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

Races in UDF library lookup [CORE3443] #3805

Closed
firebird-automations opened this issue Apr 15, 2011 · 6 comments
Closed

Races in UDF library lookup [CORE3443] #3805

firebird-automations opened this issue Apr 15, 2011 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @AlexPeshkoff

Was reported privately by Dmitry Kovalenko.

When closing database on superclassic server in rare cases AV happens with following stack trace:

ntdll.dll!RtlEnterCriticalSection() + 0x6 байт
fb_inet_server.exe!Firebird::MemoryPool::deallocate(void * block=0x00000000047b7128) Строка 1942 C++
fb_inet_server.exe!Jrd::Module::InternalModule::~InternalModule() Строка 77 + 0x1e байт C++
fb_inet_server.exe!Jrd::Module::~Module() Строка 332 + 0x11 байт C++
fb_inet_server.exe!Jrd::Module::`scalar deleting destructor'() + 0x14 байт C++
fb_inet_server.exe!Jrd::Database::~Database() Строка 98 + 0x243 байт C++
fb_inet_server.exe!shutdown_database(Jrd::Database * dbb=0x0000000004876aa8, const bool release_pools=true) Строка 5409 + 0x35 байт C++
fb_inet_server.exe!purge_attachment(Jrd::thread_db * tdbb=0x0000000002f6f940, Jrd::Attachment * attachment=0x00000000047b71f8, const bool force_flag=false) Строка 5882 C++
fb_inet_server.exe!jrd8_detach_database(__int64 * user_status=0x0000000002f6fb40, Jrd::Attachment * * handle=0x00000000005be2d8) Строка 2306 + 0x13 байт C++
fb_inet_server.exe!detach_or_drop_database(__int64 * user_status=0x000000001280ba48, unsigned int * handle=0x0000000005244bb0, const int proc=410085592, const __int64 specCode=1) Строка 2270 + 0x19 байт C++

Commits: 931f1af e44194f

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

The reason of a bug is used earlier 'long' instead 'AtomicCounter' to count references to UDF module from various databases. Before 2.5 it was safe.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

It's really good idea to use atomic counter in such cases.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10333 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Cannot be tested

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