Skip to content
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

[Bug] [PHP]Segmentation fault (core dumped) #9866

Closed
2 of 3 tasks
cuifox opened this issue Oct 30, 2022 · 11 comments
Closed
2 of 3 tasks

[Bug] [PHP]Segmentation fault (core dumped) #9866

cuifox opened this issue Oct 30, 2022 · 11 comments
Assignees
Labels
bug Something isn't working and you are sure it's a bug! php PHP agent related
Milestone

Comments

@cuifox
Copy link

cuifox commented Oct 30, 2022

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

PHP (apache/skywalking-php)

What happened

PHP 7.3.33 (cli) (built: Nov 30 2021 08:42:58) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies

/tmp/pear/download/skywalking_agent-0.1.0 # make
PHP_CONFIG=php-config cargo build --release
make: *** [Makefile:193: modules/skywalking_agent.so] Segmentation fault (core dumped)

What you expected to happen

core dumped

How to reproduce

dont konw

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@cuifox cuifox added the bug Something isn't working and you are sure it's a bug! label Oct 30, 2022
@wu-sheng
Copy link
Member

Please make your title of issue complete.

@wu-sheng wu-sheng added the php PHP agent related label Oct 30, 2022
@cuifox cuifox changed the title [Bug] [PHP] [Bug] [PHP]Segmentation fault (core dumped) Oct 30, 2022
@jmjoy
Copy link
Member

jmjoy commented Oct 30, 2022

Which OS and release version do you use?

@cuifox
Copy link
Author

cuifox commented Oct 30, 2022

docker image
php:7.3-fpm-alpine

@jmjoy
Copy link
Member

jmjoy commented Oct 31, 2022

Please use higher version alpine for building Rust, because there is a known bug for musl.

rust-lang/rust#76021

@wu-sheng wu-sheng added this to the PHP - 0.2.0 milestone Oct 31, 2022
@cuifox
Copy link
Author

cuifox commented Nov 4, 2022

My current Linux Alpine,Which version can succeed?

#cat /etc/alpine-release
3.15.1
#cat /etc/apk/repositories
https://mirrors.aliyun.com/alpine/edge/main
https://mirrors.aliyun.com/alpine/edge/community
https://mirrors.aliyun.com/alpine/edge/testing

#apk info musl
musl-1.2.3-r1 description:
the musl c library (libc) implementation

musl-1.2.3-r1 webpage:
https://musl.libc.org/

musl-1.2.3-r1 installed size:
608 KiB

php -v

PHP 7.3.33 (cli) (built: Mar 18 2022 04:05:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies

@jmjoy
Copy link
Member

jmjoy commented Nov 4, 2022

What's your Dockerfile, or build steps?

@cuifox
Copy link
Author

cuifox commented Nov 4, 2022

FROM php:7.3-fpm-alpine

RUN set -ex
&& echo "https://mirrors.aliyun.com/alpine/edge/main" > /etc/apk/repositories
&& echo "https://mirrors.aliyun.com/alpine/edge/community" >> /etc/apk/repositories
&& echo "https://mirrors.aliyun.com/alpine/edge/testing" >> /etc/apk/repositories
&& apk add --update --no-cache --virtual .build-deps1 g++ autoconf make cargo clang protobuf
&& apk add --update --no-cache --virtual .build-deps2 git libevent-dev openssl-dev jpeg-dev freetype-dev libpng-dev libzip-dev libwebp-dev libmcrypt-dev libxml2-dev
&& docker-php-ext-install pcntl posix pdo_mysql soap sockets
&& docker-php-ext-configure gd --with-webp=/usr/include/webp --with-jpeg=/usr/include --with-freetype=/usr/include/freetype2/
&& docker-php-ext-install -j$(nproc) gd
&& pecl install redis zip apcu mcrypt event skywalking_agent
&& docker-php-ext-enable redis zip apcu mcrypt event skywalking_agent
&& apk del .build-deps1

CMD ["php-fpm"]

@jmjoy
Copy link
Member

jmjoy commented Nov 4, 2022

I think the coredump was caused by make, not rust.

Alpine occasionally has strange problems. I recommend Debian.

@cuifox
Copy link
Author

cuifox commented Nov 4, 2022

Errors have been mentioned above:

/tmp/pear/download/skywalking_agent-0.1.0 # make
PHP_CONFIG=php-config cargo build --release
make: *** [Makefile:193: modules/skywalking_agent.so] Segmentation fault (core dumped)

Successed:
alpine:3.16.2

php -v

PHP 7.4.32 (cli) (built: Oct 7 2022 00:41:01) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

apk info musl

musl-1.2.3-r0 description:
the musl c library (libc) implementation

musl-1.2.3-r0 webpage:
https://musl.libc.org/

musl-1.2.3-r0 installed size:
608 KiB

@cuifox
Copy link
Author

cuifox commented Nov 4, 2022

I want to succeed in this version : php:7.3-fpm-alpine

@cuifox
Copy link
Author

cuifox commented Nov 5, 2022

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working and you are sure it's a bug! php PHP agent related
Projects
None yet
Development

No branches or pull requests

3 participants