babel: [Bug]: Random segfaults when running webpack and using @babel/core 7.16.10

💻

  • Would you like to work on a fix?

How are you using Babel?

Other (Next.js, Gatsby, vue-cli, …)

Input code

No idea how to reproduce it. It reproduces in random places in our CI builds, starting from yesterday after the release of 7.16.10

Configuration file name

No response

Configuration

No response

Current and expected behavior

Apparently we are using Babel through workbox which is used through webpack which is run from Java

├─┬ workbox-build@6.4.1
│ ├─┬ @babel/core@7.16.10

The only expectation I have is that webpack should finish the build instead of segfault. Assuming here that exit value 139 means segmentation fault.

Environment

  • Babel: 7.16.10
  • Node 16.0.0

Possible solution

Downgrading to @babel/core 7.16.7 resolves the problem

Additional context

https://github.com/vaadin/flow/runs/4882425225?check_suite_focus=true is an example of a failed build but it does not provide much more information

https://github.com/vaadin/flow/runs/4882529524 is the same build but with babel 7.16.7

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

That fix seems to also resolve the issue

After a couple of failing patch attempts I think I now agree with @jlowcs that removing

try {
 import_ = require("./import").default;
} catch (_unused) {}

resolves the issue

10/10 on the eslint job, and 5/5 on the node build, so it looks like that patch does fix the issue.

We also noticed that a random segfault appeared in our eslint CI job since bumping babel. eslint uses @babel/eslint-parser.

image