Bug 158374 - databases/firebird21-client coredumps
Summary: databases/firebird21-client coredumps
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-28 07:30 UTC by Mike Maguire
Modified: 2013-03-24 19:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Maguire 2011-06-28 07:30:11 UTC
This appears to be the same problem as:
http://www.freebsd.org/cgi/query-pr.cgi?pr=140365
but for firebird 2.1.

I received a core dump message when trying to run ibase_connect in a php script.
Running `gdb php php.core` yielded:
in ThreadData::restoreSpecific () from /usr/local/lib/libfbclient.so.2

Which matches bug mentioned above. Checked configure.in and it has the same line (the patch that fixed the other PR comments it out).

Fix: 

Probably the same basic patch as:

http://www.freebsd.org/cgi/query-pr.cgi?pr=140365
How-To-Repeat: Install programs listed in Environment. Try to run a php script with a ibase_connect command.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-28 07:30:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->acm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Mike Maguire 2011-06-28 21:09:03 UTC
Hi everyone,
I'm posting this to the bug and to freebsd-questions in case anyone can
help me out with advice on how to investigate further.
This is in regards to:
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/158374
I'm not sure if I jumped the gun on submitting the PR because the fix
only partially fixed it and the next problem may or may not be related.
=====

Actually I played with this further and maybe these things are pertinent:


Everything works fine on a FreeBSD 9 VM I have:
FreeBSD 9.0-CURRENT #3: Sun Apr  3 20:41:14 PDT 2011
gcc (GCC) 4.2.2 20070831 prerelease [FreeBSD]

I never had to patch anything and it is the exact same version of
Firebird (and PHP).


I did try patching the FreeBSD 8.2 machine (as described in the other
PR) and it only sortof worked....
It connects to a firebird database and everything seems fine (it outputs
data from the database) until the end of the script where it still
segfaults.
I should point out that php scripts that don't connect to firebird don't
segfault and I tried eliminating all other extentsions.

I'm not sure how to get a better backtrace (I tried compiling
php/php-extenstions/firebird with debug and they aren't stripped):

# gdb php php.core

#0  0x000000080193a2d2 in ?? ()
[New Thread 8017041c0 (LWP 100293)]

# file /usr/local/lib/php/20090626-debug/interbase.so
/usr/local/lib/php/20090626-debug/interbase.so: ELF 64-bit LSB shared
object, x86-64, version 1 (FreeBSD), dynamically linked, not stripped
/usr/local/lib/libfbclient.so.2.1.3: ELF 64-bit LSB shared object,
x86-64, version 1 (FreeBSD), dynamically linked, not stripped


gcc on the FreeBSD 8.2 box:
gcc (GCC) 4.2.1 20070719


Thanks,
Mike

PS
Firebird itself works fine if run from isql-fb.
Comment 3 mike 2011-07-04 01:09:42 UTC
I tried out the same exact script (well, except for the #!/usr/local...
line at the top) in apache and mod_php and saw no evidence of
segfaulting (but only when patch was applied). So I believe my other
segfaults are unrelated.

I also tried it in another VM: FreeBSD 8.1-RELEASE-p4 32bit
And it segfaults in a slightly different place (doesn't successfully
query firebird). This is with the patch.

If I figure out what that problem is then I will submit another PR. I'm
not too worried about it (I don't know how many people use CLI PHP with
Firebird). I just used python instead.


So, in conclusion, this patch fixes this PR.
Comment 4 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2013-03-24 19:17:06 UTC
State Changed
From-To: open->closed

- Current version of firebird doesn't have this problem, please try with newest  
version of firebird