Bug 17899 - mysql daemon is not starting
mysql daemon is not starting
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mysql (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Patrick Macdonald
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-09-26 19:00 EDT by Adrian Reber
Modified: 2007-04-18 12:28 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-29 22:34:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adrian Reber 2000-09-26 19:00:55 EDT
The script  /usr/bin/safe_mysqld which starts the mysql daemon has on my
computer a bug...

the script uses:

NOHUP_NICENESS=`nohup nice`

to get the NOHUP_NICENESS.

the return value for me is "-5".

in the following nice is executed like this:

nice --$NOHUP_NICENESS nohup

which results in 3 dashes (---) and creates an error in the mysql log
 like

000927 00:50:54  mysqld started
nice: unrecognized option `---5'
Try `nice --help' for more information.
000927 00:50:54  mysqld ended.

I changed it from

nice --$NOHUP_NICENESS nohup

to

nice -$NOHUP_NICENESS nohup

and it works now for me.
Comment 1 Trond Eivind Glomsrxd 2000-09-26 19:10:34 EDT
There is a known bug in mysql as shipped with 7.0 - this was released as an
errata today. Tried that? (3.23.24-1)
Comment 2 Adrian Reber 2000-09-26 19:37:25 EDT
I installed the errata but the error still exists.
i had to do the same changes to /usr/bin/safe_mysqld, as i have done to the
original mysql version shipping with 7.0
Comment 3 Trond Eivind Glomsrxd 2000-10-01 11:30:44 EDT
It works fine here, and has been tested with PHP etc. by QA.... how do you start
it?
Comment 4 Adrian Reber 2000-10-02 18:46:29 EDT
/etc/rc.d/init.d/mysqld start
But the problem could be anywhere else, because the update to 7.0 was done by
hand. Maybe I forgot to update a tool which is used in the startup script. The
database is running. I just had to change to startup script.
Comment 5 Trond Eivind Glomsrxd 2000-10-02 22:18:37 EDT
OK, I'll close it as a configuration issue... this works on the computers I've
tested.
Comment 6 Morgan Christiansson 2000-10-22 22:37:50 EDT
This is not a configuration error, i got this too.

This is a bug in the safe_mysqld script, check it out yourself.


nice expects a value between 19 and -20, bug safe_mysqld prepends a - to
the nice value.

So if $NOHUP_NICENESS is -5 it tries to set nice to --5 which confuses
nice.


I use mysql-server 3.23.24-1, directly installed from the redhat update
agent, no previous versions installed, i didn't have the energy to look
for the RedHat CD's. :)
Comment 7 Trond Eivind Glomsrxd 2000-10-23 10:24:06 EDT
OK, I can see there's a problem if you have negative niceness. Removing one of
the dashes just makes "-5" act like "5". Negative niceness is rarely used, and
only by root specifying it.... how did you get that value?
Comment 8 Morgan Christiansson 2000-10-23 11:52:03 EDT
for some reason, it happens like this, have no idea why.. there is no nice stuff
in /etc/rc.d/init.d/* or /usr/bin/safe_mysqld

i grepped both directories/files for both 'nice' and '-5'

[root@localhost /root]# nice
0

[root@localhost /root]# test=`nohup nice`
[root@localhost /root]# echo $test
-5
Comment 9 Trond Eivind Glomsrxd 2000-10-23 11:58:29 EDT
On my machine:

[root@hoser /root]# test=`nohup nice`
[root@hoser /root]# echo $test
5
[root@hoser /root]#

I'm very curious how you get it - it's usually not used, but root can set
processes to it.
Comment 10 Morgan Christiansson 2000-10-23 12:08:39 EDT
this seems to be the source of the problem:

[root@localhost /root]# nice -5 nice
-5

[root@localhost /root]# nice --5 nice
5

perhaps safe_mysqld is not the only program making positive niceness negative?
:)
Comment 11 Trond Eivind Glomsrxd 2000-10-29 22:33:44 EST
I did some changes to the package in the current tree, and an upcoming errata
for another issue (buggy aliasing code in mysql) will include this - basically
check that no niceness value is below 0.
Comment 12 Bill Nottingham 2006-06-29 01:01:25 EDT
*** Bug 196649 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.