NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/56080: tar(1) dumps core on nfs volume

>Number:         56080
>Category:       bin
>Synopsis:       tar(1) dumps core on nfs volume
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 28 10:05:00 +0000 2021
>Originator:     Hauke Fath
>Release:        NetBSD 9.99.81
Falling Raindrops
System: NetBSD i386-pxe 9.99.81 NetBSD 9.99.81 (BLACKBOX-$Revision: 1.85 $) #0: Mon Mar 22 16:48:50 CET 2021 amd64
Architecture: x86_64
Machine: amd64

% ldd /bin/tar
	-larchive.4 => /usr/lib/
	-lbz2.1 => /usr/lib/
	-lc.12 => /lib/
	-lcrypto.14 => /lib/
	-lcrypt.1 => /lib/
	-lexpat.2 => /usr/lib/
	-llzma.2 => /lib/
	-lpthread.1 => /lib/
	-lz.1 => /lib/
% ident /bin/tar
     $NetBSD: crt0.S,v 1.4 2018/11/26 17:37:46 joerg Exp $
     $NetBSD: crt0-common.c,v 1.23 2018/12/28 20:12:35 christos Exp $
     $NetBSD: crti.S,v 1.1 2010/08/07 18:01:35 joerg Exp $
     $NetBSD: crtbegin.S,v 1.2 2010/11/30 18:37:59 joerg Exp $
     $NetBSD: crtend.S,v 1.1 2010/08/07 18:01:34 joerg Exp $
     $NetBSD: crtn.S,v 1.1 2010/08/07 18:01:35 joerg Exp $


