NetBSD Problem Report #28259

From jukka@bart.stasoft.ch  Fri Nov 12 17:51:15 2004
Return-Path: <jukka@bart.stasoft.ch>
Received: from smtp.tiscali.ch (smtp.tiscali.ch [212.40.5.52])
	by narn.netbsd.org (Postfix) with ESMTP id 60B6B251EB9
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 12 Nov 2004 17:51:14 +0000 (UTC)
Message-Id: <20041112175052.F085F5708@bart.stasoft.ch>
Date: Fri, 12 Nov 2004 18:50:52 +0100 (CET)
From: j+nbsd@2004.salmi.ch
Reply-To: j+nbsd@2004.salmi.ch
To: gnats-bugs@netbsd.org
Subject: databases/php-ldap broken after PHP updates
X-Send-Pr-Version: 3.95

>Number:         28259
>Category:       pkg
>Synopsis:       databases/php-ldap broken after PHP updates
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 12 17:52:00 +0000 2004
>Closed-Date:    Thu Nov 18 20:49:31 +0000 2004
>Last-Modified:  Thu Nov 18 20:49:31 +0000 2004
>Originator:     j+nbsd@2004.salmi.ch
>Release:        NetBSD 2.0_RC4
>Organization:
>Environment:
System: NetBSD bart.stasoft.ch 2.0_RC4 NetBSD 2.0_RC4 (GENERIC) #0: Thu Oct 14 23:41:00 CEST 2004 build@bart.stasoft.ch:/build/nbsd/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Since I updated a NetBSD 2.0_RC4 i386 system using current pkgsrc
(apache-1.3.33, php-4.3.9nb1, ap-php-4.3.9nb1, php-gettext-4.3.9
and php-ldap-4.3.9) apache dumps core when starting. Removing the
line 'extension=ldap.so' from php.ini makes Apache startup succeed.
>How-To-Repeat:
Build php-ldap-4.3.9 (and Apache 1, PHP 4) and try to start Apache.

$ sudo /etc/rc.d/apache start                                                  
[1]   Abort trap (core dumped) ${HTTPD} -DSSL
/usr/pkg/sbin/apachectl startssl: httpd could not be started
$ gdb /usr/pkg/sbin/httpd httpd.core 
GNU gdb 5.3nb1
[...]
(gdb) bt
#0  0x48102feb in kill () from /usr/lib/libc.so.12
#1  0x481050af in __libc_mutex_unlock () from /usr/lib/libc.so.12
#2  0x48177003 in malloc () from /usr/lib/libc.so.12
#3  0x484ee017 in zend_hash_add_or_update ()
   from /usr/pkg/lib/httpd/mod_php4.so
#4  0x484f39c2 in zend_register_ini_entries ()
   from /usr/pkg/lib/httpd/mod_php4.so
#5  0x485b9891 in zm_startup_ldap () from /usr/pkg/lib/php/20020429/ldap.so
#6  0x4846dccc in php_dl () from /usr/pkg/lib/httpd/mod_php4.so
#7  0x484c6839 in php_load_function_extension_cb ()
   from /usr/pkg/lib/httpd/mod_php4.so
#8  0x484e5219 in zend_llist_apply () from /usr/pkg/lib/httpd/mod_php4.so
#9  0x484c6df6 in php_ini_delayed_modules_startup ()
   from /usr/pkg/lib/httpd/mod_php4.so
#10 0x484c2c5e in php_module_startup () from /usr/pkg/lib/httpd/mod_php4.so
#11 0x484fba93 in php_apache_startup () from /usr/pkg/lib/httpd/mod_php4.so
#12 0x484fc7de in php_init_handler () from /usr/pkg/lib/httpd/mod_php4.so
#13 0x080739f3 in ap_init_modules ()
#14 0x0807c35b in main ()
#15 0x080503b2 in ___start ()
>Fix:
Unknown, sorry.

>Release-Note:

>Audit-Trail:
From: Jukka Salmi <j+nbsd@2004.salmi.ch>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/28259: databases/php-ldap broken after PHP updates
Date: Sun, 14 Nov 2004 21:56:10 +0100

 Hmm, maybe I was wrong, and databases/php-ldap is not broken at all...
 I just noticed that I updated databases/openldap as well, and the
 new version (openldap-2.2.13nb4.tgz) runs fine, but: if I install
 the old version (openldap-2.2.13nb3.tgz), apache start fine, even
 with extension=ldap.so enabled in php.ini.

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

From: Jukka Salmi <j+nbsd@2004.salmi.ch>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/28259: databases/php-ldap broken after PHP updates
Date: Mon, 15 Nov 2004 14:43:15 +0100

 The wording of my last message was bad; to set the record straight:

 - After building Apache 1, PHP 4, OpenLDAP 2 and the according PHP and
   LDAP Apache modules from current pkgsrc (from scratch), Apache dumps
   core while starting (see original PR).
 - After replacing the OpenLDAP package (2.2.13nb4) with one built
   on October 18, Apache starts fine. However, checking out, rebuilding
   and reinstalling openldap sources from October 18 results in Apache
   dumping core again.

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

