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

Crash when repeatedly disposing and creating new Channel #26

Closed
arthurbla opened this issue Oct 14, 2023 · 0 comments · Fixed by #40
Closed

Crash when repeatedly disposing and creating new Channel #26

arthurbla opened this issue Oct 14, 2023 · 0 comments · Fixed by #40
Labels
bug Something isn't working

Comments

@arthurbla
Copy link

arthurbla commented Oct 14, 2023

Reproducable on Android device.
Repro: Create and dispose new channel until the app crashes.

In our game, we dispose the Channel on OnApplicationPause(true) and create it again on OnApplicationPause(false), just to avoid any possible connection problems that might arise. After repeatedly minimizing/maximizing the app, at some point it crashes. Happens both when GrpcChannel.DisposeHttpClient = true or when GrpcChannel.HttpHandler is reused.
Adb log:

10-14 20:50:28.635   740   740 F DEBUG   : Revision: '4'
10-14 20:50:28.635   740   740 F DEBUG   : ABI: 'arm64'
10-14 20:50:28.635   740   740 F DEBUG   : Processor: '7'
10-14 20:50:28.635   740   740 F DEBUG   : Timestamp: 2023-10-14 20:50:28.307635136+0300
10-14 20:50:28.635   740   740 F DEBUG   : Process uptime: 15s
10-14 20:50:28.636   740   740 F DEBUG   : Cmdline: com.COMPANY.APP
10-14 20:50:28.636   740   740 F DEBUG   : pid: 32464, tid: 32754, name: tokio-runtime-w  >>> com.COMPANY.APP <<<
10-14 20:50:28.636   740   740 F DEBUG   : uid: 10498
10-14 20:50:28.636   740   740 F DEBUG   : tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
10-14 20:50:28.636   740   740 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
10-14 20:50:28.636   740   740 F DEBUG   :     x0  0000000000000000  x1  0000000000007ff2  x2  0000000000000006  x3  00000075a436a370
10-14 20:50:28.636   740   740 F DEBUG   :     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000000
10-14 20:50:28.636   740   740 F DEBUG   :     x8  00000000000000f0  x9  000000785e781ad0  x10 0000000000000001  x11 000000785e7bfffc
10-14 20:50:28.636   740   740 F DEBUG   :     x12 000000000000ed11  x13 0000000f00000000  x14 0000000000000000  x15 000000040d9af6d5
10-14 20:50:28.636   740   740 F DEBUG   :     x16 000000785e824d60  x17 000000785e801f20  x18 00000073ecbda000  x19 0000000000007ed0
10-14 20:50:28.636   740   740 F DEBUG   :     x20 0000000000007ff2  x21 00000000ffffffff  x22 00000075a436a8e0  x23 00000075a436a8e8
10-14 20:50:28.636   740   740 F DEBUG   :     x24 b4000076a26b9400  x25 00000074305745d0  x26 0000000000000000  x27 0000000000000001
10-14 20:50:28.636   740   740 F DEBUG   :     x28 0000000000000008  x29 00000075a436a3f0
10-14 20:50:28.636   740   740 F DEBUG   :     lr  000000785e7b1b7c  sp  00000075a436a350  pc  000000785e7b1ba8  pst 0000000000001000
10-14 20:50:28.636   740   740 F DEBUG   : backtrace:
10-14 20:50:28.636   740   740 F DEBUG   :       #00 pc 0000000000051ba8  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: a1a208d119557afc28b4e0783483cba1)
10-14 20:50:28.636   740   740 F DEBUG   :       #01 pc 00000000002fc528  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (std::sys::unix::abort_internal::h20236230a7a8d74a+4)
10-14 20:50:28.636   740   740 F DEBUG   :       #02 pc 00000000002f99d8  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (__rust_foreign_exception+116)
10-14 20:50:28.636   740   740 F DEBUG   :       #03 pc 0000000000303c84  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (__rust_panic_cleanup+96)
10-14 20:50:28.636   740   740 F DEBUG   :       #04 pc 00000000002fa018  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (std::panicking::try::cleanup::h98af049b28b45715+12)
10-14 20:50:28.636   740   740 F DEBUG   :       #05 pc 0000000000155b60  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll::hdd6bcd142e77ed6f+964)
10-14 20:50:28.636   740   740 F DEBUG   :       #06 pc 00000000002c1a18  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (tokio::runtime::scheduler::multi_thread::worker::Context::run_task::hc4df2c885f653caa+440)
10-14 20:50:28.636   740   740 F DEBUG   :       #07 pc 00000000002bfca0  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (tokio::runtime::context::scoped::Scoped$LT$T$GT$::set::h1f155f517238b300+376)
10-14 20:50:28.636   740   740 F DEBUG   :       #08 pc 00000000002b8a40  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (tokio::runtime::context::runtime::enter_runtime::h8568db298988b6ce+292)
10-14 20:50:28.636   740   740 F DEBUG   :       #09 pc 00000000002c17a4  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (tokio::runtime::scheduler::multi_thread::worker::run::h2213bd75de81abe5+92)
10-14 20:50:28.636   740   740 F DEBUG   :       #10 pc 00000000002bc98c  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (tokio::runtime::task::core::Core$LT$T$C$S$GT$::poll::hf0ffb2135325e686+116)
10-14 20:50:28.636   740   740 F DEBUG   :       #11 pc 00000000002ae5b8  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll::h65ba31502b85252e+176)
10-14 20:50:28.636   740   740 F DEBUG   :       #12 pc 00000000002c5960  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (tokio::runtime::blocking::pool::Inner::run::h18191ca0c7833c9b+360)
10-14 20:50:28.636   740   740 F DEBUG   :       #13 pc 00000000002af1d0  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (std::sys_common::backtrace::__rust_begin_short_backtrace::h80069423faae7ead+136)
10-14 20:50:28.636   740   740 F DEBUG   :       #14 pc 00000000002b2f2c  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hb654027ce926f0d8+152)
10-14 20:50:28.636   740   740 F DEBUG   :       #15 pc 00000000002fc118  /data/app/~~331gcDdhFS_cCM33962zHg==/com.COMPANY.APP-uAJilUdkewpM8xbGlc2fFQ==/lib/arm64/libCysharp.Net.Http.YetAnotherHttpHandler.Native.so (std::sys::unix::thread::Thread::new::thread_start::h4923d8005475e8dd+24)
10-14 20:50:28.636   740   740 F DEBUG   :       #16 pc 00000000000b6668  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: a1a208d119557afc28b4e0783483cba1)
10-14 20:50:28.636   740   740 F DEBUG   :       #17 pc 00000000000532cc  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: a1a208d119557afc28b4e0783483cba1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants