Bug #35595 Backup crash server
Submitted: 27 Mar 2008 11:03 Modified: 13 Feb 2009 18:38
Reporter: Susanne Ebrecht Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0-bk OS:Any
Assigned to: Chuck Bell CPU Architecture:Any

[27 Mar 2008 11:03] Susanne Ebrecht
Description:
I tested with FreeBSD and with Ubuntu both AMD64:

I compiled bk tree by using: ./BUILD/compile_amd64_debug_max

[mysql60bk]$ ./libexec/mysqld --defaults-file=/home/myhome/mysql60bk/etc/my.cnf &

[mysql60bk]$ ./bin/mysql -u superuser mydb

Server version: 6.0.5-alpha-debug Source distribution

mysql> backup database * to '*';
Assertion failed: (!table || !table->in_use || table->in_use == _current_thd()), function ha_thd, file handler.cc, line 1971.
080327 11:54:52 - mysqld got signal 6 ;
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.

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

ERROR 2013 (HY000): Lost connection to MySQL server during query

How to repeat:
Start CLI from MySQL 6.0 bk tree version.
mysql> backup database * to '*';

Suggested fix:
...
[9 Apr 2008 0:20] Sveta Smirnova
Bug #35914 was marked as duplicate of this one.

Workaround: backup every single database.
[3 Feb 2009 14:37] Lars Thalmann
Triage team: I think impact is worse than I4 for this bug and that we
need to fix it in 6.0.  Please re-triage.
[11 Feb 2009 16:39] Chuck Bell
Observations
------------
The behavior dffers depending on platform. On Windows, the command results in an error:

mysql> backup database * to '*';
ERROR 1 (HY000): Can't create/write to file 'c:\\mysql\data\*' (Errcode: 22)

but on Linux (Ubuntu), the command succeeds and the '*' file is created.

So it is 'can't repeat' for Linux but the code is not consistent across platforms.
[11 Feb 2009 16:39] Chuck Bell
Observations
------------
The behavior dffers depending on platform. On Windows, the command results in an error:

mysql> backup database * to '*';
ERROR 1 (HY000): Can't create/write to file 'c:\\mysql\data\*' (Errcode: 22)

but on Linux (Ubuntu), the command succeeds and the '*' file is created.

So it is 'can't repeat' for Linux but the code is not consistent across platforms.
[13 Feb 2009 8:13] Jørgen Løland
This looks like bug#40475.
[13 Feb 2009 18:35] 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/66288

2772 Chuck Bell	2009-02-13
      BUG#35595 : Backup crash server
      
      The crash described in the bug report cannot be repeated.
      This patch contains a regression test for the command that
      caused the original crash. Note that there are two tests
      because the output file name of '*' has different outcomes
      depending on the platform chosen.
      
      These tests can also be the basis for further tests for
      BUG#40475.
[13 Feb 2009 18:38] Chuck Bell
The crash originally described in this bug report cannot be repeated. However, it has been confirmed that the command: BACKUP ... TO '*' has a different behavior depending on the platform. On Windows it throws an error from the OS, but on Linux the command succeeds.

Please add something to the backup documentation to indicate this is known issue.

Regression tests were made to detect this crash should it reappear.

Note that the tests created can be used as the basis for more test cases in BUG#40475.
[23 Feb 2009 20: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/67256

2777 Chuck Bell	2009-02-23
      BUG#35595 : Backup crash server
          
      The crash described in the bug report cannot be repeated.
      This patch contains a regression test for the command that
      caused the original crash. Note that there are two tests
      because the output file name of '*' has different outcomes
      depending on the platform chosen.
            
      These tests can also be the basis for further tests for
      BUG#40475.
      added:
        mysql-test/suite/backup/r/backup_image_name_notwin.result
        mysql-test/suite/backup/r/backup_image_name_win.result
        mysql-test/suite/backup/t/backup_image_name_notwin.test
        mysql-test/suite/backup/t/backup_image_name_win.test
      modified:
        sql/backup/backup_info.cc
[23 Feb 2009 21:32] 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/67264

2779 Chuck Bell	2009-02-23
      Removal of debug code accidentally left in patch for BUG#35595. Sorry.
      modified:
        sql/backup/backup_info.cc
[26 Mar 2009 12:34] Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090326121822-pt84kzxxayzho4mn) (version source revid:rafal.somla@sun.com-20090302164601-znhm4tadplfi2iqu) (merge vers: 6.0.11-alpha) (pib:6)