This discussion is archived
5 Replies Latest reply: Feb 7, 2013 10:56 AM by bigdelboy RSS

Solaris 10 with MySQL 5.5

989449 Newbie
Currently Being Moderated
Hi,

I have posted similar question in MySQL forums, but I'm not sure if this is due to MySQL or Solaris problem.

Does anyone know why MySQL 5.5 stops suddenly in Solaris 10 when an error ocurrs in sql script.

I run mysql from command line instead as service by next command from /opt/mysql/mysql/bin/: bash mysqld_safe --datadir=/export/home/mysql/data &.
And i have setted my-innodb-heavy-4G.cnf as /etc/my.cnf config file.

Is there any system log (other tan mysql) where can i find what is happening? how can i see who sends shutdown signal to MySQL?

Thanks
  • 1. Re: Solaris 10 with MySQL 5.5
    bigdelboy Pro
    Currently Being Moderated
    Thankyou for letting us know you have posted in other forums ... this is appreciated.
    Please keep this updated so helpers o have have duplicated wasted effort.

    .....

    Well as far as I am aware he mysqld daemon should not normally crash when you run the mysql program.

    .....

    Suggest you check mysqld is running after you have launched it.

    .....

    Given the way you are running this a permissions file on a directory used by MySQL might be an issue ..... and might cause mysql logs not to be written. Check this and you mysql configuration file.

    .....

    The main solaris system log is at /var/adm/messages

    .....

    You may have of course already checked these things.
  • 2. Re: Solaris 10 with MySQL 5.5
    989449 Newbie
    Currently Being Moderated
    Thanks for advice,

    I start MySQL and works fine, no log errors, /var/adm/messages is empty too. But, I suspect that MySQL stops when any kind of error ocurrs in any operation with mysql client (for example an error executing script sql). But neither MySQL nor Solaris(logs) shows any information about what is happening and why the process ends.

    I have discarded memory issues because the system (that is virtualized) has 8 GB RAM and prstat shows MySQL "Size" 2450M.

    I don't know where i can find more information...
  • 3. Re: Solaris 10 with MySQL 5.5
    bigdelboy Pro
    Currently Being Moderated
    user11102282 wrote:
    Thanks for advice,

    I start MySQL and works fine, no log errors, /var/adm/messages is empty too. But, I suspect that MySQL stops when any kind of error ocurrs in any operation with mysql client (for example an error executing script sql). But neither MySQL nor Solaris(logs) shows any information about what is happening and why the process ends.

    I have discarded memory issues because the system (that is virtualized) has 8 GB RAM and prstat shows MySQL "Size" 2450M.

    I don't know where i can find more information...
    I am still highly suspicious of a permissions issue.


    You should look at and write down all your evidence clearly.

    You should note the data and timestamp of all mysql files, log files, look for and core dumps.

    Before you restart the mysql daemon your should be very sure it is not running.

    You should also enable mysql configuration options to do more debugging.

    Is there any commands from mysql client tool that work? Which ones to not work ?

    What does the binarylog show if anything? What files have had their timestamps updated. Check any relevant files that ha changed since the start of the run .. does it tll you anything?

    ....

    If you are still stuck you might want to run truss or dtrace on the mysqld daemon after it has started:

    See e.g. http://dev.mysql.com/tech-resources/articles/getting_started_dtrace_saha.html

    ....

    And if you have feedback from another forum please let us know
  • 4. Re: Solaris 10 with MySQL 5.5
    989449 Newbie
    Currently Being Moderated
    About permissions problem, i have tested launching MySQL as root and the problem continue.

    MySQL works fine, applications (Pentaho on tomcat) works fine for a large period, and suddenly MySQL stops.

    I have launched truss (truss -rall -wall) on MySQL pid and these are certain results. I cannot interpret this info. I have only detected the block when first shutdown ocurrs. Anybody is able to interpret this info? thanks.


    /44:     fcntl(51, F_SETFL, FWRITE|FNONBLOCK)          = 0
    /44:     access("./mib", F_OK)                    = 0
    /44:     write(51, "07\0\002\0\0\002\0\0\0", 11)          = 11
    /44:     read(51, 0x13E4F110, 4)                    Err#11 EAGAIN
    /44:     time()                              = 0
    /44:     lwp_kill(25, SIGALRM)                    = 0
    /44:     fcntl(51, F_SETFL, FWRITE)               = 0
    /44:     read(51, " j03\0\0", 4)                    = 4
    /44:     read(51, 0x13E4F110, 874)               = 874
    /44:     03 / * m y s q l - c o n n e c t o r - j a v a - 5 . 1 . 1 7
    /44:     ( R e v i s i o n : $ { b z r . r e v i s i o n - i d } )
    /44:     * / S H O W V A R I A B L E S W H E R E V a r i a b l e
    /44:     _ n a m e = ' l a n g u a g e ' O R V a r i a b l e _ n a
    /44:     m e = ' n e t _ w r i t e _ t i m e o u t ' O R V a r i
    /44:     a b l e _ n a m e = ' i n t e r a c t i v e _ t i m e o u t
    /44:     ' O R V a r i a b l e _ n a m e = ' w a i t _ t i m e o
    /44:     u t ' O R V a r i a b l e _ n a m e = ' c h a r a c t e
    /44:     r _ s e t _ c l i e n t ' O R V a r i a b l e _ n a m e =
    /44:     ' c h a r a c t e r _ s e t _ c o n n e c t i o n ' O R V
    /44:     a r i a b l e _ n a m e = ' c h a r a c t e r _ s e t ' O
    /44:     R V a r i a b l e _ n a m e = ' c h a r a c t e r _ s e t
    /44:     _ s e r v e r ' O R V a r i a b l e _ n a m e = ' t x _
    /44:     i s o l a t i o n ' O R V a r i a b l e _ n a m e = ' t
    /44:     r a n s a c t i o n _ i s o l a t i o n ' O R V a r i a b l
    /44:     e _ n a m e = ' c h a r a c t e r _ s e t _ r e s u l t s '
    /44:     O R V a r i a b l e _ n a m e = ' t i m e z o n e ' O
    /44:     R V a r i a b l e _ n a m e = ' t i m e _ z o n e ' O R
    /44:     V a r i a b l e _ n a m e = ' s y s t e m _ t i m e _ z o
    /44:     n e ' O R V a r i a b l e _ n a m e = ' l o w e r _ c a
    /44:     s e _ t a b l e _ n a m e s ' O R V a r i a b l e _ n a m e
    /44:     = ' m a x _ a l l o w e d _ p a c k e t ' O R V a r i a
    /44:     b l e _ n a m e = ' n e t _ b u f f e r _ l e n g t h ' O
    /44:     R V a r i a b l e _ n a m e = ' s q l _ m o d e ' O R
    /44:     V a r i a b l e _ n a m e = ' q u e r y _ c a c h e _ t y p
    /44:     e ' O R V a r i a b l e _ n a m e = ' q u e r y _ c a c
    /44:     h e _ s i z e ' O R V a r i a b l e _ n a m e = ' i n i
    /44:     t _ c o n n e c t '
    /44:     fcntl(51, F_SETFL, FWRITE|FNONBLOCK)          = 0
    /44:     lwp_kill(25, SIGTERM)                    = 0
    /44:     write(51, "05\0\001FE\0\002\0", 9)          = 9
    /44:     shutdown(51, SHUT_RDWR, SOV_DEFAULT)          = 0
    /44:     close(51)                         = 0
    /25:     Received signal #14, SIGALRM, in sigtimedwait() [caught]
    /25:     siginfo: SIGALRM pid=3456 uid=101 code=-1
    /25:     sigtimedwait(0xFFFFFD7FFC920DC0, 0xFFFFFD7FFC920DD0, 0x00000000) = SIGALRM
    /25:     lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
    /25:     time()                              = 0
    /25:     alarm(1360260006)                    = 8
    /25:     lwp_sigmask(SIG_SETMASK, 0x00807007, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
    /25:     mmap(0x00000000, 196608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFBCCD000
    /25:     lwp_create(0xFFFFFD7FFC920B20, LWP_DETACHED|LWP_SUSPENDED, 0xFFFFFD7FFC920B1C) = 45
    /25:     lwp_continue(45)                    = 0
    /25:     Received signal #15, SIGTERM, in sigtimedwait() [caught]
    /25:     siginfo: SIGTERM pid=3456 uid=101 code=-1
    /25:     sigtimedwait(0xFFFFFD7FFC920DC0, 0xFFFFFD7FFC920DD0, 0x00000000) = SIGTERM
    /45:     lwp_create()     (returning as new lwp ...)     = 0
    /45:     setustack(0xFFFFFD7FFBF05AA8)
    /45:     schedctl()                         = 0xFFFFFD7FFF3F82B0
    /45:     time()                              = 0
    /45:     write(2, " 7 0 0 1", 4)                    = 4
    /45:     write(2, " 0", 1)                    = 1
    /45:     write(2, " 1 1", 4)                    = 4
    /45:     write(2, " :", 1)                    = 1
    /45:     write(2, " 0 0 : 0", 4)                    = 4
    /45:     write(2, " 0", 1)                    = 1
    /45:     write(2, " [", 2)                    = 2
    /45:     write(2, " N o t e", 4)                    = 4
    /45:     write(2, " ] ", 2)                    = 2
    /45:     write(2, 0xFFFFFD7FFBCFCA10, 45)          = 45
    /45:     / o p t / m y s q l / m y s q l / b i n / m y s q l d : N o r
    /45:     m a l s h u t d o w n\n
    /45:     write(2, "\n", 1)                    = 1
    /43:     lwp_park(0x00000000, 0)                    = 0
    /43:     lwp_unpark(45)                         = 0
    /43:     lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
    /43:     lwp_exit()
    /45:     lwp_park(0x00000000, 43)               = 0
    /42:     lwp_park(0x00000000, 0)                    = 0
    /42:     lwp_unpark(45)                         = 0
    /42:     lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
    /42:     lwp_exit()
    /45:     lwp_park(0x00000000, 42)               = 0
    /44:     lwp_park(0x00000000, 0)                    = 0
    /44:     lwp_unpark(45)                         = 0
    /44:     lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
    /44:     lwp_exit()
    /45:     lwp_park(0x00000000, 44)               = 0
    /41:     lwp_park(0x00000000, 0)                    = 0
    /41:     lwp_unpark(45)                         = 0
    /41:     lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF [0x0000FFFF]
    /41:     lwp_exit()
    /45:     lwp_park(0x00000000, 41)               = 0
    /45:     lwp_kill(1, SIGUSR1)                    = 0
    /1:     Received signal #16, SIGUSR1, in pollsys() [caught]
    /1:     siginfo: SIGUSR1 pid=3456 uid=101 code=-1
  • 5. Re: Solaris 10 with MySQL 5.5
    bigdelboy Pro
    Currently Being Moderated
    I assure you I am pretty rubbish at this interpretation.

    And I get nervous when people start running things as root as ll sorts of permissions issue may follow.

    25: Received signal #15, SIGTERM, in sigtimedwait() [caught]
    /25: siginfo: SIGTERM pid=3456 uid=101 code=-1
    /25: sigtimedwait(0xFFFFFD7FFC920DC0, 0xFFFFFD7FFC920DD0, 0x00000000) = SIGTERM

    I assume from this the process with PID 3456 issued the shutdown signal; running as user with uid 101:

    ....

    Perhaps not clear from your first post evidently the mysql database is able to start up and run for some time.

    Only after a while does it crash.

    I would now postulate the rather than:
    - That mysqld crashes because of and sql error
    You consider:
    - The mysqld has a problem and a symptom of the root cause is sql error(s) from clients.

    Some form of leak is a possiblity. Also keep a eye at the number of lightweight processes at the bottom of prstat that it is not increasing steadily ...


    .... You should also check: http://dev.mysql.com/doc/refman/5.5/en//error-log.html to ensure your error log configured / performing correctly. I realise you probably already have.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points