Attachment could not gone after it was DELETE'd FROM MON$ATTACHMENTS
--------------------------------------------------------------------
Key: CORE-5819
URL: http://tracker.firebirdsql.org/browse/CORE-5819
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 3.0.3, 4.0 Alpha 1, 3.0.2, 3.0.1, 3.0.0, 4.0 Initial
Environment: Attachment run some EXECUTE STATEMENT when it was
asynchronously dropped (using DELETE FROM MON$ATTACHMENTS).
Reporter: Vlad Khorsun
It was reproduced using OLTP-EMUL test with 10 active connections.
Separate isql session issue DELETE FROM MON$ATTACHMENTS statement and not all
attachments was finally detached, one was freeze at detach stage.
Stack traces
1. First thread run regular detach, hold blockingMutex and wait for zero at
att_purge_tid :
engine12.dll!purge_attachment(0x0000000010bc14a0, 0x00000000154ef958,
3) Line 6904 C++
engine12.dll!Jrd::JAttachment::freeEngineData(0x000007fee784ca32, 88)
Line 2935 C++
engine12.dll!Firebird::IAttachmentBaseImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::IReferenceCountedImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IVersionedImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IAttachment>
> > > >::cloopdetachDispatcher(0x000000000863adc8, 0x00000000154ef958) Line
8898 C++
fbclient.dll!Why::YAttachment::detach(0x00000000154ef958) Line 5460
C++
fbclient.dll!Firebird::IAttachmentBaseImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::IReferenceCountedImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IVersionedImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IAttachment>
> > > >::cloopdetachDispatcher(0x000000000e1c3640, 0x000000000de76cc0) Line
8898 C++
firebird.exe!rem_port::disconnect(0x000000000de76cc0,
0x000000000de76cc0) Line 2866 C++
firebird.exe!process_packet(0x000000000dd8f5c0, 0x000000000dd8f5c0,
0x0000000000000000, 0x0000000000000001) Line 4568 C++
firebird.exe!loopThread(0x000000000000007a) Line 5973 C++
firebird.exe!threadStart(0x0000000000000000) Line 93 C++
2. Second thread run asyncronous detach, set set att_purge_tid, cleanup
assotiated EDS::InternalConnection and wait for blockingMutex:
ntdll.dll!NtWaitForSingleObject() Unknown
ntdll.dll!RtlpWaitOnCriticalSection() Unknown
ntdll.dll!RtlEnterCriticalSection() Unknown
engine12.dll!`anonymous
namespace'::AttachmentHolder::AttachmentHolder(0x000007fee5503288,
0x000000000c96f100, 0, 0x000007fee5503288) Line 675 C++
engine12.dll!`anonymous
namespace'::EngineContextHolder::EngineContextHolder<Jrd::JStatement>(0x000000001564ecc0,
0x0000000000000000, 0x000000000002c78e, 0) Line 753 C++
engine12.dll!Jrd::JStatement::freeEngineData(0x000000000b498b08) Line
4943 C++
engine12.dll!EDS::InternalStatement::doClose(0x0000000000000000, 208)
Line 604 C++
engine12.dll!EDS::Statement::deallocate(0x000000000c96fcf0) Line 1026
C++
engine12.dll!EDS::Statement::deleteStatement(0x0000000015643f98,
0x0000000000000000) Line 845 C++
engine12.dll!EDS::Connection::clearStatements(0x0000000015648398) Line
492 C++
engine12.dll!EDS::Connection::detach(0x0000000015648398) Line 510
C++
engine12.dll!EDS::Connection::deleteConnection(0x0000000015648398,
0x0000000000000001) Line 310 C++
engine12.dll!EDS::Provider::releaseConnection(0x0000000000000000,
{...}, 240) Line 250 C++
engine12.dll!EDS::Connection::deleteTransaction(0x000000000c96fcf0,
0x0000000000000000) Line 401 C++
engine12.dll!EDS::Transaction::rollback(0x000007fefc6811ac, 88) Line
707 C++
engine12.dll!EDS::Transaction::jrdTransactionEnd(0x000000000c96fcf0,
0x0000000015642768, false, false, false) Line 788 C++
engine12.dll!TRA_rollback(0x000000000c96fcf0, 0x0000000021d43ff0,
false, 208) Line 1319 C++
engine12.dll!purge_transactions(0x000000001039b140, 0x000000000b498ae0,
false) Line 6850 C++
engine12.dll!purge_attachment(0x0000000011c23b40, 0x0000000011c23b40,
1) Line 7024 C++
engine12.dll!`anonymous
namespace'::shutdownAttachments(0x0000000011c23b40, 224) Line 7379 C++
engine12.dll!`anonymous
namespace'::attachmentShutdownThread(0x0000000011c23b40) Line 7408 C++
engine12.dll!threadStart(0x0000000000000000) Line 93 C++
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel