Bug #3069 | SELECT segfaults server on linux | ||
---|---|---|---|
Submitted: | 4 Mar 2004 18:59 | Modified: | 5 Mar 2004 9:49 |
Reporter: | Erasmus Oblar | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S2 (Serious) |
Version: | 4.0.18 | OS: | Linux (Redhat 8.0) |
Assigned to: | Dean Ellis | CPU Architecture: | Any |
[4 Mar 2004 18:59]
Erasmus Oblar
[4 Mar 2004 19:00]
Erasmus Oblar
pipe into mysql to create test tables
Attachment: crashdb (application/octet-stream, text), 1.11 KiB.
[4 Mar 2004 19:01]
Erasmus Oblar
query that will eventually crash the server
Attachment: query (application/octet-stream, text), 217 bytes.
[5 Mar 2004 8:04]
Erasmus Oblar
Since it's short, I'll append the table creates and query that crash the server: -- MySQL dump 9.10 -- -- Host: localhost Database: crash -- ------------------------------------------------------ -- Server version 4.0.18-standard-log DROP TABLE IF EXISTS Event; CREATE TABLE Event ( ID bigint(20) NOT NULL auto_increment, attraction bigint(20) NOT NULL default '-1', business bigint(20) NOT NULL default '-1', attractionListing bigint(20) NOT NULL default '-1', feed bigint(20) NOT NULL default '-1', PRIMARY KEY (ID), KEY attraction (attraction), KEY business (business), KEY attractionListing (attractionListing), KEY feed (feed) ) TYPE=MyISAM; INSERT INTO Event VALUES (1,1,1,1,1); DROP TABLE IF EXISTS Listing; CREATE TABLE Listing ( ID bigint(20) NOT NULL auto_increment, business bigint(20) NOT NULL default '-1', feed bigint(20) NOT NULL default '-1', feedId varchar(255) NOT NULL default '', hashKey bigint(20) NOT NULL default '-1', PRIMARY KEY (ID), KEY business (business), KEY feed (feed), KEY feedID (feedId), KEY hashKey (hashKey) ) TYPE=MyISAM; INSERT INTO Listing VALUES (1,1,1,'11111',73732500); INSERT INTO Listing VALUES (2,2,1,'22222',73732500); Now, just run this query in a loop and MySQL should eventualy hang or segfault. SELECT DISTINCT e.ID, e.attraction, e.business, e.attractionListing, e.feed FROM Event e, Listing li WHERE li.feed=1 AND e.feed=1 AND e.business=li.business ORDER BY li.hashKey;
[5 Mar 2004 9:49]
Dean Ellis
I cannot repeat this with 4.0.19, nor with our 4.0.18 binary. Copy your stack trace to some file, and resolve the stack dump (using the mysqld.sym file included in the distribution): resolve_stack_dump -s/path/to/mysqld.sym -n/path/to/stackdump
[5 Mar 2004 11:12]
Erasmus Oblar
here's the dump: 0x8071f44 handle_segfault + 420 0x82a0e38 pthread_sighandler + 184 0x82bdac9 chunk_free + 297 0x82bd963 free + 147 0x8279bd6 my_no_flags_free + 22 0x806ca56 net_end + 22 0x806b079 _._3THD + 73 0x8071b70 end_thread__FP3THDb + 64 0x807b1b2 handle_one_connection + 946 0x829e5ec pthread_start_thread + 220 0x82c7dea thread_start + 4 some sort of threading issue?