Subject: Re: Which NetBSD releases need _BLNK_DLOPEN_REQUIRE_PTHREADS=yes?
To: None <tech-pkg@netbsd.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: tech-pkg
Date: 10/17/2006 14:23:44
--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Jukka Salmi --> tech-pkg (2006-03-20 16:51:17 +0100):
> Hi,
> 
> I consider upgrading some netbsd-2 systems to netbsd-3. I am and will
> be using packages built using pkgsrc HEAD. Reading mk/dlopen.builtin.mk,
> I see some NetBSD 2.* release versions listed in
> _BLNK_DLOPEN_REQUIRE_PTHREAD_PLATFORMS. Are these really the only
> platforms which should be listed there? If yes, what changed with
> NetBSD 2.99.11 which made linking with pthreads unnecessary?

Today I upgraded a netbsd-2 system to netbsd-3 and rebuilt the packages
using pkgsrc-2006Q3. Everything worked fine, except that www/apache
dumped core on startup:

[1]   Abort trap (core dumped) ${HTTPD} -DSSL
/usr/pkg/sbin/apachectl startssl: httpd could not be started

A gdb backtrace revealed:

(gdb) bt
#0  0xbdb1c863 in kill () from /usr/lib/libc.so.12
#1  0xbdb1e7e7 in __libc_mutex_unlock () from /usr/lib/libc.so.12
#2  0xbdb96875 in __flockfile_internal () from /usr/lib/libc.so.12
#3  0xbdb718e3 in fgets () from /usr/lib/libc.so.12
#4  0x08083e73 in ap_cfg_getline ()
#5  0x08072baf in ap_srm_command_loop ()
#6  0x08073121 in ap_process_resource_config ()
#7  0x0807380b in ap_read_config ()
#8  0x0807c075 in main ()
#9  0x08050386 in ___start ()

I applied the attached patch to pkgsrc and rebuilt Apache and the
modules. This solved the problem.

This problem was reported several times but AFAICT never fixed. Any
comments are welcome.


TIA, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: mk/dlopen.builtin.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/dlopen.builtin.mk,v
retrieving revision 1.14
diff -u -p -r1.14 dlopen.builtin.mk
--- mk/dlopen.builtin.mk	26 Jun 2005 13:11:22 -0000	1.14
+++ mk/dlopen.builtin.mk	17 Oct 2006 12:16:29 -0000
@@ -47,7 +47,8 @@ _BLNK_DLOPEN_REQUIRE_PTHREAD_PLATFORMS=	
 	NetBSD-2.[0-9]_*-*						\
 	NetBSD-2.[0-9]-* NetBSD-2.[0-9].[0-9]*-*			\
 	NetBSD-2.[0-8][0-9]*-* NetBSD-2.9[0-8]*-*			\
-	NetBSD-2.99.[0-9]-* NetBSD-2.99.10-*
+	NetBSD-2.99.[0-9]-* NetBSD-2.99.10-*				\
+	NetBSD-3.*
 
 .if !defined(_BLNK_DLOPEN_REQUIRE_PTHREADS)
 _BLNK_DLOPEN_REQUIRE_PTHREADS?=	no

--TB36FDmn/VVEgNH/--