Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2006 11:50:43 -0700 (MST)
From:      Mike Durian <durian@shadetreesoftware.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/92218: openoffice.org-2.0 build fails with shlibsign core dump
Message-ID:  <200601231850.k0NIohnn013259@man.boogie.com>
Resent-Message-ID: <200601231900.k0NJ0FtY023486@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         92218
>Category:       ports
>Synopsis:       openoffice.org-2.0 build fails with shlibsign core dump
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 23 19:00:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Mike Durian
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD man.boogie.com 6.0-STABLE FreeBSD 6.0-STABLE #1: Sat Dec 17 12:54:43 MST 2005 root@man.boogie.com:/disk2/obj/disk2/src/sys/BOOGIE i386


	
>Description:
	When I try to build openoffice.org-2.0 the build fails with a
	shlibsign core dump.  The path to shlibsign is
	work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/security/nss/cmd/shlibsign

	The command causing the core dump is:
	FreeBSD6.0_OPT.OBJ/shlibsign -v -i /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libsoftokn3.so

	The error message is:
	Fatal error 'Spinlock called when not threaded.' at line 87 in file /disk2/src/lib/libpthread/thread/thr_spinlock.c (errno = 0)

	The error message usually means libpthread is mixed with libc_r.
	When I run ldd on shlibsign, I don't see libc_r.

	ldd shlibsign
	shlibsign:
		libssl3.so => /usr/local/lib/libssl3.so (0x2808a000)
		libsmime3.so => /usr/local/lib/libsmime3.so (0x280ac000)
		libnss3.so => /usr/local/lib/libnss3.so (0x280cf000)
		libplc4.so => /usr/local/lib/libplc4.so (0x2813d000)
		libplds4.so => /usr/local/lib/libplds4.so (0x28165000)
		libnspr4.so => /usr/local/lib/libnspr4.so (0x2818c000)
		libpthread.so.2 => /usr/lib/libpthread.so.2 (0x281bc000)
		libc.so.6 => /lib/libc.so.6 (0x281e1000)
		libsoftokn3.so.1 => /usr/local/lib/libsoftokn3.so.1 (0x282b8000)

	However, when I throw the core dump into the debugger, gdb does
	load libc_r.  I don't know why shlibsign is picking up libc_r,
	but it probably shouldn't.


	sudo gdb FreeBSD6.0_OPT.OBJ/shlibsign shlibsign.core
	Password:
	GNU gdb 6.1.1 [FreeBSD]
	Copyright 2004 Free Software Foundation, Inc.
	GDB is free software, covered by the GNU General Public License, and you are
	welcome to change it and/or distribute copies of it under certain conditions.
	Type "show copying" to see the conditions.
	There is absolutely no warranty for GDB.  Type "show warranty" for details.
	This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)...
	Core was generated by `shlibsign'.
	Program terminated with signal 6, Aborted.
	Reading symbols from /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libssl3.so...(no debugging symbols found)...done.
	Loaded symbols for /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libssl3.so
	Reading symbols from /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libsmime3.so...(no debugging symbols found)...done.
	Loaded symbols for /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libsmime3.so
	Reading symbols from /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libnss3.so...(no debugging symbols found)...done.
	Loaded symbols for /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libnss3.so
	Reading symbols from /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libplc4.so...(no debugging symbols found)...done.
	Loaded symbols for /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libplc4.so
	Reading symbols from /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libplds4.so...(no debugging symbols found)...done.
	Loaded symbols for /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libplds4.so
	Reading symbols from /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libnspr4.so...(no debugging symbols found)...done.
	Loaded symbols for /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libnspr4.so
	Reading symbols from /usr/lib/libpthread.so.2...(no debugging symbols found)...done.
	Loaded symbols for /usr/lib/libpthread.so.2
	Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
	Loaded symbols for /lib/libc.so.6
	Reading symbols from /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libsoftokn3.so...(no debugging symbols found)...done.
	Loaded symbols for /disk2/ports/editors/openoffice.org-2.0/work/OOA680_m1/moz/unxfbsd.pro/misc/build/mozilla/dist/lib/libsoftokn3.so
	Reading symbols from /usr/lib/libc_r.so.6...(no debugging symbols found)...done.
	Loaded symbols for /usr/lib/libc_r.so.6
	Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
	Loaded symbols for /libexec/ld-elf.so.1
	#0  0x28257573 in kill () from /lib/libc.so.6
	[New LWP 100178]
	(gdb) bt
	#0  0x28257573 in kill () from /lib/libc.so.6
	#1  0x281861da in raise () from /usr/lib/libpthread.so.2
	#2  0x28256224 in abort () from /lib/libc.so.6
	#3  0x2819dad7 in pthread_testcancel () from /usr/lib/libpthread.so.2
	#4  0x28189326 in _spinlock () from /usr/lib/libpthread.so.2
	#5  0x281893e7 in _spinlock_debug () from /usr/lib/libpthread.so.2
	#6  0x2831affa in _thread_fd_table_init () from /usr/lib/libc_r.so.6
	#7  0x283198ac in _thread_init () from /usr/lib/libc_r.so.6
	#8  0x2830fe2a in _thread_init_hack () from /usr/lib/libc_r.so.6
	#9  0x2831c4a5 in _find_thread () from /usr/lib/libc_r.so.6
	#10 0x2830cc71 in _init () from /usr/lib/libc_r.so.6
	#11 0xbfbfb778 in ?? ()
	#12 0x280743d8 in ?? () from /libexec/ld-elf.so.1
	#13 0xbfbfb728 in ?? ()
	#14 0x2805ab95 in _rtld_error () from /libexec/ld-elf.so.1
	#15 0x2805d243 in _rtld () from /libexec/ld-elf.so.1
	#16 0x2805a3ce in .rtld_start () from /libexec/ld-elf.so.1



	I should also point out that libc_r does not appear anywhere in
	/etc/libmap.conf

	I also did a "ldd *.so* | grep libc_r" in /usr/local/lib to
	see if any third-party shared libraries might be out of date
	and linked to libc_r.  libc_r did not appear in any other
	library.


>How-To-Repeat:
	It fails for me every time, but obviously other people can build it.
>Fix:
	I don't know the OOo build system well enough, but I suspect
	some makefile is misconfigured and is pulling in libc_r when
	it shouldn't be.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601231850.k0NIohnn013259>