From: Jukka Salmi <j+nbsd@2004.salmi.ch>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/28259: databases/php-ldap broken after PHP updates
Date: Mon, 15 Nov 2004 15:39:25 +0100

 Built with -g, gdb bt looks like:

 $ sudo gdb /usr/pkg/sbin/httpd httpd.core                                      
 GNU gdb 5.3nb1
 [...]
 (gdb) bt
 #0  0x48101feb in kill () from /usr/lib/libc.so.12
 #1  0x481040af in __libc_mutex_unlock () from /usr/lib/libc.so.12
 #2  0x48176003 in malloc () from /usr/lib/libc.so.12
 #3  0x4836e037 in zend_hash_add_or_update (ht=0x80c9380, 
     arKey=0x485014f8 "ldap.max_links", nKeyLength=15, pData=0x48502280, 
     nDataSize=56, pDest=0xbfbff7cc, flag=2)
     at /build/pkg/www/ap-php/work/php-4.3.9/Zend/zend_hash.c:275
 #4  0x483739e2 in zend_register_ini_entries (ini_entry=0x48502280, 
     module_number=10)
     at /build/pkg/www/ap-php/work/php-4.3.9/Zend/zend_ini.c:162
 #5  0x484fc8c1 in zm_startup_ldap (type=1, module_number=10)
     at /build/pkg/databases/php-ldap/work/php-4.3.9/ext/ldap/ldap.c:221
 #6  0x482edcec in php_dl (file=0x80ab6a8, type=1, return_value=0xbfbff870)
     at /build/pkg/www/ap-php/work/php-4.3.9/ext/standard/dl.c:238
 #7  0x48346859 in php_load_function_extension_cb (arg=0x80ab6a8)
     at /build/pkg/www/ap-php/work/php-4.3.9/main/php_ini.c:219
 #8  0x48365239 in zend_llist_apply (l=0x483b913c, 
     func=0x48346838 <php_load_function_extension_cb>)
     at /build/pkg/www/ap-php/work/php-4.3.9/Zend/zend_llist.c:189
 #9  0x48346e16 in php_ini_delayed_modules_startup ()
     at /build/pkg/www/ap-php/work/php-4.3.9/main/php_ini.c:502
 #10 0x48342c7e in php_module_startup (sf=0x483b6840, 
     additional_modules=0x483b6b80, num_additional_modules=1)
     at /build/pkg/www/ap-php/work/php-4.3.9/main/main.c:1231
 #11 0x4837bab3 in php_apache_startup (sapi_module=0x483b6840)
     at /build/pkg/www/ap-php/work/php-4.3.9/sapi/apache/mod_php4.c:266
 #12 0x4837c7fe in php_init_handler (s=0x80af038, p=0x80af010)
     at /build/pkg/www/ap-php/work/php-4.3.9/sapi/apache/mod_php4.c:889
 #13 0x080739ef in ap_init_modules (p=0x80af010, s=0x80af038)
     at http_config.c:1664
 #14 0x0807c357 in main (argc=1, argv=0xbfbffa9c) at http_main.c:5765
 #15 0x080503b2 in ___start ()

 HTH, Jukka

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

From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/28259 CVS commit: pkgsrc/databases/openldap
Date: Thu, 18 Nov 2004 19:07:04 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	jlam
 Date:		Thu Nov 18 19:07:04 UTC 2004

 Modified Files:
 	pkgsrc/databases/openldap: Makefile buildlink3.mk distinfo
 Added Files:
 	pkgsrc/databases/openldap/patches: patch-aj patch-ak

 Log Message:
 We don't actually want everything to be built with pthreads -- only
 libldap_r and slurpd.  Patch those Makefiles (patch-aj, patch-ak) to
 pass $(PTHREAD_CFLAGS) and $(PTHREAD_LDFLAGS) to the build.  The
 configure process correctly adds any necessary libraries, so adding
 $(PTHREAD_LIBS) isn't needed.  Bump the PKGREVISION since the LDAP
 libraries are no longer linked against libpthread.

 This fixes PR pkg/28259.


 To generate a diff of this commit:
 cvs rdiff -r1.86 -r1.87 pkgsrc/databases/openldap/Makefile
 cvs rdiff -r1.13 -r1.14 pkgsrc/databases/openldap/buildlink3.mk
 cvs rdiff -r1.28 -r1.29 pkgsrc/databases/openldap/distinfo
 cvs rdiff -r0 -r1.1 pkgsrc/databases/openldap/patches/patch-aj \
     pkgsrc/databases/openldap/patches/patch-ak

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: jlam@netbsd.org
State-Changed-When: Thu, 18 Nov 2004 19:11:39 +0000
State-Changed-Why:
Please update your openldap to 2.2.18nb1 and rebuild php-ldap.  I was
able to start apache on 2.0_RC5/amd64 with those changes.  Please let
me know if this works for you.

	Thanks,

	-- Johnny Lam <jlam@NetBSD.org>


From: Jukka Salmi <j+nbsd@2004.salmi.ch>
To: jlam@netbsd.org
Cc: pkgsrc-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: pkg/28259
Date: Thu, 18 Nov 2004 21:40:08 +0100

 jlam@netbsd.org --> pkgsrc-bugs (2004-11-18 19:11:40 +0000):
 > Synopsis: databases/php-ldap broken after PHP updates
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: jlam@netbsd.org
 > State-Changed-When: Thu, 18 Nov 2004 19:11:39 +0000
 > State-Changed-Why:
 > Please update your openldap to 2.2.18nb1 and rebuild php-ldap.  I was
 > able to start apache on 2.0_RC5/amd64 with those changes.  Please let
 > me know if this works for you.

 Yes, seems to work fine, Apache starts fine again. Thanks a lot!

 Regards, Jukka

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

State-Changed-From-To: feedback->closed
State-Changed-By: jlam@netbsd.org
State-Changed-When: Thu, 18 Nov 2004 20:49:31 +0000
State-Changed-Why:
PR submitter confirms the problem was fixed by carefully isolating the
code that needs to link against -lpthread.  Thanks for the PR!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.