Closed mofelee closed 3 months ago
I found that btoa('username:password')
outputs empty string
console.log((`Basic ${btoa('elastic:elastic')}`).length) // output: 6
I'm unable to reproduce this. I tried on Linux x64 using the default build, the baseline build, and in canary. I also tried on macOS arm64.
Are you using a CPU emulator a VPS somewhere? What year is your CPU from? Potentially related: #3312
@Jarred-Sumner
This code runs in a build pipeline triggered by Jenkins.
The pipeline runs on a k3s cluster, which runs on proxmox 8.2.4.
Jenkinsfile:
pipeline {
agent {
kubernetes {
yaml '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: shell
image: oven/bun:1.1.18-debian
command:
- sleep
args:
- infinity
'''
defaultContainer 'shell'
}
}
stages {
stage('Main') {
steps {
checkout scm
sh """
bun install
bun run index.ts
"""
}
}
}
}
@Jarred-Sumner
I reproduced this bug
sudo kubectl run -i -t bun --image=oven/bun:1.1.18-debian --restart=Never --command sh
console.log(btoa('hello'))
bun run index.ts
Sorry, I forgot to submit the CPU information
CPU(s): 48 x AMD EPYC 7402P 24-Core Processor (1 Socket)
Kernel Version: Linux 6.5.11-8-pve (2024-01-30T12:27Z)
Boot Mode: EFI
Manager Version: pve-manager/8.2.4/faa83925c9641325
~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 40 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: AuthenticAMD
Model name: Common KVM processor
CPU family: 15
Model: 6
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 2
Stepping: 1
BogoMIPS: 5589.50
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx lm rep_good nopl c
puid extd_apicid tsc_known_freq pni cx16 x2apic hypervisor cmp_legacy 3dnowprefetch vmmcall
Virtualization features:
Hypervisor vendor: KVM
Virtualization type: full
Caches (sum of all):
L1d: 256 KiB (4 instances)
L1i: 256 KiB (4 instances)
L2: 2 MiB (4 instances)
L3: 64 MiB (4 instances)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-3
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Not affected
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Srbds: Not affected
Tsx async abort: Not affected
Ah, Bun needs a CPU > 2008 (AVX, SSE 4.2)
Duplicate of #3312
How can we reproduce the crash?
Relevant log output
Stack Trace (bun.report)
Bun v1.1.18 (
5a0b935
) on linux x86_64_baseline [RunCommand]Segmentation fault at address 0x00000000
ld-temp.o:0
:WTF::jscSignalHandler
??
shimmer.zig:197
:src.bun.js.webcore.response.Headers.from
response.zig:2347
:Bun__fetch
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call
ld-temp.o:0
:llint_call_javascript