Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Segmentation fault alpine linux #912

Open
vGhost2000 opened this issue Dec 30, 2018 · 1 comment
Open

Segmentation fault alpine linux #912

vGhost2000 opened this issue Dec 30, 2018 · 1 comment

Comments

@vGhost2000
Copy link

Environment

  • PHP: 7.2.13
  • pthreads: 3.2.0
  • OS: linux, docker container

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
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) 
  1. 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

Expected Output

No segmentation fault

Actual Output

Segmentation fault

@joeyhub
Copy link

joeyhub commented Feb 14, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants