[New-bugs-announce] [issue13315] Unable to deal with large tarfile

Dave Flogeras report at bugs.python.org
Tue Nov 1 19:17:21 CET 2011

New submission from Dave Flogeras <dflogeras2 at gmail.com>:

I am trying to unpack boost_1_46_1.tar.bz2 (you can grab it here http://mirror.its.dal.ca/gentoo/distfiles/boost_1_46_1.tar.bz2) with the following code:

import tarfile
t = tarfile.open( "boost_1_46_1.tar.bz2" );

On OSX (both Lion and Snow Leopard, so python 2.7.1 and 2.6.1 resp.) this works as a normal user, but not as root failing with:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/tarfile.py", line 2028, in extractall
    self.extract(tarinfo, path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/tarfile.py", line 2065, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/tarfile.py", line 2157, in _extract_member
    self.chown(tarinfo, targetpath)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/tarfile.py", line 2269, in chown
    os.chown(targetpath, u, g)
OverflowError: signed integer is greater than maximum

I have confirmed that Python is running as a 64bit application on OSX.

On my 64bit Linux (gentoo) machine, this works both as a user and as root. I tried with Python 2.7.2 as well as downgrading to 2.7.1.

This could be related to 1215928

messages: 146800
nosy: Dave.Flogeras
priority: normal
severity: normal
status: open
title: Unable to deal with large tarfile
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list