Re: [freebsd] pecl-imagick -> Segmentation fault: 11 (core dumped) on php -i under freebsd 7.3

2010-11-11 Thread Olivier Mueller
Good evening,

On Tue, 2010-06-22 at 10:45 +0200, Olivier Mueller wrote:
> Problem:
> 
> [...@pandora ~]$ php -v -c /usr/local/etc/php.ini-production 
> PHP 5.3.2 with Suhosin-Patch (cli) (built: Jun 14 2010 18:11:48) 
> Copyright (c) 1997-2009 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
> Segmentation fault: 11 (core dumped)
> 
> 
> If I comment the line "extension=imagick.so"
> in /usr/local/etc/php/extensions.ini , it works fine (but without
> imagick then...). I tried recompiling about nearly all related packages
> (png, imagemagick, php, etc.), but it didn't helped. Same if I comment
> some other extensions (like pdf.so, etc.). All packages are 100%
> uptodate, as well as the OS (7.3-RELEASE-p1 amd64), but it was
> previously a 7.2 system, so this may have an influence. 
> 
> Is anybody using pecl-imagick without this segfault at the moment?   Or
> do you have any suggestion about what I could try?   I will setup a
> "blank" 7.3 system as a VM later this week to test by myself


I finally did that now (vmware-based freebsd basic system + fresh ports
tree + portinstall -rvbp php5 pecl-imagick), and it is exactly the same:
Segfault still displayed.  Maybe it's related to the "WITHOUT_X11=yes"
in my make.conf ?  I'll try again without that parameter later. 

Here are the ports list and gdb output, maybe someone will have an idea
why it is reacting like that?  : 


[r...@bsdbox73 ~]# php -v
PHP 5.3.3 with Suhosin-Patch (cli) (built: Nov 11 2010 14:40:34) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Segmentation fault: 11 (core dumped)
[r...@bsdbox73 ~]# 


[r...@bsdbox73 ~]# gdb php php.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 "amd64-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/libz.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.4
Reading symbols from /usr/local/lib/libpcre.so.0...(no debugging symbols 
found)...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
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 /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 /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000803190820 in ?? ()
(gdb) 
(gdb) bt
#0  0x000803190820 in ?? ()
#1  0x000800db17d5 in xmlFreeMutex () from /usr/local/lib/libxml2.so.5
#2  0x000800db1215 in xmlCleanupGlobals () from /usr/local/lib/libxml2.so.5
#3  0x000800d49d3a in xmlCleanupParser () from /usr/local/lib/libxml2.so.5
#4  0x0044ff28 in php_libxml_shutdown ()
#5  0x0044ff59 in zm_shutdown_libxml ()
#6  0x00558f2f in module_destructor ()
#7  0x0056061a in zend_hash_apply_deleter ()
#8  0x00560888 in zend_hash_graceful_reverse_destroy ()
#9  0x00554357 in zend_shutdown ()
#10 0x005005f5 in php_module_shutdown ()
#11 0x005dea4f in main ()
#12 0x004186de in _start ()
#13 0x000800781000 in ?? ()
#14 0x in ?? ()
#15 0x in ?? () [...]
---Type  to continue, or q  to quit---q
Quit
(gdb) 


[r...@bsdbox73 ~]# cat /etc//make.conf
# om/20080318
WITHOUT_X11=yes


[r...@bsdbox73 ~]# cat /usr/local/etc/php/extensions.ini 
extension=imagick.so


[r...@bsdbox73 ~]# uname -a
FreeBSD bsdbox73.omx.ch 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Sun Mar 21 05:25:24 
UTC 2010 r...@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64


[r...@bsdbox73 ~]# pkg_info 
ImageMagick-nox11-6.6.4.10 Image processing tools
apache-2.0.64   Version 2.0.x of Apache web server with prefork MPM.
apr-0.9.19.0.9.19   Apache Portability Library
autoconf-2.68   Automatically configure source code on many Un*x platforms 
autoconf-wrapper-20071109 Wrapper script for GNU autoconf
automake-1.11.1 GNU Standards-compliant Makefile generator (1.11)
automake-wrapper-20071109 Wrapper script for GNU automake
bash-4.0.35 The GNU Project's Bourne Again SHell
cups-client-1.4.4   Common UNIX Printing Sy

