Tarfile extraction does not work on Windows
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- docker, python
調査の方向性
tarfile.extractall と、レポートに示されている members のフィルタリングから始め、次に docker create コマンドと docker export コマンドを使って Windows 上で動作を再現します。Linux 上で同じ Python バージョンを使った場合の展開結果と比較します。エクスポートされた tar アーカイブを、再帰深度の超過による失敗や無限ループなしに Windows 上で展開できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Using Python 3.10.5, there is a scenario where the extractall function of tarfile is causing an infinite loop for Python on Windows, but not in Linux.
The tar-file where the issue occurred was the one produced by docker export, where a file-system is saved as a tar file. Unfortunately, it is too big to upload here, so I will give some commands to get this file.
> docker create --name "testcontainer" tomcat
> docker export --output="testtomcat.tar" testcontainer
That should produce a file of about 457MB.
Now, using Python 3.10.5 under Windows, the following code-snippet will crash:
import tarfile
with tarfile.open("testtomcat.tar") as tarf:
members_to_extract = [tar_info for tar_info in tarf.getmembers()
if not tar_info.isdev()]
tarf.extractall(path="/tmp/foo/", members=members_to_extract)
The error says: maximum recursion depth exceeded while calling a Python object
Your environment
- CPython versions tested on: Python 3.10.5
- Operating system and architecture: Windows 11 is where it failed, and it works fine with the same python version in Arch Linux with kernel
Linux 5.15.58-2-lts x86_64
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 558
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/cpython のほかの issue
-
docs pending
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
stdlib type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
stdlib type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
build type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
stdlib topic-email type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
似ている issue
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
bancolombia/sentinel#23 ·
-
test md オープンCI
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
bug client
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100