apache / skywalking

APM, Application Performance Monitoring System
https://skywalking.apache.org/
Apache License 2.0
23.9k stars 6.53k forks source link

[Bug] hyperf ORM Or Swoole Bug #12590

Closed kkkmax095 closed 2 months ago

kkkmax095 commented 2 months ago

Search before asking

Apache SkyWalking Component

PHP (apache/skywalking-php)

What happened

When I do not use preloading and directly use model association, the following error is pushed

php version:7.4 swoole version: 4.8.13 hyperf version :2.2

thread '' panicked at 'ptr shouldn't be null', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/phper-0.12.0/src/functions.rs:315:9 stack backtrace: 0: 0x7fe0f62f54f0 - std::backtrace_rs::backtrace::libunwind::trace::h82777a91e9377372 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7fe0f62f54f0 - std::backtrace_rs::backtrace::trace_unsynchronized::he52a3ebc8e92b459 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7fe0f62f54f0 - std::sys_common::backtrace::_print_fmt::h86f0e984e0981e08 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:66:5 3: 0x7fe0f62f54f0 - ::fmt::h0d99c3e6322baab9 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:45:22 4: 0x7fe0f631899e - core::fmt::write::h7afdcecae634c757 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/fmt/mod.rs:1202:17 5: 0x7fe0f62efa55 - std::io::Write::write_fmt::h03980dafd16fbb98 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/io/mod.rs:1679:15 6: 0x7fe0f62f6e23 - std::sys_common::backtrace::_print::h634f6e5377cdeeeb at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:48:5 7: 0x7fe0f62f6e23 - std::sys_common::backtrace::print::hb5215870b00242d0 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:35:9 8: 0x7fe0f62f6e23 - std::panicking::default_hook::{{closure}}::hfccde408bd4bce54 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:295:22 9: 0x7fe0f62f6b0f - std::panicking::default_hook::hf5508b7bdf3babed at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:314:9 10: 0x7fe0f62f74ca - std::panicking::rust_panic_with_hook::h8ac2ad414f2a80a8 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:698:17 11: 0x7fe0f62f73c7 - std::panicking::begin_panic_handler::{{closure}}::h6806472e4abb4c1b at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:588:13 12: 0x7fe0f62f599c - std::sys_common::backtrace::__rust_end_short_backtrace::h0c0f5202fe96986e at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:138:18 13: 0x7fe0f62f70e2 - rust_begin_unwind at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5 14: 0x7fe0f5f02e13 - core::panicking::panic_fmt::h6bdb18f09e76240c at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14 15: 0x7fe0f6316841 - core::panicking::panic_display::hbdffc68d20b1d911 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:72:5 16: 0x7fe0f63167eb - core::panicking::panic_str::h9241e3a5bafb91f9 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:56:5 17: 0x7fe0f5f02c86 - core::option::expect_failed::hca9fd00f9338ee52 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/option.rs:1880:5 18: 0x7fe0f6141cc5 - phper::values::ExecuteData::func::h3a187ae09530e8af 19: 0x7fe0f5f9e5f3 - skywalking_agent::execute::infer_request_id::h32251eb5b6437271 20: 0x7fe0f5f9c323 - skywalking_agent::execute::execute_internal::hfe406e30d5639f34 21: 0x55e305154509 - execute_ex 22: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 23: 0x55e3051544a6 - execute_ex 24: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 25: 0x55e3051544a6 - execute_ex 26: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 27: 0x55e3051544a6 - execute_ex 28: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 29: 0x55e3051544a6 - execute_ex 30: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 31: 0x55e3051544a6 - execute_ex 32: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 33: 0x55e3051544a6 - execute_ex 34: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 35: 0x55e3051544a6 - execute_ex 36: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 37: 0x55e3051544a6 - execute_ex 38: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 39: 0x55e3051544a6 - execute_ex 40: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 41: 0x55e3051544a6 - execute_ex 42: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 43: 0x55e3051544a6 - execute_ex 44: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 45: 0x55e3051544a6 - execute_ex 46: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 47: 0x55e3051544a6 - execute_ex 48: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 49: 0x55e3051544a6 - execute_ex 50: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 51: 0x55e3051544a6 - execute_ex 52: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 53: 0x55e3051544a6 - execute_ex 54: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 55: 0x55e3051544a6 - execute_ex 56: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 57: 0x55e3051544a6 - execute_ex 58: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 59: 0x55e3050e1e23 - zend_call_function 60: 0x55e305115e2d - 61: 0x55e305117238 - zend_std_read_property 62: 0x55e30512e498 - 63: 0x55e3051599b6 - execute_ex 64: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 65: 0x55e3051544a6 - execute_ex 66: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 67: 0x55e3051544a6 - execute_ex 68: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 69: 0x55e3051544a6 - execute_ex 70: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 71: 0x55e3051544a6 - execute_ex 72: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 73: 0x55e3051544a6 - execute_ex 74: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 75: 0x55e305154186 - execute_ex 76: 0x7fe0f5f9d528 - skywalking_agent::execute::execute_ex::h6ead2adb569389b3 77: 0x7fe0f6a847bd - _ZN6swoole12PHPCoroutine9main_funcEPv at /tmp/swoole/ext-src/swoole_coroutine.cc:797:28 78: 0x7fe0f6b1682d - ZNKSt8functionIFvPvEEclES0 at /usr/include/c++/9.3.0/bits/std_function.h:688:14 79: 0x7fe0f6b1682d - _ZN6swoole9coroutine7Context12context_funcEPv at /tmp/swoole/src/coroutine/context.cc:142:15 80: 0x7fe0f6b97c71 - swoole_make_fcontext at /tmp/swoole/thirdparty/boost/asm/make_x86_64_sysv_elf_gas.S:70

What you expected to happen

Some places cannot capture parameters, resulting in null pointers

How to reproduce

Loop to get model related data in model

Anything else

No response

Are you willing to submit a pull request to fix on your own?

Code of Conduct