Skip to content

Segfaults when under pressure? #1986

Closed
Closed
@pvdz

Description

I'm trying to debug a segfault while using Gatsby that is potentially in the realm of using sharp.

(I'm a performance eng for Gatsby)

It seems that sites with lots of images can trigger a segfault and we're not sure when exactly this happens.

I get this fairly frequently with a simple site that just has many images (~1500 for my machine) on the example site posted (in http://github.com/gatsbyjs/gatsby/pull/6291) as a repro;

Clone https://github.com/jp887/gatsby-issue6291-repro
Update package.json to set all gatsby deps to *
Clear the npm cache (~/.npm)
Clear node_modules, in case that's relevant
npm install
yarn gen-images 1500 (It triggers with 1500 images for me, this will try to process 9000 images in total)
gatsby build

For me, often it segfaults roughly between 25% and 75%.

I'm on ubuntu (xfce) 19.10
Node v8.16.2 (through nvm)

I went through some of the older Gatsby issues relating to this bug. I am able to reproduce it with .simd(true) and .simd(false), and same for .cache(true) and .cache(false).

Reducing the available memory to node does not seem to make a difference (I set it to 500mb, half of the default, but saw no increase in crash rate). Was also able to repro it running single core.

Please let me know how I can help :)

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions