[Bug 675185] Re: [Hardy SRU] dash bug causes mysqld_safe to spin at 100% CPU
Raghavendra D Prabhu
raghavendra.prabhu at percona.com
Thu Sep 20 01:07:42 UTC 2012
I tested the testcase in the commit on Precise and there seem to no issue there
(probably fixed there).
Also, it is not the right approach to change #!/bin/sh to #!/bin/bash since
former invokes POSIX compatibility mode and if dash has problems on any
platform, then that should be fixed rather than changing it in mysqld_safe or
#!/bin/sh needs to pointed elsewhere (or with update-alternatives).
Regarding the init scripts, I see that Percona Server is not packaged with
upstart script (hence vulnerable to this if on a platform with a buggy dash) as
mysql-server-55 does. I will open a separate issue to add that.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/675185
Title:
[Hardy SRU] dash bug causes mysqld_safe to spin at 100% CPU
Status in Maria:
Fix Released
Status in Percona Server with XtraDB:
New
Status in Percona Server 5.1 series:
New
Status in Percona Server 5.5 series:
New
Status in “dash” package in Ubuntu:
New
Status in “mysql-5.1” package in Ubuntu:
Confirmed
Bug description:
Symptoms are: After mysql server upgrades + restarts the old mysqld_safe keeps running and consumes 100% cpu, strace shows:
wait4(4294967295, 0x7fffb3b3d59c, 0, NULL) = -1 ECHILD (No child ...
wait4(4294967295, 0x7fffb3b3d59c, 0, NULL) = -1 ECHILD (No child ...
wait4(4294967295, 0x7fffb3b3d59c, 0, NULL) = -1 ECHILD (No child ...
For more info see the dupes, particularily bug 105457. Does not happen always, for reliable test case see below.
This is a bug (race condition) in dash, partly fixed by
http://git.kernel.org/?p=utils/dash/dash.git;a=commit;h=3800d4934391b144fd261a7957aea72ced7d47ea
. This fixes the test case and mysqld_safe, but introduces another
regression: http://eeek.borgchat.net/lists/dash/msg00268.html (patch
for that in the thread)
TEST CASE: Script in the commit message (link above). Allows to
reproduce this always, even on Karmic still.
SRU JUSTIFICATION: Obviously safe patch.
PATCH: Attached, run mysqld_safe in bash instead of dash.
REGRESSION POTENTIAL: Minimal. 1) Bash is a superset of dash. 2)
Before dash became the default sh, bash was used, we just revert that
change.
NOTES: mysqld_safe was replaced by an upstart job in Lucid. But Hardy
has support for 3 more years, justifiying a fix.
To manage notifications about this bug go to:
https://bugs.launchpad.net/maria/+bug/675185/+subscriptions
More information about the foundations-bugs
mailing list