Re: [freebsd] pecl-imagick -> Segmentation fault: 11 (core dumped) on php -i under freebsd 7.3

2010-11-16 Thread endzed

Le 12 nov. 2010 à 01:04, Olivier Mueller a écrit :

> Good evening,
> 
> On Tue, 2010-06-22 at 10:45 +0200, Olivier Mueller wrote:
>> Problem:
>> 
>> [...@pandora ~]$ php -v -c /usr/local/etc/php.ini-production 
>> PHP 5.3.2 with Suhosin-Patch (cli) (built: Jun 14 2010 18:11:48) 
>> Copyright (c) 1997-2009 The PHP Group
>> Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
>> Segmentation fault: 11 (core dumped)
>> 

Here's what did it for me :

remove the following lines from 
/usr/ports/textproc/libxml2/files/patch-configure and rebuild+reinstall libxml2

@@ -20678,6 +20679,8 @@ fi
   fi
   fi
;;
+   *freebsd*) THREAD_LIBS=""
+   ;;
 esac
 if test "$WITH_THREADS" = "1" ; then
THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"

I found this somewhere but cannot remember the thread url unfortunately...

NZ___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[solved] Re: [freebsd] pecl-imagick -> Segmentation fault: 11 (core dumped) on php -i under freebsd 7.3

2010-11-19 Thread Olivier Mueller
Hello and thanks for your feedback!

On Tue, 2010-11-16 at 13:03 +0100, end...@gmail.com wrote:
> >> [...@pandora ~]$ php -v -c /usr/local/etc/php.ini-production 
> >> PHP 5.3.2 with Suhosin-Patch (cli) (built: Jun 14 2010 18:11:48) 
> >> Copyright (c) 1997-2009 The PHP Group
> >> Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
> >> Segmentation fault: 11 (core dumped)
> >> 
> Here's what did it for me :
> remove the following lines from 
> /usr/ports/textproc/libxml2/files/patch-configure and rebuild+reinstall 
> libxml2
> @@ -20678,6 +20679,8 @@ fi
>fi
>fi
> ;;
> +   *freebsd*) THREAD_LIBS=""
> +   ;;
>  esac
>  if test "$WITH_THREADS" = "1" ; then
> THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"

> I found this somewhere but cannot remember the thread url unfortunately...

Brillant! It fixed the issue, many thanks. 

CC'ing both ports manager (pecl-imagick and libxml2). It would be nice
if this could be fixed in the ports tree directly: are these patch lines
still required by other packages? 

Regards,
Olivier


PS: something probably related is visable under
http://forums.freebsd.org/archive/index.php/t-8965.html 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [solved] Re: [freebsd] pecl-imagick -> Segmentation fault: 11 (core dumped) on php -i under freebsd 7.3

2010-11-16 Thread Alex Dupre

Olivier Mueller ha scritto:

Brillant! It fixed the issue, many thanks.


This is not the correct fix, the correct "fix" is to enable threads in 
php, using the appropriate OPTION.


--
Alex Dupre
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: [solved] Re: [freebsd] pecl-imagick -> Segmentation fault: 11 (core dumped) on php -i under freebsd 7.3

2010-11-19 Thread Olivier Mueller
Hi Alex, thanks for this even better feedback. 

On Tue, 2010-11-16 at 15:22 +0100, Alex Dupre wrote:
> This is not the correct fix, the correct "fix" is to enable threads in 
> php, using the appropriate OPTION.

Ok, so probably this one: 
LINKTHR=off (default) "Link thread lib (for threaded extensions)"   ->
on

Is there any chance this will have other consequences (problems,
incompatibilities with other php/pecl extensions) ?  Or why is this off
by default ? 


This should at least be checked when installing pecl-imagick, and I
presume it will happen sometime as there is already PR about this case:
http://www.freebsd.org/cgi/query-pr.cgi?pr=150996 

Thanks again for your input & regards,
Olivier

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"