SkyAPM / SkyAPM-php-sdk

Replaced by https://github.com/apache/skywalking-php
https://skywalking.apache.org/
Apache License 2.0
421 stars 104 forks source link

centos7 下源码编译扩展后报错segfault,编译后无法正常使用 #480

Closed shixiaobo8 closed 2 years ago

shixiaobo8 commented 2 years ago

Describe the bug描述信息如下: ----- 操作系统: [root@lan-dev-wx-01 ~]# cat /etc/system-release CentOS Linux release 7.4.1708 (Core) ----- 编译过程:

  1. 按照官方文档页面building : https://github.com/SkyAPM/SkyAPM-php-sdk/blob/master/docs/BUILDING.md
  2. 吐槽一下这个文档写的有的不够仔细,官方文档竟然不写gcc 要求,也不写清楚必要步骤,另外这个grpc库的子模块不翻墙是真的难下载
  3. 静态build grpc 和 共享库 build grpc 都通过
  4. 然后编译4.2.0 的扩展库
  5. 编译通过了,官方文档中写了什么 --with-grpc-src= 但是根本就没有这个参数 只会提示 --with-grpc , 再次吐槽这个文档写的是可读性真的耐人琢磨
  6. 编译好扩展库后,配置在php.ini 中填写好skywalking.grpc=aopserver:11800 后 并让php-fpm --nodaminsize 启动
  7. bug 出现: 当请求进入到php-fpm 系统日志 /var/log/message 报错如下: Mar 13 15:12:37 lan-dev-wx-01 kernel: php-fpm[12130]: segfault at c9 ip 00007f584576d8f0 sp 00007ffff744c078 error 4 in skywalking.so[7f5844da9000+1464000] 并且出现php-fpm 进程中断现象,nginx 直接返回502
  8. 这是折腾的第三天了,我想这pecl.php.net 上已经4.0 以上的版本发行过好几个版本了,没半年一个版本,应该属于较稳定版本了,于是尝试其它版本,结果4.1.13版本也有这个错误,其他版本不需要这些东西 真心希望放在官方网站上的agent 是良心作品~~~ 我有点想放弃php了... A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

PHP (please complete the following information):

SkyWalking (please complete the following information):

Additional context Add any other context about the problem here.

az13js commented 2 years ago

第7个问题可以尝试用master分支试下。4.2.0版本的可能有些问题 #465 ,中间我提了个PR能修复这个的 #470 ,后来被合并进去主分支了 。

shixiaobo8 commented 2 years ago

好,我试试

shixiaobo8 commented 2 years ago

pecl.php.net 上的那个gz包不是 master 分支么

shixiaobo8 commented 2 years ago

试了一下,master 分支也报这个 Segmentation fault

heyanlong commented 2 years ago

一下这么多问题,终于一边查字典一边谷歌翻译的看完了,我简单回复一下

--with-grpc-src 是目前master才有的参数,所以你看master的编译文档来编译4.2.0是不适用的。

另外请提供编译过程和coredump以便快速修复问题,文档问题可提交一个PR来提升。

shyboylpf commented 2 years ago

Please let us know, what's your question? Describe as example asked, so we can help you find the problem and the point you are missing. And last, if you want to give up PHP, just do it.

frui85 commented 2 years ago

--with-grpc-src 这个确实 4.2.0 编译也会提示的,不是master 里的