Building (packaging) editors/xemacs-nox11 on a net-booted -current
installation fails when libarchive-as-tar invoked from
work/xemacs-21.4.24/Makefile dumps core because of an assertion
[hauke@i386-pxe] /<6>xemacs-21.4.24/lisp > pwd
[hauke@i386-pxe] /<6>xemacs-21.4.24/lisp > tar -cf /dev/null .
Segmentation fault (core dumped)
[hauke@i386-pxe] /<6>xemacs-21.4.24/lisp > gdb /bin/tar tar.core
GNU gdb (GDB)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
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--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /bin/tar...
Reading symbols from /usr/libdata/debug//bin/tar.debug...
[New process 6101]
Core was generated by `tar'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00006f8f68467866 in _citrus_iconv_convert (nresults=0x7f7fff388ab8, flags=0, outbytes=0x7f7fff388b38, out=0x7f7fff388b30, 
    inbytes=0x7f7fff388b28, in=0x7f7fff388b20, cv=0x6f8f6a89b0e0) at /usr/src/lib/libc/citrus/citrus_iconv.h:61
61		_DIAGASSERT(cv && cv->cv_shared && cv->cv_shared->ci_ops &&
(gdb) bt
#0  0x00006f8f68467866 in _citrus_iconv_convert (nresults=0x7f7fff388ab8, flags=0, outbytes=0x7f7fff388b38, out=0x7f7fff388b30, 
    inbytes=0x7f7fff388b28, in=0x7f7fff388b20, cv=0x6f8f6a89b0e0) at /usr/src/lib/libc/citrus/citrus_iconv.h:61
#1  _iconv (handle=handle@entry=0x6f8f6a89b0e0, in=in@entry=0x7f7fff388b20, szin=szin@entry=0x7f7fff388b28, out=out@entry=0x7f7fff388b30, 
    szout=szout@entry=0x7f7fff388b38) at /usr/src/lib/libc/iconv/iconv.c:97
#2  0x00006f8f6a483834 in iconv_strncat_in_locale (as=0x6f8f6a832158, _p=<optimized out>, length=<optimized out>, sc=0x6f8f6a883070)
    at /usr/src/external/bsd/libarchive/dist/libarchive/archive_string.c:2039
#3  0x00006f8f6a4844ba in archive_strncat_l (as=as@entry=0x6f8f6a832158, _p=<optimized out>, n=<optimized out>, sc=<optimized out>)
    at /usr/src/external/bsd/libarchive/dist/libarchive/archive_string.c:1998
#4  0x00006f8f6a48459a in archive_strncpy_l (as=as@entry=0x6f8f6a832158, _p=<optimized out>, n=<optimized out>, sc=<optimized out>)
    at /usr/src/external/bsd/libarchive/dist/libarchive/archive_string.c:1944
#5  0x00006f8f6a4847d9 in archive_mstring_get_mbs_l (aes=0x6f8f6a832110, p=0x7f7fff388c58, length=0x7f7fff388c88, sc=<optimized out>)
    at /usr/src/external/bsd/libarchive/dist/libarchive/archive_string.c:4005
#6  0x00006f8f6a47b810 in _archive_entry_pathname_l (entry=<optimized out>, p=<optimized out>, len=<optimized out>, sc=<optimized out>)
    at /usr/src/external/bsd/libarchive/dist/libarchive/archive_entry.c:598
#7  0x00006f8f6a41f051 in get_entry_pathname (a=0x6f8f6a88d000, entry=<optimized out>, name=<optimized out>, length=<optimized out>, 
    sc=<optimized out>) at /usr/src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_pax.c:428
#8  0x00006f8f6a41f5da in archive_write_pax_header (a=0x6f8f6a88d000, entry_original=0x6f8f6a831500)
    at /usr/src/external/bsd/libarchive/dist/libarchive/archive_write_set_format_pax.c:839
#9  0x00006f8f6a46a1da in _archive_write_header (_a=0x6f8f6a88d000, entry=0x6f8f6a831500)
    at /usr/src/external/bsd/libarchive/dist/libarchive/archive_write.c:650
#10 0x00000000e4c08ac2 in write_entry (bsdtar=bsdtar@entry=0x7f7fff389590, a=a@entry=0x6f8f6a88d000, entry=0x6f8f6a831500)
    at /usr/src/external/bsd/libarchive/dist/tar/write.c:974
#11 0x00000000e4c08cac in write_file (entry=<optimized out>, a=0x6f8f6a88d000, bsdtar=0x7f7fff389590)
    at /usr/src/external/bsd/libarchive/dist/tar/write.c:962
#12 write_hierarchy (bsdtar=bsdtar@entry=0x7f7fff389590, a=a@entry=0x6f8f6a88d000, path=path@entry=0x7f7fff389dd2 ".")
    at /usr/src/external/bsd/libarchive/dist/tar/write.c:941
#13 0x00000000e4c0907e in write_archive (a=a@entry=0x6f8f6a88d000, bsdtar=bsdtar@entry=0x7f7fff389590)
    at /usr/src/external/bsd/libarchive/dist/tar/write.c:513
#14 0x00000000e4c098a4 in tar_mode_c (bsdtar=bsdtar@entry=0x7f7fff389590) at /usr/src/external/bsd/libarchive/dist/tar/write.c:247
#15 0x00000000e4c0ba4d in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/external/bsd/libarchive/dist/tar/bsdtar.c:910
(gdb) print *cv
$1 = {cv_shared = 0x6c652e73, cv_closure = 0x6f8f6a80b050}
(gdb) print *cv->cv_shared
Cannot access memory at address 0x6c652e73

where 0x6c652e73 happens to be ascii 's.el'.

See also
<> ff.


	On a net-booted instance of -current amd64, with pkgsrc
	mounted r/o and WRKOBJDIR=/var/obj/pkgsrc, 'make extract'

	Change to
	${WRKOBJDIR}/editors/xemacs-nox11/work/xemacs-21.4.24/lisp and
	run '/bin/tar -cf /dev/null .'.

	The assertion failure appears to be somewhat specific to the
	tared up directory.

	/bin/pax works here, as does pkgsrc gtar.


	None, yet. 

	A workaround is to have the xemacs Makefile use GNU tar	instead.



Home | Main Index | Thread Index | Old Index