You are not logged in.

#1 2012-03-15 20:50:39

ccc1
Member
Registered: 2009-04-16
Posts: 111

[Solved] problem with udev option event_timeout

hi!

i use an udev-rule to run a backup script, if an external hard drive is connected to my laptop:

KERNEL=="sd?1", ATTRS{manufacturer}=="TrekStor", ATTRS{serial}=="343434", ACTION=="add", OPTIONS+="event_timeout=3600",SYMLINK+="external", RUN+="/path/to/script.sh"

the option event_timeout ensures that the script isn't killed after 60 seconds.
everthing used to work as expected. until recently. now i have lines like these in my log and the script is killed.

Mar 15 20:38:53 localhost udevd[157]: worker [14982] timeout, kill it
Mar 15 20:38:53 localhost udevd[157]: seq 2186 '/devices/pci0000:00/0000:00:1a.7/usb1/1-5/1-5.4/1-5.4.3/1-5.4.3.2/1-5.4.3.2:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1' killed
Mar 15 20:38:53 localhost udevd[157]: worker [14982] terminated by signal 9 (Killed)

is this a known bug in udev? any workaround?

ccc1

Last edited by ccc1 (2013-08-11 14:29:38)

Offline

#2 2012-03-15 21:50:23

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] problem with udev option event_timeout

ccc1 wrote:

i use an udev-rule to run a backup script

And that's your problem right there. You should not attempt to fork long running processes from a udev rule. What you're seeing is expected behavior.

Offline

#3 2012-03-17 14:30:11

ccc1
Member
Registered: 2009-04-16
Posts: 111

Re: [Solved] problem with udev option event_timeout

falconindy wrote:
ccc1 wrote:

i use an udev-rule to run a backup script

And that's your problem right there. You should not attempt to fork long running processes from a udev rule. What you're seeing is expected behavior.

ok.
what should i use instead? my backup script should start after the usb-drive is connected ...

ccc1

Offline

Board footer

Powered by FluxBB