InnoDB does not complete shutdown with transaction log enabled

Bug #670971 reported by David Shrewsbury
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Critical
Joe Daly
7.0
Fix Released
Critical
Joe Daly

Bug Description

When compiling drizzle with --with-debug and --enable-profiling, InnoDB does not complete its shutdown, so we cannot get any profile data. It outputs 'InnoDB: Starting shutdown...' and never completes.

Attaching to the process, we the following thread states:

(gdb) info threads
  13 0x00007fff84fc9b3e in __sigwait ()
  12 0x00007fff84fa2eb6 in __semwait_signal ()
  11 0x00007fff84fa2eb6 in __semwait_signal ()
  10 0x00007fff84fa2eb6 in __semwait_signal ()
   9 0x00007fff84fa2eb6 in __semwait_signal ()
   8 0x00007fff84fa2eb6 in __semwait_signal ()
   7 0x00007fff84fa2eb6 in __semwait_signal ()
   6 0x00007fff84fa2eb6 in __semwait_signal ()
   5 0x00007fff84fa2eb6 in __semwait_signal ()
   4 0x00007fff84fa2eb6 in __semwait_signal ()
   3 0x00007fff84fa2eb6 in __semwait_signal ()
   2 0x00007fff84fa2eb6 in __semwait_signal ()
* 1 "com.apple.main-thread" 0x00007fff84fabdce in select$DARWIN_EXTSN ()

(gdb) thread 1
[Switching to thread 1 (process 75249), "com.apple.main-thread"]
0x00007fff84fabdce in select$DARWIN_EXTSN ()

(gdb) bt
#0 0x00007fff84fabdce in select$DARWIN_EXTSN ()
#1 0x000000010336404a in os_thread_sleep () at locale_facets.tcc:2578
#2 0x0000000103352d4a in logs_empty_and_mark_files_at_shutdown () at locale_facets.tcc:2578
#3 0x00000001033bca05 in innobase_shutdown_for_mysql () at locale_facets.tcc:2578
#4 0x00000001032d65e1 in InnobaseEngine::~InnobaseEngine (this=0x101771ec0) at plugin/innobase/handler/ha_innodb.cc:304
#5 0x00000001001a76d4 in drizzled::module::Registry::~Registry (this=0x101722ec0) at drizzled/module/registry.cc:58
#6 0x00000001001a7ad8 in drizzled::module::Registry::shutdown () at drizzled/module/registry.cc:85
#7 0x0000000100088fe0 in main (argc=1, argv=0x7fff5fbff708) at drizzled/main.cc:385

Related branches

Revision history for this message
David Shrewsbury (dshrews) wrote :

Note: This happens on both Linux and Mac OS X. Was unable to attach to the process ID on Linux for some reason.

Revision history for this message
David Shrewsbury (dshrews) wrote :

Also note that the server must be started with --transaction-log.enabled. When not enabled, shutdown will complete.

Revision history for this message
David Shrewsbury (dshrews) wrote :

Appears to happen whether or not profiling support is enabled. Looks like InnoDB thinks there are still active transactions. Might have something to do with the latest changes to use InnoDB's transaction IDs for the transaction log.

summary: - InnoDB does not complete shutdown with profiling enabled and transaction
- log enabled
+ InnoDB does not complete shutdown with transaction log enabled
Revision history for this message
David Shrewsbury (dshrews) wrote :

Pretty sure this is related to this newly merged branch:

lp:~skinny.moey/drizzle/transaction_id_innodb

Looks like an InnoDB trx id is allocated for the server STARTUP and SHUTDOWN events, but the transaction is never closed within InnoDB (via trx_free_for_mysql()).

Changed in drizzle:
assignee: nobody → Joe Daly (skinny.moey)
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Joe Daly (skinny.moey) wrote :

Dave do mind giving this a whirl and see if it fixes the problem? the branch is linked to the bug report

Revision history for this message
Stewart Smith (stewart) wrote : Re: [Bug 670971] Re: InnoDB does not complete shutdown with transaction log enabled

On Thu, 04 Nov 2010 17:10:54 -0000, David Shrewsbury <email address hidden> wrote:
> Pretty sure this is related to this newly merged branch:
>
> lp:~skinny.moey/drizzle/transaction_id_innodb
>
> Looks like an InnoDB trx id is allocated for the server STARTUP and
> SHUTDOWN events, but the transaction is never closed within InnoDB (via
> trx_free_for_mysql()).

This is quite likely.

Note that Innobase plugin will just start a transaction just about
anywhere if there hasn't been one... so calling things has to be pretty
careful.

we should add a test to storage_engine_api_tester for this call and what
sholud/shouldn't be aronud it.

--
Stewart Smith

Revision history for this message
David Shrewsbury (dshrews) wrote :

Still happening. :(

Revision history for this message
David Shrewsbury (dshrews) wrote :

My mistake. Patch works.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.