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

Deadlock on Shutdown under MacOSX in 1.1 #295

Closed
fceller opened this issue Nov 25, 2012 · 4 comments
Closed

Deadlock on Shutdown under MacOSX in 1.1 #295

fceller opened this issue Nov 25, 2012 · 4 comments
Assignees
Labels
Milestone

Comments

@fceller
Copy link
Contributor

fceller commented Nov 25, 2012

(gdb) thread 1
[Switching to thread 1 (process 81365), "com.apple.main-thread"]
0x00007fff85e41386 in __semwait_signal ()
(gdb) where
#0 0x00007fff85e41386 in __semwait_signal ()
#1 0x00007fff8e30dcbd in pthread_join ()
#2 0x0000000108e5fa73 in TRI_ShutdownLogging () at logging.c:1781
#3 0x0000000108e5b80d in TRI_ShutdownC () at init.c:75
#4 0x0000000108d8ccef in main (argc=4, argv=0x0) at arango.cpp:63

(gdb) thread 2
[Switching to thread 2 (process 81365)]
0x00007fff8e2cbfcd in __findenv ()
(gdb) where
#0 0x00007fff8e2cbfcd in __findenv ()
#1 0x00007fff8e2cc020 in getenv ()
#2 0x00007fff8e2b17e0 in _st_tzset_basic ()
#3 0x00007fff8e2b3091 in localtime_r ()
#4 0x00007fff8e2b31ea in ctime_r ()
#5 0x00007fff8e2973d9 in _asl_time_string ()
#6 0x00007fff8e29730e in asl_msg_to_string_raw ()
#7 0x00007fff8e28fc77 in _asl_send_message ()
#8 0x00007fff8e28f412 in _asl_lib_vlog ()
#9 0x00007fff8e27c839 in vsyslog ()
#10 0x00007fff8e27c7b6 in syslog ()
#11 0x0000000108e600ab in LogAppenderSyslog_Log (appender=0x7fff8e31cfce, level=37, severity=0, msg=0x7fff8e31cfce "TZ", length=4484685360) at logging.c:1485
#12 0x0000000108e5fdf0 in MessageQueueWorker (data=0x7fff8e31cfce) at logging.c:632
#13 0x0000000108e6730b in ThreadStarter (data=0x7f8e11e00000) at threads-posix.c:93
#14 0x00007fff8e283742 in _pthread_start ()
#15 0x00007fff8e270181 in thread_start ()

(gdb) thread 3
[Switching to thread 3 (process 81365)]
0x00007fff85e41386 in __semwait_signal ()
(gdb) where
#0 0x00007fff85e41386 in __semwait_signal ()
#1 0x00007fff8e30d800 in nanosleep ()
#2 0x00007fff8e30d717 in usleep ()
#3 0x0000000108e866e2 in StatisticsLoop () at statistics.cpp:497
#4 0x0000000108e6730b in ThreadStarter (data=0x7f8e11e043b0) at threads-posix.c:93
#5 0x00007fff8e283742 in _pthread_start ()
#6 0x00007fff8e270181 in thread_start ()

@ghost ghost assigned jsteemann Nov 25, 2012
@fceller
Copy link
Contributor Author

fceller commented Nov 26, 2012

Note: I cannot reproduce this problem

@ghost ghost assigned fceller Nov 27, 2012
@fceller
Copy link
Contributor Author

fceller commented Nov 27, 2012

Logging should be in GMT

@ghost ghost assigned jsteemann Nov 27, 2012
jsteemann added a commit that referenced this issue Nov 27, 2012
@jsteemann
Copy link
Contributor

Actually we're not calling localtime ourselves but syslog does it internally.
The problem may be caused by syslog being non-reentrant (this is a guess only but is reported occasionally on Google).
I have put a mutex around the syslog calls in 1.1 which hopefully makes it reentrant. I have also changed the behavior of 1.1 to only use the syslog if the server is started with the --logger.syslog option. Previously, the syslog was always used, even if the server was not started with that option.

jsteemann added a commit that referenced this issue Nov 27, 2012
jsteemann added a commit that referenced this issue Nov 27, 2012
@jsteemann
Copy link
Contributor

Please reopen if it occurs again.

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

No branches or pull requests

2 participants