fix(codemods): SIGSEV segfault problem. reduce amount of parse() calls. Preserve ast root refe…#10503
Closed
BobrImperator wants to merge 3 commits intowarp-drive-data:mainfrom
Closed
fix(codemods): SIGSEV segfault problem. reduce amount of parse() calls. Preserve ast root refe…#10503BobrImperator wants to merge 3 commits intowarp-drive-data:mainfrom
BobrImperator wants to merge 3 commits intowarp-drive-data:mainfrom
Conversation
ee30224 to
6a0a663
Compare
a0b60fe to
5ec465a
Compare
Contributor
Author
|
Closing since we're able to get around this and regular users won't encounter this problem.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rootAST for longer.[bug] SIGSEGV when GC collects native AST objects during concurrent async operations (napi, macOS ARM64) ast-grep/ast-grep#2553
The problem doesn't seem to happen on small projects or when the warp-drive codemods are built directly and ran with
node ~/Projects/warp-drive/packages/codemods/dist/index.js apply migrate-to-schema --config=./example-codemod.config.jsonSetting
ulimit -s unlimited(Unlimited stack-size) points towards a stack overflow issue while running the codemod against large projects. The problem appears to be happening in@ast-grep/napi/treesitterulimit -s unlimited && pnpx @ember-data/codemods@canary apply migrate-to-schema --config=./example-codemod.config.jsonulimit -s unlimited && node~/Projects/warp-drive/packages/codemods/dist/index.js apply migrate-to-schema --config=./example-codemod.config.jsonReproductions:
bun ~/Projects/warp-drive/packages/codemods/dist/index.js apply migrate-to-schema --config=./example-codemod.config.jsonpanic(main thread): Segmentation fault at address 0x16C3E3FD0
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
pnpx @ember-data/codemods@canary apply migrate-to-schema --config=./example-codemod.config.json