stylelint: Segmentation fault (core dumped)
What steps are needed to reproduce the bug?
Just install latest version.
What Stylelint configuration is needed to reproduce the bug?
NA
How did you run Stylelint?
stylelint --cache <path>
Which version of Stylelint or dependencies are you using?
15.6.3
What did you expect to happen?
Run without errors.
What actually happened?
It crashes with this exception: Segmentation fault (core dumped)
Does the bug relate to non-standard syntax?
No
Proposal to fix the bug
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 22
- Comments: 37 (24 by maintainers)
Commits related to this issue
- fix: downgrade cosmiconfig as commented by stylelint/stylelint#6898 — committed to kc-workspace/kcws-js by kamontat a year ago
- update deps incl. electron to v25, fix stylelint segmentation dump (#3118) - update electron to v25 - added `overrides:` section to `package.json` to fix https://github.com/stylelint/stylelint/issu... — committed to MagicMirrorOrg/MagicMirror by khassel a year ago
- Revert "BUGFIX. Temporarily remove the `stylelint:fix` command" This reverts commit 0fbc30bd80521e61bd9cc802495b156965a058fe. References: - https://github.com/stylelint/stylelint/issues/6898 - https... — committed to beatrizsmerino/nuxt-course by beatrizsmerino a year ago
- feat(core): upgrade rush and dependencies (#89) * chore: migrate * feat: migrate pnpmOptions to pnpm-config file * feat: enabled some extra experiment options * chore: update repo-state * fix(rus... — committed to kc-workspace/kcws-js by kamontat a year ago
- Fix stylelint issue 'Segmentation fault'. Bump stylelint to v15.7.0. https://github.com/stylelint/stylelint/issues/6898 — committed to enigmatry/entry-angular-building-blocks by msljivic a year ago
- Bump stylelint-config version. Fixes 'Segmentation fault' issue. (#93) * Fix stylelint issue 'Segmentation fault'. Bump stylelint to v15.7.0. https://github.com/stylelint/stylelint/issues/6898 * ... — committed to enigmatry/entry-angular-building-blocks by msljivic a year ago
- Fix no longer needed workaround for Cosmiconfig segfault This workaround was introduced in #6902. See also #6898. — committed to stylelint/stylelint by ybiquitous 8 months ago
- Update stylelint As seen here: https://github.com/stylelint/stylelint/issues/6898#issuecomment-1577691344 — committed to backspace/adventures by backspace 7 months ago
I added this in my
package.jsonto temporarily avoid the issues :(I use
npm)https://github.com/stylelint/stylelint/releases/tag/15.7.0 is released! 🎉 The segmentation fault should not occur. 👍🏼
@rcerljenko Thanks for the report. I doubt this is a problem of Cosmiconfig:
Can you confirm a workaround to downgrade Cosmiconfig to 8.1.3?
Thanks for the help, everyone.
For now, I agree with doing a patch release, pinning
cosmiconfig. 👍🏼 I’ll prepare for the release right now.I’ve opened follow-up issues:
So, I’m closing this issue since it’s no longer needed. Feel free to comment if you still have any concerns.
Thank you so much for helping us resolve this problem!
Great thanks, @romainmenke! I’ve merged #6902.
I’ll do a patch release today. See also #6903.
I agree with removing
v8-compiler-cacheif there are no more concerns. 👍🏼I guess you would still have to remove that weird cache package for that to work.
I also occur this problem:
“stylelint”: “^15.6.3”
This issue can occasionally be reproduced on my MBP, but it can be reproduced every time on the CI Linux.
Currently, I don’t think we should support
.mjsexplicitly. See also below (CLI help and doc):https://github.com/stylelint/stylelint/blob/f1ace6167d1145f875050452f17b3e11494fac05/lib/cli.js#L115-L118
https://github.com/stylelint/stylelint/blob/f1ace6167d1145f875050452f17b3e11494fac05/docs/user-guide/configure.md?plain=1#L5-L8
But, we note that some people may try using
.mjsif Cosmiconfig 8.2 is installed. Let’s consider it later, though.Should be fine; as
cosmiconfigusesawait, a non-promise result should be handled just fine. The only (obscure) breakage I could imagine would be a file that includes athenproperty at the root level, which might just crash with an obscure error. If you want to be extra sure about that corner case, I guess you could do something likeWell, uh, that makes sense.
cosmiconfigmigrated tovitestfor this reason. Apparently, the switch is relatively straightforward.Hi,
cosmiconfigmaintainer here.For some reason, within
stylelint, any call toimport()crashes. Do you have any idea why that could be? In general, even though stylelint is written in CJS. it shouldn’t have any problems calling dynamicimport()…I have tried running the full prettier test suite, no issues with that… I’m not sure what’s different here.
Confirmed that:
fixes the issue
I can confirmed lock “cosmiconfig”: “8.1.3” works