[apm-agent-php] Crash PHP application after enable APM agent

I'm installing apm-agent-php by adding a script to my Dockerfile

RUN apk --no-cache add curl-dev gcc g++ make autoconf && \
  mkdir -p /etc/apm-agent && \
  curl -L "https://github.com/elastic/apm-agent-php/archive/refs/tags/v1.2.tar.gz" > /tmp/apm-agent.tar.gz && \
  tar -zxvf /tmp/apm-agent.tar.gz -C /etc/apm-agent --strip-components 1 && \
  cd /etc/apm-agent/src/ext && \
  phpize && \
  CFLAGS="-std=gnu99" ./configure --enable-elastic_apm && \
  make && \
  make install && \
  rm /tmp/apm-agent.tar.gz

Then enable in php.ini file

extension="elastic_apm.so"
elastic_apm.bootstrap_php_part_file=/etc/apm-agent/src/bootstrap_php_part.php
elastic_apm.environment=__elastic_apm_env__
elastic_apm.enabled=__elastic_apm_enabled__
elastic_apm.server_url=__elastic_apm_server_url__
elastic_apm.service_name=__elastic_apm_service_name__
elastic_apm.secret_token=__elastic_apm_secret__
elastic_apm.transaction_sample_rate=0.1
elastic_apm.transaction_max_spans=100
elastic_apm.server_timeout=50ms

After starting container, the agent can send data to APM server successfully, but after 5-6 times reload, server is crashed with error

 child 17 exited on signal 11 (SIGSEGV - core dumped) after 33.225786 seconds from start

and can not access the website anymore.
After 1-2min, I can access the website again, but after 4-5 times of reloading, the same issue occurs again.

The issue is not happen if elastic_apm.enabled=false (installed but not enable)

Note: Also try with other installing approaches by using APK package but got the same issue

RUN curl -L https://github.com/elastic/apm-agent-php/releases/download/v1.2/apm-agent-php_1.2_all.apk > /tmp/apm-agent-php.apk && \
  apk add --allow-untrusted /tmp/apm-agent-php.apk && \
  rm /tmp/apm-agent-php.apk

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.