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

Server crash every 3 hour (FreeBSD8.2R) [CORE3400] #1321

Closed
firebird-automations opened this issue Mar 19, 2011 · 6 comments
Closed

Server crash every 3 hour (FreeBSD8.2R) [CORE3400] #1321

firebird-automations opened this issue Mar 19, 2011 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: YuriP (yuri_pp)

Every 3 hour Firebird crash with log :

    Sat Mar 19 18:08:14 2011
    Fatal lock manager error: mutex init failed, errno: 22

(Client) Sat Mar 19 18:08:14 2011
/usr/local/bin/fbguard: /usr/local/sbin/fb_smp_server terminated abnormally (-1)
(Client) Sat Mar 19 18:08:14 2011
/usr/local/bin/fbguard: guardian starting /usr/local/sbin/fb_smp_server

    Sat Mar 19 21:31:13 2011
    Fatal lock manager error: mutex init failed, errno: 22

(Client) Sat Mar 19 21:31:14 2011
/usr/local/bin/fbguard: /usr/local/sbin/fb_smp_server terminated abnormally (-1)

(Client) Sat Mar 19 21:31:14 2011
/usr/local/bin/fbguard: guardian starting /usr/local/sbin/fb_smp_server

Core dump backtrace:

#⁠0 0x0000000800824cc8 in ISC_unmap_file () from /usr/local/lib/libfbembed.so.2.5
#⁠1 0x000000080096c465 in Jrd::LockManager::detach_shared_file () from /usr/local/lib/libfbembed.so.2.5
#⁠2 0x00000008009730c0 in Jrd::LockManager::~LockManager () from /usr/local/lib/libfbembed.so.2.5
#⁠3 0x0000000800700d80 in Firebird::RefCounted::release () from /usr/local/lib/libfbembed.so.2.5
#⁠4 0x000000080084510b in Jrd::Database::~Database () from /usr/local/lib/libfbembed.so.2.5
#⁠5 0x00000008008269d3 in shutdown_database () from /usr/local/lib/libfbembed.so.2.5
#⁠6 0x00000008008314e3 in purge_attachment () from /usr/local/lib/libfbembed.so.2.5
#⁠7 0x00000008008325a7 in jrd8_detach_database () from /usr/local/lib/libfbembed.so.2.5
#⁠8 0x00000008006fd994 in detach_or_drop_database () from /usr/local/lib/libfbembed.so.2.5
#⁠9 0x0000000800876a40 in Jrd::SecurityDatabase::closeDatabase () from /usr/local/lib/libfbembed.so.2.5
#⁠10 0x0000000800877282 in Jrd::SecurityDatabase::onShutdown () from /usr/local/lib/libfbembed.so.2.5
#⁠11 0x000000080087735c in Jrd::SecurityDatabase::onShutdown () from /usr/local/lib/libfbembed.so.2.5
#⁠12 0x0000000800700463 in fb_shutdown () from /usr/local/lib/libfbembed.so.2.5
#⁠13 0x00000008009eeaf2 in Firebird::InstanceControl::destructors () from /usr/local/lib/libfbembed.so.2.5
#⁠14 0x00000008009eeb99 in __tcf_0 () from /usr/local/lib/libfbembed.so.2.5
#⁠15 0x000000080140ebf6 in __cxa_finalize () from /lib/libc.so.7
#⁠16 0x00000008006de773 in __do_global_dtors_aux () from /usr/local/lib/libfbembed.so.2.5
#⁠17 0x00000008005849c0 in ?? ()
#⁠18 0x00000008009fad61 in _fini () from /usr/local/lib/libfbembed.so.2.5
#⁠19 0x0000000800584980 in ?? ()
#⁠20 0x000000080055ad31 in dlsym () from /libexec/ld-elf.so.1
#⁠21 0x000000080055aeee in dlclose () from /libexec/ld-elf.so.1
#⁠22 0x000000080140ec04 in __cxa_finalize () from /lib/libc.so.7
#⁠23 0x00000008013baf57 in exit () from /lib/libc.so.7
#⁠24 0x000000080096c2cc in Jrd::LockManager::bug () from /usr/local/lib/libfbembed.so.2.5
#⁠25 0x000000080096d250 in Jrd::LockManager::initialize () from /usr/local/lib/libfbembed.so.2.5
#⁠26 0x00000008008241b2 in ISC_map_file () from /usr/local/lib/libfbembed.so.2.5
#⁠27 0x000000080096d706 in Jrd::LockManager::attach_shared_file () from /usr/local/lib/libfbembed.so.2.5
#⁠28 0x0000000800971890 in Jrd::LockManager::LockManager () from /usr/local/lib/libfbembed.so.2.5
#⁠29 0x0000000800972063 in Jrd::LockManager::create () from /usr/local/lib/libfbembed.so.2.5
#⁠30 0x00000008008348cf in jrd8_attach_database () from /usr/local/lib/libfbembed.so.2.5
#⁠31 0x00000008006ffa7b in isc_attach_database () from /usr/local/lib/libfbembed.so.2.5
#⁠32 0x000000000040e14c in attach_database ()
#⁠33 0x0000000000412cd4 in process_packet ()
#⁠34 0x0000000000413a65 in loopThread ()
#⁠35 0x00000008006edf9b in (anonymous namespace)::threadStart () from /usr/local/lib/libfbembed.so.2.5
#⁠36 0x000000080122c4f1 in pthread_getprio () from /lib/libthr.so.3
#⁠37 0x00007ffffebf8000 in ?? ()

It's core dump was create because exit procedure, initated from LockManager , is not correct, but It dump cann't show, what problem was be with lockmanager.
I suspect that procedures in src/jrs/ics_sync.cpp not fully tested on FreeBSD, and work with semaphores not fully correct.

Commits: 2760ce3 9017640 FirebirdSQL/fbt-repository@cc293a5

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Core dump is correct - here is
#⁠24 0x000000080096c2cc in Jrd::LockManager::bug () from /usr/local/lib/libfbembed.so.2.5
#⁠25 0x000000080096d250 in Jrd::LockManager::initialize () from /usr/local/lib/libfbembed.so.2.5
#⁠26 0x00000008008241b2 in ISC_map_file () from /usr/local/lib/libfbembed.so.2.5
sequence which caused real error. Superclassic tried to close, but failed to do it smart.

Procedures in ics_sync.cpp are really not full tested on FreeBSD, but same code is used on MacOS (it has same with freebsd problem with missing shared mutexes). The state of freebsd 2.5 port is as follows - I've made it build without fatal errors and made sure that it's passing minimum(!) tests. The worst is the fact that this OS does miss efficient cross-process sync tools (shared mutexes and shared condition variable), which makes is definitely less efficient for FB 2.5 compared with linux.

Anyway - at the first glance looks like you've found a bug. If you wish to take part it fixing it - please contact me privately (peshkoff at mail dot ru).

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Issue appears to be fixed - but I did not get final confirmation from Yuri.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10333 ]

@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
Projects
None yet
Development

No branches or pull requests

2 participants