New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation Fault #11
Comments
Have you got PHP's uuid extension loaded? |
Thanks, I just tried it again with the uuid extension loaded and got the same result. Also, not sure if this is helpful.. but here's the output from valgrind:
|
And the same thing happens even when you disable Xdebug? uuid extension is not needed for the operation but I've seen a segfault in the past related to uuid extension and external shared library linking with libuuid |
Unfortunately yes. It still happens when I disable xdebug. Let me know if there's anything I can do to help debug this. Thanks again. :-) |
Have you got another Lucid box? Is this a reproducible issue? |
I'll try it on another Lucid machine when I get to work tomorrow. But yes, I can reproduce it reliably. |
Sorry to bug you again. I'm just curious, what platform are you using to develop php-zmq on? What platform would you say has the best support? |
I'm developing on Debian but all platforms that I have access to should be equally supported. Is this issue still happening? |
Hello, I cannot reproduce this using: $ php -v Linux ubuntu 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010 x86_64 GNU/Linux |
Ok, I think I've got it figured out. The problem only happens when I have the imagick PHP extension loaded. I disabled the imagick extension and it's working fine now. I wonder why that would cause the problem? |
I've tested this on another Ubuntu Lucid install. I get the same seg fault with imagick 2.3.0 installed from PECL, and with php5-imagick 2.1.1RC1-1build3 installed from apt. Building the PECL version depends on libmagickwand-dev 7:6.5.7.8-1ubuntu1 from apt. No seg fault when the imagick PHP extension isn't installed. Cheers, |
(tldr; load uuid before imagick & zmq in the php .ini's) I've just confirmed it where a zmq connect segfaulted, but renaming /etc/php5/cli/conf.d/uuid.ini to 00-uuid.ini allows the connect to succeed. The zmq-bind wasn't affected. |
I just stumbled on the same problem with the same server configuration. I renamed the imagick.ini to zz-imagick.ini and everything works now. |
I met this issue also on ubuntu 10.10 x86_64. I have a deep debug. Here is the gdb stack trace: (gdb) r examples/client.php Here jrand_seed[] is a thread local storage : #ifdef HAVE_TLS #if defined(linux) && defined(__NR_gettid) && defined(HAVE_JRAND48) I don't know how to fix it yet. Rename imagick.ini doesn't work for me. My zeromq and php-zmq are built by myself. |
Just rename imagick.ini doesn't work. I have to comment out "extension=imagick.so" in it. The reason is that imagick.so also requires libuuid.so and so libuuid.so is loaded before zmq.so/libzmq.so. Unfortunately TLS variable jrand_seed[] is not alloced due to unknown reason. |
I really don't know what's going on with this issue. I'll try to debug this issue further during the weekend. |
mkoppanen, haven't you looked at this issue yet? |
Hi, this looks like to be an issue with ImageMagick rather than zmq. See http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=18801. As a work-around you can LD_PRELOAD libuuid.so library for now before real solution is found. |
Hi, can someone test compiling ImageMagick with --disable-openmp and see if this helps? |
Hi, after ImageMagick 6.7.1.0 with --disable-openmp and php imagick extension recompiling, I won't get segfault now. also, extension uuid disabled. Here's my php version info. PHP 5.3.8-pl0-gentoo (cli) (built: Sep 6 2011 11:12:49) (DEBUG) |
Apparently this is a problem with libc6 since 2005, but it appears that with recent libraries being compiled for multiple threads it has become more of an issue recently. The latest Debian unstable eglibc6 packages apparently solve this problem, but I haven't tried that yet. I just filed a bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647896 |
I get a seg fault when trying to run the following script on the command line after installing php-zmq (I'm on commit b24cfaebd9250f983701a6112eed2d52240e14c6).
I'm on Ubuntu Lucid (PHP 5.3.2-1ubuntu4.2) with the latest ZeroMQ code from http://github.com/zeromq/zeromq2
Script to reproduce:
GDB Backtrace:
Any ideas?
The text was updated successfully, but these errors were encountered: