axkibe/lsyncd — Issue #83: lsyncd crashes when it gets a notification from kernel
Author: axkibe
Created: 2011-11-16 15:10:28+00:00
State: open

Originally filed by atvol3....@gmail.com on 2011-08-29T06:42:24

What steps will reproduce the problem?
1. Compile lsyncd on rhel 5.5 (also compile lua-5.1 and rsync-3.0.8).
2. Run lsyncd -rsync /tmp/foo host:/tmp/foo
3. Initial startup goes well.
4. touch /tmp/foo/me
5. Crash.

What is the expected behavior? What does Lsyncd do instead?

Lsync should work, but instead it crashes. :)

What version of Lsyncd are you using? On what operating system (host and target(s)?

We're running linux rhel 5.5. The rhel doesn't have prebuilt packages for lua and it's rsync is too old, but I've dodged these issues already.

If applicable please copy/paste your Lsyncd configuration file.

Running on defaults.

If applicable please copy/paste a logfile generated with '-log all' of a minimal testcase that raises this problem.

kernels clocks_per_sec=100
Call: configure()
Inotify: inotify fd = 3
Call: initialize()
09:35:36 Function: Inotify.addWatch(/tmp/foo/, (true), (nil), (nil))
09:35:36 Inotify: addwatch(/tmp/foo/)->1
09:35:36 Call: getAlarm()
09:35:36 Alarm: runner.getAlarm returns: (true)
09:35:36 Masterloop: immediately handling delays.
09:35:36 Call: cycle()
09:35:36 Function: invokeActions('Sync1',(Timestamp: 6129235.2))
09:35:36 Normal: recursive startup rsync: /tmp/foo/ -> DSTHOST:/tmp/foo/
09:35:36 Exec: /opt/ami/rsync-3.0.8/bin/rsync [--delete] [-lts] [-r] [/tmp/foo/] [DSTHOST:/tmp/foo/]
09:35:36 Call: getAlarm()
09:35:36 Alarm: runner.getAlarm returns: (false)
09:35:36 Masterloop: going into select (no timeout).
09:35:36 Call: collectProcess()
09:35:36 Delay: collected an event
09:35:36 Normal: Startup of '/tmp/foo/' finished.
09:35:36 Delay: Finish of Init on /tmp/foo/ = 0
09:35:36 Call: cycle()
09:35:36 Function: invokeActions('Sync1',(Timestamp: 6129235.53))
09:35:36 Call: getAlarm()
09:35:36 Alarm: runner.getAlarm returns: (false)
09:35:36 Masterloop: going into select (no timeout).
09:36:03 Call: inotifyEvent()
09:36:03 Inotify: got event Create me(1)
09:36:03 Function: delay(Sync1, Create, /me, (nil))
09:36:03 Delay: New Create:/me
09:36:03 Call: cycle()
09:36:03 Function: invokeActions('Sync1',(Timestamp: 6129262.04))
09:36:03 Call: getAlarm()
09:36:03 Alarm: runner.getAlarm returns: (Timestamp: 6129277.04)
PANIC: unprotected error in call to Lua API (bad argument #-1 (Lsyncd.jiffies expected, got table))

Please provide any additional information below.

The source directory /tmp/foo is empty at startup. Then I do touch /tmp/foo/me and at 09:36:03 lsyncd reacts to that. Then something goes wrong and I get the PANIC message.