Bug #23810 Server crashes on various "show status ..." commands
Submitted: 31 Oct 2006 17:05 Modified: 7 Jun 2007 16:15
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.12-beta OS:Solaris (Solaris 8,9,10 Sparc 64bit)
Assigned to: Ramil Kalimullin CPU Architecture:Any
Tags: regression

[31 Oct 2006 17:05] Joerg Bruehe
Description:
New failure in the 5.1.12-beta builds, not observer before.

Specific to "debug" runs on Sparc-64, all Solaris versions (8, 9, and 10).

Some examples:

binlog_stm_innodb_stat         [ fail ]
mysqltest: In included file "./extra/binlog_tests/innodb_stat.test": At line 10: query 'show status like "binlog_cache_use"
' failed: 2013: Lost connection to MySQL server during query

cache_innodb                   [ fail ]
mysqltest: In included file "./include/query_cache.inc": At line 30: query 'show status like "Qcache_queries_in_cache"' failed: 2013: Lost connection to MySQL server during query

compress                       [ fail ]
mysqltest: At line NNN: query 'SHOW STATUS LIKE 'Compression'' failed: 2013: Lost connection to MySQL server during query

count_distinct2                [ fail ]
mysqltest: At line NNN: query 'show status like 'Created_tmp_disk_tables'' failed: 2013: Lost connection to MySQL server during query

crash_commit_before            [ fail ]
mysqltest: In included file "./include/wait_until_connected_again.inc": At line 18: query 'show status' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 0...

create                         [ fail ]
mysqltest: At line NNN: query 'show status like "Opened_tables"' failed: 2013: Lost connection to MySQL server during query

delayed                        [ fail ]
mysqltest: At line NNN: query 'show status like 'not_flushed_delayed_rows'' failed: 2013: Lost connection to MySQL server during query

More samples in
mysqldev@production:~/my/archive/mysql/mysql-5.1.12-beta/log/test_failures/

Log files in
mysqldev@production:~/my/archive/mysql/mysql-5.1.12-beta/log/
butch-64bit-5.1-community.log
sol10-sparc-a-64bit-5.1-community.log
sunfire100a-64bit-5.1-community.log

How to repeat:
Run the test suite.
[17 Jan 2007 11:18] 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/18244

ChangeSet@1.2386, 2007-01-17 15:17:59+04:00, ramil@mysql.com +1 -0
  Fix for bug #23810: Server crashes on various "show status ..." commands
  
  We access some variable values using casts like *(long *) buff
  that may cause crashes on some platforms (e.g. solaris 64) if buff is
  not properly aligned in memory, so we cannot allocate it on the stack.
  Fix: use thd->alloc() to ensure the buff is properly aligned.
[17 Jan 2007 11:37] Ramil Kalimullin
there is another approach possible, see the next patch.
[17 Jan 2007 12:53] 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/18253

ChangeSet@1.2386, 2007-01-17 16:53:07+04:00, ramil@mysql.com +1 -0
  Fix for bug #23810: Server crashes on various "show status ..." commands
  
  We access some variable values using casts like *(long *) buff
  that may cause crashes on some platforms (e.g. solaris 64) if buff is
  not properly aligned.
  Fix: use my_alloca() to ensure the buff is properly aligned.
[14 May 2007 10:06] 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/26582

ChangeSet@1.2486, 2007-05-14 15:06:25+05:00, ramil@mysql.com +2 -0
  Fix for bug #23810: Server crashes on various "show status ..." commands
    
  We access some variable values using casts like *(long *) buff
  that may cause crashes on some platforms (e.g. solaris 64) if buff is
  not properly aligned.
  Fix: align the buffer used.
[23 May 2007 7:17] 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/27182

ChangeSet@1.2504, 2007-05-23 12:15:47+05:00, ramil@mysql.com +2 -0
  Fix for bug #23810: Server crashes on various "show status ..." commands
  
  We access some variable values using casts like *(long *) buff
  that may cause crashes on some platforms (e.g. solaris 64) if buff is
  not properly aligned.
  Fix: align the buffer used.
[6 Jun 2007 16:55] Bugs System
Pushed into 5.1.20-beta
[7 Jun 2007 16:15] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.1.20 changelog.