gatsby icon indicating copy to clipboard operation
gatsby copied to clipboard

SIGSEGV/SIGABRT/SIGBUS faults after update gatsby-source-contentful package to ^7.14.0 version on M1 based Macbook Pro

Open akilis-intent opened this issue 2 years ago • 1 comments

Preliminary Checks

  • [X] This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
  • [X] This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions

Description

After switching to M1 based Macbook Pro I wasn't able to run local project environment, where on Intel based Macbook Pro all runs well. SIGSEGV & SIGABRT & SIGBUS faults were appearing alternately and quite regularly. Several times it runs without issue, but then after rebuilding error show up again.

The only way to reproduce issue on Intel based Macbook Pro was by running there process profiling with command npx process-top ./node_modules/.bin/gatsby build.

After robust investigation it turned out that downgrade of gatsby-source-contentful makes things working back again. What's more I've observed that createPages process on version [email protected] (Intel based Macbook Pro) tooks more than 17 seconds, while on [email protected] only 0.3 of second.

Another weird part is that process profiling with [email protected] package works well for M1 based device while failing with SIG fault on Intel based device.

SIG Faults e.g (M1 Macbook Pro, gatsby-source-contentful: ^7.14.0):

Screenshot 2022-09-13 at 15 17 12 Screenshot 2022-09-02 at 11 44 40 Screenshot 2022-09-02 at 11 25 30

Successfull building process:

Screenshot 2022-09-13 at 15 18 26 Screenshot 2022-09-06 at 12 49 59

Reproduction Link

--

Steps to Reproduce

M1 based device

  1. Installgatsby-source-contentful: ^7.14.0
  2. Create proces of dynamic pages generation with Contentful (createPages method)
  3. Run gatsby develop
  4. Observe issue during createPages

Intel based device

  1. Installgatsby-source-contentful: ^7.14.0
  2. Create proces of dynamic pages generation with Contentful (createPages method)
  3. Run gatsby develop
  4. Observe longer time of createPages process comparing to the gatsby-source-contentful: 7.13.1.

Expected Result

  • No SIG faults on local development
  • Efficient createPages process time
  • No SIG faults during node profiling with command npx process-top ./node_modules/.bin/gatsby build

Actual Result

Often SIGSEGV & SIGABRT & SIGBUS faults during local development on M1 based device. Extended createPages process time comparing to 7.13.1 version (x55 times).

Environment

System:
  OS: macOS Monterey v12.5.1
  CPU: Apple M1 Pro
Binaries:
  Node: 16.17.0
  npm: 8.15.0
npmPackages:
  "gatsby": "^4.20.0",
  "gatsby-source-contentful": "^7.14.0",

Config Flags

FAST_DEV: true, DEV_SSR: false,

akilis-intent avatar Sep 13 '22 14:09 akilis-intent

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 💜

LekoArts avatar Sep 14 '22 05:09 LekoArts

Hi!

Since we didn't receive an answer for 7 days or more about the ask of a reproduction I'm going to close this now, as we can't do much to help without a reproduction. If you are able to create a minimal reproduction for this then please do answer here or open a new issue with a reproduction. Thanks!

LekoArts avatar Oct 04 '22 06:10 LekoArts