Cysharp / Cysharp/YetAnotherHttpHandler

Crashed: tokio-runtime-worker for IOS

Open
#142 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
509
Forks
46
Avg merge
1h 24m
Merged PRs (30d)
1

Description

Hi folks,

I'm using Yaha v1.11.1 as GRPC client on Unity (v6000.1.5f1)
We have been getting a lot of crashes on iOS lately.

Yaha Settings is:

                Http2Only = true,
                Http2AdaptiveWindow = true,
                PoolIdleTimeout = TimeSpan.FromMinutes(2),
                Http2KeepAliveWhileIdle = false,
                ConnectTimeout = TimeSpan.FromSeconds(12)

Trace is as follows.

0  libsystem_kernel.dylib         0xb1dc __pthread_kill + 8
1  libsystem_pthread.dylib        0x7c60 pthread_kill + 268
2  libsystem_c.dylib              0x772d0 abort + 124
3  libsystem_malloc.dylib         0x16d70 malloc_vreport + 892
4  libsystem_malloc.dylib         0x169e8 malloc_report + 64
5  libsystem_malloc.dylib         0x11594 ___BUG_IN_CLIENT_OF_LIBMALLOC_POINTER_BEING_FREED_WAS_NOT_ALLOCATED + 32
6  UnityFramework                 0x64b8454 core::ptr::drop_in_place$LT$tokio..runtime..task..core..Stage$LT$yaha_native..binding..yaha_request_begin..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$::hc3161cc6c3f9ec95 + 392640
7  UnityFramework                 0x64b8fb8 core::ptr::drop_in_place$LT$tokio..runtime..task..harness..poll_future..$u7b$$u7b$closure$u7d$$u7d$..Guard$LT$yaha_native..binding..yaha_request_begin..$u7b$$u7b$closure$u7d$$u7d$$C$alloc..sync..Arc$LT$tokio..runtime..scheduler..current_thread..Handle$GT$$GT$$GT$::h2cfad7e18483af5e + 395556
8  UnityFramework                 0x64bba54 tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll::h7b92a6cd8b60b97c + 406464
9  UnityFramework                 0x6622610 tokio::runtime::scheduler::multi_thread::worker::Context::run_task::h7380ac8088d2521f + 596
10 UnityFramework                 0x662001c tokio::runtime::context::scoped::Scoped$LT$T$GT$::set::he6d0c6622b0923ca + 640
11 UnityFramework                 0x661c55c tokio::runtime::context::runtime::enter_runtime::hc727493226e38c0b + 516
12 UnityFramework                 0x662234c tokio::runtime::scheduler::multi_thread::worker::run::hbd73f82e5169ac5a + 104
13 UnityFramework                 0x662b47c tokio::runtime::task::core::Core$LT$T$C$S$GT$::poll::h5323d7e8693b7ffc + 3652
14 UnityFramework                 0x6600cf4 tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll::h3911bee5cfacc862 + 7076
15 UnityFramework                 0x6613b9c tokio::runtime::blocking::pool::Inner::run::h7cb65a1b877c1f56 + 1604
16 UnityFramework                 0x6616424 std::sys::backtrace::__rust_begin_short_backtrace::ha559214fb74c3691 + 192
17 UnityFramework                 0x6616cf4 core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h902e9e781817c27d + 1864
18 UnityFramework                 0x66ae4a8 std::sys::pal::unix::thread::Thread::new::thread_start::h45a7f62b02ec0fe0 + 395 (mod.rs:395)
19 libsystem_pthread.dylib        0x3344 _pthread_start + 136
20 libsystem_pthread.dylib        0xab8 thread_start + 8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the crash trace, especially the yaha_request_begin entry point and the tokio runtime frames, then review the reported Unity iOS configuration. Reproduce the crash if possible and determine a verified fix for the invalid-free failure; done means the iOS crash no longer occurs under the reported settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, grpc, ios, rust, unity
Domain
mobile-dev, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.