# php-5.2.12 and pecl install: Seg. fault

- Thread: https://externals.io/message/46485
- Original archive: https://news-web.php.net/php.internals/46485
- Started by k@rl.pflaesterer.de on 2009-12-22T12:25:47+00:00
- Messages: 8
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #46485 — k@rl.pflaesterer.de — 2009-12-22T12:25:47+00:00

URL: https://externals.io/message/46485#46485

Hi,
I wanted to install php-5.2.12 on a 32-Bit SLES9 SP4. I had no problems
with the 64-Bit SLES10SP2 but with the 32-Bit I can't use pecl.

Whenever I try to install a library I only get a seg. fault. I tried
also php-5.2.11 and there is also the same problem. php-5.2.9 works.

pecl install pdflib expands to:

/usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib

If I run that with gdb I see:

(gdb) run
Starting program: /usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib
[Thread debugging using libthread_db enabled]
[New Thread 1080940768 (LWP 32645)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1080940768 (LWP 32645)]
0x402fb9f4 in SSL_SESSION_hash () from /usr/lib/libssl.so.0.9.7
(gdb) bt
#0  0x402fb9f4 in SSL_SESSION_hash () from /usr/lib/libssl.so.0.9.7
#1  0x402fba3b in SSL_SESSION_hash_LHASH_HASH () from /usr/lib/libssl.so.0.9.7
#2  0x40016a6c in d2i_X509 () from /lib/ld-linux.so.2
#3  0x403fceac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
#4  0x403d171d in getrn () from /usr/lib/libcrypto.so.0.9.7
#5  0x00000000 in ?? ()
(gdb)


And there I'm lost.  How can I debug further what the problem might be.

On another server (also SLES9SP4 32-bit Linux) I see:

(gdb) run
Starting program: /usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib
[Thread debugging using libthread_db enabled]
[New Thread 1082827648 (LWP 25177)]
*** glibc detected *** double free or corruption (out): 0x4083f088 ***
*** glibc detected *** double free or corruption (out): 0x4083f090 ***

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1082827648 (LWP 25177)]
0x4053e498 in ASN1_STRING_free () from /usr/lib/libcrypto.so.0.9.7
(gdb) bt
#0  0x4053e498 in ASN1_STRING_free () from /usr/lib/libcrypto.so.0.9.7
#1  0x4083f05e in main_arena () from /lib/tls/libc.so.6
#2  0x4053b565 in ASN1_primitive_free () from /usr/lib/libcrypto.so.0.9.7
#3  0x08068afb in ?? ()
#4  0x405d3eac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
#5  0xf0604082 in ?? ()
#6  0x405d3eac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
#7  0x405cefe8 in X509_seq_tt () from /usr/lib/libcrypto.so.0.9.7
#8  0x4053b61b in asn1_item_combine_free () from /usr/lib/libcrypto.so.0.9.7
#9  0x405cf72c in ASN1_OCTET_STRING_it () from /usr/lib/libcrypto.so.0.9.7
#10 0x405bd330 in gdImageCreateFromPngCtx () at gd_png.c:124
#11 0x00000000 in ?? ()



  KP

---

## #46487 — Jess Portnoy — 2009-12-22T13:18:19+00:00

URL: https://externals.io/message/46485#46487 · In reply to: #46485

Hello,

One thing that immediately comes to mind is the old OpenSSL version 
[0.9.7]. Doesn't SLES9 offer OpenSSL 0.9.8 of any version? Is 0.9.7 as 
high as it gets in their official repos?
If so, I'd compile the latest OpenSSL on my own [0.9.8l] and try, also, 
what is the OpenSSL version on the SLES10SP2?

The attached trace is not really useful as there are no debug symbols, 
if you want to go that road they will be necessary.

May the source be with you,
Best regards,
Jess Portnoy



