Hi all --
The Python mogilefs.py class at
http://www.albany.edu/~ja6447/mogilefs.py
has an issue -- when called from threaded code on Linux, it'll
intermittently dump core due to unhandled, stray SIGALRM signals.
This thread notes the fix:
http://python-forum.org/pythonforum/viewtopic.php?f=5&t=9395 .
pycurl needs the NOSIGNAL option to operate thread-safely.
http://curl.haxx.se/mail/lib-2002-12/0103.html notes that NOSIGNAL
is required to abort slow DNS name resolution. Is it safe to
assume that mogstored nodes' names will always resolve speedily?
fwiw, I would guess so, and it's better than coredumping, but ymmv ;)
patch for mogilefs.py is below. cheers,
--j.
--- ../external/linux/zips/
mogilefs.2007-09-05.py 2008-09-25
15:46:07.000000000 +0000
+++
mogilefs.new.py 2008-10-16 13:13:46.000000000 +0000
@@ -668,6 +668,11 @@
curl.setopt(pycurl.LOW_SPEED_TIME, 5)
curl.setopt(pycurl.LOW_SPEED_LIMIT, 1)
curl.setopt(pycurl.WRITEFUNCTION, ofp.write)
+
+ # Oct 16 2008 jm: avoid segfaults when
multithreaded, see
+ #
http://python-forum.org/pythonforum/viewtopic.php?f=5&t=9395
+ curl.setopt(pycurl.NOSIGNAL, 1)
+
curl.perform()
curl.close()
if fp is None: