oven-sh/bun

Bun segfault during containerd / buildkitd (bun alpine docker image) build of nuxt app

Opened this issue · 4 comments

j03c commented

How can we reproduce the crash?

Environment: Ubuntu 24.04, rootless containerd, nerdctl, cni plugins, buildkitd, github action runner = build on push to remote.
Build failed during github action runner workflow.
Action runner runs as unprivileged user (uisng user systemd service file rather than system-wide one)

If any other or more specific info required, let me know.

Relevant log output

Stack Trace (bun.report)

Bun v1.2.20 (6ad208b) on linux x86_64_baseline [RunAsNodeCommand]

Segmentation fault at address 0x00000050

  • PrintStream.h:72: JSC::OpBitand::dump
  • ??
  • bit:87: JSC::JSGenericTypedArrayView<JSC::Float16Adaptor>::setFromTypedArray
  • JSObject.h:0: operationGetDynamicVar
  • ArrayPrototypeInlines.h:110: operationNewArrayWithSpecies
  • DataLog.h:45: void WTF::dataLog<char [33], unsigned long, char [5], JSC::JSValue, char [12], JSC::DFG::AbstractValue, char [2]>
  • AirKind.h:53: JSC::B3::Air::Inst JSC::B3::(...)::LowerToAir::createGenericCompare<JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda'(...)::LowerToAir::ArgPromise&, JSC::B3::(...)::LowerToAir::ArgPromise&), JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda0'(...)::LowerToAir::ArgPromise&, JSC::B3::(...)::LowerToAir::ArgPromise&), JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda'(...)::LowerToAir::ArgPromise&, JSC::B3::(...)::LowerToAir::ArgPromise&), JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda0'(...)::LowerToAir::ArgPromise&, JSC::B3::(...)::LowerToAir::ArgPromise&), JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda'(...)::LowerToAir::ArgPromise&), JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda0'(...)::LowerToAir::ArgPromise&)>(...)::LowerToAir::createBranch(...)::'lambda'(...)::LowerToAir::ArgPromise&, JSC::B3::(...)::LowerToAir::ArgPromise&) const&, JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda0'(...)::LowerToAir::ArgPromise&, JSC::B3::(...)::LowerToAir::ArgPromise&) const&, JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda'(...)::LowerToAir::ArgPromise&, JSC::B3::(...)::LowerToAir::ArgPromise&) const&, JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda0'(...)::LowerToAir::ArgPromise&, JSC::B3::(...)::LowerToAir::ArgPromise&) const&, JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda'(...)::LowerToAir::ArgPromise&) const&, JSC::B3::(...)::LowerToAir::createBranch(...)::'lambda0'(...)::LowerToAir::ArgPromise&) const&, bool)::'lambda'(...)::operator()
  • B3Validate.cpp:227: JSC::B3::(...)::Validater::run
  • AirOpcodeGenerated.h:28661: JSC::B3::Air::Inst::isValidForm
  • PrintStream.h:73: JSC::OpLshift::dump

Features: tsconfig, tsconfig_paths, workers_spawned, workers_terminated, process_dlopen, Bun.stderr, Bun.stdin, Bun.stdout, jsc, spawn

@j03c, the latest version of Bun is v1.2.22, but this crash was reported on Bun v1.2.20.

Are you able to reproduce this crash on the latest version of Bun?

bun upgrade
j03c commented

Yes, I have just reproduced this after updating to bun alpine docker image 1.2.22. In fact, changing my Dockerfile to use FROM oven/bun:1.2.22-alpine AS base then pushing this change triggered a build of the nuxt app, using the github action runner, which failed. Re-running the job using button in Github UI succeeded (as it it did the previous time bun segfaulted).

Bun v1.2.22 (6bafe26) on linux x86_64_baseline [RunAsNodeCommand]

Segmentation fault at address 0x00000050

Features: tsconfig, tsconfig_paths, workers_spawned, workers_terminated, process_dlopen, Bun.stderr, Bun.stdin, Bun.stdout, jsc, spawn

Same issue for me: #22873