patrickpeng2091 / lsyncd

Automatically exported from code.google.com/p/lsyncd
GNU General Public License v2.0
0 stars 0 forks source link

lsyncd: exits with Interrupted system call if strace'd #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A user of the lsyncd Debian package reported 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618678 which describes a crash 
of lsyncd when running it with strace. I don't think that the described 
behaviour is Debian specific.

It would be nice if you could respond to 618678@bugs.debian.org (ideally CCing 
618678-submitter@b.d.o to keep the original reporter in the loop).

Regards
Jan Dittberner

Original issue reported on code.google.com by jan.ditt...@gmail.com on 17 Mar 2011 at 7:22

GoogleCodeExporter commented 9 years ago
Lsyncd is currently on a major revision later than 1.34 for which this has been 
reported. A lot has changed since then.

Original comment by axk...@gmail.com on 17 Mar 2011 at 7:50

GoogleCodeExporter commented 9 years ago
1.34 is the lsyncd release in Debian stable. The bug is not release critical. I 
will ask the submitter to try 2.0.3 and ask him whether he can reproduce the 
bug in that version.

Original comment by jan.ditt...@gmail.com on 18 Mar 2011 at 9:49

GoogleCodeExporter commented 9 years ago
Yes, I could reproduce this with Lsyncd 1.34, and I can confirm the issue to be 
gone with 2.0.3. 

To quote the strace man page:
   On some platforms a process that has a system call trace applied
   to it with the -p option will receive a  SIGSTOP.   This  signal
   may  interrupt  a system call that is not restartable.  This may
   have an unpredictable effect on the process if the process takes
   no action to restart the system call.

Lsyncd 1.34 is such a process that does not properly do an action to restart 
the system call that reads from inotify. Lsyncd 1.42 will not halt, but do a 
complete restart, as it handles the SIGSTOP to be a SIGHUP. Lsyncd 2.0.x and 
later applies a proper signalmask and will thus not be affected when hooked 
with strace -p.

Solution: I strongly suggest going with Lsyncd 2.0.x. It has been a complete 
rewrite that added improvments and fixes on a lot of frontiers. If you strace 
Lsyncd 1.34 right from start rather than hook on it with strace -p it'll work 
too.

Kind regards, and sorry for the issues. Axel

Original comment by axk...@gmail.com on 22 Mar 2011 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by axk...@gmail.com on 29 Mar 2011 at 8:43