Bug 75128 - MySQL hangs/crashes after glibc upgrade
MySQL hangs/crashes after glibc upgrade
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
: 75297 75379 75507 75616 75684 76082 76111 76242 76565 76631 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2002-10-04 14:10 EDT by Mike Bartling
Modified: 2014-01-21 17:48 EST (History)
48 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-11-06 19:57:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike Bartling 2002-10-04 14:10:45 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606

Description of problem:
When connecting to a MySQL server remotely after the latest glibc upgrade, MySQL
hangs and crashes as follows;

021004 18:36:02  mysqld started
/usr/local/mysql/libexec/mysqld: ready for connections

Number of processes running now: 1
mysqld process hanging, pid 31607 - killed
021004 18:36:30  mysqld restarted

This does not affect local connections, but only remote connections.
This has also been replicated on RedHat 7.3. This problem is seen with the
RedHat MySQL RPM's as well as other versions of MySQL (custom RPM's). It seems
to die before it even checks the tables.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Install redhat 7.1 / 7.3
2.Install glibc (.40) update
3.Install MySQL
4.Connect to MySQL from a remote machine (or locally to the IP, not to

Actual Results:  MySQL hung then crashed, resulting in the following in the err log;

021004 18:36:02  mysqld started
/usr/local/mysql/libexec/mysqld: ready for connections

Number of processes running now: 1
mysqld process hanging, pid 31607 - killed
021004 18:36:30  mysqld restarted
/usr/local/mysql/libexec/mysqld: ready for connections

Expected Results:  MySQL should have allowed / disallowed connections based on
the table contents, however it never got as far as to check tables

Additional info:

This has been replicated on several Intel based servers running a variety of
redhat 7.1 and 7.3. The problem only occured after installing glibc. Recompiling
MySQL didn't cure the problem.
Comment 1 Mike Bartling 2002-10-04 14:17:44 EDT
downgrading glibc to 2.2.5-39 fixed the problem
Comment 2 Mike Bird 2002-10-04 15:12:54 EDT
Also replicated in RH7.2
Comment 3 Seth Vidal 2002-10-05 16:27:44 EDT
I get a slight change when I rebuilt mysql under glibc 2.2.5-40 on rhl 7.3. The
error changes to error 2013 - but the mysqld does not die.

Could it in be related to this:


Comment 4 Seth Vidal 2002-10-05 16:57:57 EDT
might be worth checking the mit-pthreads includes in mysql - looks like they
define and work with the nameres maxpacket size in there and it might be a test
they are doing based on it being 1024 not 65536 which the glibc -40 patches
redefine it to be. so that might be why its dying unhappily.

Comment 5 Jakub Jelinek 2002-10-05 18:38:49 EDT
The problem is actually that MySQL uses insanely low RLIMIT_STACK and does
gethostbyname from such threads. There are many other places in glibc which
use alloca for 32K etc., so it is weird MySQL did not get caught by this
far earlier. A patch to deal with low RLIMIT_STACK while not slowing programs
down in the normal case is in the works.
Comment 6 Jacco Ligthart 2002-10-08 12:06:56 EDT
This is also reproducable with RH 7.1 on an alpha ev56.
The same alpha also gave a haltcode 07 which may be unrelated.
Comment 7 Need Real Name 2002-10-08 20:25:36 EDT
Another extremely kludgey and temporary workaround: adding IP/hostnames to
/etc/hosts for any host which will be connecting to MySQL also keeps it from
crashing. Of course, there's an easy DoS attack possible by simply attempting to
connect to MySQL's port from a host that is not in /etc/hosts, but it does
ameliorate the problem slightly until you can recompile.
Comment 8 Need Real Name 2002-10-08 21:19:39 EDT
Another workaround that appears to more or less work so far: put "set-variable =
thread_stack=1M" into /etc/my.cnf under [mysqld] if this won't make resources
get out of hand on your server(s). Actually 256K instead of 1M seems to work as
well. YMMV.
Comment 9 Trevor Cordes 2002-10-09 06:41:35 EDT
Neither workaround works on my system (RH7.3).  I run local DNS off the same box
and it appears to override any setting I make in /etc/hosts.  The thread_stack
option did nothing.

I guess I'll have to await an errata release :-(
Comment 10 Need Real Name 2002-10-09 11:11:08 EDT
The thread_stack fixed worked perfect for me.  However I had to set it during start up for mysql to 
get it to work.  

safe_mysqld --set-variable thread_stack=256k&
Comment 11 Jakub Jelinek 2002-10-10 16:24:45 EDT
*** Bug 75616 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Jelinek 2002-10-10 16:26:43 EDT
I've put fixed rpms (i386/i686/SRPMS for 7.x only) to people.redhat.com/jakub/glibc/errata/
Those packages have not been through QA yet, though in the initial testing
seems to cure the problem.
If you have any problems with them please let me know ASAP.
Comment 13 Joe Christy 2002-10-10 20:01:52 EDT
I certainly can't find the putative fixed RPMs at /jakub/glibc/errata/, which
appears to be empty (permissions?).

It would sure be great if this got fixed - not only has this bug hosed the snort
setup on my network, compromising my network security, but many other people
have MySQL problems which are essentially identical to this bug, cf. bugs 74943,
75290, and 75297.
Comment 14 Seth Vidal 2002-10-10 20:12:20 EDT
did you go to ftp://people.redhat.com/jakup/glibc/errata/

I found them there.

also - you can always roll the glibc update back out.

Comment 15 Jakub Jelinek 2002-10-11 02:56:52 EDT
*** Bug 75684 has been marked as a duplicate of this bug. ***
Comment 16 Milan Kerslager 2002-10-11 03:23:05 EDT
ftp://people.redhat.com/jakub/glibc/errata/ works well [b not p]
Comment 17 Jakub Jelinek 2002-10-11 04:02:36 EDT
*** Bug 75507 has been marked as a duplicate of this bug. ***
Comment 18 Daniel Senie 2002-10-14 22:11:54 EDT
{aside: display of this bug points out a bug in Bugzilla, not handling wide 
display stuff well).

This fix is desperately needed. Problem with up2date is that it's easy to use 
to apply "approved" fixes, but when handling a large number of machines it's 
quite painful to do updates from "pre-release" patches.

We've got MySQL daemons crashing all over the place due to this, on RH7.0 and 
RH7.2 machines.

We did find adding the host names in question to /etc/hosts works around the 
problem, as it avoids the "fixed" versions of the resolver routines.
Comment 19 Daniel Senie 2002-10-14 22:17:07 EDT
If someone could provide details of which version WAS in play just before this 
one (i.e. there've been several updates to glibc, and I really don't know 
which one was previously installed) that'd be a help.

Are the preceeding RPMs kept somewhere on systems? Seems like a rollback 
mechanism is proving to be necessary. Much as I dislike working with Microsoft 
stuff, I note that in XP they've added some facilities to roll back driver 
updates and such in the event a new version causes things to break. Guess it's 
time for the Linux folks to consider the same.

Until the fix for the present version of glibc has cleared QA, I think I'd 
like to go ahead and roll back. Any pointers to doing this for RH7.0 and RH7.2 
would be greatly appreciated.

Comment 20 Milan Kerslager 2002-10-15 03:38:09 EDT
Wide format of this page is caused by long CC: field. Too many people would like
to know final solution.

Backing up old packages is provided by up2date in RH 8.0 (AFAIK). As there is
update for up2date for 7.x releases, this could be posiible to have this
improvements handy now. But I did not find appropriate switches for command line
inside man page and thus don't know if I'm right.
Comment 21 Tom Wood 2002-10-15 22:38:02 EDT
glibc -42 WORKSFORME on 7.3.  Now, RH really needs to push these through testing
and get them out for 7.x and 8.0 ASAP.
Comment 22 Nic Doye 2002-10-16 13:10:39 EDT
Another "ME TOO" style response. (RHL 7.3 smp i686 box).

glibc 2.2.5-40 is fooed, but .39 and Jakub's .42 are fine. I'll stay with .42.

Many thanks.

Comment 23 Jakub Jelinek 2002-10-18 16:20:23 EDT
*** Bug 76111 has been marked as a duplicate of this bug. ***
Comment 24 Jakub Jelinek 2002-10-18 16:21:34 EDT
*** Bug 76242 has been marked as a duplicate of this bug. ***
Comment 25 Jakub Jelinek 2002-10-18 16:45:42 EDT
*** Bug 75379 has been marked as a duplicate of this bug. ***
Comment 26 Jakub Jelinek 2002-10-18 16:47:12 EDT
*** Bug 76082 has been marked as a duplicate of this bug. ***
Comment 27 Jakub Jelinek 2002-10-23 10:42:46 EDT
*** Bug 76565 has been marked as a duplicate of this bug. ***
Comment 28 Milan Kerslager 2002-10-23 12:18:44 EDT

I had to restart whole server to be able to login via ssh and sendmail stopped
receiving mails too. All programs which using glibc should be stopped and
started again to use new liraries.
Comment 29 Need Real Name 2002-10-23 17:01:49 EDT
Note: This same Bug affects Red Hat Linux 6.2 as well.

There are currently no 6.2 glibc packages available.
The suggested set-variable=thread_stack=256k does not work around it. I will try
setting it during startup next.

If packages for 6.2 can be respun as well, that would be most helpfull.

Note that rsync is also affected by this issue:
Works: rsync -r --compress nmg@eva.host.nl::wtvinvoer/cmp /var/directory

Fails: rsync --compress nmg@eva.host.nl::wtvinvoer/cmp/* /var/directory/cmp/
With a Connection reset by peer message. This was something that also was
affected by the glibc upgraded. This was between 2 7.3 machines.
Comment 30 Daniel Senie 2002-10-31 23:31:53 EST
Been 8 days since the last update to this bug (and that was only to add more 
people to the massive CC list). Two weeks since it was reported test versions 
worked properly. I guess we were all hoping RedHat would place some priority 
on getting a fix to a busted errata into RHN in short order, but that appears 
to not be the case.

We are using /etc/hosts entries to work around the bad code (assumes your 
nsswitch.com is checked before DNS). With a large number of systems now 
running the bad version of glibc, it would take many hours to apply new RPMs 
by hand. Since it appeared weeks ago that fixed versions were entering QA, we 
held off, assuming RHN would have updates shortly.

It would be helpful if this bug were updated by the folks working on fixing 
and/or testing the fix.
Comment 31 Trevor Cordes 2002-11-01 00:53:02 EST
Hear hear.  It seems only security issues get immediate erratas.  Most other 
bugs go un-errata'd.  Even, now it seems, super popular bugs like this one 
that is probably affecting thousands of sites!

The rpm and rhn system are wonderful, but do have their drawbacks... namely 
time delays.
Comment 32 Need Real Name 2002-11-05 15:38:30 EST
Jakub's .42 version has worked great on our test systems. Unfortunately, we're
prohibited by company security policies from installing test fixes on production
machines, unless there's an immediate visible danger to leaving off the test fix.

If RedHat can get this through QA testing and approved it would be a tremendous
help to us. I wouldn't suggest rushing it, but an update here and a little more
expeditious effort on completing their QA testing would be a very good thing.

Since the original errata that caused this was a security update, I hope we can
get this issue moving with the same sense of urgency.
Comment 33 Bill Nottingham 2002-11-06 19:57:57 EST
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

Comment 34 Neil Sedley 2002-11-07 03:14:57 EST
*** Bug 76631 has been marked as a duplicate of this bug. ***
Comment 35 Tom Morgan 2002-11-15 11:13:15 EST
I am having this issue with redhat 8.0 and MySql.
I can telnet localhost 3306 or mysql with no issue.
I get immediately disconnect if I telnet valid ip address 3306 or mysql with -h 
Valid Ip address.
I have run up2date and am current.

Is this the same issue?

Tom Morgan
Comment 36 Tom Morgan 2002-11-19 09:26:20 EST
I have not seen an update or comment on whether this is being addressed for red 
hat 8.0.  What is the status?
If I added the remote clients to /etc/hosts on the MySql box they were able to 

Tom Morgan
Comment 37 Mike Bird 2002-12-04 08:25:47 EST
Upgrading from 7.3 to 8.0 brings the bug back.  Any chance of updates for
glibc-2.2.93-5, since 8.0 contains many packages which won't work with

Please re-OPEN
Comment 38 Daniel Senie 2002-12-04 08:52:45 EST
I opened bug 78990 to track the issue for RedHat 8.0. That way we at least 
have an OPEN bug to refer to. RedHat folks: feel free to re-open 75128 and 
close 78990 if you agree to fix the issue.
Comment 39 Joe Orton 2002-12-12 07:19:33 EST
This issue is being tracked as bug 77467 for 8.0.
Comment 40 Gustavo 2003-01-11 14:26:00 EST
This bug reappeared after the upgrading mysql from version 3.23.54a (rpm
provided by mysq.com) to version 4.0.8-gamma (binary provided by mysql.com as well).

Using redhat 7.1 glibc 2.2.4-31.

Mysql 4.0.8 stopped crashing when I added --skip-name-resolve in the mysql

This server has glibc 2.2.4-31 installed for quite a while, and mysql 3.23.54a
was working just fine with it.
Comment 41 Gustavo 2003-01-23 12:42:38 EST
It was actually a bug in mysql 4.0.8.
Upgrading to version 4.0.9 fix the problem
Comment 42 Ken A. 2003-01-30 14:51:39 EST
using redhat 8.0 with latest redhat supplied version of mysql and all updates 
as of 01-30-2003, this problem still exists, 
but 2 workarounds exist: 
add: set-variable = thread_stack=256K 
to /etc/my.cnf [mysql] section
- make sure sure /etc/rc.d/init.d/mysqld contains:
 "/usr/bin/safe_mysqld --defaults-file=/etc/my.cnf"


add ips and hostnames of connecting hosts to /etc/hosts.
Comment 43 Edinelson Keiji Shimokawa 2003-02-18 10:58:51 EST
Try this at mysql prompt:

mysql> USE mysql;
mysql> GRANT ALL ON *.* TO root@"%" IDENTIFIED BY 'yourpassword';

This worked for me.

Edinelson Keiji Shimokawa.
Comment 44 Patrick Macdonald 2003-03-12 15:36:17 EST
*** Bug 75297 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.