473,406 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

threading IOError

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

Dec 13 '05 #1
2 1916
Gabriel Genellina wrote:
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.

-------------------------------------------------------------------------
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullseye.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.org.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
Dec 14 '05 #2
Andrew MacIntyre ha escrito:
Gabriel Genellina wrote:
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

Dec 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ruben | last post by:
I am reading a large text file a chunk at a time using the readlines(buffer_size) statement. I get an IOERROR ERRNO 32 Broken Pipe command when I "pipe" the output to MYSQL database using the...
2
by: Nigel King | last post by:
I have a problem with the logging module. It reports a Broken Pipe error after outputing to the log file occasionally (5%). This does not appear to happen on Mac OSX using current finked python...
1
by: Bob Swerdlow | last post by:
We have some users of our application getting error messages like: IOError: zipimport: can not open file /Volumes/MyApp/MyApp.app/Contents/Resources/Modules.zip This only happens on our Mac...
0
by: Anton Jansen | last post by:
Hi list, I have troubles with some python scripts I use as cgi scripts with thttpd. At irregular intervals when a post is made an IOError is raised by the CGI module. My question is how and why...
2
by: h112211 | last post by:
Hi, I installed the newest available PIL (1.1.5 for Python 2.4) from their site, but cannot seem to open any files. The following from PIL import Image i =...
5
by: jkn | last post by:
Hi all Python 2.4.2 (#1, Apr 26 2006, 23:35:31) on linux2 Type "help", "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "<stdin>", line 1, in...
7
by: Marco | last post by:
Hello,every one, I meet a question: in my old script, I usually use os.popen2() to get info from standard unix(LinuX) program like ps,ifconfig... Now, I write a OO-based programme, I still use...
1
by: Robert.R.Emmel | last post by:
Hello, I am using the threading module and the Queue module in python to to send out shipment tracking URL requests. Is there a way to timeout a thread within a Queue? I think the way I...
0
by: Tim Golden | last post by:
Lowell Alleman wrote: Well you've certainly picked a ticklish area to run into problems with ;). First, forget about the threading aspects for the moment. AFAICT the smallest program which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.