pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48271: mysqld (5.5) startup fails during boot if console login is started



>Number:         48271
>Category:       pkg
>Synopsis:       mysqld (5.5) startup fails during boot if console login is 
>started
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 04 09:30:00 +0000 2013
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        NetBSD 6.1
>Organization:
Dr. Nagler & Company GmbH
>Environment:
        
        
System: NetBSD test-s0 5.1.2 NetBSD 5.1.2 (NSW-WS) #3: Fri Dec 21 15:15:43 CET 
2012 wgstuken@test-s0:/usr/src/sys/arch/amd64/compile/NSW-WS amd64
Architecture: x86_64
Machine: amd64
>Description:
        Mysql server is monitored by a shell script called mysqld_safe that wil 
try to restart the server
        if it terminates in an unexpected way.
        This scripts writes messages on stdout.
        But after the getty is started on /dev/console, stdout of this script 
has been revoked and
        any write will fail. When mysqld_safe tries to write, SIGPIPE is 
triggerd.
        SIGPIPE is not ingnored, so default action is taken that will immedialy 
kill the process.
>How-To-Repeat:
        Setup mysql 5.5 server on a NetBSD 6.1 system and boot it. The server 
will not come up during boot.
>Fix:
        There are two possible ways to fix this.

        1. ignore SIGPIPE in mysqld_safe like other signals too

        Change the line "trap '' 1 2 3 15" into "trap '' 1 2 3 13 15" in 
mysqld_safe to fix this.


        2. ignore SIGPIPE in the rc-file and do not change mysqld_safe.

        Add "trap '' 13" in front of calling mysqld_safe in function 
mysqld_start().
        I'm not shure if this must be done in a sub-shell to avoid side effects 
in the startup code or not.
        If a subshell must be used to ignore SIGPIPE, then "(" and ")" must be 
placed around the
        new trap-statement and the call of the main program in background.
        In order to keep the semantic with the last background command in the 
shell the following code
        may be used:
( trap '' 13; exec  ${command} --user=${mysqld_user} .... ) &

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index