incron fails after dealing with changes done by useradd or userdell

From: Patryk <rzadzinp_at_wit.edu.pl>
Date: Mon, 07 Mar 2011 14:46:49 +0100

Hello,

I gave incron 0.5.8 a try.

# `incrontab -e`
/etc/passwd IN_CLOSE_WRITE /send/me/an/email

useradd would trigger this immediately, sending 2 notification emails. After that incron
would just hang and ignore any changes to the passwd file. The same happens with
/etc/group or userdel, however echo text > /some/other/file works all the time without
crashing anything.

Perhaps a hint can be gained from stracing the incrond process:

poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1) = ?
ERESTART_RESTARTBLOCK (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
read(4, 0x61d7e0, 32) = -1 EAGAIN (Resource temporarily unavailable)
write(5, "X", 1) = 1
rt_sigreturn(0x5) = -1 EINTR (Interrupted system call)
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1) = 1
([{fd=4, revents=POLLIN}])
read(4, "X", 1) = 1
read(4, 0x7fff170b253f, 1) = -1 EAGAIN (Resource temporarily unavailable)
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 8522
wait4(-1, 0x7fff170b2558, WNOHANG, NULL) = -1 ECHILD (No child processes)
poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 3, -1

The last line is where the process hangs without responding to any next changes. Probably
a bug.

--
Kind regards,
Patryk
Received on Tue Jun 05 2012 - 22:14:21 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST