Main-thread hangs in Puck2DRenderer/CoreMaps and background drawable cleanup (11.31.1)
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 22/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- ios, swift
- 领域
- mobile, performance
调研方向
Start with the reported stacks in Puck2DRenderer and MapView.reduceMemoryUse, then inspect the referenced 11.33.0 release notes and issue 2229 for symbol availability. The report provides no deterministic reproducer or resolved private frames, so first identify a bounded way to reproduce or diagnose each signature. Done means identifying a matching cause or fix and documenting a supported workaround or release; the issue reports no verified fix.
由索引模型根据 Issue 内容生成。
描述
Environment
- Flutter app, one phone MapView,
mapbox_maps_flutter2.31.1. - MapboxMaps/CoreMaps 11.31.1, MapboxCommon 24.31.1.
- Case A: iPhone 12, iOS 27.0.1, release build.
- Case B: iPhone 11, iOS 26.6.1, release build.
- Sentry captured one >=2-second main-thread hang for each signature.
- We do not use CarPlay, custom GL/Metal rendering or synthetic scene activation.
These are two separate signatures; we have not established a common cause.
The shipped watchdog is Sentry Cocoa 8.58.4 ANRTrackerV1: it checks foreground
and active application state and filters oversleep after suspension. Its
two-second message is a missed-main-queue-tick threshold, not a measured
duration of the function visible in the sampled stack.
Observed behavior and reproduction status
These are production observations. We do not have a deterministic reproduction or a minimal reproducer yet. The captured signatures involve a native location-puck update after returning to the foreground and automatic drawable cleanup during a scene-background notification, respectively.
Expected behavior: lifecycle transitions and location-puck updates keep the main thread responsive.
Case A: location puck update waits inside CoreMaps
The app returned to the foreground approximately 2.2 seconds before the
hang snapshot. The main-thread call chain, caller to callee, is:
PuckManager.subscribeOnUpdates
PuckManager.startRendering
Puck2DRenderer.state.setter / didset
Puck2DRenderer.startRendering
Puck2DRenderer.updateLayerFastPath
StyleManager.setLayerProperties
MBMStyleManager.setStyleLayerPropertiesForLayerId
MapboxCoreMaps +0xe9390 +0x145c70 +0x92bfa8 +0x25b520 +0x2600c8
+0x4cf928 +0x3495bc +0x34a7d8 +0x4d6084 +0x4d5dc4
MapboxCommon +0x1b9dcc +0x1baac4
std::__1::condition_variable::__do_timed_wait
_pthread_cond_wait
__psynch_cvwait
arm64 UUIDs:
- CoreMaps:
A6900208-95DF-33BA-9A4B-AF77F668EE78. - Common:
6A8EDD2C-FA7B-33FF-836E-13F17C762895.
The CoreMaps UUID matches the distributed 11.31.1 binary. Our application
dSYMs resolve the Swift wrappers; the private CoreMaps/Common frames remain
unresolved. In the all-thread snapshot, the Mapbox worker queues, including
MtlGpuUploader, are waiting/sleeping. No runnable lock owner is identifiable.
There is no overlapping app-owned style-reload breadcrumb. A snapshot does
not prove that one function occupied the entire hang interval.
We examined disabling puck bearing as a workaround but did not apply it:
heading still participates in PuckRendererState and the fast path still
writes location properties. We have no evidence that this avoids the wait.
Case B: background cleanup reaches MTKView.releaseDrawables
The main thread is in the scene-background notification:
UIScene lifecycle notification
MapView.sceneDidEnterBackground
MapView.reduceMemoryUse
-[MTKView releaseDrawables]
_mtkLinkedOnOrAfter.cold.1
The breadcrumbs show repeated pairs of app-requested reduceMemoryUse
around earlier background transitions. The latest pair was 13 ms apart,
with the second request 4 ms before that background breadcrumb. However,
that pair preceded the hang snapshot by approximately 73 seconds; a
foreground breadcrumb intervened approximately 38 seconds before detection.
We cannot identify those earlier requests as the cause of the sampled
cleanup. No later background breadcrumb was present in the captured event.
We removed app-initiated iOS memory cleanup in the next build and now leave
it to the SDK. This removes duplication, not a proven cause of this hang.
No active Mapbox renderer/worker is identifiable in the snapshot either.
Verification limits and questions
We have no affected physical device attached. Attempts to record a simulator
trace did not produce an exportable trace, so we have no measured hang-rate
or latency improvement to claim. The 11.33.0 release notes describe a
different startup distance-formatter blockage, not either stack above.
- Can you symbolicate the Case A library offsets and identify the awaited
operation or the relevant lifecycle invariant? - Is there a supported workaround or a release containing a matching fix
for the Puck2DRenderer wait or drawable-release hang? - What additional bounded diagnostic would identify the blocking owner on
a production device without collecting user location or account data?
References: 11.33.0 release,
private symbol availability.
Issue 2444 describes
forced CarPlay background rendering and heap corruption; our setup and
signatures differ, so we do not treat it as the same defect.
- 主要语言
- Swift
- 星标
- 601
- 派生
- 198
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mapbox/mapbox-maps-ios 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 38/100
mapbox/mapbox-maps-ios#2462 ·
-
auto-triaged bug :beetle: p2
难度 4/5 3-5 天 新手友好度 28/100
mapbox/mapbox-maps-ios#2461 ·
-
auto-triaged bug :beetle: p1
难度 4/5 3-5 天 新手友好度 18/100
mapbox/mapbox-maps-ios#2460 ·
-
auto-triaged bug :beetle: p2
难度 4/5 3-5 天 新手友好度 35/100
mapbox/mapbox-maps-ios#2459 ·
-
auto-triaged bug :beetle: p1
难度 4/5 3-5 天 新手友好度 38/100
mapbox/mapbox-maps-ios#2456 · 2 条评论 · 1 个 reaction ·
查看 mapbox/mapbox-maps-ios 的全部 Issue
相似的 Issue
-
bug iphone
难度 2/5 1-3 小时 新手友好度 82/100
VictorKildahl/cra#948 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
area: build-and-ci S3: minor
难度 2/5 1-3 小时 新手友好度 72/100
manaflow-ai/cmux#65734 ·
维护者通常 1 天内回复
-
bug text-to-speech
难度 2/5 1-3 小时 新手友好度 76/100
FluidInference/FluidAudio#1201 ·
维护者通常 1 天内回复
-
AsyncThrowingStream rethrows its failure on the second next() when the consumer was already waiting at finish(throwing:)可能已有人在做 @Joseph-Cursio 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复