From nobody@FreeBSD.org  Wed Sep 10 04:33:22 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0185C106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Sep 2008 04:33:22 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E6EA78FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Sep 2008 04:33:21 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m8A4XLc2046393
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 10 Sep 2008 04:33:21 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m8A4XLpK046392;
	Wed, 10 Sep 2008 04:33:21 GMT
	(envelope-from nobody)
Message-Id: <200809100433.m8A4XLpK046392@www.freebsd.org>
Date: Wed, 10 Sep 2008 04:33:21 GMT
From: Nigel Weeks <nweeks@ausbm.com.au>
To: freebsd-gnats-submit@FreeBSD.org
Subject: fbclient crashes php engine
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         127262
>Category:       ports
>Synopsis:       databases/firebird20-server: fbclient crashes php engine [regression]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 10 04:40:01 UTC 2008
>Closed-Date:    Sun May 16 07:35:52 UTC 2010
>Last-Modified:  Sun May 16 07:35:52 UTC 2010
>Originator:     Nigel Weeks
>Release:        RELENG_7_0
>Organization:
Australian Bulk Minerals / Prism9 Technology
>Environment:
FreeBSD server0001.prism9.com 7.0-STABLE FreeBSD 7.0-STABLE #0: Thu May 22 19:04:52 EST 2008     nweeks@server0001.prism9.com:/usr/obj/usr/src/sys/SERVER  i386

>Description:
After upgrade to FreeBSD 7, and rebuilding all ports from sources, Apache
processes die with Sig 11's

Running php5 from command line yeilds the same result

simple php script containing the following:
#!/usr/local/bin/php

<?php

$conn = ibase_connect("localhost:/raid/db/passport.fdb","sysdba","masterkey");

$sql = "select * from tbl_transaction";
$rec = ibase_query($sql);
while($row = ibase_fetch_row($rec)){
  echo ".";

}

?>


When run, yields the following:
./db_test.php

Segmentation fault (core dumped)


gdb dump of the core:

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 `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.4
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxml2.so.5 Reading symbols from /lib/libz.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/local/lib/php/20060613/interbase.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/php/20060613/interbase.so
Reading symbols from /usr/local/lib/libfbclient.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libfbclient.so.2 Reading symbols from /lib/libncurses.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libncurses.so.7
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6 Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x285fedff in ThreadData::restoreSpecific ()
   from /usr/local/lib/libfbclient.so.2
[New Thread 0x835b300 (LWP 101281)]
(gdb) 


Again, all ports were compiled fresh - no old libraries were remaining...

Firebird operation itself is fine - can `isql` to databases, backups,
restores and remote connections are fine.



>How-To-Repeat:
On FreeBSD 7.x  (Both 7_0_0_RELEASE and 7_0 have been tried):

Install PHP5, php5-interbase, Firebird2-client, and Firebird2-server.

Create test script to connect to a database, and do a simple select query


>Fix:
Currently, the only fix is to downgrade to FreeBSD 6.2

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Sep 10 05:08:24 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127262 
Responsible-Changed-From-To: ale->skv 
Responsible-Changed-By: ale 
Responsible-Changed-When: Wed Sep 10 05:45:36 UTC 2008 
Responsible-Changed-Why:  
Assign to skv as it seems a firebird2 misbehavior. 
Other info here: http://bugs.php.net/bug.php?id=43388 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127262 
Responsible-Changed-From-To: skv->freebsd-ports-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Dec 25 03:27:43 UTC 2009 
Responsible-Changed-Why:  
skv no longer maintains this port. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127262 

From: Sylvio Cesar Teixeira <sylvio@FreeBSD.org>
To: bug-followup@FreeBSD.org, nweeks@ausbm.com.au
Cc:  
Subject: Re: ports/127262: databases/firebird20-server: fbclient crashes php 
	engine [regression]
Date: Thu, 29 Apr 2010 15:19:04 -0300

 Hi Nigel,
 
 This problem still happen?
State-Changed-From-To: open->closed 
State-Changed-By: stefan 
State-Changed-When: Sun May 16 07:34:08 UTC 2010 
State-Changed-Why:  
Submitter timeout, and it seems this has been fixed in ports/140365. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127262 
>Unformatted:
