-
-
Notifications
You must be signed in to change notification settings - Fork 285
fix seg fault #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix seg fault #329
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe Dockerfile has been updated with two modifications. The base Node.js image specification now includes an explicit Alpine Linux version tag, changing from Pre-merge checks❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
Deploying usesend with
|
| Latest commit: |
8b04889
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://39d791ac.usesend.pages.dev |
| Branch Preview URL: | https://km-2025-12-30-seg-fault.usesend.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docker/Dockerfile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cloudflare Pages
🔇 Additional comments (2)
docker/Dockerfile (2)
82-82: LGTM!The CMD syntax is correct for Alpine Linux, which uses busybox's
sh.
4-4: AI summary inconsistency: SKIP_ENV_VALIDATION not changed.The AI summary claims
SKIP_ENV_VALIDATIONwas changed from"true"to"false", but the annotated code shows no changes to lines 4 or 78 where this variable is set. These environment variable settings appear to have been present in both stages (base and runner) before this PR.Also applies to: 78-78
| @@ -1,4 +1,4 @@ | |||
| FROM node:20.19-alpine AS base | |||
| FROM node:20.19-alpine3.20 AS base | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
node:20.19-alpine3.20 Docker image compatibility
💡 Result:
Short answer: node:20.19-alpine3.20 is an official Docker tag and works, but it uses Alpine (musl libc) so you may hit compatibility issues with glibc-linked binaries or some native (npm) modules. Recommended mitigations: install build tools (apk add build-base python3 make g++), rebuild native modules (npm rebuild / npm ci), or use gcompat/glibc compatibility — or switch to a glibc-based Node image (e.g., node:20.19-bookworm or node:20.19-slim) if you need broad binary compatibility. [1][2][3][4]
Sources
- Official node Docker image tags (includes 20.19-alpine3.20). [1]
- Explanation of musl vs glibc tradeoffs for Alpine images. [2]
- Alpine docs on running glibc programs and gcompat. [3]
- Community notes on glibc compatibility approaches (e.g., gcompat, installing glibc). [4]
🌐 Web query:
Node.js 20.19 Alpine 3.20 segmentation fault
💡 Result:
Short answer — this is a known problem with some Node 20 builds on Alpine 3.20 (segfaults/instability). Causes reported include Alpine-packaged Node/OpenSSL/musl interactions and upstream Node patches; Alpine security notices and downstream projects recommend upgrading or pinning to fixed Node builds. See sources and fixes below.
What to do
- Upgrade the Alpine package to the fixed Node build (Alpine nodejs >= 20.15.1-r0) or use a newer Node 20.x that includes the fix. [1][2]
- If you can’t upgrade, run a non‑Alpine (glibc) Node image (e.g., node:20 on Debian/Bookworm) or pin to an earlier working image (reports show rolling back to 3.18/older Node removed the crash for some users). [3][4]
- If crashes look OpenSSL-related (segfault after runtime DB/crypto ops), pin OpenSSL to the prior working patch (e.g., 3.0.16) as a temporary workaround while upgrading. [5]
References
- Alpine / CVE/patch info (fixed in nodejs 20.15.1-r0). [1]
- Snyk advisory mentioning upgrade to 20.15.1-r0 for Alpine 3.20. [2]
- Community bug reports showing segfaults on Alpine 3.19/3.20 and rollbacks to older images as a workaround. [3][4]
- Report of segfaults tied to OpenSSL patch changes and suggestion to pin OpenSSL 3.0.16. [5]
If you want, tell me how you run Node (Dockerfile or image tag and exact version) and I’ll give the exact Dockerfile fix/pinning command.
🌐 Web query:
node 20.19 alpine:3.20 known issues
💡 Result:
Short summary — known issues reported for node:20.19-alpine3.20 (May 2024 → present):
-
Multiple security vulnerabilities in Alpine-packaged Node.js that affect 3.20 (including CVE‑2024‑22018 and CVE‑2024‑22020). Upgrading the Alpine nodejs package to the patched release (20.15.1-r0 or later where provided) or pulling a patched node:20-alpine image is recommended. [1][2]
-
Reported command‑injection / package-specific vulnerabilities affecting Alpine Node.js packages (CVE references for Alpine 3.19/3.20 family); monitor Alpine security advisories and update images when fixed. [3]
-
Community reports of memory‑leak/regression behavior after specific Node 20.x updates on Alpine images (users rolled back to earlier pinned images to avoid the issue). If you see unexplained memory growth, try pinning a known-good node:20.x-alpine image or using a non-Alpine base for comparison. [4]
Recommended actions:
- Pull latest node:20-alpine3.20 (or node:20-alpine with updated package) and rebuild to get patched Alpine packages. Verify the nodejs package version in the image (apk info / node -v). [1][2]
- If immediate patch unavailable, pin to a known-good image (e.g., earlier patched tag) or switch to Debian/Ubuntu‑based node images until Alpine package fixes are released. [4][1]
Sources:
[1] Snyk — CVE-2024-22020 / Alpine nodejs advisories.
[2] Snyk — CVE-2024-22018 (Alpine nodejs).
[3] Vulert / Alpine vulnerability listing (CVE-2024-36138).
[4] Community reports (Reddit) re: memory leaks and rollback/pinning practices.
The Docker image node:20.19-alpine3.20 is known to have segmentation fault and instability issues with Node 20 builds on Alpine 3.20. This is caused by Alpine-packaged Node/OpenSSL/musl interactions. Additionally, this tag has known security vulnerabilities (CVE-2024-22018, CVE-2024-22020).
To actually fix segmentation faults, consider one of these approaches:
- Upgrade to patched Alpine Node build: Use
node:20.15.1-alpine3.20or ensure the Alpine nodejs package is >= 20.15.1-r0 - Switch to glibc-based image: Use
node:20.19-bookworm(ornode:20.19-slim) if broad binary compatibility is needed - Investigate root cause: If the seg fault is OpenSSL-related, pinning OpenSSL to 3.0.16 may be a temporary workaround while upgrading
Before merging, verify which version is actually required and ensure it addresses the underlying segmentation fault.
🤖 Prompt for AI Agents
In docker/Dockerfile around line 1, the base image node:20.19-alpine3.20 is
known to cause segmentation faults and has CVEs; update the FROM to a safer
image: either pin to the patched Alpine Node build (e.g.,
node:20.15.1-alpine3.20 or any tag with nodejs >= 20.15.1-r0) or switch to a
glibc-based variant like node:20.19-bookworm or node:20.19-slim; choose the
appropriate image for your compatibility needs, update the Dockerfile FROM line
accordingly, and verify the selected tag resolves the segfault/security issues
before merging.
Summary by cubic
Updated the Docker base image to node:20.19-alpine3.20 to resolve a segfault during container startup.
Written for commit 8b04889. Summary will update automatically on new commits.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.