René's URL Explorer Experiment


Title: fix: don't abort on worker termination during module load by edusperoni · Pull Request #1993 · NativeScript/android · GitHub

Open Graph Title: fix: don't abort on worker termination during module load by edusperoni · Pull Request #1993 · NativeScript/android

X Title: fix: don't abort on worker termination during module load by edusperoni · Pull Request #1993 · NativeScript/android

Description: Description Targets main (rebased after the V8 14.9 upgrade, #1987, merged); the bugs themselves are long-standing (verified — every fixed site was byte-identical on main before the upgrade). Intermittent process aborts/crashes (~20% of cold full-suite runs on an emulator, always in the worker-heavy early phase) were root-caused to worker.terminate() landing while the worker is still loading its script. Once TerminateExecution() is armed, every V8 entry that runs JS returns an empty MaybeLocal — and three call sites on exactly this path unwrapped without checking. The proven signature (symbolized from a device tombstone) is Fatal error in v8::ToLocalChecked / Empty MaybeLocal on a worker thread, aborting from ModuleInternal::LoadModule. Fixes ModuleInternal.cpp — script->Run() was unwrapped with ToLocalChecked() one line before the tc.HasCaught() guard meant to handle it; now checked first (matching the sibling compile sites in the same function). Same treatment for the unconditional __extends global lookup a few lines down. NativeScriptException.cpp — the TryCatch constructor now bails out early on tc.HasTerminated() || tc.Message().IsEmpty() with a fallback message, and no longer builds a Persistent from an empty exception handle (which left ReThrowToV8 dereferencing an empty Local). CallbackHandlers.cpp — CallWorkerScopeOnErrorHandle unwrapped the global onerror lookup with ToLocalChecked(); it runs precisely when a worker script fails to load. Now ToLocal() + early return. Runtime.cpp — struct sigaction was never zero-initialized, leaving sa_mask/sa_flags as stack garbage for both signal handlers (a source of run-to-run nondeterminism in crash behavior). No behavior change for healthy paths: termination reporting was already correctly suppressed (isTerminating_ is set before TerminateExecution() and guarded in BackgroundLooper/CallWorkerScopeOnErrorHandle); no existing spec asserts an error for terminate-during-load. Known remaining flake (out of scope): while re-verifying the reproduction on the unfixed build, one crash of a different signature was captured — a bionic Pointer tag ... was truncated SIGABRT on a worker thread right after isolate creation (heap corruption, not an empty-handle abort). It was not observed in 27 cold runs of the fixed build, but this PR does not claim to fix it; it's an open follow-up. Related Pull Requests #1987 (merged V8 14.9 base) Does your pull request have unit tests? Yes — tests/testWorkerTerminateDuringLoad.js: the worker spins at module scope so terminate() deterministically lands inside the module-function call (the wide window; the script->Run() window is microseconds and can't be hit reliably), asserting no onerror fires and the process survives. It cannot fail spuriously. It lives in the app's tests/ because shared/Workers/ is a submodule shared with iOS. Suite: 606 specs, 0 failures (605 baseline + 1). Statistical verification: unfixed build reproduces at ~20% per cold full-suite run (re-armed before fixing: 1/5); fixed build ran 27 cold full-suite runs with zero crashes and a clean dropbox/tombstone sweep. Summary by CodeRabbit Bug Fixes Improved worker termination during module loading to prevent spurious error reports. Improved handling of interrupted script execution and missing error details. Added safer handling for worker error callbacks and runtime signal setup. Improved runtime stability when scripts are stopped while initialization is in progress. Tests Added coverage for repeatedly terminating workers while modules are loading. Verified that expected termination does not produce unexpected error notifications.

Open Graph Description: Description Targets main (rebased after the V8 14.9 upgrade, #1987, merged); the bugs themselves are long-standing (verified — every fixed site was byte-identical on main before the upgrade). Inter...

X Description: Description Targets main (rebased after the V8 14.9 upgrade, #1987, merged); the bugs themselves are long-standing (verified — every fixed site was byte-identical on main before the upgrade). Inter...

Opengraph URL: https://github.com/NativeScript/android/pull/1993

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:25d8a86d-a1d6-575c-7113-d3d58c991933
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idED62:2C4BED:18A4F90:1F50E05:6B01421D
html-safe-nonce3c4c9b3b10ab6f08c5911c0d1f319c7eb44f6a7a6bc81891fe996d78d3b9f9bc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDYyOjJDNEJFRDoxOEE0RjkwOjFGNTBFMDU6NkIwMTQyMUQiLCJ2aXNpdG9yX2lkIjoiMTM2NTI5NjIyNzQ2MTE4NjA3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccc9dc9a2770d4d8a3f1cba5a0fb9d38b00a9b97584eff4043301f5aaa9627d7d
hovercard-subject-tagpull_request:4175031550
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/NativeScript/android/pull/1993/files
twitter:imagehttps://avatars.githubusercontent.com/u/4061767?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4061767?s=400&v=4
og:image:altDescription Targets main (rebased after the V8 14.9 upgrade, #1987, merged); the bugs themselves are long-standing (verified — every fixed site was byte-identical on main before the upgrade). Inter...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/android git https://github.com/NativeScript/android.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id29137950
octolytics-dimension-repository_nwoNativeScript/android
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id29137950
octolytics-dimension-repository_network_root_nwoNativeScript/android
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
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

Links:

Skip to contenthttps://github.com/NativeScript/android/pull/1993/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fandroid%2Fpull%2F1993%2Ffiles
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%2Fandroid%2Fpull%2F1993%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=NativeScript%2Fandroid
Reloadhttps://github.com/NativeScript/android/pull/1993/files
Reloadhttps://github.com/NativeScript/android/pull/1993/files
Reloadhttps://github.com/NativeScript/android/pull/1993/files
NativeScripthttps://github.com/NativeScript
androidhttps://github.com/NativeScript/android
Codehttps://github.com/NativeScript/android
Issues106 (106)https://github.com/NativeScript/android/issues
Pull requests24 (24)https://github.com/NativeScript/android/pulls
Actionshttps://github.com/NativeScript/android/actions
Projectshttps://github.com/NativeScript/android/projects
Wikihttps://github.com/NativeScript/android/wiki
Security and qualityhttps://github.com/NativeScript/android/security
Insightshttps://github.com/NativeScript/android/insights
Sign up for GitHub https://github.com/signup?return_to=%2FNativeScript%2Fandroid%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FNativeScript%2Fandroid%2Fissues%2Fnew%2Fchoose
NathanWalkerhttps://github.com/NathanWalker
mainhttps://github.com/NativeScript/android/tree/main
fix/worker-terminate-crasheshttps://github.com/NativeScript/android/tree/fix/worker-terminate-crashes
Conversation 4 https://github.com/NativeScript/android/pull/1993
Commits 1 https://github.com/NativeScript/android/pull/1993/commits
Checks 7 https://github.com/NativeScript/android/pull/1993/checks
Files changed https://github.com/NativeScript/android/pull/1993/files
Please reload this pagehttps://github.com/NativeScript/android/pull/1993/files
fix: don't abort on worker termination during module load https://github.com/NativeScript/android/pull/1993/files#top
Show all changes 1 commit https://github.com/NativeScript/android/pull/1993/files
61ed64b fix: don't abort on worker termination during module load edusperoni Jul 31, 2026 https://github.com/NativeScript/android/pull/1993/commits/61ed64bc7fd13d96297d3bd12a3bb2eb1b138c9d
Clear filters https://github.com/NativeScript/android/pull/1993/files
Please reload this pagehttps://github.com/NativeScript/android/pull/1993/files
Please reload this pagehttps://github.com/NativeScript/android/pull/1993/files
mainpage.js https://github.com/NativeScript/android/pull/1993/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
testWorkerTerminateDuringLoad.js https://github.com/NativeScript/android/pull/1993/files#diff-dc9b0d8d444334e1967f8aa6a7c317c6d7099464b7a4a294cf45247ae9a60acf
workerTerminateDuringLoadWorker.js https://github.com/NativeScript/android/pull/1993/files#diff-cb147b9840b02701a37d4ba1cb44b6791624bdbd4baf771d7d14849d490a69f1
CallbackHandlers.cpp https://github.com/NativeScript/android/pull/1993/files#diff-a784229ab7689cd9ce3d502557091158b2943269fad47c1891a15a07c355500e
ModuleInternal.cpp https://github.com/NativeScript/android/pull/1993/files#diff-8fb647a9437c57deb39dc2079f0cdfc94a75fafef82b46766fd7d1d276af246e
NativeScriptException.cpp https://github.com/NativeScript/android/pull/1993/files#diff-93d70766ca3edeb71b49baba2158c55cc56fbd8a53a22f093384344d5a3cb0f3
Runtime.cpp https://github.com/NativeScript/android/pull/1993/files#diff-b9490640f5d26f7cd6b9a176a2142b8e985a6aac9e2d64287de37fc694e80cc3
test-app/app/src/main/assets/app/mainpage.jshttps://github.com/NativeScript/android/pull/1993/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
View file https://github.com/NativeScript/android/blob/61ed64bc7fd13d96297d3bd12a3bb2eb1b138c9d/test-app/app/src/main/assets/app/mainpage.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1993/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/1993/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
https://github.com/NativeScript/android/pull/1993/files#diff-b7fd6c22bfc29391e9e3ed935d6c6194b1ad595c7592690229952b5ddb99c0d5
test-app/app/src/main/assets/app/tests/testWorkerTerminateDuringLoad.jshttps://github.com/NativeScript/android/pull/1993/files#diff-dc9b0d8d444334e1967f8aa6a7c317c6d7099464b7a4a294cf45247ae9a60acf
View file https://github.com/NativeScript/android/blob/61ed64bc7fd13d96297d3bd12a3bb2eb1b138c9d/test-app/app/src/main/assets/app/tests/testWorkerTerminateDuringLoad.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1993/{{ revealButtonHref }}
coderabbitaihttps://github.com/apps/coderabbitai
Aug 3, 2026https://github.com/NativeScript/android/pull/1993/files#r3705866200
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/NativeScript/android/pull/1993/files
test-app/app/src/main/assets/app/tests/workerTerminateDuringLoadWorker.jshttps://github.com/NativeScript/android/pull/1993/files#diff-cb147b9840b02701a37d4ba1cb44b6791624bdbd4baf771d7d14849d490a69f1
View file https://github.com/NativeScript/android/blob/61ed64bc7fd13d96297d3bd12a3bb2eb1b138c9d/test-app/app/src/main/assets/app/tests/workerTerminateDuringLoadWorker.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1993/{{ revealButtonHref }}
test-app/runtime/src/main/cpp/CallbackHandlers.cpphttps://github.com/NativeScript/android/pull/1993/files#diff-a784229ab7689cd9ce3d502557091158b2943269fad47c1891a15a07c355500e
View file https://github.com/NativeScript/android/blob/61ed64bc7fd13d96297d3bd12a3bb2eb1b138c9d/test-app/runtime/src/main/cpp/CallbackHandlers.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1993/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/1993/files#diff-a784229ab7689cd9ce3d502557091158b2943269fad47c1891a15a07c355500e
coderabbitaihttps://github.com/apps/coderabbitai
Aug 3, 2026https://github.com/NativeScript/android/pull/1993/files#r3705866216
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/NativeScript/android/pull/1993/files
https://github.com/NativeScript/android/pull/1993/files#diff-a784229ab7689cd9ce3d502557091158b2943269fad47c1891a15a07c355500e
test-app/runtime/src/main/cpp/ModuleInternal.cpphttps://github.com/NativeScript/android/pull/1993/files#diff-8fb647a9437c57deb39dc2079f0cdfc94a75fafef82b46766fd7d1d276af246e
View file https://github.com/NativeScript/android/blob/61ed64bc7fd13d96297d3bd12a3bb2eb1b138c9d/test-app/runtime/src/main/cpp/ModuleInternal.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1993/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/1993/files#diff-8fb647a9437c57deb39dc2079f0cdfc94a75fafef82b46766fd7d1d276af246e
https://github.com/NativeScript/android/pull/1993/files#diff-8fb647a9437c57deb39dc2079f0cdfc94a75fafef82b46766fd7d1d276af246e
https://github.com/NativeScript/android/pull/1993/files#diff-8fb647a9437c57deb39dc2079f0cdfc94a75fafef82b46766fd7d1d276af246e
https://github.com/NativeScript/android/pull/1993/files#diff-8fb647a9437c57deb39dc2079f0cdfc94a75fafef82b46766fd7d1d276af246e
test-app/runtime/src/main/cpp/NativeScriptException.cpphttps://github.com/NativeScript/android/pull/1993/files#diff-93d70766ca3edeb71b49baba2158c55cc56fbd8a53a22f093384344d5a3cb0f3
View file https://github.com/NativeScript/android/blob/61ed64bc7fd13d96297d3bd12a3bb2eb1b138c9d/test-app/runtime/src/main/cpp/NativeScriptException.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1993/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/1993/files#diff-93d70766ca3edeb71b49baba2158c55cc56fbd8a53a22f093384344d5a3cb0f3
https://github.com/NativeScript/android/pull/1993/files#diff-93d70766ca3edeb71b49baba2158c55cc56fbd8a53a22f093384344d5a3cb0f3
test-app/runtime/src/main/cpp/Runtime.cpphttps://github.com/NativeScript/android/pull/1993/files#diff-b9490640f5d26f7cd6b9a176a2142b8e985a6aac9e2d64287de37fc694e80cc3
View file https://github.com/NativeScript/android/blob/61ed64bc7fd13d96297d3bd12a3bb2eb1b138c9d/test-app/runtime/src/main/cpp/Runtime.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1993/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/1993/files#diff-b9490640f5d26f7cd6b9a176a2142b8e985a6aac9e2d64287de37fc694e80cc3
https://github.com/NativeScript/android/pull/1993/files#diff-b9490640f5d26f7cd6b9a176a2142b8e985a6aac9e2d64287de37fc694e80cc3
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.