Bug #39712 Maria crash in _ma_remove_not_visible_states
Submitted: 28 Sep 2008 16:17 Modified: 6 May 2009 10:53
Reporter: Philip Stoev Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Maria storage engine Severity:S1 (Critical)
Version:5.1-maria, 6.0-maria OS:Any
Assigned to: CPU Architecture:Any

[28 Sep 2008 16:17] Philip Stoev
Description:
When executing the iuds6 SystemQA test, maria crashed as follows:

#2  0x00000000006b5f86 in handle_segfault (sig=11) at mysqld.cc:2659
#3  <signal handler called>
#4  0x0000000000b72d6f in _ma_remove_not_visible_states (org_history=0x2aaab020eda8, all=0 '\0', trnman_is_locked=1 '\001') at ma_state.c:152
#5  0x0000000000b72ea7 in _ma_remove_not_visible_states_with_lock (share=0x2aaac02b55f8) at ma_state.c:194
#6  0x0000000000bd53ed in collect_tables (str=0x4be11fe0, checkpoint_start_log_horizon=4623334381) at ma_checkpoint.c:1062
#7  0x0000000000bd3bca in really_execute_checkpoint () at ma_checkpoint.c:195
#8  0x0000000000bd3a21 in ma_checkpoint_execute (level=CHECKPOINT_MEDIUM, no_wait=1 '\001') at ma_checkpoint.c:132
#9  0x0000000000bd461c in ma_checkpoint_background (arg=0x1e) at ma_checkpoint.c:618
#10 0x0000003ba88062f7 in start_thread () from /lib64/libpthread.so.0
#11 0x0000003ba80ce85d in clone () from /lib64/libc.so.6

The crash is here:

(gdb) list
147
148       last_trid= org_history->trid;
149       parent= &org_history->next;
150       for (history= org_history->next; history; history= next)
151       {
152HERE>>>  next= history->next; <<<<<<<<<<<<<< HERE
153         if (!trnman_exists_active_transactions(history->trid, last_trid,
154                                                trnman_is_locked))
155         {
156           my_free(history, MYF(0));

(gdb) print history
$1 = (MARIA_STATE_HISTORY *) 0x2aaaffffffff

How to repeat:
If this happens again, a repeatable test case will be provided.
[10 Dec 2008 16:46] Michael Widenius
I just fixed in the Maria 5.1 tree a bug that caused the history state to contain wrong information, which could explain this crash.  This patch will be in MySQL 6.0 after next merge.

I put the state to 'need feedback' as there is no test case.
If this bug happens again, please reopen this bug report
[10 Dec 2008 17:12] Guilhem Bichot
Monty's fix has just been merged into 6.0-maria. Reporter, if this isn't too time-consuming, could you please re-run your SystemQA test on that latest 6.0-maria to see if you still observe the problem? Let us know if you would need help.
[11 Jan 2009 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[6 May 2009 10:53] Philip Stoev
Not seen recently.