Title: OSError in TarFile.getmembers()
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jvoisin
Priority: normal Keywords:

Created on 2019-12-16 13:07 by jvoisin, last changed 2019-12-16 13:07 by jvoisin.

File name Uploaded Description Edit
crash-462a00f845e737bff6df2fe6467fc7cdd4c39cd8e27ef1d3011ec68a9808ca8e jvoisin, 2019-12-16 13:07
Messages (1)
msg358485 - (view) Author: jvoisin (jvoisin) Date: 2019-12-16 13:07
The attached file produces the following stacktrace when opened via `` and iterated with `TarFile.getmembers`, on Python 3.7.5rc1:

$ cat 
import tarfile
import sys

with[1]) as t:
  for member in t.getmembers():

$ python3 crash-462a00f845e737bff6df2fe6467fc7cdd4c39cd8e27ef1d3011ec68a9808ca8e
Traceback (most recent call last):
  File "", line 5, in <module>
    for member in t.getmembers():
  File "/usr/lib/python3.7/", line 1763, in getmembers
    self._load()        # all members, we first have to
  File "/usr/lib/python3.7/", line 2350, in _load
    tarinfo =
  File "/usr/lib/python3.7/", line 2281, in next - 1)
  File "/usr/lib/python3.7/", line 368, in seek
    return, whence)
  File "/usr/lib/python3.7/", line 143, in seek
    data =, offset))
  File "/usr/lib/python3.7/", line 454, in read
  File "/usr/lib/python3.7/", line 501, in _read_eof
OSError: CRC check failed 0x21e25017 != 0x7c839e8b

The OSError exception isn't documented as a possible exception when using TarFile.getmembers ( ).
Date User Action Args
2019-12-16 13:07:11jvoisincreate