PacketFence - BTS - PacketFence
View Issue Details
0000796PacketFencepublic2009-09-09 14:552011-01-26 15:43
obilodeau 
obilodeau 
normalmajoralways
closedfixed 
 
 
0000796: pfsetvlan doesn't deal with Alarm signals (SIGALRM)
We use so many modules we don't really know or remember if they are thread safe or not. Some of these modules use the alarm() call. According to this perl bug http://rt.perl.org/rt3/Public/Bug/Display.html?id=16807 [^] alarm is not thread-safe.

The way we experienced this is a complete crash of our daemon with no info in the logs. Only a simple die with "Alarm clock" happens.

You can repeat the bug using: kill -s SIGALRM <pfsetvlan pid>

Other links:
http://groups.google.com/group/perl.perl5.porters/browse_frm/thread/99616b4f24bc3e26?hl=en&lr=&ie=UTF-8&oe=UTF-8&rnum=1&prev=/groups%3Fq%3Dperl%2Balarm%2Bclock%2Bthreads%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3Drt-16807-35884.2.54002486802122%2540bugs6.perl.org%26rnum%3D1 [^]

No tags attached.
has duplicate 0000907closed obilodeau pfsetvlan doesn't need to stop on SIGALRM 
related to 0000902closed  Net::Telnet and Net::Appliance::Session use alarm() for timeout which is incompatible with threaded perl 
Issue History
2009-09-09 14:55obilodeauNew Issue
2009-09-09 14:55obilodeauStatusnew => assigned
2009-09-09 14:55obilodeauAssigned To => obilodeau
2009-09-09 14:57obilodeauStatusassigned => confirmed
2009-09-11 16:22obilodeauNote Added: 0001310
2009-09-11 16:22obilodeauStatusconfirmed => resolved
2009-09-11 16:22obilodeauResolutionopen => fixed
2010-02-08 13:09obilodeauRelationship addedrelated to 0000902
2010-02-09 10:35obilodeauRelationship addedhas duplicate 0000907
2011-01-26 15:43obilodeauStatusresolved => closed

Notes
(0001310)
obilodeau   
2009-09-11 16:22   
Fixed in mtn: e69d5f5489987e043be147bdaf0489af1b1fcdb4

We can't get who asked for the alarm but at least we don't fail mysteriously without any error message.