[issue21090] File read silently stops after EIO I/O error

2016-11-15 Thread Martijn Pieters
Martijn Pieters added the comment: The Python 2.7 issue (using fread without checking for interrupts) looks like a duplicate of http://bugs.python.org/issue1633941 -- nosy: +mjpieters ___ Python tracker __

[issue21090] File read silently stops after EIO I/O error

2014-11-12 Thread STINNER Victor
STINNER Victor added the comment: On IRC, buck1 asked why the following code behaves differently on Python < 3.4 and Python >= 3.4. It is related to this issue in fact. Code: --- from __future__ import print_function from os import openpty read, write = openpty() from subprocess import Popen

[issue21090] File read silently stops after EIO I/O error

2014-07-02 Thread STINNER Victor
STINNER Victor added the comment: For Python 2, file.read() looks wrong: if only checks ferror() if fread() returns 0, whereas Py_UniversalNewlineFread() can call fread() more than once, and according to fread() manual page, fread() result can be different than 0 on error. "If an error occurs

[issue21090] File read silently stops after EIO I/O error

2014-07-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1492a42b8308 by Victor Stinner in branch '2.7': Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before, http://hg.python.org/cpython/rev/1492a42b8308 -- ___ Python tracker

[issue21090] File read silently stops after EIO I/O error

2014-07-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 652b62213072 by Victor Stinner in branch '3.4': Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before, http://hg.python.org/cpython/rev/652b62213072 New changeset 440279cec378 by Victor Stinner in branch 'default': (Merge 3.4)

[issue21090] File read silently stops after EIO I/O error

2014-07-02 Thread Charles-François Natali
Charles-François Natali added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue21090] File read silently stops after EIO I/O error

2014-07-01 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch for FileIO.readall() which should fix the issue. Currently, readall() returns read bytes at the first read() error if a least one call to read() succeed. -- keywords: +patch Added file: http://bugs.python.org/file35820/fileio_readall_ei

[issue21090] File read silently stops after EIO I/O error

2014-06-29 Thread ivank
ivank added the comment: This problem happens with Python 3.4 as well. $ cat read_error_file.py from __future__ import print_function import os fname = "/usr/bin/Xorg" size = os.stat(fname).st_size print(fname, "stat size:", size) f = open(fname, "rb") print("len(f.read()): ", len(f.read()))

[issue21090] File read silently stops after EIO I/O error

2014-06-29 Thread ivank
ivank added the comment: I managed to reproduce this again, this time by corrupting data on a btrfs filesystem. $ cat read_error_file.py import os fname = "/usr/bin/Xorg" size = os.stat(fname).st_size print fname, "stat size:", size f = open(fname, "rb") print "len(f.read()): ", len(f.rea

[issue21090] File read silently stops after EIO I/O error

2014-05-21 Thread Claudiu.Popa
Changes by Claudiu.Popa : -- nosy: -Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue21090] File read silently stops after EIO I/O error

2014-04-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: ivank, if you know some C, perhaps you could write a trivial program that does an fopen() followed by an fread() of 131072 bytes, and see if the fread() errors out. -- ___ Python tracker

[issue21090] File read silently stops after EIO I/O error

2014-04-27 Thread Charles-François Natali
Charles-François Natali added the comment: I'm with Antoine, it's likely a glibc bug. We already had a similar issue with fwrite(): http://bugs.python.org/issue17976 -- nosy: +neologix ___ Python tracker _

[issue21090] File read silently stops after EIO I/O error

2014-04-27 Thread STINNER Victor
STINNER Victor added the comment: 2014-04-27 5:26 GMT+02:00 ivank : > (I see the `IOError: [Errno 5] Input/output error` exception now.) Can you please run your test in strace to see system calls? -- ___ Python tracker

[issue21090] File read silently stops after EIO I/O error

2014-04-26 Thread ivank
ivank added the comment: I'm finding it hard to reproduce the bug again with more zpool corruption. (I see the `IOError: [Errno 5] Input/output error` exception now.) I do remember that in the reported case, Python 3.4, node.js, and OpenJDK 7 threw an EIO exception, but Python 2.7 did not.

[issue21090] File read silently stops after EIO I/O error

2014-04-26 Thread STINNER Victor
STINNER Victor added the comment: @ivank: Can you please answer to questions? It's hard to understand the issue. Without more information, I would suggest to close the issue. -- ___ Python tracker

[issue21090] File read silently stops after EIO I/O error

2014-04-04 Thread STINNER Victor
STINNER Victor added the comment: > Python 2.7 uses C fopen() and fread(), so what happens probably is that > fread() silences the error. I see that file_read() checks ferror() if fread() returned 0. I would nice to run the test in strace and attach the output of strace to see if the EIO is r

[issue21090] File read silently stops after EIO I/O error

2014-04-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue21090] File read silently stops after EIO I/O error

2014-03-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Python 2.7 uses C fopen() and fread(), so what happens probably is that fread() silences the error. -- nosy: +pitrou ___ Python tracker ___ ___

[issue21090] File read silently stops after EIO I/O error

2014-03-29 Thread Claudiu.Popa
Changes by Claudiu.Popa : -- nosy: +Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21090] File read silently stops after EIO I/O error

2014-03-28 Thread ivank
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