Bug #33575 Backup: crash on shutdown if Falcon table
Submitted: 29 Dec 2007 1:15 Modified: 9 Oct 2008 11:31
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.5-alpha-debug OS:Linux (SUSE 10 64-bit)
Assigned to: Sergey Vojtovich CPU Architecture:Any

[29 Dec 2007 1:15] Peter Gulutzan
Description:
I create a Falcon table.
I say BACKUP DATABASE.
I try to use 'mysqladmin shutdown' to stop the server.
Crash.

Built from mysql-6.0-backup source with BUILD/compile-pentium-debug-max.
Last changeset = "ChangeSet@1.2753, 2007-12-20 15:32:22-05:00".

How to repeat:
/* Start with all databases empty. */
use test
create table t (s1 int) engine=falcon;
insert into t values (1);
backup database test to '/usr/local/mysql/var/t89';
quit
[29 Dec 2007 6:18] MySQL Verification Team
Thank you for the bug report. Verified as described.
[3 Jan 2008 4:53] Kevin Lewis
Lars,  I think a backup specialist should look into this and determine what relationship this has to the Falcon engine.
[26 Jan 2008 3:09] Chuck Bell
The crash occurs when this assertion is fired:

SyncObject::~SyncObject()
{
	ASSERT(lockState == 0);

See syncObject.cpp:123.

However, if one were to do a SELECT * FROM test.t; after the backup then shutdown the server, the crash does not occur. 

Recommendation: revisit and verify this bug after the WL#3574 and WL#4205 patches are pushed and merged with the 6.0 main and 6.0-falcon trees.
[28 Mar 2008 20:03] Giuseppe Maxia
Can't repeat using mysql-6.0 - ChangeSet@1.2610, 2008-03-28 11:53:03+01:00.

However, a similar behavior can be observer in Bug#35659
[1 Sep 2008 9:34] Øystein Grøvlen
Same problem is also reported in bug#37695.
As I note there, it should be possible to reproduce this error by running the test case for bug#36795.
[1 Sep 2008 12:44] Sergey Vojtovich
This is pure Falcon issue.
[1 Sep 2008 13:02] 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/53005

2805 Sergey Vojtovich	2008-09-01
      BUG#33575 - Backup: crash on shutdown if Falcon table
      
      Shutting down the server immediately after BACKUP of Falcon table
      may cause assertion failure.
      
      The problem was that Falcon didn't inform the server that it has
      started internal transaction. Thus the server didn't commit this
      transaction, causing assertion failure on shutdown.
[3 Sep 2008 10:12] Rafal Somla
Looks ok.
[30 Sep 2008 9:58] Sergey Vojtovich
Was pushed to 6.0.8 Sep 20.
[9 Oct 2008 11:31] Jon Stephens
Documented bugfix in the 6.0.8 changelog as follows:

        Shutting down the MySQL server immediately following the execution of a
        BACKUP DATABASE statement caused the server to crash if the database to
        be backed up contained any Falcon tables.