bug: `npm run og:build` segfaults in CentOS 7
Closed this issue · 2 comments
taoky commented
先决条件 (Prerequisites)
- 我已确认这个问题没有在其他 issues中提出过。
I am sure that this problem has NEVER been discussed in other issues.
发生了什么(What happened)
# npm run og:build
> help.mirrorz.org@0.0.0 og:build
> node -r @swc-node/register ./scripts/generate-opengraph.ts
Loaded env from /root/mirrorz-help/.env.local
info - Generating OpenGraph images for "help.mirrors.cernet.edu.cn"...
info - [OG] Cache miss for open graph image "help.mirrors.cernet.edu.cn/default" from ./node_modules/.cache/
Segmentation fault (core dumped)
期望的现象(What you expected to happen)
> npm run og:build
> help.mirrorz.org@0.0.0 og:build
> node -r @swc-node/register ./scripts/generate-opengraph.ts
Loaded env from /home/taoky/Projects/mirrorz-help/.env.local
info - Generating OpenGraph images for "mirrors.help"...
info - [OG] Reading open graph image "mirrors.help/default" from ./node_modules/.cache/
> echo $status
0
如何重现此问题(How to reproduce it)
$ sudo docker run -it --rm centos:7 bash
# ulimit -n 1024
# yum install epel-release
# yum install npm git vim
# git clone https://github.com/mirrorz-org/mirrorz-help.git
# cd mirrorz-help/
# npm install
# vim .env.local
# npm run og:build
操作系统(OS Version)
CentOS 7 (Container & VM)
浏览器(如果适用)(Browser version, if applicable)
N/A
其他环境(Other environments)
Node.js v16.18.1 from EPEL, Glibc 2.17.
其他需要说明的事项(Anything else we need to know)
(This issue is blocking help.mirrors.cernet.edu.cn from updating its contents.)
taoky commented
The crash seems to be triggered by https://github.com/mirrorz-org/mirrorz-help/tree/master/src/compiled/satori.
taoky commented
npm run build
also segfaults in CentOS 7, though I have workarounded this issue by using nix in the production server...