Skip to content

Conversation

@KMKoushik
Copy link
Member

@KMKoushik KMKoushik commented Dec 29, 2025

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

  • Chores
    • Updated Docker base image to a newer Alpine Linux version for improved security and compatibility.
    • Enabled environment variable validation in the build process to ensure proper configuration validation.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
unsend-marketing Ready Ready Preview, Comment Dec 29, 2025 8:44pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

Walkthrough

The Dockerfile has been updated with two modifications. The base Node.js image specification now includes an explicit Alpine Linux version tag, changing from node:20.19-alpine to node:20.19-alpine3.20. Additionally, the SKIP_ENV_VALIDATION environment variable has been changed from "true" to "false", which affects how environment variables are validated during the build and runtime stages.

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix seg fault' is vague and does not clearly convey what specific segmentation fault is being fixed or relate meaningfully to the actual changes (Docker image update and environment variable modification). Provide a more descriptive title that specifically indicates the issue being fixed, such as 'Update Node.js Docker image and enable environment validation' or reference the specific segmentation fault being addressed.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a 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

@cloudflare-workers-and-pages
Copy link

Deploying usesend with  Cloudflare Pages  Cloudflare Pages

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

View logs

@KMKoushik KMKoushik merged commit bba9e93 into main Dec 29, 2025
6 of 7 checks passed
@KMKoushik KMKoushik deleted the km/2025-12-30-seg-fault branch December 29, 2025 20:45
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 95dfa6b and 8b04889.

📒 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_VALIDATION was 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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.


⚠️ This change may worsen segmentation fault issues, not fix them.

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:

  1. Upgrade to patched Alpine Node build: Use node:20.15.1-alpine3.20 or ensure the Alpine nodejs package is >= 20.15.1-r0
  2. Switch to glibc-based image: Use node:20.19-bookworm (or node:20.19-slim) if broad binary compatibility is needed
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants