Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

gnutar: Child died with signal 11when and only when using ssh

Running via remote ssh on OSX Mavericks,


$ gnutar tf archive.tar.gz

gnutar: Child died with signal 11

gnutar: Error is not recoverable: exiting now


Gnutar is the current macports' version:


$ gnutar --version

tar (GNU tar) 1.28


The same command works from terminal. It also works in ssh sessions on Snow Leopard. In the ssh session, "gzip -cd archive.tar.gz | gnutar tf -" works, but some applications (R package installer) expect gnutar to handle the decompression.


This problem has been mentioned in the gnutar mailing list (for Yosemite) without a resolution.

Posted on Jun 2, 2015 10:12 AM

Reply
4 replies

Jun 2, 2015 11:02 AM in response to GNW3

Signal 11 is SIGSEGV - Invalid memory reference


If the exact same command works from a local Terminal session for the exact same file to the exact same output location logged in as the exact same user, then it might have something to do with the ssh vs Terminal environment variables, or the stty -a settings (very unlikely, but it is different, and differences are all that you have to go on at the moment).


Did the SIGSEGV generate a core file? You could try using gdb to analyze it, and see where it seg faulted.


Otherwise find a different tar utility, or maybe different source for gnutar.

Jun 3, 2015 4:52 AM in response to BobHarris

The error also occurs for bzip2 compressed archives. In many cases, the files come from external organizations so all I can do is change the locally installed versions of the software. Normally, I use Cygwin ssh on our "corporate standard desktop" Windows 7 environment. I just tried ssh from another mac and did not get the error, so I compared the environments. Form the mac, I get "LANG=en_CA.UTF-8", but from the PC the LANG variable is not set.

If I manually set it in the PC session the gnutar command works. If I unset LANG in the mac session, the child dies. I also tried LANG=X and that also works, so something is screwing up when LANG isn't set. This seems to be something about the way gnutar runs the child process, as

"gzip -dc ipred_0.9-3.tar.gz | gnutar tf -" doesn't seem to care if or how LANG is set.

Jun 4, 2015 9:58 AM in response to BobHarris

Just using ssh to connect to a remote system may not get the benefit of shell startup scripts, but there are several ways (all of which I didn't remember without some help from Google) to deal with it:


1. compile time options in bash for special handling of ssh sessions:

<http://apple.stackexchange.com/questions/23633/source-profile-and-bashrc-on-ssh- login-without-tty>,


2. ~/.ssh/environment: <http://stackoverflow.com/questions/216202/why-does-an-ssh-remote-command-get-few er-environment-variables-then-when-run-m…>.


3. ~/.ssh/config to pass variables set in the remote terminal environment


4. moving settings from ~/.profile to /etc/paths.d (OS X only)

(In particular, macports users may want to put macports paths in /etc/paths.d).

gnutar: Child died with signal 11when and only when using ssh

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.