[Bug 3271] New: Rsync instances stay in memory when using in daemon mode

bugzilla-daemon at dp3.samba.org bugzilla-daemon at dp3.samba.org
Fri Nov 18 13:14:39 GMT 2005


https://bugzilla.samba.org/show_bug.cgi?id=3271

           Summary: Rsync instances stay in memory when using in daemon mode
           Product: rsync
           Version: 2.6.7
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: akalach at itos.eu.org
         QAContact: rsync-qa at samba.org


Hello, all

We are using rsync as file transfer tool to make run-time
synchronization of two remote servers. So rsync is started each time a
file is modified to make changes be propagated to the remote peer.

Receiving side.
   The rsync is working in daemon mode (rsync --daemon)

Sending site.
   There is a frequently modified file, which is sended by rsync to
receiving side after each modification.
   Before sending the file our system performs check for existing rsync
process, which are already sending the same file.
   If it is so, this rsync process is terminated by sending to it TERM
signal, and next starting new rsync process.

Problem.
   Sometimes on the receiving side appear child rsync processes which
permanently hang in memory and never finish. I observed that these processes
write to log file string "rsync: read error: Connection reset by peer" and then
hang.
   After I removed logging from rsync (see log.c file) this problem is
not appeared anymore.
   This problem is encountered only when rsync is in the daemon mode.
When we are using rsync in the standalone mode all works fine.

   I assume that the cause of the problem is the usage of string
formatting functions in the signal handlers in the rsync source code.
Many of such formattings functions are using static buffers/variables
and when invoked in signal handler may caused to inpredicable results.

All testing was done on the SuSe 9.0 Linux x86 with rsync 2.6.6 release
and with the latest CVS snapshot.


:/var/log/trace/rsync> ps ax|grep rsync
18998 pts/8    S      0:36 strace -f rsync --daemon --no-detach
18999 pts/8    S      0:00 rsync --daemon --no-detach
19450 pts/8    S      0:00 rsync --daemon --no-detach
19945 pts/8    S      0:00 rsync --daemon --no-detach
20049 pts/8    S      0:00 rsync --daemon --no-detach
20077 pts/8    S      0:00 rsync --daemon --no-detach


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list