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.

Error : munmap_chunk(): invalid pointer, Node.js 13 (EOL)

See original GitHub issue

Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest? Yes, 0.29.3

What are the steps to reproduce? Some large images trigger munmap_chunk(): invalid pointer error and kills the node process   What is the expected behaviour? Should generate compress version of image

Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?

    return sharp(fileBuffer)
      .resize(height, width)
      .toBuffer()
      .then((data: any) => {
        return data;
      })
      .catch((err: any) => log.info(err, 'Failed to compress image!'));

Are you able to provide a sample image that helps explain the problem? image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, Nov 23, 2021

Node.js 13 reached end-of-life on the 1st June 2020, please upgrade.

If you’re still having problems after upgrading to a supported version of Node.js, please provide a backtrace of the crash.

0reactions
stanly-johnsoncommented, Nov 23, 2021

Installed by npm i sharp

Output of npx envinfo --binaries --system

  System:
    OS: Linux 5.11 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (1) x64 Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
    Memory: 96.32 MB / 973.74 MB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 13.14.0 - /usr/bin/node
    npm: 6.14.4 - /usr/bin/npm

Will try to post a debugging backtrace soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

munmap_chunk(): invalid pointer - Stack Overflow
This error message means that by writing into memory that does not belong to an object (but belongs to your process so no...
Read more >
Error in `node': munmap_chunk(): invalid pointer
Hi,. I get an error when running an OR-tools app on linux. It seems that there is a problem with /libortools.so::operations_research::PathOperator:: ...
Read more >
Fix list for IBM MQ Version 9.1 LTS
IT39876, IBM MQ client connection on Linux causes internal error (Probe ID ZD061030) ... the endmqm command results in munmap_chunk(): invalid pointer error....
Read more >
Bug listing with status RESOLVED with resolution NEEDINFO ...
Bug :2427 - "portage: if USE variables change, WORKDIR should be cleaned" ... does munmap_chunk() on an invalid pointer, Apache segfaults" status:RESOLVED ...
Read more >
2016-April.txt - Mailing Lists - OpenSSL
NULL before it gets as far as calling EVP_DigestVerifyFinal(). Are you able to recompile ... Error encountered while processing node > <tlsfuzzer.expect.
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