Bug #50160 Server with semi-sync replication crashes in ActiveTranx::is_tranx_end_pos
Submitted: 7 Jan 2010 21:02 Modified: 20 Jan 2010 9:25
Reporter: Elena Stepanova Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.5.1-m2 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[7 Jan 2010 21:02] Elena Stepanova
100107 23:29:26 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 60561 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x16706190
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x4180d100 thread_stack 0x40000
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at (nil) is an invalid pointer

How to repeat:
- unpack the attached archive in <mysql-basedir>/mysql-test. It should create
'stress_test_basedir' folder;
- run as  
perl ./stress_test_basedir/run.pl

run.pl is a wrapper for MTR to start server, and mysql-stress-test to run a 5-thread stress test. 
For mysql-stress-test you need to have perl with threads on the top of your path (or please modify run.pl to call mysql-stress-test.pl with the right perl).

The screen output should say 'Waiting for server(s) to exit...' for a few seconds (sleep time for the server to start), and then start rapidly producing lines like
test_loop[0:0 0:377]: TID 2 test: 'stress2'  Errors: No Errors. Test Passed OK
test_loop[0:0 0:378]: TID 1 test: 'stress1'  Errors: No Errors. Test Passed OK

When/if the problem is hit, the output says something like
test_loop[0:0 0:7]: TID 2 test: 'stress1'  Errors: Severity S1: 15 (thread aborting)
and the test exits
If the server does not start fast enough, the test might abort immediately; in this case please increase sleep time in run.pl.
[7 Jan 2010 21:22] Elena Stepanova
All threads bt

Attachment: all_threads_bug50160.out (application/octet-stream, text), 17.99 KiB.

[7 Jan 2010 21:23] Elena Stepanova
Stress test

Attachment: stress_test_basedir.tar.gz (application/gzip, text), 21.21 KiB.

[7 Jan 2010 21:23] Elena Stepanova
See also bug#50157 and bug#50163. The attached stress test is the same for all three bugs, and it randomly ends with one of these crashes.
All three problems might be the same, but since the produced stack trace is noticeably different in each case, I'm logging each one separately.
[20 Jan 2010 9:25] Zhenxing He
dup of Bug#50157