[dancer-users] All starman workers have one (deleted) file open in lsof, seem hung on an flock call

Mike South msouth at gmail.com
Tue Mar 18 06:42:42 GMT 2014


I recently had a problem come up with my D1 app.  I have the app writing
the PID to the database at start and stop of a particular route, and I have
two runs that never completed.

I did an strace on the worker and it looked like this:

[root at host ~]# strace -p 26508
Process 26508 attached - interrupt to quit
flock(10, LOCK_EX

lsof on that process gave me

starman   26508      apps   10wW     REG               8,22         0
  24 /tmp/3j6mXZXwWM (deleted)

(not sure, but I think the 10 in the flock call and the 10 in the 10wW mean
that we're talking about the same file?).

After a little more digging I found that every starman worker had that file
open (except with 10w instead of 10wW for all but the one above and
stracing a few of the other workers showed the same output ( "flock(10,
LOCK_EX" ) as above.

I started it up from a script with

qx{ plackup --server Starman --port $port --workers 50 --env $env
--pid=$run_file --daemonize bin/app.pl  --error-log logs/$env.log }

Anyone have any idea what that file would be, and whether this is
indicative of any problem?  Normally I expect to see a "listen(..." call
when I do an strace, which I think means the worker is waiting for a
connection.  This looks to me like it's trying to get a lock on a file to
write to it, but I don't know what that file would be, etc.

Any help would be greatly appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20140318/3582f008/attachment.html>

More information about the dancer-users mailing list