threading IOError

G

Gabriel Genellina

Hi

I'm using Python 2.4.2 on Windows 98 SE.

In a program with several threads, sometimes (I cant determine exactly
when or why) one thread dies with the following traceback:

12/13/05 02:17:47 (WatchDog ) Unhandled thread exception
Traceback (most recent call last):
File "E:\prog\pop3\TaskScheduler.py", line 60, in run
self.finished.wait(self.interval)
File "C:\Apps\Python\Lib\threading.py", line 348, in wait
self.__cond.wait(timeout)
File "C:\Apps\Python\Lib\threading.py", line 218, in wait
remaining = endtime - _time()
IOError: [Errno 2] No such file or directory

The error appears to be inside the time module, and I can't explain the
IOError there.

Maybe this crash is related too: sometimes, the full program crashes
with an Invalid Page Fault with the following info:

PYTHONW provocó un error de página no válida en el módulo
PYTHON24.DLL de 016f:1e0ab51f.
Registros:
EAX=1e19d1af CS=016f EIP=1e0ab51f EFLGS=00010206
EBX=00841f80 SS=0177 ESP=0071e6ec EBP=00000000
ECX=73962000 DS=0177 ESI=1e06a1b0 FS=1a07
EDX=1e19d1b0 ES=0177 EDI=00000000 GS=0000

Any ideas?

Gabriel Genellina
Softlab SRL
 
A

Andrew MacIntyre

Gabriel said:
Hi

I'm using Python 2.4.2 on Windows 98 SE.

In a program with several threads, sometimes (I cant determine exactly
when or why) one thread dies with the following traceback:

12/13/05 02:17:47 (WatchDog ) Unhandled thread exception
Traceback (most recent call last):
File "E:\prog\pop3\TaskScheduler.py", line 60, in run
self.finished.wait(self.interval)
File "C:\Apps\Python\Lib\threading.py", line 348, in wait
self.__cond.wait(timeout)
File "C:\Apps\Python\Lib\threading.py", line 218, in wait
remaining = endtime - _time()
IOError: [Errno 2] No such file or directory

The error appears to be inside the time module, and I can't explain the
IOError there.

Maybe this crash is related too: sometimes, the full program crashes
with an Invalid Page Fault with the following info:

PYTHONW provocó un error de página no válida en el módulo
PYTHON24.DLL de 016f:1e0ab51f.
Registros:
EAX=1e19d1af CS=016f EIP=1e0ab51f EFLGS=00010206
EBX=00841f80 SS=0177 ESP=0071e6ec EBP=00000000
ECX=73962000 DS=0177 ESI=1e06a1b0 FS=1a07
EDX=1e19d1b0 ES=0177 EDI=00000000 GS=0000

Any ideas?

Quite some time ago I saw the same sort of issue - inexplicable
exceptions from apparently benign code.

Tim Peters prognosticated that there was a bug in an extension module,
and indeed that proved to be the case (a 3rd party extension, which
fortunately I had source for and was able to build).

I doubt that any of Python's standard extension modules will be involved
(as they are generally mature and widely used and tested) but you should
look at the source for any others looking for unhandled error returns.
Typically, errno is set but the failure return from the routine setting
errno is ignored or not properly handled.

What then happens is the next time an exception gets propagated through
Python's internals, the errno value gets picked up and is used to
identify the exception (incorrectly).

The invalid page fault may well be because a garbage pointer is handed
to a routine, possibly as a consequence of the mishandled error return.
 
G

Gabriel Genellina

Andrew MacIntyre ha escrito:
Gabriel said:
File "C:\Apps\Python\Lib\threading.py", line 218, in wait
remaining = endtime - _time()
IOError: [Errno 2] No such file or directory

The error appears to be inside the time module, and I can't explain the
IOError there.

Maybe this crash is related too: sometimes, the full program crashes
with an Invalid Page Fault with the following info:
Quite some time ago I saw the same sort of issue - inexplicable
exceptions from apparently benign code.

Tim Peters prognosticated that there was a bug in an extension module,
and indeed that proved to be the case (a 3rd party extension, which
fortunately I had source for and was able to build).

I doubt that any of Python's standard extension modules will be involved
(as they are generally mature and widely used and tested) but you should
look at the source for any others looking for unhandled error returns.
Typically, errno is set but the failure return from the routine setting
errno is ignored or not properly handled.

What then happens is the next time an exception gets propagated through
Python's internals, the errno value gets picked up and is used to
identify the exception (incorrectly).

The invalid page fault may well be because a garbage pointer is handed
to a routine, possibly as a consequence of the mishandled error return.

Oh, thanks, at least this gives me a starting point to investigate. But
I can´t discard the standard modules; this is an (almost) clean python
install. The download rate has became extremely low and maybe all of
this is related to the recent upgrade to Python 2.4.2... (Maybe
Win98+many threads+sockets is not a well tested combination)

Thanks,
Gabriel Genellina
Softlab SRL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top