Bug #7532 Server crashes and hangs on mysql-test-run --valgrind run
Submitted: 24 Dec 2004 21:05 Modified: 6 Jan 2005 15:30
Reporter: Sergey Petrunya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0-bk OS:Linux (linux)
Assigned to: Michael Widenius CPU Architecture:Any

[24 Dec 2004 21:05] Sergey Petrunya
Description:
mysql-test-run --valgrind fails (and was failing for some time, can't provide exact moment when  this started) on current 5.0 tree compiled with  compile-pentium-valgrind-max
The failures are:

...
index_merge                    [ fail ]

Errors are (from /home/psergey/mysql-5.0/mysql-test/var/log/mysqltest-time) :
/home/psergey/mysql-5.0/client/.libs/mysqltest: At line 164: query 'insert into t2 select * from t0' failed: 2013: Lost connection to MySQL server during query
(the last lines may be the most important ones)

Ending Tests
Shutting-down MySQL daemon

master not cooperating with mysqladmin, will try manual kill
./mysql-test-run: kill: (30630) - No such pid
master refused to die. Sending SIGKILL
./mysql-test-run: kill: (30630) - No such pid
Master shutdown finished
Slave shutdown finished
index_merge_bdb                [ skipped ]

lowercase_table_qcache         [ pass ]   
master not cooperating with mysqladmin, will try manual kill
master refused to die. Sending SIGKILL
lowercase_view                 [ pass ]   
merge                          [ pass ]   
metadata                       [ pass ]   
mix_innodb_myisam_binlog       [ pass ]   
multi_statement                [ pass ]   

multi_update                   [ fail ]

Errors are (from /home/psergey/mysql-5.0/mysql-test/var/log/mysqltest-time) :
/home/psergey/mysql-5.0/client/.libs/mysqltest: At line 465: query 'insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9')' failed: 2013: Lost connection to MySQL server during query
(the last lines may be the most important ones)

Ending Tests
Shutting-down MySQL daemon

master not cooperating with mysqladmin, will try manual kill
./mysql-test-run: kill: (2265) - No such pid
master refused to die. Sending SIGKILL
./mysql-test-run: kill: (2265) - No such pid
Master shutdown finished
Slave shutdown finished
myisam-blob                    [ pass ]   
...
rpl000008                      [ pass ]   

and here it hangs forever in test rpl000009. If I kill it, the test contines, and hangs forever again in rpl_change_master

How to repeat:
run the test with --valgrind
[6 Jan 2005 15:30] Michael Widenius
This is a bug in valgrind (it doesn't dealloc rw_locks).

A patch for valgrind 2.2 to fix this problem can be found at:
http://lists.mysql.com/internals/18494

I have reported the bug and sent the fix to the valgrind developers and they replied that the new valgrind version (available in CVS) has also fixed this. Until this is released, it's probably better to use my patch...