<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="619666">
  <date_last_updated>2010-08-28 08:02:32.902844+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/619666</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~pstoev-askmonty</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.2</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/619666/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/619666/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/619666</bug_web_link>
  <owner>Philip Stoev</owner>
  <assignee>Michael Widenius</assignee>
  <milestone_title>Maria 5.2</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Deadlock with Aria around translog_flush_wait_for_end()</title>
  <status>New</status>
  <importance>Medium</importance>
  <created>2010-08-18 07:01:15.622159+00:00</created>
  <description>
<![CDATA[When executing a DML workload, Aria 5.2 deadlocked with one thread with the following backtrace:

#2  0x08747ec2 in safe_cond_wait (cond=0x9278954, mp=0x92788f4, file=0x88d5d60 "ma_loghandler.c", line=7689) at thr_mutex.c:496
#3  0x0851b058 in translog_flush_wait_for_end (lsn=4303371829) at ma_loghandler.c:7688
#4  0x0851bb43 in translog_flush (lsn=4303371829) at ma_loghandler.c:7967
#5  0x0856d7b2 in flush_log_for_bitmap (page=0xb6079008 "\002", page_no=0, data_ptr=0xb39e708 "\376\376\t\003\f") at ma_bitmap.c:2558
#6  0x0851dd94 in pagecache_fwrite (pagecache=0x9281fa0, filedesc=0xb5f03684, buffer=0xb6079008 "\002", pageno=0, type=PAGECACHE_PLAIN_PAGE, flags=36)
    at ma_pagecache.c:618
#7  0x0852695f in flush_cached_blocks (pagecache=0x9281fa0, file=0xb39ece8, cache=0xab790b70, end=0xab790b78, type=FLUSH_RELEASE, first_errno=0xab790b5c)
    at ma_pagecache.c:4240
#8  0x085271b9 in flush_pagecache_blocks_int (pagecache=0x9281fa0, file=0xb39ece8, type=FLUSH_RELEASE, filter=0, filter_arg=0x0) at ma_pagecache.c:4530
---Type <return> to continue, or q <return> to quit---
#9  0x08527560 in flush_pagecache_blocks_with_filter (pagecache=0x9281fa0, file=0xb39ece8, type=FLUSH_RELEASE, filter=0, filter_arg=0x0)
    at ma_pagecache.c:4652
#10 0x085583db in _ma_once_end_block_record (share=0xb39e708) at ma_blockrec.c:432
#11 0x0857b96f in maria_close (info=0xab55978) at ma_close.c:79
#12 0x0852acc8 in ha_maria::close (this=0xab731e0) at ha_maria.cc:1051
#13 0x082df4e8 in closefrm (table=0xb2aab48, free_share=true) at table.cc:2451
#14 0x082c6d9a in intern_close_table (table=0xb2aab48) at sql_base.cc:786
#15 0x082c6e3b in free_cache_entry (table=0xb2aab48) at sql_base.cc:808
#16 0x0872a39c in my_hash_delete (hash=0x8a6e7a0, record=0xb2aab48 "\310ܺ\n\340\061\267\n\220\221\325\n8k\203\n") at hash.c:562
#17 0x082c7aa8 in close_open_tables (thd=0xb140730) at sql_base.cc:1208
#18 0x082c7e04 in close_thread_tables (thd=0xb140730) at sql_base.cc:1361
#19 0x0827faff in dispatch_command (command=COM_QUERY, thd=0xb140730, packet=0xb142739 "", packet_length=100) at sql_parse.cc:1636
#20 0x0827dee7 in do_command (thd=0xb140730) at sql_parse.cc:898
#21 0x0827aea8 in handle_one_connection (arg=0xb140730) at sql_connect.cc:1154
#22 0x00a08919 in start_thread () from /lib/libpthread.so.0
#23 0x001ede5e in clone () from /lib/libc.so.6

and several threads with:

#2  0x08747ec2 in safe_cond_wait (cond=0x9278954, mp=0x92788f4, file=0x88d5d60 "ma_loghandler.c", line=7689) at thr_mutex.c:496
#3  0x0851b058 in translog_flush_wait_for_end (lsn=4303370971) at ma_loghandler.c:7688
#4  0x0851bb43 in translog_flush (lsn=4303370971) at ma_loghandler.c:7967
#5  0x085b5247 in ma_commit (trn=0xae140c0) at ma_commit.c:61
#6  0x0852f62f in ha_maria::implicit_commit (thd=0xb13e330, new_trn=false) at ha_maria.cc:2647
#7  0x0827fab4 in dispatch_command (command=COM_QUERY, thd=0xb13e330,
    packet=0xb0e0789 "REPLACE INTO smf_log_boards (`id_msg`,`id_member`,`id_board`) VALUES (209,4,147)", packet_length=80) at sql_parse.cc:1625
#8  0x0827dee7 in do_command (thd=0xb13e330) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xb13e330) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6]]>  </description>
  <activities>
    <activity datechanged="2010-08-18T07:01:15.622159+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Philip Stoev</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2010-08-18T07:06:32.526581+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[core , binary, datadir https://bugs.launchpad.net/maria/+bug/619666/+attachment/1497185/+files/var-bug619666.zip]]>      </newvalue>
      <whatchanged>attachment added</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-08-18T07:07:52.139158+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[5.2]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-08-18T07:07:58.044040+00:00">
      <oldvalue>
<![CDATA[Undecided]]>      </oldvalue>
      <newvalue>
<![CDATA[Medium]]>      </newvalue>
      <whatchanged>maria: importance</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-08-28T08:02:32.100297+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Michael Widenius (monty)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/619666/comments/1" datecreated="2010-08-18T07:06:32.526581+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Re: Deadlock with Aria around translog_flush_wait_for_end()]]>      </subject>
      <content>