Karl Pflästerer wrote:
> Hi,
> I wanted to install php-5.2.12 on a 32-Bit SLES9 SP4. I had no problems
> with the 64-Bit SLES10SP2 but with the 32-Bit I can't use pecl.
>
> Whenever I try to install a library I only get a seg. fault. I tried
> also php-5.2.11 and there is also the same problem. php-5.2.9 works.
>
> pecl install pdflib expands to:
>
> /usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib
>
> If I run that with gdb I see:
>
> (gdb) run
> Starting program: /usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib
> [Thread debugging using libthread_db enabled]
> [New Thread 1080940768 (LWP 32645)]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1080940768 (LWP 32645)]
> 0x402fb9f4 in SSL_SESSION_hash () from /usr/lib/libssl.so.0.9.7
> (gdb) bt
> #0  0x402fb9f4 in SSL_SESSION_hash () from /usr/lib/libssl.so.0.9.7
> #1  0x402fba3b in SSL_SESSION_hash_LHASH_HASH () from /usr/lib/libssl.so.0.9.7
> #2  0x40016a6c in d2i_X509 () from /lib/ld-linux.so.2
> #3  0x403fceac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
> #4  0x403d171d in getrn () from /usr/lib/libcrypto.so.0.9.7
> #5  0x00000000 in ?? ()
> (gdb)
>
>
> And there I'm lost.  How can I debug further what the problem might be.
>
> On another server (also SLES9SP4 32-bit Linux) I see:
>
> (gdb) run
> Starting program: /usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib
> [Thread debugging using libthread_db enabled]
> [New Thread 1082827648 (LWP 25177)]
> *** glibc detected *** double free or corruption (out): 0x4083f088 ***
> *** glibc detected *** double free or corruption (out): 0x4083f090 ***
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1082827648 (LWP 25177)]
> 0x4053e498 in ASN1_STRING_free () from /usr/lib/libcrypto.so.0.9.7
> (gdb) bt
> #0  0x4053e498 in ASN1_STRING_free () from /usr/lib/libcrypto.so.0.9.7
> #1  0x4083f05e in main_arena () from /lib/tls/libc.so.6
> #2  0x4053b565 in ASN1_primitive_free () from /usr/lib/libcrypto.so.0.9.7
> #3  0x08068afb in ?? ()
> #4  0x405d3eac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
> #5  0xf0604082 in ?? ()
> #6  0x405d3eac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
> #7  0x405cefe8 in X509_seq_tt () from /usr/lib/libcrypto.so.0.9.7
> #8  0x4053b61b in asn1_item_combine_free () from /usr/lib/libcrypto.so.0.9.7
> #9  0x405cf72c in ASN1_OCTET_STRING_it () from /usr/lib/libcrypto.so.0.9.7
> #10 0x405bd330 in gdImageCreateFromPngCtx () at gd_png.c:124
> #11 0x00000000 in ?? ()
>
>
>
>   KP

---

## #46488 — k@rl.pflaesterer.de — 2009-12-22T14:40:43+00:00

URL: https://externals.io/message/46485#46488 · In reply to: #46487

Jess Portnoy <jess@zend.com> writes:

> Hello,
>
> One thing that immediately comes to mind is the old OpenSSL version
> [0.9.7]. Doesn't SLES9 offer OpenSSL 0.9.8 of any version? Is 0.9.7 as
> high as it gets in their official repos?
> If so, I'd compile the latest OpenSSL on my own [0.9.8l] and try,
> also, what is the OpenSSL version on the SLES10SP2?
>
> The attached trace is not really useful as there are no debug symbols,
> if you want to go that road they will be necessary.

Unfortunately if I see it right 0.9.7 is the newest version for
openssl in SLES9. SLES10 has 0.9.8 and there everything works. I'll try
it with compiling openssl but I would avoid it if I could. The
maintenance for these systems (4 machines) won't be easier then :-(

download, compile, test

It works with openssl 0.9.8l, thanks.

 KP

---

## #46489 — Pierre Joye — 2009-12-22T15:08:07+00:00

URL: https://externals.io/message/46485#46489 · In reply to: #46485

hi,


The pecl channel install does not use SSL and there is no signing
involved, so the pecl install pdflib cmd won't use ssl. On your other
script, gd crashes, are you opening an image from a https URL? If not,
it means that your setup is broken (mixing lib/headers/x86/x64
versions?).

Cheers,


> Hi,
> I wanted to install php-5.2.12 on a 32-Bit SLES9 SP4. I had no problems
> with the 64-Bit SLES10SP2 but with the 32-Bit I can't use pecl.
>
> Whenever I try to install a library I only get a seg. fault. I tried
> also php-5.2.11 and there is also the same problem. php-5.2.9 works.
>
> pecl install pdflib expands to:
>
> /usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib
>
> If I run that with gdb I see:
>
> (gdb) run
> Starting program: /usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib
> [Thread debugging using libthread_db enabled]
> [New Thread 1080940768 (LWP 32645)]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1080940768 (LWP 32645)]
> 0x402fb9f4 in SSL_SESSION_hash () from /usr/lib/libssl.so.0.9.7
> (gdb) bt
> #0  0x402fb9f4 in SSL_SESSION_hash () from /usr/lib/libssl.so.0.9.7
> #1  0x402fba3b in SSL_SESSION_hash_LHASH_HASH () from /usr/lib/libssl.so.0.9.7
> #2  0x40016a6c in d2i_X509 () from /lib/ld-linux.so.2
> #3  0x403fceac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
> #4  0x403d171d in getrn () from /usr/lib/libcrypto.so.0.9.7
> #5  0x00000000 in ?? ()
> (gdb)
>
>
> And there I'm lost.  How can I debug further what the problem might be.
>
> On another server (also SLES9SP4 32-bit Linux) I see:
>
> (gdb) run
> Starting program: /usr/local/php-5.2.12/bin/php -C -n -q -d include_path=/usr/local/php-5.2.12/lib/php -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv=On /usr/local/php-5.2.12/lib/php/peclcmd.php install pdflib
> [Thread debugging using libthread_db enabled]
> [New Thread 1082827648 (LWP 25177)]
> *** glibc detected *** double free or corruption (out): 0x4083f088 ***
> *** glibc detected *** double free or corruption (out): 0x4083f090 ***
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1082827648 (LWP 25177)]
> 0x4053e498 in ASN1_STRING_free () from /usr/lib/libcrypto.so.0.9.7
> (gdb) bt
> #0  0x4053e498 in ASN1_STRING_free () from /usr/lib/libcrypto.so.0.9.7
> #1  0x4083f05e in main_arena () from /lib/tls/libc.so.6
> #2  0x4053b565 in ASN1_primitive_free () from /usr/lib/libcrypto.so.0.9.7
> #3  0x08068afb in ?? ()
> #4  0x405d3eac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
> #5  0xf0604082 in ?? ()
> #6  0x405d3eac in __JCR_LIST__ () from /usr/lib/libcrypto.so.0.9.7
> #7  0x405cefe8 in X509_seq_tt () from /usr/lib/libcrypto.so.0.9.7
> #8  0x4053b61b in asn1_item_combine_free () from /usr/lib/libcrypto.so.0.9.7
> #9  0x405cf72c in ASN1_OCTET_STRING_it () from /usr/lib/libcrypto.so.0.9.7
> #10 0x405bd330 in gdImageCreateFromPngCtx () at gd_png.c:124
> #11 0x00000000 in ?? ()
>
>
>
>  KP
>
>
> --
> 
> 
>
>



