Repository navigation
fix(next): retire browser pages before chrome teardown - #27166
Conversation
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
web and size checks: green |
|
Found 6 test failures on Blacksmith runners: Failures
|
|
Bead |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (review_browser_retirement): SHIP at 0a86eef Independent correctness review found no remaining defects in the final diff. The review checked synchronous main-thread retirement, retained off-main cleanup, page/chrome teardown order, ownership transfer, and probe cancellation. Earlier findings (macOS 14-compatible Mutex and probe module visibility/import) were fixed. Native and live Chromium proof are tracked in the PR description. |
|
Review (review_browser_retirement): SHIP at 05b0fed Independent exact-head review: no remaining correctness findings. The final test-only repair moves the off-main thread assertion into the synchronous release operation, preserving coverage and application behavior. Earlier macOS 14 Mutex and probe module integration findings are resolved. |
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Review (review_browser_retirement): SHIP at 83e5935 Independent exact-head correctness review found no remaining defects in the complete change, including the copyable Sendable test owner and the probe autorelease-pool boundary. Native and strict runtime acceptance are still pending; neither compilation nor the earlier partial probe flags is represented as a full pass. |
|
Shipped in:
|
|
For awareness: on feat-cmux-next, |
…ncurrency feat-cmux-next's CmuxNext test build failed since #27166 (compile job 04bdd1343315cf9eea120801): BrowserEntryRetirementTests.swift:43 returned the main-actor chrome out of the Mutex's nonisolated withLock closure ("returning main actor-isolated ... as a 'sending' result"). The test now reads the chrome on main before the entry goes into the Mutex, in a scope that leaves the owner the only reference.
…ncurrency feat-cmux-next's CmuxNext test build failed since #27166 (compile job 04bdd1343315cf9eea120801): BrowserEntryRetirementTests.swift:43 returned the main-actor chrome out of the Mutex's nonisolated withLock closure ("returning main actor-isolated ... as a 'sending' result"). The test now reads the chrome on main before the entry goes into the Mutex, in a scope that leaves the owner the only reference. Compiled: a2570c53c9143f9d38b3ec0f
…ncurrency feat-cmux-next's CmuxNext test build failed since #27166 (compile job 04bdd1343315cf9eea120801): BrowserEntryRetirementTests.swift:43 returned the main-actor chrome out of the Mutex's nonisolated withLock closure ("returning main actor-isolated ... as a 'sending' result"). The test now reads the chrome on main before the entry goes into the Mutex, in a scope that leaves the owner the only reference. Compiled: a2570c53c9143f9d38b3ec0f Agent-Session: https://cmux.com/deeplink/agent?id=aid-729c3133f699708e5f40
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Releasing hidden browser chrome could abort in Chromium’s AppKit hierarchy tracker: a descendant registered a weak reference to an ancestor already deallocating.
BrowserEntrynow closes the page and detaches its content before releasing chrome. Final release off main retains both objects through main-actor cleanup; explicit close uses the same retirement path.The reported crash was matched by executable UUID to nightly commit
1f0f687b2f32a9f506e19e7f683e8362fd3da6b2. The crash marker’s newer version described the on-disk update. A live isolated baseline reproduced the same SIGABRT stack:weak_register_no_lock → objc_storeWeak → NSPointerArray.addPointer → Chromium hidden-ancestor tracking → NSView finalization.Verification
Head:
83e5935206c0777a5d5ba2a4e67e7c53ec27ebc5.Focused native command (run with each source SHA):
76e2236c6806d386aff96e2e699f185a6c4c64f2, step348a7122cf4795d1daac2f4e: failed as expected because the released owner left its page open (1 of 2 tests failed).f8ca670571d6b40dd99dca84: 3 tests passed, 0 skipped, exit 0 on Xcode 26.6. Covers hidden-owner release, repeated close, and final release off main with real WebKit/AppKit objects. The test process exited with no live test windows. Intermediate test compilation errors were repaired before this pass.3a1260654af924576823694f, tag27166-browser-view-teardown: passed; downloaded artifact SHA-2560782e3b69176e581324c0b78c349defd645ae1ca78d6a0c6f0e50d97c3e39e63, original bundle signature verified before isolated launch.dcc8aa3a1df9d67342947c9aadc222615f70d89d, build9020003ddbefb27438b98c79, crashed on the first owner-release probe with the matching weak ancestor stack.live_before_release,closed,content_detached,chrome_released, andpassedas true. The app stayed inactive, the frontmost application stayed the same, and the isolated app quit gracefully and exited afterward.Observed / Not run
Observed: original crash and matching symbols; same-stack live baseline crash; 10 exact-head Chromium runs passing every lifecycle assertion; independent correctness review on this head. The native suite passed all 3 tests with no skips.
Not run: Sentry queries (CLI unauthenticated), a broad package sweep, and Cloud behavior (desktop lifecycle change only). Capture-service attempts had no available GUI runner; local verification uses separate tagged bundle IDs, data/configs, and control sockets with activation disabled.
No capture: no rendered UI change. Native runtime receipts and the baseline crash are retained privately.
Impact and review
BrowserEntryis the ownership boundary for both desktop browser engines. The retirement adapter lives inCmuxNextBrowser. The debug-only control endpoint exercises real CEF ancestor tracking; the helper remains available to the Browser module because the App’s bench flag does not propagate to it.Review (review_browser_retirement): SHIP at 83e5935. Earlier review findings about macOS 14 Mutex support and module imports are resolved. Conflict-only merge gate passed at head
83e5935206c0777a5d5ba2a4e67e7c53ec27ebc5against base85b76c63b5c9b95ddd1c6bc5c671d5172c2df911. Local, remote, PR, and reviewed heads match. Incoming base changes do not touch the five changed paths. No open merge freeze or failing current-head GitHub check was found. Pending unrelated checks follow the repository’s normal landing policy.Changelog
Fixed a crash when releasing browser views.