Bug 9502 - Deamon deadlock at stop (SIGINT caught)
Summary: Deamon deadlock at stop (SIGINT caught)
Status: ASSIGNED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.7
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-14 09:28 UTC by yuri
Modified: 2013-06-02 23:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yuri 2012-12-14 09:28:46 UTC
After SIGINT receiving rsync deamon hangs with next stack:

#0  0x00002b96891cf01e in __lll_lock_wait_private () from /lib64/libc.so.6
#1  0x00002b9689165e5d in _L_lock_15302 () from /lib64/libc.so.6
#2  0x00002b968916445f in malloc_atfork () from /lib64/libc.so.6
#3  0x00002b968915017a in __fopen_internal () from /lib64/libc.so.6
#4  0x000000000041ff92 in logfile_open () at log.c:153
#5  0x000000000041e8ec in logit (code=FERROR, 
    buf=0x7fff3cfc2060 "rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(545) [Receiver=3.0.7]\n", len=92, is_utf8=0) at log.c:116
#6  rwrite (code=FERROR, 
    buf=0x7fff3cfc2060 "rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(545) [Receiver=3.0.7]\n", len=92, is_utf8=0) at log.c:285
#7  0x000000000041ede5 in rprintf (code=FERROR, 
    format=0x4471b0 "rsync error: %s (code %d) at %s(%d) [%s=%s]\n") at log.c:405
#8  0x000000000041eeec in log_exit (code=20, file=0x4446f5 "rsync.c", line=545) at log.c:836
#9  0x00000000004133f9 in _exit_cleanup (code=20, file=0x4446f5 "rsync.c", line=545)
    at cleanup.c:190
#10 0x000000000040ab62 in sig_int (val=<value optimized out>) at rsync.c:545
#11 <signal handler called>
#12 0x00002b968915debc in ptmalloc_unlock_all () from /lib64/libc.so.6
#13 0x00002b968918947f in fork () from /lib64/libc.so.6
#14 0x000000000042c945 in start_accept_loop (port=12666, fn=0x436a80 <start_daemon>)
    at socket.c:597
#15 0x00000000004382d7 in daemon_main () at clientserver.c:1069
#16 0x000000000041be2a in main (argc=0, argv=0x0) at main.c:1479

I think problem that _exit_cleanup uses non reentrant function fopen (not sure that only it)