René's URL Explorer Experiment


Title: worker.terminate() is a no-op during entry evaluation, and terminating there wedges teardown · Issue #445 · NativeScript/ios · GitHub

Open Graph Title: worker.terminate() is a no-op during entry evaluation, and terminating there wedges teardown · Issue #445 · NativeScript/ios

X Title: worker.terminate() is a no-op during entry evaluation, and terminating there wedges teardown · Issue #445 · NativeScript/ios

Description: Found while completing #443's pump-termination item (three empirical rounds on the #444 branch); target semantics below are verified on Android, where terminate-during-entry works (android#2021 @ 351bef64, spec-proven with terminate land...

Open Graph Description: Found while completing #443's pump-termination item (three empirical rounds on the #444 branch); target semantics below are verified on Android, where terminate-during-entry works (android#2021 @ 3...

X Description: Found while completing #443's pump-termination item (three empirical rounds on the #444 branch); target semantics below are verified on Android, where terminate-during-entry works (android#2021...

Opengraph URL: https://github.com/NativeScript/ios/issues/445

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"worker.terminate() is a no-op during entry evaluation, and terminating there wedges teardown","articleBody":"Found while completing #443's pump-termination item (three empirical rounds on the #444 branch); target semantics below are verified on Android, where terminate-during-entry works (android#2021 @ 351bef64, spec-proven with terminate landing 0-1ms into the entry body).\n\n## The defect (iOS)\n\n**The no-op**: `WorkerWrapper::workerIsolate_` is assigned only after the background looper's `func()` returns — and `func()` is where entry evaluation (the pumped module-graph load, any top-level-await park) runs. `Terminate()` bails on the null isolate, so for a worker still inside its entry, `worker.terminate()` does nothing: no `TerminateExecution`, no termination-requested flag. The pump bails landed in #444 engage only once the worker has a published isolate — the parked-entry scenario #443's pump item describes is unreachable on iOS for this reason.\n\n**The wedge**: publishing the isolate early (via a separate atomic, drain-guard semantics untouched) makes `Terminate()` genuinely fire mid-entry — and the suite then hangs past 600s in teardown. That attempt was reverted on #444's branch: shipping it would convert a silent no-op into a hang. The comment at `WorkerWrapper.mm` (Terminate) records the gap at the site.\n\n## Target semantics — what correct terminate-during-entry looks like\n\nVerified end-to-end on Android (trace + spec); the fix here must satisfy all six:\n\n1. **Prompt pump exit via a termination-requested flag**, not the V8 probe alone — `IsExecutionTerminating` is a mid-unwind probe and a parked pump runs no JS. (Already converged: android e11c9c30 / iOS's requested-flag in #444; iOS's flag is currently unreachable mid-entry because of the no-op above.)\n2. **Termination never masquerades**: the evaluator checks termination BEFORE its timeout branch (never \"Top-level await timed out\"), and exception construction has an explicit HasTerminated/empty-Message branch (never an entry rejection with a fabricated message).\n3. **No onerror on a dying worker**: the error router early-returns on the wrapper's terminating flag — a terminated entry produces neither worker-scope `onerror` nor a parent error event. Terminate is not an error.\n4. **Everything after the bail runs no JS and tolerates empty answers**: the settle-gate's capability re-`Evaluate()` returns empty on a terminating isolate and must fall through inertly; the teardown chain drops loop entries and releases handles only, never consuming an unchecked Maybe before `Dispose`.\n5. **Error-report building must be termination-safe**: anything between the bail and disposal that formats messages/stacks must read through `FromMaybe`/`IsEmpty`, never `ToChecked`/`ToLocalChecked` — the termination interrupt can materialize inside the reporter itself (`ToDetailString` runs JS). Android hit exactly this CHECK-abort and fixed it in 351bef64; iOS's exception/message formatters need the same audit as part of this work.\n6. **The window is real, not theoretical**: on Android the spec's terminate landed 0-1ms into the entry body on every iteration. Any fix must be spec-proven with the same shape (worker .mjs entry parked in TLA, terminated mid-pump, repeated iterations).\n\n## Scope\n\nA worker-lifecycle design pass: early isolate publication paired with a teardown path that tolerates termination landing inside entry evaluation (the pumped graph load, the TLA park, and the queue-arm-before-isolate window are all live during `func()`), plus the rule-5 formatter audit. Cross-runtime contract: the six rules above should hold identically on both platforms; Android already conforms.\n","author":{"url":"https://github.com/edusperoni","@type":"Person","name":"edusperoni"},"datePublished":"2026-08-20T16:09:39Z","url":"https://github.com/NativeScript/ios/issues/445"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f8c5679c-225d-d5d5-acce-08a333a8b6a2
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA470:134361:17E0001:1F665CA:6B01383A
html-safe-nonce4a889cb5bf4a5584f86f3462fa16109b9d84c422db70076ab7a9096e64973985
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDcwOjEzNDM2MToxN0UwMDAxOjFGNjY1Q0E6NkIwMTM4M0EiLCJ2aXNpdG9yX2lkIjoiNDExMzI1NDI4MzgzNzc4MjA3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace2fd3474277e8f4d66d29c1b50bfa7b7b1acd1a0619f5de74e8b549067083a03
hovercard-subject-tagissue:5205501765
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/ios/445/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9c9b830e2d8d2f8eade279da96ba127ec21f7a09af9f18dd708a26c3b702550d/NativeScript/ios/issues/445
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9c9b830e2d8d2f8eade279da96ba127ec21f7a09af9f18dd708a26c3b702550d/NativeScript/ios/issues/445
og:image:altFound while completing #443's pump-termination item (three empirical rounds on the #444 branch); target semantics below are verified on Android, where terminate-during-entry works (android#2021 @ 3...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameedusperoni
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/ios git https://github.com/NativeScript/ios.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id172934359
octolytics-dimension-repository_nwoNativeScript/ios
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id172934359
octolytics-dimension-repository_network_root_nwoNativeScript/ios
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/NativeScript/ios/issues/445#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fios%2Fissues%2F445
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fios%2Fissues%2F445
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2Fios
Reloadhttps://github.com/NativeScript/ios/issues/445
Reloadhttps://github.com/NativeScript/ios/issues/445
Reloadhttps://github.com/NativeScript/ios/issues/445
NativeScripthttps://github.com/NativeScript
ioshttps://github.com/NativeScript/ios
Codehttps://github.com/NativeScript/ios
Issues56 (56)https://github.com/NativeScript/ios/issues
Pull requests42 (42)https://github.com/NativeScript/ios/pulls
Actionshttps://github.com/NativeScript/ios/actions
Projectshttps://github.com/NativeScript/ios/projects
Security and qualityhttps://github.com/NativeScript/ios/security
Insightshttps://github.com/NativeScript/ios/insights
https://github.com/NativeScript/ios
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/ios/issues/445
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/ios/issues/445
#493https://github.com/NativeScript/ios/pull/493
worker.terminate() is a no-op during entry evaluation, and terminating there wedges teardownhttps://github.com/NativeScript/ios/issues/445#top
#493https://github.com/NativeScript/ios/pull/493
https://github.com/edusperoni
edusperonihttps://github.com/edusperoni
on Aug 20, 2026https://github.com/NativeScript/ios/issues/445#issue-5205501765
#443https://github.com/NativeScript/ios/issues/443
#444https://github.com/NativeScript/ios/pull/444
#444https://github.com/NativeScript/ios/pull/444
#443https://github.com/NativeScript/ios/issues/443
#444https://github.com/NativeScript/ios/pull/444
fix: loader additional hardening (#443) #444https://github.com/NativeScript/ios/pull/444
edusperonihttps://github.com/edusperoni
completedhttps://github.com/NativeScript/ios/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#493https://github.com/NativeScript/ios/pull/493
on Oct 9, 2026https://github.com/NativeScript/ios/issues/445#event-32903874867
edusperonihttps://github.com/edusperoni
on Oct 9, 2026https://github.com/NativeScript/ios/issues/445#event-32903878275
fix(worker): terminate() reaches a worker still inside its entry scri…https://github.com/NativeScript/ios/commit/872aba995b69fd36d89df24ed9ae3dec70d55e73
https://docs.github.com/articles/closing-issues-via-commit-messages
872aba9https://github.com/NativeScript/ios/commit/872aba995b69fd36d89df24ed9ae3dec70d55e73
Sign up for freehttps://github.com/signup?return_to=https://github.com/NativeScript/ios/issues/445
Sign in to commenthttps://github.com/login?return_to=https://github.com/NativeScript/ios/issues/445
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.