question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Large (>1MB) colour profiles can crash with segmentation fault

See original GitHub issue

Hi,

We are experiencing node/express server crash when using sharp with specific images (4): segmentation fault

I’ve tried to go from using Buffer to Stream without any change. I’ve tried to isolate the problem without doing anything on the image like this:

const sharp = require('sharp');

sharp('./images/bug.jpg')
  .toFile('./images/out.jpg', (err, info) => {
    console.log({ err, info });
  });

here is one of the images: https://framapic.org/pRRvN4QD9sK4/akysnsC4rj15.jpg

Working locally with OSX Sierra, node 6.11.1, & same problem remotely with google gcp instances.

Thanks for helping

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, Nov 9, 2017

Brilliant, thank you, it looks like you’ve run into https://github.com/jcupitt/libvips/commit/7b64246af2cdf9c7b9fae0f29e5483bb6a7376d2 which was fixed in libvips 8.5.6.

This explains why the pre-compiled libvips binaries (8.5.5) fail and brew-installed libvips (8.5.9) works.

1reaction
lovellcommented, Sep 26, 2017

An OS-level backtrace is required here rather than a JS stacktrace.

As I mentioned above, gdb is probably the best tool for this.

You use it by running gdb --args /usr/bin/node your-app.js, enter run at the prompt, wait for the crash then enter bt at the prompt for the backtrace.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identify what's causing segmentation faults (segfaults) - IU KB
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >
Why do I get a segfault in C from declaring a large array on the ...
You can fix this by either asking for extra stack when you create the thread, allocating on the heap, or changing the OS...
Read more >
Composite Bug! | Forums | SideFX
So, if I ask for a 1Mb block, and no hole is big enough for this request, the allocation fails. The system can't...
Read more >
Untitled
Support for bind 9.11.5 headers - Fix seg-fault parsing DWARF-1 information. ... feature (#1555397) - fix crash when write follows large read (#1463706) ......
Read more >
Query: All Stories - Blender Development
Can confirm the issue, but 2.90.1 seems to behave like this either. ... Péter Friedrich (peterf) added a comment to T99015: Segmentation fault...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found