New submission from ivank:
I intentionally corrupted a zpool to induce an I/O error in a file, in this
case, /usr/lib/x86_64-linux-gnu/gconv/IBM1390.so
# ls -l /usr/lib/x86_64-linux-gnu/gconv/IBM1390.so
-rw-r--r-- 1 root root 231,496 2014-03-24 06:26
/usr/lib/x86_64-linux-gnu/gconv/IBM1390.so
# cat /usr/lib/x86_64-linux-gnu/gconv/IBM1390.so > /dev/null
cat: /usr/lib/x86_64-linux-gnu/gconv/IBM1390.so: Input/output error
When I read the file, Python 3.3.5 and 3.4.0 check for EIO and raise an
exception:
>>> open("/usr/lib/x86_64-linux-gnu/gconv/IBM1390.so", "rb").read()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 5] Input/output error
but Python 2.7.6 does not:
# python2
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = open("/usr/lib/x86_64-linux-gnu/gconv/IBM1390.so", "rb").read()
>>> len(x)
131072
----------
components: IO
messages: 215085
nosy: ivank
priority: normal
severity: normal
status: open
title: File read silently stops after EIO I/O error
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21090>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com