-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #46491 — Jess Portnoy — 2009-12-22T15:16:04+00:00

URL: https://externals.io/message/46485#46491 · In reply to: #46488

Hello,

See here: http://distrowatch.com/table.php?distribution=suse

This is very useful when trying to determining what distro has what of 
what version.

May the source be with you,
Best regards,
Jess Portnoy



Karl Pflästerer wrote:
> Jess Portnoy <jess@zend.com> writes:
>
>   
> > […]
>
> Unfortunately if I see it right 0.9.7 is the newest version for
> openssl in SLES9. SLES10 has 0.9.8 and there everything works. I'll try
> it with compiling openssl but I would avoid it if I could. The
> maintenance for these systems (4 machines) won't be easier then :-(
>
> download, compile, test
>
> It works with openssl 0.9.8l, thanks.
>
>  KP

---

## #46493 — k@rl.pflaesterer.de — 2009-12-22T15:27:23+00:00

URL: https://externals.io/message/46485#46493 · In reply to: #46489

Pierre Joye <pierre.php@gmail.com> writes:

> The pecl channel install does not use SSL and there is no signing
> involved, so the pecl install pdflib cmd won't use ssl. On your other

Hi,
that was the exact backtrace I got, when I ran pecl install pdflib.
Something must call use ssl there, how would I otherwise get such a
backtrace? 
 
> script, gd crashes, are you opening an image from a https URL? If not,
> it means that your setup is broken (mixing lib/headers/x86/x64
> versions?).

I'll check that. I also wondered about the gd crash, since I didn't open
an image; I just called `pecl install pdflib'.

As I wrote in another message; for the first machine installing openssl
from source helped; for the second (and third, fourth and fifth :-) )
I'll see. 

But as I wrote: php-5.2.9 worked; I tested 5.2.11 there I also had the
segfault. I didn't install php-5.2.10 so I don't know if the change was
from 5.2.9 to .10 or .11

 KP

---

## #46494 — Pierre Joye — 2009-12-22T16:03:50+00:00

URL: https://externals.io/message/46485#46494 · In reply to: #46493

hi,

I'm 99.99% sure that there are some libraries or extension mess.
Please double check your extension directory and be sure that you are
not loading old extensions or random libraries.

Cheers,


> Pierre Joye <pierre.php@gmail.com> writes:
>
> > […]
>
> Hi,
> that was the exact backtrace I got, when I ran pecl install pdflib.
> Something must call use ssl there, how would I otherwise get such a
> backtrace?
>
> > […]
>
> I'll check that. I also wondered about the gd crash, since I didn't open
> an image; I just called `pecl install pdflib'.
>
> As I wrote in another message; for the first machine installing openssl
> from source helped; for the second (and third, fourth and fifth :-) )
> I'll see.
>
> But as I wrote: php-5.2.9 worked; I tested 5.2.11 there I also had the
> segfault. I didn't install php-5.2.10 so I don't know if the change was
> from 5.2.9 to .10 or .11
>
>  KP
>
>
> --
> 
> 
>
>



-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #46495 — Jess Portnoy — 2009-12-22T16:40:35+00:00

URL: https://externals.io/message/46485#46495 · In reply to: #46494

Hi Pierre,

I may be wrong but as far as I can see, SSL is being used by PEAR, at 
least, potentially, I am not that well versed in its code but I ran:
# grep -i ssl /usr/local/zend/share/pear/* -r --color
And it does seem to return relevant results. Again, I admit I did not 
review throughly.

May the source be with you,
Best regards,
Jess Portnoy



Pierre Joye wrote:
> hi,
>
> I'm 99.99% sure that there are some libraries or extension mess.
> Please double check your extension directory and be sure that you are
> not loading old extensions or random libraries.
>
> Cheers,
>
> 
>   
> > […]
