Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment:

I created a patch to workaround this crash. But I saw another problamatic 
phenomenon "Error without exception set".

I confirmed PyErr_Occurred() returns TRUE when leaving file_close() on error, 
but I gave up.

test_close_open_print_buffered (__main__.FileThreadingTests) ... close failed in
 file object destructor:
IOError: [Errno 0] Error
Exception in thread Thread-1:
Traceback (most recent call last):
  File "e:\python-dev\release26-maint\lib\threading.py", line 532, in __bootstra
p_inner
    self.run()
  File "e:\python-dev\release26-maint\lib\threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "test_custom.py", line 94, in worker
    f()
  File "test_custom.py", line 88, in <lambda>
    lambda: self._close_and_reopen_file(),
  File "test_custom.py", line 54, in _close_and_reopen_file
    self._close_file()
  File "test_custom.py", line 49, in _close_file
    self.f.close()
SystemError: error return without exception set

Qclose failed in file object destructor:

IOError: [Errno 0] Error
Exception in thread Thread-4:
Traceback (most recent call last):
  File "e:\python-dev\release26-maint\lib\threading.py", line 532, in __bootstra
p_inner
    self.run()
  File "e:\python-dev\release26-maint\lib\threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "test_custom.py", line 94, in worker
    f()
  File "test_custom.py", line 88, in <lambda>
    lambda: self._close_and_reopen_file(),
  File "test_custom.py", line 54, in _close_and_reopen_file
    self._close_file()
  File "test_custom.py", line 49, in _close_file
    self.f.close()
SystemError: error return without exception set

4271 88.3166 ok

----------------------------------------------------------------------
Ran 1 test in 6.579s

OK

----------
Added file: 
http://bugs.python.org/file18052/py26_experimental_patch_on_fileobject.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9295>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to