Dear Dominic

Il Wednesday 06 August 2008 18:00:19 Dominic Lukas Wyler ha scritto:
> Bibindex eventually fails with the following error:
>
>       Error: Cannot read
> http://doc.rero.ch/lm.php?url=1000,43,2,1234-zyx/xy.pdf: <urlopen error (4,
> 'Interrupted system call')>
>
> (lm.php is a php script which manages access to to the fulltext files. Some
> fulltext are stored internally in invenio, /opt/cds-invenio/var/data/files/
> and some are stored separately and linked to using lm.php)
>
> I assume the two error messages are somehow linked, like for example the
> bibindex process being stopped after too many errors, hence the
> 'Interrupted system call' error.

with this email I'll address the above particular error that is in fact 
unrelated to the other problems you're facing with BibIndex. 

This error is due to an apparent conflict between UNIX signals and UNIX 
sockets in Python, and is raised by BibSched pinging BibIndex with a signal 
every seconds to see if it is still alive, and actually causing the brute 
interruption of an any opened socket (like the current downloaded fulltext). 
The problem has been fixed on CVS and the fix will be included with the next 
release.

I attach to this email a patch that you can apply to bibtask.py (under 
modules/bibsched/lib/bibtask.py or directly in your installation Python 
library directory), that should solve at least this particular error you're 
encountering.

Best regards,
        Samuele

-- 
.O.
..O
OOO
Index: bibtask.py
===================================================================
RCS file: /log/cvsroot/cds-invenio/modules/bibsched/lib/bibtask.py,v
retrieving revision 1.46
retrieving revision 1.49
diff -u -3 -r1.46 -r1.49
--- bibtask.py  20 Jun 2008 14:08:58 -0000      1.46
+++ bibtask.py  14 Jul 2008 14:56:15 -0000      1.49
@@ -544,7 +544,7 @@
     ## initialize signal handler:
     _task_params['signal_request'] = None
     signal.signal(signal.SIGUSR1, _task_sig_sleep)
-    signal.signal(signal.SIGUSR2, _task_sig_ping)
+    signal.signal(signal.SIGUSR2, signal.SIG_IGN)
     signal.signal(signal.SIGTSTP, _task_sig_ctrlz)
     signal.signal(signal.SIGTERM, _task_sig_stop)
     signal.signal(signal.SIGQUIT, _task_sig_stop)

Reply via email to