Subject: bin/25207: 2.0: tar cores on certain archive contents
To: None <>
From: Hubert Feyrer <>
List: netbsd-bugs
Date: 04/17/2004 10:54:46
>Number:         25207
>Category:       bin
>Synopsis:       2.0: tar cores on certain archive contents
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 17 08:55:00 UTC 2004
>Originator:     Hubert Feyrer
>Release:        NetBSD 2.0_BETA
	<The following information is extracted from your kernel. Please>
	<append output of "ldd", "ident" where relevant (multiple lines).>
System: NetBSD miyu 2.0_BETA NetBSD 2.0_BETA (MIYU) #46: Sun Apr 11 13:19:40 MEST 2004 feyrer@miyu:/usr/cvs/src-2.0/sys/arch/i386/compile/MIYU i386
Architecture: i386
Machine: i386

I have tar on 2.0_BETA/i386 dump core on me (reliably) when trying
to copy my -rnetbsd-2-0 source tree located in /usr/cvs/src-2.0 to
some dir:

	( cd /usr/cvs ; tar plcf - \
	  src-2.0/gnu/dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results \
	  | ( cd /tmp ; tar plvxf - ) )

This leads to:

	tar: Cannot create
	src-2.0/gnu/dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longdouble.out (File exists)
	src-2.0/gnu/dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-s-longdouble.out+Abort (core dumped)
	tar: Failed write to archive volume: 1miyu%  (Broken pipe)
	tar: Unexpected EOF on archive file
	tar: Unexpected EOF on archive file
	tar: Unexpected EOF on archive file


gdb says:
	(gdb) bt
	#0  0x48090e1b in kill () from /lib/
	#1  0x48105287 in abort () from /lib/
	#2  0x08050170 in file_creat (arcn=0x806de20)
	    at /usr/src/bin/pax/file_subs.c:102
	#3  0x0804c657 in extract () at /usr/src/bin/pax/ar_subs.c:348
	#4  0x08054f65 in main (argc=3, argv=0xbfbff88c) at /usr/src/bin/pax/pax.c:293
	#5  0x0804a1e2 in ___start ()

file_subs.c:102 is:
        if (xtmp_name)

xtmp_name is at that place:
	(gdb) print xtmp_name
	$1 = 0x807a180 	"src-2.0/gnu/dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results/s-double-a-longdouble.out"

I've played with variants of the above command starting in various dirs
and giving various arguments, but it only crashes in that one situation:

	works:  ( cd / ; tar plcf - usr/cvs/src-2.0/gnu/dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results
	works:  ( cd /usr ; tar plcf - cvs/src-2.0/gnu/dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results
	ABORTS: ( cd /usr/cvs ; tar plcf - src-2.0/gnu/dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results
	works:  ( cd /usr/cvs/src-2.0 ; tar plcf - gnu/dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results
	works:  ( cd /usr/cvs/src-2.0/gnu ; tar plcf - dist/gcc/gcc/testsuite/consistency.vlad/layout/i960-97r2-results

I can copy more of the tree (initially the command was to cd /usr/cvs and
tar up src-2.0), but the error always happens at the same line/file.

	See above.


Hubert Feyrer <>
 	<Please check that the above is correct for the bug being reported,>
 	<and append source date of snapshot, if applicable (one line).>