Mantis - gtar
Viewing Issue Advanced Details
4601 regular use crash always 2010-11-09 11:36 2011-07-01 22:24
smwardle  
phil  
normal  
closed  
fixed  
none    
none  
0004601: gtar -xf Segmentation Fault
Using gtar to extract multiple files from an archive (created by gtar) gives a Segmentation Fault.
This problem has occurred with both releases of version 1.24.
1.23 was working.
Repeatable on UltraSPARC-II and UltraSPARC-III+ machines.
Issue History
2010-11-09 11:36 smwardle New Issue
2010-11-09 16:43 ihsan Issue Monitored: ihsan
2010-11-09 16:43 ihsan Note Added: 0008447
2010-11-09 17:55 phil Note Added: 0008448
2010-11-09 18:25 smwardle Note Added: 0008449
2010-11-09 18:26 smwardle Note Edited: 0008449
2010-11-09 18:35 phil Note Added: 0008450
2010-11-09 18:35 phil Status new => closed
2010-11-09 18:35 phil Resolution open => unable to reproduce
2010-11-10 08:28 ihsan Assigned To => phil
2010-11-10 08:28 ihsan Note Added: 0008451
2010-11-10 08:28 ihsan Status closed => feedback
2010-11-10 08:28 ihsan Resolution unable to reproduce => reopened
2010-11-11 18:31 phil Note Added: 0008452
2010-11-11 18:31 phil Status feedback => closed
2010-11-11 18:32 phil Resolution reopened => unable to reproduce
2010-11-11 18:37 bwalton Note Added: 0008453
2010-11-11 18:51 phil Note Added: 0008454
2010-11-15 09:52 maciej Note Added: 0008455
2010-11-15 16:36 bonivart Status closed => feedback
2010-11-15 16:36 bonivart Resolution unable to reproduce => reopened
2010-11-15 16:39 skayser Note Added: 0008456
2010-11-15 18:17 phil Note Added: 0008457
2010-11-16 18:20 skayser Note Added: 0008460
2010-11-16 18:36 phil Note Added: 0008461
2010-11-17 19:04 phil Note Added: 0008462
2010-11-18 09:44 smwardle Note Added: 0008464
2011-01-21 14:05 dam Note Added: 0008720
2011-01-21 14:21 smwardle Note Added: 0008721
2011-01-21 16:31 dam Note Added: 0008722
2011-01-21 16:44 smwardle Note Added: 0008723
2011-01-21 16:45 smwardle Note Edited: 0008723
2011-07-01 22:24 dam Note Added: 0009171
2011-07-01 22:24 dam Status feedback => closed
2011-07-01 22:24 dam Resolution reopened => fixed

Notes
(0008447)
ihsan   
2010-11-09 16:43   
The same issue also on x86:

ihsan@dognchgresv01:~$ gunzip -c garsrcarchive/unbound-1.4.7.tar.gz | gtar --no-same-owner -xf - -C extract
Segmentation Fault (core dumped)
(0008448)
phil   
2010-11-09 17:55   
erm.. I'm not seeing a problem , when testing on sol 10 sparc.
And Ihsan, the invokation you gave is invalid.

$ /opt/csw/bin/gtar zxf ../unbound-1.4.7.tar.gz
[works]

$ gunzip -c ../unbound-1.4.7.tar.gz |/opt/csw/bin/gtar --no-same-owner -xf - -C extract

gives

/opt/csw/bin/gtar: extract: Cannot open: No such file or directory
/opt/csw/bin/gtar: Error is not recoverable: exiting now


To smwardle:
I've tried extracting individual multiple files.
$ /opt/csw/bin/gtar zfx ../unbound-1.4.7.tar.gz unbound-1.4.7/iterator/iter_fwd.c unbound-1.4.7/iterator/iter_resptype.c

works just fine for me.

So... I dont have a reproducible problem to investigate yet.
Unless you can give me a more specific example I can look at, I will be closing this case as "cannot reproduce".
(0008449)
smwardle   
2010-11-09 18:25   
(edited on: 2010-11-09 18:26)
Example:

mkdir /tmp/{ggg,qqq}
touch /tmp/ggg/{a,b,c}
cd /tmp/ggg
gtar -cf - a b c | gtar -C /tmp/qqq/ -xf -
ls /tmp/qqq/

(0008450)
phil   
2010-11-09 18:35   
history output:
(some line numbers skipped for irrelevant stuff :)
158 cd /tmp
159 mkdir ggg qqq
160 cd ggg

166 /opt/csw/bin/gtar cf - a b c | /opt/csw/bin/gtar xf - -C /tmp/qqq
# retry with your exact flags:
169 rm ../qqq/*
170 /opt/csw/bin/gtar -cf - a b c | /opt/csw/bin/gtar -C /tmp/qqq/ -xf -


"works for me".

there's something wrong with your system, I'm afraid.
Closing as non-reproducible.
(0008451)
ihsan   
2010-11-10 08:28   
Sorry, but this is reproducable. Just login on bender and execute the command I've provided.
(0008452)
phil   
2010-11-11 18:31   
Ihsan, YOU are doing something wrong also :-/
As I mentioned higher up, I tried it out, but the invocation you gave is wrong.
The fault is in how you are calling it, not the program :)
(0008453)
bwalton   
2010-11-11 18:37   
...but if it is segfaulting, even with invalid options, isn't that something that should be investigated and corrected?
(0008454)
phil   
2010-11-11 18:51   
That sort of thing is usually an "upstream" error, rather than a packaging error.

If someone wants to spend the extra time poking around recompiling a fresh version of the same source code, and finds that it is some mistake in how I've compiled it, I'll be happy to redo.
I deem that to be highly unlikely, so dont see this as worth futher effort.
(I used very generic compile flags)
Notice that the original reporter, mentions that the prior version of 1.24 showed problems for him, whereas 1.23 did not.
So his issues are most likely some kind of interaction with his system, and the gtar implementation change between 1.23 and 1.24.
Nothing I can do about that!
(0008455)
maciej   
2010-11-15 09:52   
Here's how I can reproduce the same symptom on a x86 host:

wget https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/examples/multiple-versions/trunk/files/hello-0.1.0.tar.gz [^]
gtar xfvz hello-0.1.0.tar.gz
(0008456)
skayser   
2010-11-15 16:39   
Reported this issue upstream so that it can be fixed (sent an email to the GNU tar bug mailing list, bug-tar@gnu.org). Will add the thread URL (once it appears in the archives) and findings to this bug report.
(0008457)
phil   
2010-11-15 18:17   
Thanks guys for the confirmation.
I'm backrevving to 1.23
(0008460)
skayser   
2010-11-16 18:20   
Upstream thread: http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00069.html [^]
Suggested fix: http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00073.html [^]

Therefore, you should be able to work around the problem with the 1.24
and 1.25 tarballs by configuring with:

  ./configure gl_cv_func_futimesat_works=yes

which is effectively what the gnulib fix changed to happen automatically
on Solaris 10.
(0008461)
phil   
2010-11-16 18:36   
Thanks for the digging.
rebuilding.
(0008462)
phil   
2010-11-17 19:04   
I dropped in experimental.
Please test.
(0008464)
smwardle   
2010-11-18 09:44   
Thanks but still segfaults here I'm afraid.
SunOS 5.10 Generic_144488-02 sun4u sparc SUNW,Sun-Blade-1000
(0008720)
dam   
2011-01-21 14:05   
I think I found the issue. Would you mind trying the updated packages from experimental?
  http://buildfarm.opencsw.org/experimental.html#gtar [^]
(0008721)
smwardle   
2011-01-21 14:21   
Just tried it but it's still segfaulting...
(0008722)
dam   
2011-01-21 16:31   
The error seems to occur only when the compilation is done on Solaris 9 and the package is used on Solaris 10. I have contacted upstream again about the issue and meanwhile made release-specific packages for 9 and 10:
  http://buildfarm.opencsw.org/experimental.html#gtar [^]
(0008723)
smwardle   
2011-01-21 16:44   
(edited on: 2011-01-21 16:45)
I can confirm the release specific package is working here on Solaris 10.

(0009171)
dam   
2011-07-01 22:24   
Fixed in 1.26,REV=2011.06.29 and released to current/.