[Bug 1225407] New: GNU tar hangs when extracting certain symlinks
https://bugzilla.suse.com/show_bug.cgi?id=1225407 Bug ID: 1225407 Summary: GNU tar hangs when extracting certain symlinks Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: psychonaut@nothingisreal.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- The version of GNU tar 1.35 packaged for openSUSE Tumbleweed hangs when using --wildcards to extract a symlink to another file in the archive that does not match the wildcard. The problem may be specific to the openSUSE RPMs; I cannot reproduce it when using GNU tar 1.35 compiled from source. An example of an archive that can reproduce this problem is at <http://files.nothingisreal.com/tmp/news002f1.tar.bz2>. Using the command line tar xavf news002f1.tar.bz2 the archive is successfully extracted. But if I add a --wildcards option such as tar xavf news002f1.tar.bz2 --wildcards '*trek*' then tar hangs when it gets to the file news002f1/b5/net.startrek/24. This file, which matches the wildcard, is a symlink to the file news002f1/b5/net.sf-lovers/141, which does not match the wildcard. Running tar with strace shows that tar gets stuck in a loop: mkdirat(AT_FDCWD, "news002f1", 0755) = -1 EEXIST (File exists) mkdirat(AT_FDCWD, "news002f1/b5", 0755) = -1 EEXIST (File exists) mkdirat(AT_FDCWD, "news002f1/b5/net.startrek", 0755) = -1 EEXIST (File exists) newfstatat(AT_FDCWD, "news002f1/b5/net.startrek", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0 linkat(AT_FDCWD, "news002f1/b5/net.sf-lovers/141", AT_FDCWD, "news002f1/b5/net.startrek/24", 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "news002f1/b5/net.sf-lovers/141", 0x7fffcaca26a0, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory) By contrast, GNU tar 1.35 compiled from source does not hang; it instead emits the error messages of the following sort for the affected symlinks and then continues processing the archive: Cannot hard link to ‘news002f1/b5/net.sf-lovers/141’: No such file or directory -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1225407 Tristan Miller <psychonaut@nothingisreal.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|GNU tar hangs when |GNU tar hangs when |extracting certain symlinks |extracting certain hard | |links -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1225407 https://bugzilla.suse.com/show_bug.cgi?id=1225407#c1 --- Comment #1 from Tristan Miller <psychonaut@nothingisreal.com> --- s/symlink/hard link/g -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1225407 Chenzi Cao <chcao@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|screening-team-bugs@suse.de |danilo.spinella@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1225407 Danilo Spinella <danilo.spinella@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|danilo.spinella@suse.com |antonio.teixeira@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1225407 https://bugzilla.suse.com/show_bug.cgi?id=1225407#c2 Antonio Teixeira <antonio.teixeira@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Antonio Teixeira <antonio.teixeira@suse.com> --- Thanks for reporting. Should now be fixed with request https://build.opensuse.org/request/show/1187615 Feel free to reopen the bug if the issue persists. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com