<![CDATA[]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/619666/comments/2" datecreated="2010-08-18T07:07:16.966766+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Re: Deadlock with Aria around translog_flush_wait_for_end()]]>      </subject>
      <content>
<![CDATA[Dump of all threads:

Thread 20 (Thread 0xb78e6b70 (LWP 6939)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0efa9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00a0a330 in _L_lock_697 () from /lib/libpthread.so.0
#3  0x00a0a201 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08747807 in safe_mutex_lock (mp=0x92819c0, my_flags=0, file=0x88e9128 "ma_checkpoint.c", line=748) at thr_mutex.c:297
#5  0x085ac20c in collect_tables (str=0xb78e622c, checkpoint_start_log_horizon=4303371832) at ma_checkpoint.c:748
#6  0x085ab3f5 in really_execute_checkpoint () at ma_checkpoint.c:195
#7  0x085ab21a in ma_checkpoint_execute (level=CHECKPOINT_MEDIUM, no_wait=1 '\001') at ma_checkpoint.c:132
#8  0x085abec1 in ma_checkpoint_background (arg=0x1e) at ma_checkpoint.c:601
#9  0x00a08919 in start_thread () from /lib/libpthread.so.0
#10 0x001ede5e in clone () from /lib/libc.so.6

Thread 19 (Thread 0xafb0cb70 (LWP 6940)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0c5e4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x085feefe in xt_timed_wait_cond (self=0x0, cond=0x9279310, mutex=0x92792f8, milli_sec=500) at thread_xt.cc:1989
#3  0x085eb640 in tabc_fr_wait_for_cache (self=0xa80f728, msecs=500) at tabcache_xt.cc:873
#4  0x085ec24e in tabc_fr_main (self=0xa80f728) at tabcache_xt.cc:1194
#5  0x085ec3b3 in tabc_fr_run_thread (self=0xa80f728) at tabcache_xt.cc:1213
#6  0x085fcdb1 in xt_thread_main (data=0xbffdd52c) at thread_xt.cc:1036
#7  0x00a08919 in start_thread () from /lib/libpthread.so.0
#8  0x001ede5e in clone () from /lib/libc.so.6

Thread 18 (Thread 0xae70ab70 (LWP 6942)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a10550 in sigwait () from /lib/libpthread.so.0
#2  0x0826efb4 in signal_hand (arg=0x0) at mysqld.cc:2936
#3  0x00a08919 in start_thread () from /lib/libpthread.so.0
#4  0x001ede5e in clone () from /lib/libc.so.6

Thread 17 (Thread 0xae30db70 (LWP 6944)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0c5e4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x085feefe in xt_timed_wait_cond (self=0xa8f9468, cond=0xae6b8914, mutex=0xae6b88fc, milli_sec=100) at thread_xt.cc:1989
#3  0x0860b161 in xn_sw_wait_for_xact (self=0xa8f9468, db=0xae697010, hsecs=10) at xaction_xt.cc:2789
#4  0x0860aca7 in xn_sw_main (self=0xa8f9468) at xaction_xt.cc:2688
#5  0x0860ae60 in xn_sw_run_thread (self=0xa8f9468) at xaction_xt.cc:2733
#6  0x085fcdb1 in xt_thread_main (data=0xaf10912c) at thread_xt.cc:1036
#7  0x00a08919 in start_thread () from /lib/libpthread.so.0
#8  0x001ede5e in clone () from /lib/libc.so.6

Thread 16 (Thread 0xad8cbb70 (LWP 6945)):
#0  0x0088c424 in __kernel_vsyscall ()
---Type <return> to continue, or q <return> to quit---
#1  0x00a0c5e4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x085feefe in xt_timed_wait_cond (self=0xa906ab0, cond=0xae6b89e8, mutex=0xae6b89d0, milli_sec=120000) at thread_xt.cc:1989
#3  0x0862b19e in dl_co_wait (self=0xa906ab0, db=0xae697010, secs=120) at datalog_xt.cc:1714
#4  0x0862c56d in dl_co_main (self=0xa906ab0, once_off=0) at datalog_xt.cc:2013
#5  0x0862c6d0 in dl_run_co_thread (self=0xa906ab0) at datalog_xt.cc:2051
#6  0x085fcdb1 in xt_thread_main (data=0xaf10912c) at thread_xt.cc:1036
#7  0x00a08919 in start_thread () from /lib/libpthread.so.0
#8  0x001ede5e in clone () from /lib/libc.so.6

Thread 15 (Thread 0xacecab70 (LWP 6946)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0c5e4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x085feefe in xt_timed_wait_cond (self=0xa9140f8, cond=0xae6b8984, mutex=0xae6b896c, milli_sec=500) at thread_xt.cc:1989
#3  0x0861151a in xlog_wr_wait_for_log_flush (self=0xa9140f8, db=0xae697010) at xactlog_xt.cc:2425
#4  0x08611ecd in xlog_wr_main (self=0xa9140f8) at xactlog_xt.cc:2622
#5  0x08612041 in xlog_wr_run_thread (self=0xa9140f8) at xactlog_xt.cc:2647
#6  0x085fcdb1 in xt_thread_main (data=0xaf10912c) at thread_xt.cc:1036
#7  0x00a08919 in start_thread () from /lib/libpthread.so.0
#8  0x001ede5e in clone () from /lib/libc.so.6

Thread 14 (Thread 0xac4c9b70 (LWP 6948)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0c5e4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x085feefe in xt_timed_wait_cond (self=0xa921938, cond=0xae6c296c, mutex=0xae6c2954, milli_sec=400) at thread_xt.cc:1989
#3  0x085e542e in xres_cp_wait_for_log_writer (self=0xa921938, db=0xae697010, milli_secs=400) at restart_xt.cc:2517
#4  0x085e57c3 in xres_cp_main (self=0xa921938) at restart_xt.cc:2598
#5  0x085e5974 in xres_cp_run_thread (self=0xa921938) at restart_xt.cc:2626
#6  0x085fcdb1 in xt_thread_main (data=0xaf10912c) at thread_xt.cc:1036
#7  0x00a08919 in start_thread () from /lib/libpthread.so.0
#8  0x001ede5e in clone () from /lib/libc.so.6

Thread 13 (Thread 0xae457b70 (LWP 6949)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0f40b in read () from /lib/libpthread.so.0
#2  0x08712a8d in vio_read (vio=0xa8cca48, buf=0xa8e7a18 "\a", size=4) at viosocket.c:44
#3  0x082618c7 in my_real_read (net=0xa8e5a8c, complen=0xae4572c8) at net_serv.cc:824
#4  0x08261f00 in my_net_read (net=0xa8e5a8c) at net_serv.cc:1017
#5  0x0827dd30 in do_command (thd=0xa8e5a10) at sql_parse.cc:840
#6  0x0827aea8 in handle_one_connection (arg=0xa8e5a10) at sql_connect.cc:1154
#7  0x00a08919 in start_thread () from /lib/libpthread.so.0
#8  0x001ede5e in clone () from /lib/libc.so.6

Thread 12 (Thread 0xb5cb1b70 (LWP 6957)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0efa9 in __lll_lock_wait () from /lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#2  0x00a0a34d in _L_lock_865 () from /lib/libpthread.so.0
#3  0x00a0a303 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08747807 in safe_mutex_lock (mp=0x8a6a860, my_flags=0, file=0x8880718 "sql_base.cc", line=1198) at thr_mutex.c:297
#5  0x082c7a26 in close_open_tables (thd=0xa969000) at sql_base.cc:1198
#6  0x082c7e04 in close_thread_tables (thd=0xa969000) at sql_base.cc:1361
#7  0x0827faff in dispatch_command (command=COM_QUERY, thd=0xa969000, packet=0xa9d3b89 "UPDATE smf_log_packages SET install_state = 130", packet_length=47)
    at sql_parse.cc:1636
#8  0x0827dee7 in do_command (thd=0xa969000) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xa969000) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6

Thread 11 (Thread 0xb5c48b70 (LWP 6959)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0c23c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x08747ec2 in safe_cond_wait (cond=0x9278954, mp=0x92788f4, file=0x88d5d60 "ma_loghandler.c", line=7689) at thr_mutex.c:496
#3  0x0851b058 in translog_flush_wait_for_end (lsn=4303371749) at ma_loghandler.c:7688
#4  0x0851bb43 in translog_flush (lsn=4303371749) at ma_loghandler.c:7967
#5  0x085b5247 in ma_commit (trn=0xb1252e0) at ma_commit.c:61
#6  0x0852f62f in ha_maria::implicit_commit (thd=0xacfaa00, new_trn=false) at ha_maria.cc:2647
#7  0x0827fab4 in dispatch_command (command=COM_QUERY, thd=0xacfaa00,
    packet=0xacfca09 "INSERT INTO smf_log_subscribed (`id_subscribe`,`id_member`,`old_id_group`,`start_time`,`end_time`,`status`,`pending_details`) VALUES (10370560,80,14298624,0,8274432,0,'out')", packet_length=173) at sql_parse.cc:1625
#8  0x0827dee7 in do_command (thd=0xacfaa00) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xacfaa00) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6

Thread 10 (Thread 0xb5b7cb70 (LWP 6961)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0efa9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00a0a34d in _L_lock_865 () from /lib/libpthread.so.0
#3  0x00a0a303 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08747807 in safe_mutex_lock (mp=0x8a6a860, my_flags=0, file=0x8880718 "sql_base.cc", line=1198) at thr_mutex.c:297
#5  0x082c7a26 in close_open_tables (thd=0xada0b30) at sql_base.cc:1198
#6  0x082c7e04 in close_thread_tables (thd=0xada0b30) at sql_base.cc:1361
#7  0x0827faff in dispatch_command (command=COM_QUERY, thd=0xada0b30,
    packet=0xadadc59 "REPLACE INTO smf_log_mark_read (`id_msg`,`id_member`,`id_board`) VALUES (198,12353280,6763520)", packet_length=94) at sql_parse.cc:1636
#8  0x0827dee7 in do_command (thd=0xada0b30) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xada0b30) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6

Thread 9 (Thread 0xaba87b70 (LWP 6963)):
#0  0x0088c424 in __kernel_vsyscall ()
---Type <return> to continue, or q <return> to quit---
#1  0x00a0efa9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00a0a34d in _L_lock_865 () from /lib/libpthread.so.0
#3  0x00a0a303 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08747807 in safe_mutex_lock (mp=0x8a6a860, my_flags=0, file=0x8880718 "sql_base.cc", line=1198) at thr_mutex.c:297
#5  0x082c7a26 in close_open_tables (thd=0xae3c0d8) at sql_base.cc:1198
#6  0x082c7e04 in close_thread_tables (thd=0xae3c0d8) at sql_base.cc:1361
#7  0x0827faff in dispatch_command (command=COM_QUERY, thd=0xae3c0d8,
    packet=0xae5ab41 "INSERT INTO smf_approval_queue (`id_attach`,`id_msg`) VALUES (5,16389632)", packet_length=73) at sql_parse.cc:1636
#8  0x0827dee7 in do_command (thd=0xae3c0d8) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xae3c0d8) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6

Thread 8 (Thread 0xaba1eb70 (LWP 6965)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0efa9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00a0a34d in _L_lock_865 () from /lib/libpthread.so.0
#3  0x00a0a303 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08747807 in safe_mutex_lock (mp=0x8a6a860, my_flags=0, file=0x8880718 "sql_base.cc", line=1198) at thr_mutex.c:297
#5  0x082c7a26 in close_open_tables (thd=0xada9898) at sql_base.cc:1198
#6  0x082c7e04 in close_thread_tables (thd=0xada9898) at sql_base.cc:1361
#7  0x0827faff in dispatch_command (command=COM_QUERY, thd=0xada9898, packet=0xaf03bd9 "", packet_length=91) at sql_parse.cc:1636
#8  0x0827dee7 in do_command (thd=0xada9898) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xada9898) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6

Thread 7 (Thread 0xab9b5b70 (LWP 6967)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0efa9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00a0a34d in _L_lock_865 () from /lib/libpthread.so.0
#3  0x00a0a303 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08747807 in safe_mutex_lock (mp=0x8a6a860, my_flags=0, file=0x8880718 "sql_base.cc", line=1198) at thr_mutex.c:297
#5  0x082c7a26 in close_open_tables (thd=0xaceb1d8) at sql_base.cc:1198
#6  0x082c7e04 in close_thread_tables (thd=0xaceb1d8) at sql_base.cc:1361
#7  0x0827faff in dispatch_command (command=COM_QUERY, thd=0xaceb1d8,
    packet=0xaa56f79 "INSERT INTO smf_log_actions (`log_time`,`id_log`,`id_member`,`ip`,`action`,`id_board`,`id_topic`,`id_msg`,`extra`) VALUES (114,147,9280768,'time','mm',15956992,181,12212224,'om')", packet_length=178) at sql_parse.cc:1636
#8  0x0827dee7 in do_command (thd=0xaceb1d8) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xaceb1d8) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6

Thread 6 (Thread 0xab92bb70 (LWP 6969)):
#0  0x0088c424 in __kernel_vsyscall ()
---Type <return> to continue, or q <return> to quit---
#1  0x00a0efa9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00a0a34d in _L_lock_865 () from /lib/libpthread.so.0
#3  0x00a0a303 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08747807 in safe_mutex_lock (mp=0x8a6a860, my_flags=0, file=0x8880718 "sql_base.cc", line=2747) at thr_mutex.c:297
#5  0x082cad53 in open_table (thd=0xaf86ea0, table_list=0xaa6bcf0, mem_root=0xab92a070, refresh=0xab92a0b7, flags=0) at sql_base.cc:2747
#6  0x082ce729 in open_tables (thd=0xaf86ea0, start=0xab92a464, counter=0xab92a3d8, flags=0) at sql_base.cc:4656
#7  0x0832d29a in mysql_update (thd=0xaf86ea0, table_list=0xaa6bcf0, fields=..., values=..., conds=0xaa7f148, order_num=0, order=0x0,
    limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false) at sql_update.cc:212
#8  0x08283855 in mysql_execute_command (thd=0xaf86ea0) at sql_parse.cc:3120
#9  0x0828c847 in mysql_parse (thd=0xaf86ea0, inBuf=0xaa2bb80 "UPDATE smf_log_polls SET id_member = 12643328 WHERE id_member IN (4)", length=68,
    found_semicolon=0xab92b22c) at sql_parse.cc:6055
#10 0x0827ea43 in dispatch_command (command=COM_QUERY, thd=0xaf86ea0,
    packet=0xaf88ea9 "UPDATE smf_log_polls SET id_member = 12643328 WHERE id_member IN (4)", packet_length=68) at sql_parse.cc:1204
#11 0x0827dee7 in do_command (thd=0xaf86ea0) at sql_parse.cc:898
#12 0x0827aea8 in handle_one_connection (arg=0xaf86ea0) at sql_connect.cc:1154
#13 0x00a08919 in start_thread () from /lib/libpthread.so.0
#14 0x001ede5e in clone () from /lib/libc.so.6

Thread 5 (Thread 0xab81db70 (LWP 6971)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0c23c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x08747ec2 in safe_cond_wait (cond=0x9278954, mp=0x92788f4, file=0x88d5d60 "ma_loghandler.c", line=7689) at thr_mutex.c:496
#3  0x0851b058 in translog_flush_wait_for_end (lsn=4303371225) at ma_loghandler.c:7688
#4  0x0851bb43 in translog_flush (lsn=4303371225) at ma_loghandler.c:7967
#5  0x085b5247 in ma_commit (trn=0xb1e3400) at ma_commit.c:61
#6  0x0852f62f in ha_maria::implicit_commit (thd=0xb05b8b0, new_trn=false) at ha_maria.cc:2647
#7  0x0827fab4 in dispatch_command (command=COM_QUERY, thd=0xb05b8b0,
    packet=0xb05f769 "INSERT IGNORE INTO smf_log_notify (`id_member`,`id_topic`) VALUES (10533632,23)", packet_length=79) at sql_parse.cc:1625
#8  0x0827dee7 in do_command (thd=0xb05b8b0) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xb05b8b0) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xab793b70 (LWP 6973)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0c23c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x08747ec2 in safe_cond_wait (cond=0x9278954, mp=0x92788f4, file=0x88d5d60 "ma_loghandler.c", line=7689) at thr_mutex.c:496
#3  0x0851b058 in translog_flush_wait_for_end (lsn=4303371829) at ma_loghandler.c:7688
#4  0x0851bb43 in translog_flush (lsn=4303371829) at ma_loghandler.c:7967
#5  0x0856d7b2 in flush_log_for_bitmap (page=0xb6079008 "\002", page_no=0, data_ptr=0xb39e708 "\376\376\t\003\f") at ma_bitmap.c:2558
#6  0x0851dd94 in pagecache_fwrite (pagecache=0x9281fa0, filedesc=0xb5f03684, buffer=0xb6079008 "\002", pageno=0, type=PAGECACHE_PLAIN_PAGE, flags=36)
    at ma_pagecache.c:618
#7  0x0852695f in flush_cached_blocks (pagecache=0x9281fa0, file=0xb39ece8, cache=0xab790b70, end=0xab790b78, type=FLUSH_RELEASE, first_errno=0xab790b5c)
    at ma_pagecache.c:4240
#8  0x085271b9 in flush_pagecache_blocks_int (pagecache=0x9281fa0, file=0xb39ece8, type=FLUSH_RELEASE, filter=0, filter_arg=0x0) at ma_pagecache.c:4530
---Type <return> to continue, or q <return> to quit---
#9  0x08527560 in flush_pagecache_blocks_with_filter (pagecache=0x9281fa0, file=0xb39ece8, type=FLUSH_RELEASE, filter=0, filter_arg=0x0)
    at ma_pagecache.c:4652
#10 0x085583db in _ma_once_end_block_record (share=0xb39e708) at ma_blockrec.c:432
#11 0x0857b96f in maria_close (info=0xab55978) at ma_close.c:79
#12 0x0852acc8 in ha_maria::close (this=0xab731e0) at ha_maria.cc:1051
#13 0x082df4e8 in closefrm (table=0xb2aab48, free_share=true) at table.cc:2451
#14 0x082c6d9a in intern_close_table (table=0xb2aab48) at sql_base.cc:786
#15 0x082c6e3b in free_cache_entry (table=0xb2aab48) at sql_base.cc:808
#16 0x0872a39c in my_hash_delete (hash=0x8a6e7a0, record=0xb2aab48 "\310ܺ\n\340\061\267\n\220\221\325\n8k\203\n") at hash.c:562
#17 0x082c7aa8 in close_open_tables (thd=0xb140730) at sql_base.cc:1208
#18 0x082c7e04 in close_thread_tables (thd=0xb140730) at sql_base.cc:1361
#19 0x0827faff in dispatch_command (command=COM_QUERY, thd=0xb140730, packet=0xb142739 "", packet_length=100) at sql_parse.cc:1636
#20 0x0827dee7 in do_command (thd=0xb140730) at sql_parse.cc:898
#21 0x0827aea8 in handle_one_connection (arg=0xb140730) at sql_connect.cc:1154
#22 0x00a08919 in start_thread () from /lib/libpthread.so.0
#23 0x001ede5e in clone () from /lib/libc.so.6

Thread 3 (Thread 0xab709b70 (LWP 6975)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0c23c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x08747ec2 in safe_cond_wait (cond=0x9278954, mp=0x92788f4, file=0x88d5d60 "ma_loghandler.c", line=7689) at thr_mutex.c:496
#3  0x0851b058 in translog_flush_wait_for_end (lsn=4303370971) at ma_loghandler.c:7688
#4  0x0851bb43 in translog_flush (lsn=4303370971) at ma_loghandler.c:7967
#5  0x085b5247 in ma_commit (trn=0xae140c0) at ma_commit.c:61
#6  0x0852f62f in ha_maria::implicit_commit (thd=0xb13e330, new_trn=false) at ha_maria.cc:2647
#7  0x0827fab4 in dispatch_command (command=COM_QUERY, thd=0xb13e330,
    packet=0xb0e0789 "REPLACE INTO smf_log_boards (`id_msg`,`id_member`,`id_board`) VALUES (209,4,147)", packet_length=80) at sql_parse.cc:1625
#8  0x0827dee7 in do_command (thd=0xb13e330) at sql_parse.cc:898
#9  0x0827aea8 in handle_one_connection (arg=0xb13e330) at sql_connect.cc:1154
#10 0x00a08919 in start_thread () from /lib/libpthread.so.0
#11 0x001ede5e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xb5c00b70 (LWP 6994)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x00a0efa9 in __lll_lock_wait () from /lib/libpthread.so.0
#2  0x00a0a34d in _L_lock_865 () from /lib/libpthread.so.0
#3  0x00a0a303 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x08747807 in safe_mutex_lock (mp=0x8a6a860, my_flags=0, file=0x8880718 "sql_base.cc", line=2747) at thr_mutex.c:297
#5  0x082cad53 in open_table (thd=0xafef528, table_list=0xb5bffe00, mem_root=0xb5bffcc0, refresh=0xb5bffd07, flags=0) at sql_base.cc:2747
#6  0x082ce729 in open_tables (thd=0xafef528, start=0xb5bffd74, counter=0xb5bffd5c, flags=0) at sql_base.cc:4656
#7  0x082cf55d in open_normal_and_derived_tables (thd=0xafef528, tables=0xb5bffe00, flags=0) at sql_base.cc:5123
#8  0x083e1dfc in mysqld_list_fields (thd=0xafef528, table_list=0xb5bffe00, wild=0xab99c98 "") at sql_show.cc:929
#9  0x0827f095 in dispatch_command (command=COM_FIELD_LIST, thd=0xafef528, packet=0xaf73471 "A", packet_length=2) at sql_parse.cc:1334
#10 0x0827dee7 in do_command (thd=0xafef528) at sql_parse.cc:898
#11 0x0827aea8 in handle_one_connection (arg=0xafef528) at sql_connect.cc:1154
---Type <return> to continue, or q <return> to quit---
#12 0x00a08919 in start_thread () from /lib/libpthread.so.0
#13 0x001ede5e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb78e76d0 (LWP 6937)):
#0  0x0088c424 in __kernel_vsyscall ()
#1  0x001e6251 in select () from /lib/libc.so.6
#2  0x08272b6a in handle_connections_sockets (arg=0x0) at mysqld.cc:5305
#3  0x08271f31 in main (argc=24, argv=0xbffddb54) at mysqld.cc:4775]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/619666/comments/3" datecreated="2010-08-18T07:13:23.518527+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Re: Deadlock with Aria around translog_flush_wait_for_end()]]>      </subject>
      <content>
<![CDATA[To reproduce:

MALLOC_CHECK_=1 perl runall-new.pl --basedir=/home/philips/bzr/maria-5.2/ --grammar=conf/smf/smf2.yy --mysqld=--init_file=/home/philips/bzr/randgen-smf/conf/smf/smf2.sql --queries=10M --duration=360 --engine=Maria --mysqld=--default-storage-engine=Maria --mysqld=--skip-innodb

The .sql and the .yy file can be found on hasky in /home/pstoev/bug619666

You can disregard the output of the test, and within a minute or two you will observe that all queries have hanged in SHOW PROCESSLIST.]]>      </content>
    </comment>
  </comments>
  <messages>
    <message created="2010-08-18 07:06:32.526581+00:00" owner="Philip Stoev">
<![CDATA[]]>      <attachment link="https://bugs.launchpad.net/bugs/619666/+attachment/1497185" type="Unspecified">
        <title>core , binary, datadir</title>
        <file>LPexportBug619666_var-bug619666.zip</file>
      </attachment>
    </message>
  </messages>
</launchpad-bug>
