Bug #42830 Falcon Exception: ResultSet has been closed after recovery
Submitted: 13 Feb 2009 13:04 Modified: 15 May 2009 15:58
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0-falcon-team OS:Any
Assigned to: Christopher Powers CPU Architecture:Any
Tags: F_ERROR HANDLING, system transaction, Tablespace
Triage: Triaged: D1 (Critical)

[13 Feb 2009 13:04] Philip Stoev
Description:
Shortly after recovery, Falcon crashed as follows:

 16:24:09 Update cardinalities
# 16:24:09 1: CommitNoUpdates transaction 2
# 16:24:09 Exception: ResultSet has been closed
# 16:24:09 2: Rollback transaction 3
# 16:24:10 Exception: can't continue after fatal error
# 16:24:10 Thread::thread: thread -1510691952: can't continue after fatal error
# 16:24:10 terminate called after throwing an instance of 'SQLError'
# 16:24:10 090212 16:24:10 - mysqld got signal 6 ;

 16:24:10 stack_bottom = (nil) thread_stack 0x30c00
# 16:24:10 /export/home/pb2/test/sb_1-317944-1234451012.72/mysql-6.0.10-alpha-linux-i686-test/libexec/mysqld(my_print_stacktrace+0x32) [0x88194c9]
# 16:24:10 /export/home/pb2/test/sb_1-317944-1234451012.72/mysql-6.0.10-alpha-linux-i686-test/libexec/mysqld(handle_segfault+0x2cd) [0x82bafc9]
# 16:24:10 [0x193420]
# 16:24:10 /lib/libc.so.6(abort+0x101) [0x74b621]
# 16:24:10 /usr/lib/libstdc++.so.6(__gnu_cxx::__verbose_terminate_handler()+0x150) [0xa99c60]
# 16:24:10 /usr/lib/libstdc++.so.6 [0xa976c5]
# 16:24:10 /usr/lib/libstdc++.so.6 [0xa97702]
# 16:24:10 /usr/lib/libstdc++.so.6(__cxa_rethrow+0x5b) [0xa977bb]
# 16:24:10 /export/home/pb2/test/sb_1-317944-1234451012.72/mysql-6.0.10-alpha-linux-i686-test/libexec/mysqld(Thread::thread()+0x1a2) [0x857b536]
# 16:24:10 /export/home/pb2/test/sb_1-317944-1234451012.72/mysql-6.0.10-alpha-linux-i686-test/libexec/mysqld(Thread::thread(void*)+0x17) [0x857b5f9]
# 16:24:10 /lib/libpthread.so.0 [0x89a45b]
# 16:24:10 /lib/libc.so.6(clone+0x5e) [0x7f1c4e]

How to repeat:
This is happening only rarely and a new recovery attempt on the original tablespace does not produce the failure.
[19 Feb 2009 17:16] Kevin Lewis
Chris, Vlad suggests that this may be similar to Bug#42725.  These bugs may be seen now because the scavenger is running more often.  Please investigate whether the scavenger needs to coordinate access to ResultSets before clearing them.
[23 Feb 2009 20: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/67254

3032 Christopher Powers	2009-02-23
      Bug#42725 "Exception when filling I_S.TABLESPACES by Falcon"
      Bug#42830 "Falcon Exception: ResultSet has been closed after recovery"
      
      The exception occurs because the system transaction is committed
      while the result set is being accessed. The commit closes the
      statement and clears the associated result sets.
      
      To prevent this, the tablespace getinfo methods now get a
      shared lock on syncSysDDL before executing queries.
      
      Database::openDatabase also gets a shared lock on syncSysDDL
      prior to executing query and processing the result set. Note that
      this issue was indirectly addressed by disabling scavenging during
      recovery: http://lists.mysql.com/commits/66823.
[23 Feb 2009 22:47] 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/67268

3034 Christopher Powers	2009-02-23
      Bug#42725 "Exception when filling I_S.TABLESPACES by Falcon"
      Bug#42830 "Falcon Exception: ResultSet has been closed after recovery"
      
      Missed a spot: SequenceManager::initialize()
[2 Mar 2009 14:12] Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090302140208-lfdejjbcyezlhhjt) (version source revid:olav@sun.com-20090224081308-fcszc3gg5r9gykao) (merge vers: 6.0.11-alpha) (pib:6)
[15 May 2009 15:58] MC Brown
An entry has been added to the 6.0.11 changelog: 

When Falcon is populating the INFORMATION_SCHEMA.TABLESPACES table, an exception can be raised because required result set has been closed before the resultset has been completed. This can happen during a BACKUP operation.