-
-
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 on Ubuntu 23 #636
Comments
What you're seeing sounds like it is peculiar to your system and the libraries on it, so it's unlikely I'll be able to provide even any insight. If you generate a backtrace of the segmentation fault (using the instructions at https://bugs.php.net/bugs-generating-backtrace.php) I might be able to provide a bit of a clue where to look. |
Thanks for reply This may help. (gdb) run -v Program received signal SIGSEGV, Segmentation fault. |
Well, libgomp.so.1 looks to be the culprit, so it's the OpenMP that appears to be the problem. Can you find out what version you have on the system where you're having a problem, and on the systems where you're not seeing problems? And then post that info here. You might want to try disabling OpenMP in ImageMagick, by using the configure option |
I am getting the above issue on Ubuntu 23.04 On same system extension for PHP 7.4 is working fine The same php package works on Ubuntu 22 and below versions. Don't know how to get a version of libgomp sharing the below output for ldconfig ldconfig -p | grep libgomp
|
Hmmm. Maybe do But if other versions of PHP are working maybe that's not the cause. Or at least not the only cause. Can you try running PHP without any other extensions loaded or compiled in? |
If I Run PHP without the imagick extension it works properly |
FYI, I just ran into this libgomp issue in the middle of upgrading my Fedora 37 server to Fedora 38 server. Unfortunately I also pulled the latest imagick repo and recompiled. So I am not sure what build of imagick I was on prior and whether that will make a difference. For now I will install PHP without imagick installed until a working version of imagick plays nicely with libgomp . FYI, the libgomp RPM version that comes with Fedora 38 is v13.2.1-4.fc38 . |
@adeshmrane or @specializedtom any chance of a Dockerfile that reproduces this issue? As you're both seeing it, there's probably a problem to be investigated, but starting with the bug in front of me is much easier than trying to guess what the problem is. |
The only other change I can think of that could of brought on this error, is that the virtual box I am running it on, now has dual processors. I didn't have to recompile my existing version of imagick to get things running (post upgrade). This is prior to updating the Linux OS from Fedora 37 to Fedora 38, which required PHP to be recompiled and linked after upgrade. I tried adding
Can multi-processor support for imagick be disabled via the PHP.INI file, seeing as it successfully compiles and links? I am trying to link imagick into a PHP 8.2.7 codebase. |
Sorry for the delay You can replicate this by compiling php with the imagick extension and trying to load this on Ubuntu 23 without loading extension all works good but when you load extension it gives error |
I see the same behavior on Ubuntu 22.04.3 This is my workaround:
the last compilation action is
With the module linked that way, php will crash. remove
Copy .libs/imagick.so to your extension directory php works again. |
Hi, I have the same problem (segmentation fault) with Ubuntu 23.04, Imagick 3.7.0 and PHP 8.3.2. Here is a Dockerfile that reproduces the issue (using asdf to install PHP and Imagick from sources): FROM ubuntu:23.04
RUN apt update \
&& apt upgrade -y
RUN apt install -y --no-install-recommends \
git \
gdb \
build-essential \
curl wget ca-certificates \
locate \
autoconf \
bison re2c libxml2-dev libsqlite3-dev libcurl4-openssl-dev libgd-dev libonig-dev libpq-dev libreadline-dev libzip-dev \
libmagickwand-dev file
# Install asdf & PHP
SHELL [ "/bin/bash" , "-lc" ]
RUN git clone --depth=1 https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 \
&& . ~/.asdf/asdf.sh \
# Install PHP
&& asdf plugin add php \
&& asdf install php latest \
&& asdf global php latest
# Install imagick
RUN . ~/.asdf/asdf.sh \
&& pecl install --configureoptions 'with-imagick="autodetect"' imagick
RUN echo '. "$HOME/.asdf/asdf.sh"' > ~/.bashrc
ENTRYPOINT [ "/bin/bash" ] Build it: docker build -t imagick-segfault .
Run the container: docker run -it imagick-segfault Run PHP without imagick works: php -v Add imagick, and then we get a "Segmentation fault": echo 'extension=imagick.so' >> $(asdf where php)/conf.d/php.ini
php -v GDB:
|
when I enable the Imagick extension on Ubuntu 23.04 I get segmentation fault
On other distributions, the extension is working properly
root@/home/salman# /usr/local/apps/php80/bin/php -v
Segmentation fault (core dumped)
if I disable the extension PHP is working properly.
The text was updated successfully, but these errors were encountered: