Bug #42244 Segmentation fault at rpl_handler.h
Submitted: 21 Jan 2009 16:00 Modified: 12 Nov 2009 12:34
Reporter: Alfranio Tavares Correia Junior Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:6.0-rpl OS:Any
Assigned to: Zhenxing He CPU Architecture:Any
Tags: 6-0-rpl-green, crash, pushbuild, pushbuild, sporadic

[21 Jan 2009 16:00] Alfranio Tavares Correia Junior
Description:
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/data0/pushbuild/pb/bzr_mysql-6.0-rpl/148/bzr_mysql-6.0-rpl-exp/sql/mysqld --de'.
Program terminated with signal 11, Segmentation fault.
#0  0x00002b51993264c5 in pthread_kill () from /lib64/libpthread.so.0
#0  0x00002b51993264c5 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000d564b2 in my_write_core (sig=11) at stacktrace.c:309
#2  0x0000000000725281 in handle_segfault (sig=11) at mysqld.cc:2682
#3  <signal handler called>
#4  0x00000000009573de in ~Delegate (this=0x0) at rpl_handler.h:129
#5  0x0000000000957425 in ~Trans_delegate (this=0x0) at rpl_handler.h:142
#6  0x0000000000956bf4 in delegates_destroy () at rpl_handler.cc:118
#7  0x0000000000723d6b in clean_up (print_message=true) at mysqld.cc:1370
#8  0x0000000000726343 in unireg_abort (exit_code=1) at mysqld.cc:1299
#9  0x0000000000728b29 in main (argc=8, argv=0x7fff11ac71f8) at mysqld.cc:4563

How to repeat:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0-rpl&order=148
[2 Mar 2009 9:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/67962

2819 He Zhenxing	2009-03-02
      BUG#42244 Segmentation fault at rpl_handler.h
      
      When some error caused the server to exit before calling
      delegates_init(), transaction_delegate, etc, were not initialzed,
      this would cause segmental fault when calling delegates_destroy
      because the latter does not check if the objects were NULL or not.
      
      Fixed the problem by only calling destruction on these objects if
      they are not NULL.
[13 Mar 2009 8:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/69100

2821 He Zhenxing	2009-03-13
      BUG#42244 Segmentation fault at rpl_handler.h
      
      When some error caused the server to exit before calling
      delegates_init(), transaction_delegate, etc, were not initialzed,
      this would cause segmental fault when calling delegates_destroy
      because the latter does not check if the objects were NULL or not.
      
      Fixed the problem by only calling destruction on these objects if
      they are not NULL.
[13 Mar 2009 8:58] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/69104

3115 He Zhenxing	2009-03-13
      BUG#42244 Segmentation fault at rpl_handler.h
      
      When some error caused the server to exit before calling
      delegates_init(), transaction_delegate, etc, were not initialzed,
      this would cause segmental fault when calling delegates_destroy
      because the latter does not check if the objects were NULL or not.
      
      Fixed the problem by only calling destruction on these objects if
      they are not NULL.
[24 Mar 2009 17:19] Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090324171507-s5aac9guj21l0jz6) (version source revid:zhenxing.he@sun.com-20090313081440-zdeme0527g611xpg) (merge vers: 6.0.11-alpha) (pib:6)
[25 Mar 2009 18:16] Jon Stephens
Can you provide 1 or 2 sentences explaining when users might encounter this issue, and what they would have to do to trigger it?

Thanks.
[26 Mar 2009 3:57] Zhenxing He
Hi, Jon

It can be triggered if a wrong option is give, for example, an option that requires a value is not provided with a value, or the value is not correct.
[26 Mar 2009 6:08] Zhenxing He
hi, Jon

This problem can only happen when starting the server, after server successfully started, it should never happen.
[26 Mar 2009 16:51] Jon Stephens
Documented bugfix in the 6.0.11 changelog as follows:

        If the server was started with an option that had a missing or
        invalid value, a subsequent error that would cause normally the
        server to shut down could cause it to crash instead.

Closed.
[26 Sep 2009 4:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/84703

3108 He Zhenxing	2009-09-26
      Backporting WL#4398 WL#1720
      Backporting BUG#44058 BUG#42244 BUG#45672 BUG#45673
      Backporting BUG#45819 BUG#45973 BUG#39012
[27 Oct 2009 9:50] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091027094604-9p7kplu1vd2cvcju) (version source revid:zhenxing.he@sun.com-20091026140226-uhnqejkyqx1aeilc) (merge vers: 6.0.14-alpha) (pib:13)
[27 Oct 2009 21:54] Jon Stephens
Already documented in 6.0.11; reclosing.
[12 Nov 2009 8:17] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091110093229-0bh5hix780cyeicl) (version source revid:alik@sun.com-20091027095744-rf45u3x3q5d1f5y0) (merge vers: 5.5.0-beta) (pib:13)
[12 Nov 2009 12:34] Jon Stephens
Also documented bugfix in the 5.5.0 changelog; closed.