Bug #4494 segmentation fault - mysqld process hanging
Submitted: 9 Jul 2004 23:45 Modified: 13 Jul 2004 0:23
Reporter: Ian Rubado Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.17/4.0.20 OS:Linux (linux x86)
Assigned to: CPU Architecture:Any

[9 Jul 2004 23:45] Ian Rubado
Description:
I have a very large SQL query, over 176k of text. Its a select statement getting data like and not like. When the query does not contain a syntax error it runs fine. However, if the query has an error mysql tells me it is hanging and then dies.
The following is from the .err log. 

Number of processes running now: 1
mysqld process hanging, pid 15049 - killed

STDERR reports a segmentation fault. 

How to repeat:
Same query multiple times on same machine with 4.0.17 and 4.0.20 result in the same errors. Have not tested on other machines. Would be will to provide the query and table structure.
[12 Jul 2004 23:14] Guilhem Bichot
Hi,
> Would be willing to provide the query and table structure. 
Yes, please do. You can upload a file containing the query and table structure, with name 'bug4494', at:
 ftp://ftp.mysql.com/pub/mysql/upload/
Thank you.
Guilhem
[12 Jul 2004 23:48] Ian Rubado
file containing query and table structure have been uploaded.
[13 Jul 2004 0:23] Guilhem Bichot
Hi again,
I didn't get a crash with the upcoming 4.0.21. Your query looks quite like the one of
http://bugs.mysql.com/bug.php?id=3969
(the title of that bug mentions replication, but the key is that it happened when the replication slave server IGNORED the query, which is what happens when you get a syntax error too; nothing really specific to replication). That bug is fixed in 4.0.21, I suggest you upgrade when it is released, and re-open this bug if it still crashes.
Thank you a lot for your bug report!
Guilhem
[13 Jul 2004 0:33] Ian Rubado
ok. thanks!
[1 Sep 2006 2:07] Lou Donayre
I encountered this same problem this morning.  I am running 5.0.24-standard-log on CentOS4.4 (final) with kernel 2.6.9-42.0.2.ELsmp.

I looked it up and found this old issue and am adding my comments here in case someone else finds this thread with the same problem.

After debuuging for a while I have isolated the problem to the memlock being set in my my.cnf.  I found a more recent reference to Bug #18467.

Regards,  
-Lou