-
-
Notifications
You must be signed in to change notification settings - Fork 134
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 when run php -i #207
Comments
Installing valgrind and running php -i through that, I can see that the error is in the underlying ImageMagick library, rather than Imagick itself.
Someone else has the same issue docker-library/php#275 and reported it at alpine https://bugs.alpinelinux.org/issues/6021. If you want to investigate this, you should either use gdb to step through ImageMagick's code, or just put some debugging in place. In particular I think that the code may be assuming that the size of a pointer to MagickThreadKey is going to be the same size as the pthread_key_t structure, which might not be the case. Alternatively, if you just want to get it working, compiling ImageMagick without thread support would probably work. |
Thanks for the feedback. I see that ImageMagick is already compiled with |
Apparently CreateMagickThreadKey still does stuff when threads aren't compiled in. Either stepping through that code, or just putting in printfs to find the exact line that is causing the issue would be the next step in finding what the error is. Actually - opening an issue with the ImageMagick guys at https://github.com/ImageMagick/ImageMagick/ would also be a good idea. |
Just to set your expectations, investigating this your self, at least as far as finding the exact line that is causing the problem is going to get it resolved far faster than waiting for people who don't use Alpine linux to investigate it. |
Or they might fix it within 48 hours. I'm going to close this as there's no further action for me to take. |
I get a segmentation fault when run
php -i
inside of a php docker container based on alpine with imagick 3.3.4 installed via pecl. Reproduced with PHP 5.3, 5.6, 7.0, 7.1I've prepared an image with php 7.1 compiled with
--enable-debug
option and pre-installed imagick:https://github.com/csandanov/php-imagick
You can reproduce it by running:
You will see a segmentation fault at the very end of the output. I tried to trace it but nothing helpful:
$ apk add --update strace $ strace php -i ### ... --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} --- +++ killed by SIGSEGV +++ Segmentation fault
Not sure how this could affect working applications.
The text was updated successfully, but these errors were encountered: