GithubHelp home page GithubHelp logo

Comments (9)

aodashuai001 avatar aodashuai001 commented on June 14, 2024

@heyanlong 大佬有时间指教下吗?

from skyapm-php-sdk.

aodashuai001 avatar aodashuai001 commented on June 14, 2024

通过日志打印发现tars的函数入口函数应该是App\Core\{closure},对应的类应该是App\Core\Tars
但是在php_skywalking.h头文件中,定义的函数是onRequest,定义的类是Tars\core\Server,会导致请求不能开启一个trace。
在修改了php_skywalking.h的函数为App\Core\{closure},类App\Core\Tars后,却发现虽然请求进入了sky_request_init函数,但是数据依然没有上报,manager.cc文件的Manager::consumer消费并没有执行,而且接口无响应(无限等待中)
然后在应用程序日志显示:

[2022-08-22 17:03:24 $32586.0] WARNING swManager_check_exit_status: worker#2[pid=27167] abnormal exit, status=0, signal=11
A bug occurred in Swoole-v4.4.6, please report it.
The Swoole developers probably don't know about it,
and unless you report it, chances are it won't be fixed.
You can read How to report a bug doc before submitting any bug reports:

swoole/swoole-src#2000
Please do not send bug reports in the mailing list or personal letters.
The issue page is also suitable to submit feature requests.

from skyapm-php-sdk.

aodashuai001 avatar aodashuai001 commented on June 14, 2024

请求的这个worker进程直接退出,信号为11,意思是读取了非法的内存。不知道为啥会这样。

from skyapm-php-sdk.

aodashuai001 avatar aodashuai001 commented on June 14, 2024

定位到了SKYWALKING_G(is_swoole) = true;这一行,只要注释掉这一行,就不会报signal=11进程异常退出

from skyapm-php-sdk.

heyanlong avatar heyanlong commented on June 14, 2024

需要看一下tars的入口函数是什么。可以发一个最小代码吗?目前e2e没有包含tars测试。

from skyapm-php-sdk.

aodashuai001 avatar aodashuai001 commented on June 14, 2024

需要看一下tars的入口函数是什么。可以发一个最小代码吗?目前e2e没有包含tars测试。

tars的入口应该是没错的,我最开始出现问题的地方应该是我们这边的项目覆盖了onRequest回调,是在App\Core\Tars里。
现在的问题是进程会异常退出,报signal 11,我调试了一下,发现是在PHP里http request对象的指针地址读取错误,我目前发现了两处疑似导致问题的地方:
1 调用SKYWALKING_G(is_swoole) = true;赋值,因此我改用其他全局变量的方式实现这个逻辑,就能够恢复正常。
2 调用sky_find_swoole_fd函数就会出现,此处没有找到好的解法,我尝试注释此行,用常量1返回就可以,这里不知道怎么替换

from skyapm-php-sdk.

heyanlong avatar heyanlong commented on June 14, 2024

重写onRequest没关系,还是会继续处理swoole的onRequest

from skyapm-php-sdk.

aodashuai001 avatar aodashuai001 commented on June 14, 2024

重写onRequest没关系,还是会继续处理swoole的onRequest

现在的问题是

1 调用SKYWALKING_G(is_swoole) = true;赋值,因此我改用其他全局变量的方式实现这个逻辑,就能够恢复正常。
2 调用sky_find_swoole_fd函数就会出现,此处没有找到好的解法,我尝试注释此行,用常量1返回就可以

这两处会导致php服务读取http request header时,指针地址错误,这个问题我怎么看源码都看不出问题来,怀疑是swoole的bug。

from skyapm-php-sdk.

heyanlong avatar heyanlong commented on June 14, 2024

发一下你怎么改的,再发一下demo代码,我本地测试一下。

from skyapm-php-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.