473,657 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\T askScheduler.py ", line 60, in run
self.finished.w ait(self.interv al)
File "C:\Apps\Python \Lib\threading. py", line 348, in wait
self.__cond.wai t(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 1928
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\T askScheduler.py ", line 60, in run
self.finished.w ait(self.interv al)
File "C:\Apps\Python \Lib\threading. py", line 348, in wait
self.__cond.wai t(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*****@bullsey e.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.or g.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
8187
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 following command: python script.py | mysql I am using RED HAT 9 Linux. The problem only happens if I use the pipe to MYSQL. It breaks but it gets to process around 1000 MYSQL statements.
2
8614
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 (2.3.3) but does appear to occur on Python 2.3.4 running on a very old Redhat Linux xxxxx 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686. The actual logged error follows my signature. Note that "files used:-" has been sent to the file. From a...
1
2269
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 version - the Windows version seems fine. Our build is still using bundlebuilder, which creates Modules.zip. I want to upgrade to py2app, but have not yet done so (we are using py2exe for the Windows version). Only a few (7) of our users have had...
0
1242
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 does this happen? The exception looks like this: ---
2
22891
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 = Image.open(file('c:\\image2.png')) results in
5
7665
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 ? IOError: invalid mode: a
7
22230
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 os.popen2( check whether mplayer still working via ps command ), but some things I got the following message: Traceback (most recent call last):
1
426
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 have it now the thread will wait until something is returned and will basically wait forever for that something.
0
1395
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 reproduces your problem is: <code> import signal
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.