Bug #34741 prepared show master logs without binlogging debug assert
Submitted: 21 Feb 2008 18:04 Modified: 12 Nov 2009 19:14
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.1.24-maria-alpha-pb321-debug OS:Windows
Assigned to: Sergei Golubchik CPU Architecture:Any

[21 Feb 2008 18:04] Shane Bester
Description:
server crashed in debug code when running show master logs in a prepared statement without binlogging enabled:

mysqld.exe!_db_enter_
mysqld.exe!st_select_lex_unit::cleanup
mysqld.exe!mysql_parse
mysqld.exe!dispatch_command
mysqld.exe!do_command
mysqld.exe!handle_one_connection
mysqld.exe!pthread_start
mysqld.exe!_callthreadstart
mysqld.exe!_threadstart
kernel32.dll!FlsSetValue

How to repeat:
Should be retested on latest maria tree, or latest 5.1 tree.
It crashed debug build from pushbuild, 5.1.24-maria-alpha-pb321

start debug build of server:
   mysqld.exe --console --skip-grant-tables --skip-name-resolve

run this:
   prepare stmt from 'show master logs';
   execute stmt;
   deallocate prepare stmt;
[21 Feb 2008 18:05] MySQL Verification Team
couldn't repeat on the standard 5.1.23-rc2-debug community binaries, so i think it's specific to the maria tree
[21 Feb 2008 18:27] Sveta Smirnova
Thank you for the report.

Is enough to run this test once or it should be run concurrently?
[21 Feb 2008 18:30] MySQL Verification Team
once, by pasting those three lines into mysql command line client
[22 Feb 2008 11:27] MySQL Verification Team
Thank you for the bug report.

080222  8:23:42 [Note] /home/miguel/dbs/maria/libexec/mysqld: ready for connections.
Version: '5.1.24-maria-alpha-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
[New Thread 1168681296 (LWP 20653)]
/home/miguel/dbs/maria/libexec/mysqld: missing DBUG_RETURN or DBUG_VOID_RETURN macro in function "show_binlogs"

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1168681296 (LWP 20653)]
0x0000000000b59a92 in _db_return_ (_line_=4709, _stack_frame_=0x45a89180) at dbug.c:1250
1250        cs->framep= cs->framep->prev;
Current language:  auto; currently c
(gdb) bt full
#0  0x0000000000b59a92 in _db_return_ (_line_=4709, _stack_frame_=0x45a89180) at dbug.c:1250
        save_errno = 22
        _slevel_ = 4
        cs = (CODE_STATE *) 0x237b380
#1  0x000000000069d17f in mysql_execute_command (thd=0x2375068) at sql_parse.cc:4709
<cut>
[22 Feb 2008 13:30] 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/42826

ChangeSet@1.2609, 2008-02-22 14:31:37+01:00, guilhem@gbichot4.local +2 -0
  Small fixes; the missing DBUG_RETURN() fixes
  BUG#34741 "prepared show master logs without binlogging debug assert"
[22 Feb 2008 13:32] Guilhem Bichot
I fixed the root cause (missing DBUG_RETURN in show_binlogs()); Serg will try to modify dbug library to be less sensitive to such mistakes.
[22 Feb 2008 13:38] Guilhem Bichot
no emergency as no more crash
[19 Oct 2009 13:05] 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/87300

2902 Sergei Golubchik	2009-10-19
      bug#34741 prepared show master logs without binlogging debug assert
      
      s/return/DBUG_RETURN/
[31 Oct 2009 8:19] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091031081410-qkxmjsdzjmj840aq) (version source revid:serg@mysql.com-20091019190146-2g2j9i8aqhnd4a1u) (merge vers: 6.0.14-alpha) (pib:13)
[31 Oct 2009 17:40] Paul DuBois
Noted in 6.0.14 changelog.

Executing SHOW MASTER LOGS as a prepared statement without binary
logging enabled caused a crash for debug builds.

Setting report to NDI pending push to 5.5.x.
[12 Nov 2009 8:19] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091110093229-0bh5hix780cyeicl) (version source revid:mikael@mysql.com-20091102100915-a2nbfxaqprpgptfw) (merge vers: 5.5.0-beta) (pib:13)
[12 Nov 2009 19:14] Paul DuBois
Noted in 5.5.0 changelog.