Bug #55699 Assertion failure in innodb plugin with large number of threads
Submitted: 2 Aug 2010 23:27 Modified: 26 Oct 2010 1:22
Reporter: Jonathon Coombes Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S3 (Non-critical)
Version:1.0 OS:Any
Assigned to: Sunny Bains
Tags: assertion, innodb, plugin
Triage: Needs Triage: D3 (Medium)

[2 Aug 2010 23:27] Jonathon Coombes
Description:
Assertion failure in file trx/trx0undo.c line 1941: undo->state == 4 while running sysbench benchmark with 512 threads

Here is the stack from gdb. Also, undo->state is 3.

Program received signal SIGABRT, Aborted.
[Switching to Thread 1264793920 (LWP 28336)]
0x000000361de30155 in raise () from /lib64/libc.so.6
(gdb) where
#0 0x000000361de30155 in raise () from /lib64/libc.so.6
#1 0x000000361de31bf0 in abort () from /lib64/libc.so.6
#2 0x000000000085836e in trx_undo_update_cleanup (trx=0x2aaac0088be8, undo_page=0x2aaaac608000 ")ibL", mtr=0x4b630d20)
at trx/trx0undo.c:1941
#3 0x0000000000855af4 in trx_commit_off_kernel (trx=0x2aaac0088be8, for_commit=1) at trx/trx0trx.c:799
#4 0x0000000000856c1f in trx_commit_for_mysql (trx=0x2aaac0088be8) at trx/trx0trx.c:1604
#5 0x00000000007e0198 in innobase_commit (hton=<value optimized out>, thd=0x2aaab84bd950, all=true) at handler/ha_innodb.cc:2842
#6 0x00000000006fc59b in ha_commit_one_phase (thd=0x2aaab84bd950, all=true) at handler.cc:1240
#7 0x00000000006fc920 in ha_commit_trans (thd=0x2aaab84bd950, all=<value optimized out>) at handler.cc:1199
#8 0x00000000005f63c4 in end_trans (thd=0x2aaab84bd950, completion=COMMIT) at sql_parse.cc:740
#9 0x00000000005f8f1e in mysql_execute_command (thd=0x2aaab84bd950, last_timer=0x4b632bc0) at sql_parse.cc:4321
#10 0x00000000005fe381 in mysql_parse (thd=0x2aaab84bd950, inBuf=<value optimized out>, length=<value optimized out>,
found_semicolon=0x4b632ba0, last_timer=<value optimized out>) at sql_parse.cc:6296
#11 0x00000000005fecc0 in dispatch_command (command=COM_QUERY, thd=0x2aaab84bd950, packet=<value optimized out>,
packet_length=<value optimized out>) at sql_parse.cc:1284
#12 0x00000000006001f3 in do_command (thd=0x2aaab84bd950) at sql_parse.cc:920
#13 0x00000000005ee902 in handle_one_connection (arg=<value optimized out>) at sql_connect.cc:1182
#14 0x000000361ea062f7 in start_thread () from /lib64/libpthread.so.0
#15 0x000000361ded1e3d in clone () from /lib64/libc.so.6

How to repeat:
Run benchmark to overflow the number of slots?

Suggested fix:
Correct the assertion
[19 Aug 2010 10:20] Sunny Bains
This fix was missed when fixing bug# 35352. This fix is only relevant to debug builds.
[28 Sep 2010 8:46] Bugs System
Pushed into mysql-5.1 5.1.52 (revid:sunanda.menon@sun.com-20100928083322-wangbv97uobu7g66) (version source revid:sunanda.menon@sun.com-20100928083322-wangbv97uobu7g66) (merge vers: 5.1.52) (pib:21)
[28 Sep 2010 15:39] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100928153607-tdsxkdm5cmuym5sq) (version source revid:alik@sun.com-20100928153508-0saa6v93dinqx1u7) (merge vers: 5.6.1-m4) (pib:21)
[28 Sep 2010 15:41] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100928153646-pqp8o1a92mxtuj3h) (version source revid:alik@sun.com-20100928153532-lr3gtvnyp2en4y75) (pib:21)
[28 Sep 2010 15:44] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:alik@sun.com-20100928153459-4nudf4zgzlou4s7q) (version source revid:alik@sun.com-20100928153459-4nudf4zgzlou4s7q) (merge vers: 5.5.7-rc) (pib:21)
[14 Oct 2010 8:26] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (merge vers: 5.1.51-ndb-7.0.20) (pib:21)
[14 Oct 2010 8:41] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (merge vers: 5.1.51-ndb-6.3.39) (pib:21)
[14 Oct 2010 8:56] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (merge vers: 5.1.51-ndb-6.2.19) (pib:21)
[26 Oct 2010 1:22] John Russell
Added to changelog:

        A heavy workload with a large number of threads could cause
        a crash in the debug version of the server.