[FIX] Segmentation fault on CentOS 7 due to outdated sharp#23796
[FIX] Segmentation fault on CentOS 7 due to outdated sharp#23796pierre-lehnen-rc merged 1 commit intodevelopfrom
sharp#23796Conversation
|
We still have this problem on a Centos7 VM with 4.2.1 as well as 4.2.2. Steps to reproduce: Extract bundle
Run npmStart ServerAre we missing something obvious here? On former installs we had to set LD_PRELOAD="bundle/programs/server/npm/node_modules/sharp/vendor/lib/libz.so" but this file is not present any more. |
|
We are also having this issue moving from 3.17.1. Exactly as mausballklauer described in the previous post. Thanks! |
|
@mausballklauer what node and npm versions are you running? |
|
We are running: Sorry, I should mention that I did update node before attempting the update to 12.22.1 but it rolled back when I rolled back the server after the failed update. |
|
please make sure to use the exact same versions as stated on the release notes.. in case of release 4.2.2: https://github.com/RocketChat/Rocket.Chat/releases/tag/4.2.2 Node: 12.22.1 |
|
We use: NPM 6.14.12 is bundled with Node 12.22.1 so that's version we are using. Do you think it is neccessary to downgrade specifically to 6.14.1? Nevertheless, I'll try to build it tomorrow and report back then. |
I'd say using the same minor version (so |
|
Ok, this was unexpected... I downgraded NPM to 6.14.1 and now it works. The segmentation fault error is gone. This resolves my actual issue, nevertheless it would be good fixing this so that the install procedure works with the NPM version that comes bundled with the Node version stated in the release notes. Anyways, thanks for having a look into this! |
|
Today, I wanted to start the instance of Rocket.Chat from my yesterdays comment where I stated that it was finally working. To my great surprise, it was throwing the segmentation fault error on startup. What happened? It was working yesterday, why not today? Where was the difference between yesterday and today? After some investigation and carefully retaking all the steps I did yesterday I finally found the difference. You must know, we are behind a corporate proxy with our servers, no direct communication towards "the internet" is allowed. During the downgrade procedure of NPM (from 16.14.12 to 6.14.1) I had to set the HTTPS_PROXY environment variable in order to get the NPM install.sh script working. Setting this variable finally made a difference. When I try to start Rocket.Chat without this variable being set, it throws a segmentation fault. If I simply enter
and then start RocketChat again - it starts and works fine, no segmentation faults! So it wasn't the NPM version all along, it was the HTTPS_PROXY variable that had to be set. Can you tell what is happening during startup and what could possibly be the reason why this environment variable has to be set in the shell starting the Rocket.Chat instance? |
Proposed changes (including videos or screenshots)
Upgrades
sharpto avoid a segmentation fault on CentOS 7 during startup related tosharp.nodebeing loaded viaprocess.dlopen().Suggested as a fix for versions
4.0.xand4.1.x.Issue(s)
Closes #23346
Closes #23427
Steps to test or reproduce
rsyncuserand host IP192.168.0.123)/opt/Rocket.Chatdirectory:Further comments
Originally posted by @lovell in lovell/sharp#2570 (comment)