Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SuperServer FB3 has entered in infinite loop (hang up) [CORE5632] #5898

Closed
firebird-automations opened this issue Oct 9, 2017 · 7 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @ibprovider

Attachments:
fb_lock_994e00000000384b28000000.zip

- Firebird 3.0.3.32802 x64 (SuperServer)
- Connection through TCP/IP (localhost)

Server has entered in infinite loop(?) in one own thread (ID: 24436)

I waited 24 hours.

At client side (multithreaded test system) all test threads wait the answer from server:
- 1 thread wait answer for COMMIT_TR
- 3 threads wait answers for START_TR
- 7 threads wait answers for DETACH_DB

Sources, dumps, binaries ...: http://dropmefiles.com/h0au4 (valid within 14 days)

Stack of thread with infinite loop (24436)
> engine12.dll!Jrd::LockManager::find_lock(unsigned short series, const unsigned char * value, unsigned short length, unsigned short * slot) Line 2129 C++ Symbols loaded.
engine12.dll!Jrd::LockManager::enqueue(Jrd::thread_db * tdbb, Firebird::CheckStatusWrapper * statusVector, long prior_request, const unsigned short series, const unsigned char * value, const unsigned short length, unsigned char type, int(*)(void *) ast_routine, void * ast_argument, __int64 data, short lck_wait, long owner_offset) Line 581 C++ Symbols loaded.
engine12.dll!enqueue(Jrd::thread_db * tdbb, Firebird::CheckStatusWrapper * statusVector, Jrd::Lock * lock, unsigned short level, short wait) Line 934 C++ Symbols loaded.
[Inline Frame] engine12.dll!ENQUEUE(Jrd::thread_db *) Line 149 C++ Symbols loaded.
engine12.dll!LCK_lock(Jrd::thread_db * tdbb, Jrd::Lock * lock, unsigned short level, short wait) Line 663 C++ Symbols loaded.
engine12.dll!transaction_start(Jrd::thread_db * tdbb, Jrd::jrd_tra * trans) Line 3259 C++ Symbols loaded.
engine12.dll!TRA_start(Jrd::thread_db * tdbb, int tpb_length, const unsigned char * tpb, Jrd::jrd_tra * outer) Line 1715 C++ Symbols loaded.
engine12.dll!start_transaction(Jrd::thread_db * tdbb, bool transliterate, Jrd::jrd_tra * * tra_handle, Jrd::Attachment * attachment, unsigned int tpb_length, const unsigned char * tpb) Line 7848 C++ Symbols loaded.
engine12.dll!Jrd::JAttachment::startTransaction(Firebird::CheckStatusWrapper * user_status, unsigned int tpbLength, const unsigned char * tpb) Line 4195 C++ Symbols loaded.
engine12.dll!Firebird::IAttachmentBaseImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::IReferenceCountedImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IVersionedImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::InheritFirebird::IAttachment\ > > > >::cloopstartTransactionDispatcher(Firebird::IAttachment * self, Firebird::IStatus * status, unsigned int tpbLength, const unsigned char * tpb) Line 8654 C++ Symbols loaded.
[Inline Frame] fbclient.dll!Firebird::IAttachment::startTransaction(Firebird::CheckStatusWrapper *) Line 1827 C++ Symbols loaded.
fbclient.dll!Why::YAttachment::startTransaction(Firebird::CheckStatusWrapper * status, unsigned int tpbLength, const unsigned char * tpb) Line 5070 C++ Symbols loaded.
fbclient.dll!Firebird::IAttachmentBaseImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::IReferenceCountedImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IVersionedImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::InheritFirebird::IAttachment\ > > > >::cloopstartTransactionDispatcher(Firebird::IAttachment * self, Firebird::IStatus * status, unsigned int tpbLength, const unsigned char * tpb) Line 8654 C++ Symbols loaded.
[Inline Frame] firebird.exe!Firebird::IAttachment::startTransaction(Firebird::CheckStatusWrapper *) Line 1827 C++ Symbols loaded.
firebird.exe!rem_port::start_transaction(P_OP operation, p_sttr * stuff, packet * sendL) Line 5849 C++ Symbols loaded.
firebird.exe!process_packet(rem_port * port, packet * sendL, packet * receive, rem_port * * result) Line 4398 C++ Symbols loaded.
firebird.exe!loopThread(void * __formal) Line 5954 C++ Symbols loaded.
[Inline Frame] firebird.exe!`anonymous-namespace'::ThreadArgs::run() Line 78 C++ Symbols loaded.
firebird.exe!threadStart(void * arg) Line 93 C++ Symbols loaded.

@firebird-automations
Copy link
Collaborator Author

Commented by: @ibprovider

Code of infinite loop:
--------------
lbl* LockManager::find_lock(USHORT series,
const UCHAR* value,
USHORT length,
USHORT* slot)
{
/**************************************
*
* f i n d _ l o c k
*
**************************************
*
* Functional description
* Find a lock block given a resource
* name. If it doesn't exist, the hash
* slot will be useful for enqueing a
* lock.
*
**************************************/

// See if the lock already exists

const USHORT hash\_slot = \*slot =
	\(USHORT\) InternalHash::hash\(length, value, m\_sharedMemory\-\>getHeader\(\)\-\>lhb\_hash\_slots\);

ASSERT\_ACQUIRED;
srq\* const hash\_header = &m\_sharedMemory\-\>getHeader\(\)\-\>lhb\_hash\[hash\_slot\];

>| for (srq* lock_srq = (SRQ) SRQ_ABS_PTR(hash_header->srq_forward);
>| lock_srq != hash_header; lock_srq = (SRQ) SRQ_ABS_PTR(lock_srq->srq_forward))
>| {
>| lbl* lock = (lbl*) ((UCHAR*) lock_srq - offsetof(lbl, lbl_lhb_hash));
>| if (lock->lbl_series != series || lock->lbl_length != length)
>| {
>| continue;
>| }

	if \(\!length \|\| \!memcmp\(value, lock\-\>lbl\_key, length\)\)
		return lock;
\}

return NULL;

}
--------------

@firebird-automations
Copy link
Collaborator Author

Commented by: @ibprovider

lock file

@firebird-automations
Copy link
Collaborator Author

Modified by: @ibprovider

Attachment: fb_lock_994e00000000384b28000000.zip [ 13182 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @ibprovider

Reason of this problem was linked with hardware error (bad RAM module).

Please close this issue.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Cannot Reproduce [ 5 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Cannot be tested

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant