Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 74943

Summary: mysqld segfaults on remote connections
Product: [Retired] Red Hat Linux Reporter: Prasad Ullal <prasad.ullal>
Component: mysqlAssignee: Patrick Macdonald <patrickm>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: high    
Version: 8.0CC: aguszainal, andreas, apicton, bgwhite, bug-lists, chris.ricker, cola, dag, elliotp, herrold, joe.christy, landas, max, mesiah, navin, pacman128, pd, ramses, rgreimel, rhbz, stk, tedndiann, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-11-29 02:38:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Prasad Ullal 2002-10-02 22:59:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 

Description of problem:
When remote connections are attempted to the mysql server (version 3.23.52) it 
segfaults and is restarted by safe_mysqld. On the remote side the client 
complains of 'Lost connection during query'.

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

How reproducible:

Steps to Reproduce:
1.Start the server: /etc/init.d/mysqld start
2.Create an account for remote access
3.From the remote machine try to connect to the server.

Actual Results:  The server dies and is restarted by safe_mysqld. At any given 
time only one instance of mysqld remains running.

Expected Results:  A normal connection.

Additional info:

Comment 1 Need Real Name 2002-10-03 13:33:36 UTC
I've the SAME problem.
MySQL work with replication and local socket connections, but if i connect from a remote
host i get the same error.

davidegiunchi (at)

Comment 2 Andreas Thienemann 2002-10-06 13:20:03 UTC
Verified here.

Same problem on a box running the null beta...

Comment 3 Andreas Thienemann 2002-10-06 16:58:20 UTC
An strace of the mysqld process shows that it is segfaulting after setting some

fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0  
accept(3, {sin_family=AF_INET, sin_port=htons(45766),
sin_addr=inet_addr("")}}, [16]) = 7  
fcntl64(3, F_SETFL, O_RDWR)             = 0  
getsockname(7, {sin_family=AF_INET, sin_port=htons(3306),
sin_addr=inet_addr("")}}, [16]) = 0  
fcntl64(7, F_GETFL)                     = 0x2 (flags O_RDWR)  
fcntl64(7, F_SETFL, O_RDWR|O_NONBLOCK)  = 0  
setsockopt(7, SOL_IP, IP_TOS, [8], 4)   = 0  
setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0  
time(NULL)                              = 1033923183  
write(6, "\200\300\2@\0\0\0\0\340\2547\0100\377\16\10\220o>\10\5"..., 148) = 148  
rt_sigsuspend([HUP QUIT PIPE TERM TSTP] <unfinished ...>  
--- SIGRTMIN (Real-time signal 0) ---  
<... rt_sigsuspend resumed> )           = -1 EINTR (Interrupted system call)  
sigreturn()                             = ? (mask now [HUP QUIT PIPE TERM TSTP
select(5, [3 4], NULL, NULL, NULL)      = ? ERESTARTNOHAND (To be restarted)  
--- SIGSEGV (Segmentation fault) ---

Comment 4 David Martos 2002-10-07 21:34:51 UTC
I have the same problem connecting from a remote server.

Comment 5 Robert Greimel 2002-10-08 08:54:28 UTC
Same here. Worked fine under 7.x but after upgrade to 8.0 remote connections to
mysqld crash the daemon with a segfault. Downgrading mysqld to the version used
in 7.3 did NOT help and the same problem was observed with remote connections.

Comment 6 Andreas Thienemann 2002-10-08 11:14:16 UTC
mysqld does work when started with the parameter --skip-name-resolve or 
the "skip-name-resolv" entry is added to the mysqld part of /etc/my.cnf.

Thus I'd assume the problem is in the shared resolver libs, as it makes no 
difference if a known good mysqld from RH 7.3 is installed.

Problem with the above mentioned workaround is that the GRANT tables in mysqld 
only work with IPs and not with hostnames anymore. Thus users have to be 
allowed access with numerical IPs.

Comment 7 Prasad Ullal 2002-10-09 05:45:50 UTC
Thought I'd change the priority to high: MySQL is still popular with many 
admins but RedHat has seems to have given it a back seat (PostGRE gets 
installed if you select the default 'SQL server' in the installer).

Anyhow, this is apparently a glibc problem... something to do with the resolver 
function. It seems downgrading to the version prior to the glibc-2.2.5-
40 'fixes' the issue. Checkout the bug #75297.

Comment 8 StK 2002-10-09 09:00:46 UTC
Connecting though a ssl-tunnel is possible!

Comment 9 Datadink 2002-10-12 01:07:47 UTC
Same problem here.  Stock RedHat 8.0 install done from scratch.  Besides the 
2013 - Lost connection to MySQLserver during query error., I am also getting 
SQL syntax errors on pages that used to work under RedHat 7.3 (You have an 
error in your SQL syntax near '' at line 1).  I have heard that it may be a 
query error but these same pages worked fine in the previous version.  Any help 
would be appreciated.

Comment 10 Paulo Barreto 2002-10-17 21:21:57 UTC
...andreas was correct about the --skip-name-resolve parameter, and that give 
me an idea...

...I solved the problem adding the ip and hostname of the remote machine 
to /etc/hosts where mysqld is running.

This is strange because DNS resolution is working fine in both server and 
client computers. 

Comment 11 Andreas Thienemann 2002-10-18 10:43:47 UTC
Yes, adding the host to /etc/hosts is another possible workaround. But this does
not work well if you get updates from dynamic hosts.

Also, AFAIK, the lookup of host from the hosttable is different than doing the
same lookup via reverse DNS. This is also the reason why localhost connections
work, as localhost is usually defined in /etc/hosts.

To RedHat: Could we please get a bit of feedback about this? Status is still NEW
and we have seen several people commenting about this 2 week old BugReport.
Additionally I heard about several people who have this problem on their
productive servers now, which is a bad thing [tm].

Comment 12 Lars Andre Landas 2002-10-18 11:37:33 UTC
This problem is even bigger on RedHat 7.3 with the latest glibc installed. The
problem don't show up before you restart the mysql-server. This problem can be
hard to track down, if you don't restart the mysql deamon several weeks after
you updatet your system.

Another concern:
Shouldn't it be safe to run up2date?

Comment 13 Bryan White 2002-10-18 17:44:49 UTC
For what it's worth...
Updating glibc and nscd to a version from rawhide solved the problem on my
boxes.  Version from rawhide that I got was 2.3-2. 

Comment 14 Andreas Thienemann 2002-10-18 21:27:22 UTC
confirmed here.


Comment 15 Need Real Name 2002-10-26 06:19:52 UTC
I have recently installed 2 machines with RedHat 8.0 - stock install. On the 
one machine, connecting remotely worked fine. However, on the 2nd machine, I 
can't get it to work, and have resorted to using skip-name-resolve instead.

I have checked the versions of glibc and they are the same on both machines. 
The only difference I can think of at the moment is hardware and drivers - one 
is a P4, the other a P3. The P4 has onboard lan, the P3 has a cheap accton card.

Comment 16 Prasad Ullal 2002-10-30 16:42:33 UTC
Here's another my.cnf fix that seems to work (under [mysqld]):



Comment 17 Florus Both 2002-11-11 13:47:20 UTC
I did the last suggested additions to my.cnf and that solved this problem for 


Comment 18 Need Real Name 2002-11-11 20:27:58 UTC
i'm still having the same problem with remote connection

mysqld log
021111 11:34:03  /usr/libexec/mysqld: Normal shutdown

021111 11:34:03  InnoDB: Starting shutdown...
A mysqld process already exists at  Mon Nov 11 11:34:04 PST 2002
021111 11:34:05  InnoDB: Shutdown completed
021111 11:34:05  /usr/libexec/mysqld: Shutdown Complete

021111 11:34:05  mysqld ended




Comment 19 Joern 2002-11-14 09:22:17 UTC
Hi there,

I don't know, if the problem I have has the same reason. I installed redhat 
8.0 on a P4 Machine (Dell Inspiron Notebook) with PHP and MYSQL. I also put 
phpmyadmin on the machine. Calling PHPINFO(); does not show any MySQL support 
and starting phpmyadmin over the localhost shows errors (Cannot load MySQL 
extension). After looking in the usr/lib/php4, there's no located.

Any idea or suggestions ? I'm a linux newbie and its hard for me to find any 
help on this....

Comment 20 Chris Ricker 2002-11-14 14:27:00 UTC, you have a different problem.  RH comes with MySQL support
for PHP, but it's not installed by default.  Install the php-mysql-4.2.2-8.0.5
rpm on your system (it's on one of your CDs), restart apache, and you should be
all set.

Comment 21 aguszainal 2002-11-29 02:38:12 UTC
yeap....i had the same problem with both my redhat 8.0 machines...hopefully a 
bugfix will come asap sinces one of them is the production server.

Comment 22 Joe Orton 2002-12-12 12:27:25 UTC

*** This bug has been marked as a duplicate of 77467 ***

Comment 23 boyet 2003-01-24 21:23:14 UTC
*** Bug 82582 has been marked as a duplicate of this bug. ***