Dirk Meyer wrote: > Hi, > > let us talk over the list please, I don't like discussing stuff over > the tracker. > OK ... > "SourceForge.net" wrote: > >> The patch was written because according to a lot of threads I have read, >> the python select call can raise interrupted system call exceptions >> sporadically on some systems that are safe to ignore. In my system (Ubuntu >> 7.10 Linux izzy 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686 >> GNU/Linux), the select call was raising an interrupted system call >> exception so often as to make the recording server unusable. >> > > Very strange. If that happens, it could also happen during other > systems calls like ioctl which will cause a lot of trouble. > > I don't know about ioctl, but for sure select, read, write, any time consuming blocking system call can terminate early with EINTR [1]. Please note that it is the kernel that generates the signal. It has nothing to do with any application code raising the signals. I have also read (but forget where) that sometimes you get EAGAIN from the kernel as well, which is maybe also safe to ignore. In any case, with the advent of dual core cpu's, maybe this type of thing is happening more often and if the python wrappers to the system calls aren't handling these returns, then the application code that uses the python wrappers must handle them.
We can implement a retry around the select as my patch has done [2], or the other option is to just catch and ignore EINTR (and maybe EAGAIN) by just pretending select didn't return any ready handles. This could be done by catching the select_error exception and not doing a sys.exit(1) if the error code is EINTR (and EAGAIN). The current code catches ValueError and select_error and calls sys.exit(1), which seems incorrect to me In any case, the code in nf_generic.py must change. If left as is, the Freevo 1.7.4 record server will continue to crash. > > > Please try to only catch that signal in nf_thread.py in run around > | nf_wrapper.step(simulate = True) > > Again, just changing nf_wrapper is not enough. nf_generic.py must change as well -- it must not call sys.exit if EINTR (and possibly EAGAIN) is raised. -Doug [1] http://groups.google.com/group/comp.lang.python/msg/c84cfbc20f6570fa [2] https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1837139&group_id=46652 ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel