Opened 10 years ago

Closed 6 years ago

#47001 closed defect (fixed)

gnutar doesn't work anymore.

Reported by: informatimago (Pascal J. Bourguignon) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: mkae (Marko Käning)
Port: gnutar

Description

Here is an example extracting an archive, but archive creation crashes too. System tar still works:

[pjb@larissa :0.0 src]$ sudo port install gnutar
--->  Computing dependencies for gnutar
--->  Fetching archive for gnutar
--->  Attempting to fetch gnutar-1.27.1_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/gnutar
--->  Attempting to fetch gnutar-1.27.1_0.darwin_14.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/gnutar
--->  Installing gnutar @1.27.1_0
--->  Activating gnutar @1.27.1_0
--->  Cleaning gnutar
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
[pjb@larissa :0.0 src]$ gnutar jtvf sbcl-1.2.8-source.tar.bz2
gnutar: Child died with signal 11
gnutar: Error is not recoverable: exiting now
[pjb@larissa :0.0 src]$ /usr/bin/tar ztvf sbcl-1.2.8-source.tar.bz2 |head
drwxr-xr-x  0 stas   stas        0 Feb  1 13:28 sbcl-1.2.8/
-rw-r--r--  0 stas   stas    21115 Jan 31 15:24 sbcl-1.2.8/base-target-features.lisp-expr
-rwxr-xr-x  0 stas   stas     1659 Jan 31 15:24 sbcl-1.2.8/run-sbcl.sh
-rw-r--r--  0 stas   stas      384 Jan 31 15:24 sbcl-1.2.8/sbcl-pwd.sh
-rw-r--r--  0 stas   stas   142319 Jan 31 15:24 sbcl-1.2.8/package-data-list.lisp-expr
-rw-r--r--  0 stas   stas    15290 Jan 31 15:24 sbcl-1.2.8/OPTIMIZATIONS
-rw-r--r--  0 stas   stas     5044 Jan 31 15:24 sbcl-1.2.8/slam.sh
-rw-r--r--  0 stas   stas     1505 Jan 31 15:24 sbcl-1.2.8/make-windows-installer.sh
-rw-r--r--  0 stas   stas     6514 Jan 31 15:24 sbcl-1.2.8/TODO
-rwxr-xr-x  0 stas   stas     1789 Jan 31 15:24 sbcl-1.2.8/make-genesis-2.sh
[pjb@larissa :0.0 src]$ uname -a
Darwin larissa.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64 i386 MacBookAir6,2 Darwin
[pjb@larissa :0.0 src]$

Change History (9)

comment:1 Changed 10 years ago by neverpanic (Clemens Lang)

I cannot reproduce your problem:

$ gnutar jtvf /opt/local/var/macports/distfiles/sbcl/sbcl-1.2.8-source.tar.bz2 | head
drwxr-xr-x stas/stas         0 2015-02-01 13:28 sbcl-1.2.8/
-rw-r--r-- stas/stas     21115 2015-01-31 15:24 sbcl-1.2.8/base-target-features.lisp-expr
-rwxr-xr-x stas/stas      1659 2015-01-31 15:24 sbcl-1.2.8/run-sbcl.sh
-rw-r--r-- stas/stas       384 2015-01-31 15:24 sbcl-1.2.8/sbcl-pwd.sh
-rw-r--r-- stas/stas    142319 2015-01-31 15:24 sbcl-1.2.8/package-data-list.lisp-expr
-rw-r--r-- stas/stas     15290 2015-01-31 15:24 sbcl-1.2.8/OPTIMIZATIONS
-rw-r--r-- stas/stas      5044 2015-01-31 15:24 sbcl-1.2.8/slam.sh
-rw-r--r-- stas/stas      1505 2015-01-31 15:24 sbcl-1.2.8/make-windows-installer.sh
-rw-r--r-- stas/stas      6514 2015-01-31 15:24 sbcl-1.2.8/TODO
-rwxr-xr-x stas/stas      1789 2015-01-31 15:24 sbcl-1.2.8/make-genesis-2.sh

It crashes with a segfault for you; can you try running it in gdb to get a backtrace?

comment:2 Changed 10 years ago by neverpanic (Clemens Lang)

Owner: changed from macports-tickets@… to mww@…
Port: gnutar added

Also, when filing bugs against ports, please Cc the maintainer and fill in the port field.

comment:3 Changed 10 years ago by informatimago (Pascal J. Bourguignon)

[pjb@larissa :0.0 Downloads]$ gdb gnutar
GNU gdb (GDB) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin14.0.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gnutar...(no debugging symbols found)...done.
(gdb) set args tvf android-sdk_r24.0.2-linux.tgz 
(gdb) run
Starting program: /opt/local/bin/gnutar tvf android-sdk_r24.0.2-linux.tgz 
Unable to find Mach task port for process-id 44866: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
(gdb) backtrace
No stack.
(gdb) 

:-(

comment:4 Changed 10 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:5 in reply to:  3 Changed 10 years ago by g5pw (Aljaž Srebrnič)

Replying to pjb@…:

(please check gdb is codesigned - see taskgated(8))

Is your GDB codesigned?

comment:6 Changed 10 years ago by Ionic (Mihai Moldovan)

Better try lldb:

lldb gnutar
run tvf android-sdk_r24.0.2-linux.tgz
bt all

comment:7 Changed 9 years ago by gnw3

gnutar @1.28_0 on OS X Mavericks: the child dies if the LANG variable is not set, but works with LANG=X. I discovered this using Cygwin ssh from Windows. A workaround is to add a line the in the ssh config file on the client to set LANG on the server.

$ gnutar tf tar-1.28.tar.xz |head -2
tar-1.28/
tar-1.28/acinclude.m4
$ unset LANG
$ gnutar tf tar-1.28.tar.xz |head
gnutar: Child died with signal 11
gnutar: Error is not recoverable: exiting now
$ LANG=X gnutar tf tar-1.28.tar.xz |head -2
tar-1.28/
tar-1.28/acinclude.m4

The crash report has:

Application Specific Information:
*** multi-threaded process forked ***
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libdispatch.dylib             	0x00007fff904841e6 _dispatch_wakeup + 100
1   libdispatch.dylib             	0x00007fff90484788 _dispatch_queue_push_list_slow2 + 30
2   libdispatch.dylib             	0x00007fff90487129 _dispatch_mach_msg_send + 608
3   libdispatch.dylib             	0x00007fff90486e7d dispatch_mach_send + 136
4   libxpc.dylib                  	0x00007fff8a2c3920 _xpc_connection_send_message_with_reply_f + 125
5   libxpc.dylib                  	0x00007fff8a2c37e0 xpc_connection_send_message_with_reply_sync + 180
6   com.apple.CoreFoundation      	0x00007fff93926d93 -[CFPrefsPlistSource copyReplyForDaemonMessage:toConnection:error:] + 243
7   com.apple.CoreFoundation      	0x00007fff93a817e0 __47-[CFPrefsPlistSource alreadylocked_synchronize]_block_invoke_2 + 352
8   com.apple.CoreFoundation      	0x00007fff9392665b withDaemonConnection + 299
9   com.apple.CoreFoundation      	0x00007fff939260bb -[CFPrefsPlistSource alreadylocked_synchronize] + 587
10  com.apple.CoreFoundation      	0x00007fff93925db3 _copyValueForKey + 131
11  com.apple.CoreFoundation      	0x00007fff93925d07 -[CFPrefsPlistSource copyValueForKey:] + 71
12  com.apple.CoreFoundation      	0x00007fff93925b65 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 149
13  com.apple.CoreFoundation      	0x00007fff93925a9f -[CFPrefsSource copyValueForKey:] + 79
14  com.apple.CoreFoundation      	0x00007fff93925a30 __CFPreferencesCopyAppValue_block_invoke + 32
15  com.apple.CoreFoundation      	0x00007fff9391fc0e +[CFPrefsSearchListSource withSearchListForIdentifier:perform:] + 846
16  com.apple.CoreFoundation      	0x00007fff9391f878 CFPreferencesCopyAppValue + 168
17  libintl.8.dylib               	0x0000000102531534 _nl_language_preferences_default + 70
18  libintl.8.dylib               	0x000000010252f628 libintl_dcigettext + 628
19  gnutar                        	0x00000001024d0a67 sys_child_open_for_uncompress + 113
20  gnutar                        	0x00000001024b8718 open_archive + 2208
21  gnutar                        	0x00000001024c898b read_and + 105
22  gnutar                        	0x00000001024d2b4d main + 4105
23  libdyld.dylib                 	0x00007fff8968a5fd start + 1

Thread 0 crashed with X86 Thread State (64-bit):

comment:8 Changed 8 years ago by kurthindenburg (Kurt Hindenburg)

Owner: changed from mww@… to macports-tickets@…
Status: newassigned

comment:9 Changed 6 years ago by dgilman (David Gilman)

Resolution: fixed
Status: assignedclosed

In a0de3f905d0ad366f8c200ebbb5c5cde99a3e2c6/macports-ports (master):

gnutar: update to 1.30

Remove old CVE patch. The two tickets are both about an issue where tar
crashes when LANG is unset. I'm unable to reproduce this on 10.13 with
this version of gnutar so it appears to have been fixed by either Apple
or the tar maintainers.

Closes: #52186
Closes: #47001

Note: See TracTickets for help on using tickets.