[New-bugs-announce] [issue23649] tarfile not re-entrant for multi-threading

Srdjan Grubor report at bugs.python.org
Thu Mar 12 17:40:01 CET 2015


New submission from Srdjan Grubor:

When running tarfile.extract through multiple threads, the archive reading pointer is not protected from simultaneous seeks and causes various convoluted bugs:

  <some code>
    self.archive_object.extract(member, extraction_path)
  File "/usr/lib/python3.4/tarfile.py", line 2019, in extract
    set_attrs=set_attrs)
  File "/usr/lib/python3.4/tarfile.py", line 2088, in _extract_member
    self.makefile(tarinfo, targetpath)
  File "/usr/lib/python3.4/tarfile.py", line 2127, in makefile
    source.seek(tarinfo.offset_data)
  File "/usr/lib/python3.4/gzip.py", line 573, in seek
    self.read(1024)
  File "/usr/lib/python3.4/gzip.py", line 365, in read
    if not self._read(readsize):
  File "/usr/lib/python3.4/gzip.py", line 449, in _read
    self._read_eof()
  File "/usr/lib/python3.4/gzip.py", line 485, in _read_eof
    hex(self.crc)))
OSError: CRC check failed 0x1036a2e1 != 0x0

----------
messages: 237960
nosy: sgnn7
priority: normal
severity: normal
status: open
title: tarfile not re-entrant for multi-threading
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23649>
_______________________________________


More information about the New-bugs-announce mailing list