In alpine linux image:
1) pthreads wokers pool + imagick in woker => Segmentation fault
2) pthreads wokers pool <20 wokers + curl in woker => all fine
3) pthreads wokers pool >30-40 wokers + curl => Segmentation fault
In debian linux image:
1) pthreads wokers pool + imagick in woker => all fine
2) pthreads wokers pool <20 wokers + curl in woker => all fine
3) pthreads wokers pool >30-40 wokers + curl => all fine
(sorry im bad speack english)
Reproducing Code
In attachment file, completely environment, php code, example files.
docker build -t alpine-pthreads .
docker run --rm alpine-pthreads
START single thread process
Single thread time: 40.1971
START multi thread process
Segmentation fault (core dumped)
2) debian (all fine):
docker build -f ./Dockerfile.deb -t debian-pthreads .
docker run --rm debian-pthreads
START single thread process
Single thread time: 41.0055
START multi thread process
Multi thread time: 10.2270
If you install debug symbols and run it with gdb you might get a nice stack trace that could help. Note that curl comes with async support though imagick probably does not even if it might be just a proc wrapper.
Environment
Summary
In alpine linux image: 1) pthreads wokers pool + imagick in woker => Segmentation fault 2) pthreads wokers pool <20 wokers + curl in woker => all fine 3) pthreads wokers pool >30-40 wokers + curl => Segmentation fault
In debian linux image: 1) pthreads wokers pool + imagick in woker => all fine 2) pthreads wokers pool <20 wokers + curl in woker => all fine 3) pthreads wokers pool >30-40 wokers + curl => all fine
(sorry im bad speack english)
Reproducing Code
In attachment file, completely environment, php code, example files.
test.tar.gz
Unpack, then run cmd: 1) alpine
2) debian (all fine):
Expected Output
No segmentation fault
Actual Output
Segmentation fault