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

Segfault when closing SQL statement in remote provider during shutdown #7504

Closed
AlexPeshkoff opened this issue Mar 14, 2023 · 2 comments
Closed

Comments

@AlexPeshkoff
Copy link
Member

During shutdown of CS process segfault took place. In stack trace one can see that code tries to work with non-NULL Rsr instance pointing out of allocated for process address space.

Stack trace:

#0 0x00007f26d13896f9 in (anonymous namespace)::CHECK_HANDLE (blk=blk@entry=0x7f1925422140, error=335544324)
at /usr/home/firebird/B4.0-release/src/remote/client/interface.cpp:118
#1 0x00007f26d1390e95 in Remote::Statement::freeClientData (this=this@entry=0x7f26d1961f00, status=status@entry=0x7f26cfc8e140,
force=force@entry=true) at /usr/home/firebird/B4.0-release/src/remote/client/interface.cpp:3892
#2 0x00007f26d1398d22 in Remote::Statement::release (this=0x7f26d1961f00)
at /usr/home/firebird/B4.0-release/src/remote/client/interface.cpp:736
#3 0x00007f26d13a7c39 in Firebird::IStatementBaseImpl<Remote::Statement, Firebird::CheckStatusWrapper, Firebird::IReferenceCountedImpl<Remote::Statement, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IVersionedImpl<Remote::Statement, Firebird::CheckStatusWrapper, Firebird::InheritFirebird::IStatement > > > >::cloopreleaseDispatcher (self=)
at /usr/home/firebird/B4.0-release/src/include/firebird/IdlFbInterfaces.h:10155
#4 0x00007f26d1336872 in Firebird::IReferenceCounted::release (this=)
at /usr/home/firebird/B4.0-release/src/include/firebird/IdlFbInterfaces.h:181
#5 Firebird::RefPtrFirebird::IStatement::assign (p=0x0, this=0x7f25f08ad338)
at /usr/home/firebird/B4.0-release/src/include/../common/classes/RefCounted.h:217
#6 Firebird::RefPtrFirebird::IStatement::operator= (p=0x0, this=0x7f25f08ad338)
at /usr/home/firebird/B4.0-release/src/include/../common/classes/RefCounted.h:149
#7 Why::YHelper<Why::YStatement, Firebird::IStatementImpl<Why::YStatement, Firebird::CheckStatusWrapper, Firebird::IReferenceCountedImpl<Why::YStatement, Firebird::CheckStatusWrapper, Firebird::Inherit<Firebird::IVersionedImpl<Why::YStatement, Firebird::CheckStatusWrapper, Firebird::InheritFirebird::IStatement > > > > >::destroy2 (dstrFlags=0, this=0x7f25f08ad310)
at /usr/home/firebird/B4.0-release/src/yvalve/../yvalve/YObjects.h:167
#8 Why::YStatement::destroy (this=0x7f25f08ad310, dstrFlags=dstrFlags@entry=0) at /usr/home/firebird/B4.0-release/src/yvalve/why.cpp:4237
#9 0x00007f26d13499b3 in Why::HandleArrayWhy::YStatement::destroy (dstrFlags=0, this=0x7f1d9786ab30)
at /usr/home/firebird/B4.0-release/src/yvalve/../yvalve/YObjects.h:107
#10 Why::YAttachment::destroy (this=this@entry=0x7f1d9786a9b0, dstrFlags=dstrFlags@entry=0)
at /usr/home/firebird/B4.0-release/src/yvalve/why.cpp:5473
#11 0x00007f26d1349de8 in Why::YAttachment::shutdown (this=this@entry=0x7f1d9786a9b0) at /usr/home/firebird/B4.0-release/src/yvalve/why.cpp:5488
#12 0x00007f26d134afd8 in Why::Dispatcher::shutdown (this=this@entry=0x7f1dd643ec70, userStatus=userStatus@entry=0x7f26cfc8e880,
timeout=timeout@entry=10000, reason=reason@entry=-5) at /usr/home/firebird/B4.0-release/src/yvalve/why.cpp:6633
#13 0x00007f26d134b870 in fb_shutdown (timeout=timeout@entry=10000, reason=reason@entry=-5)
at /usr/home/firebird/B4.0-release/src/yvalve/why.cpp:3707
#14 0x00007f26d134bb0e in (anonymous namespace)::shutdownThread () at /usr/home/firebird/B4.0-release/src/yvalve/why.cpp:783
#15 0x00007f26d13d47e0 in (anonymous namespace)::ThreadArgs::run (this=)
at /usr/home/firebird/B4.0-release/src/common/ThreadStart.cpp:78

@AlexPeshkoff
Copy link
Member Author

Wait for user test in production - error very hard to reproduce.

@AlexPeshkoff
Copy link
Member Author

AlexPeshkoff commented Mar 24, 2023

Releases in branches 3 & 4 were not affected, bug arrived in codebase later.

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

2 participants