oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.13k stars 2.76k forks source link

Shell Segmentation fault #12077

Open ilyaChuk opened 4 months ago

ilyaChuk commented 4 months ago

How can we reproduce the crash?

const process = await $`./deploy.sh`;
    let buildOutput = '';

    for await (const chunk of process.stdout) {
        const line = Buffer.from(chunk).toString();
        console.log(line);
        buildOutput += line;
    }
    debugger

Relevant log output

No response

Stack Trace (bun.report)

Bun v1.1.16 (bf7b327) on linux x86_64 [AutoCommand]

Segmentation fault at address 0x00000020

Jarred-Sumner commented 4 months ago

Is that the complete code snippet which reproduces the issue? No other code is being run in the file? For crashes like this, the lines that lead to the crash may have been run before the crash triggered. Would you be able to paste the contents of deploy.sh as well?

ilyaChuk commented 4 months ago

@Jarred-Sumner, I don't really understand myself in what situations this happens. since then, I've been changing the code and I can't go back to the error anymore. But I'll try to find it, and I'll let you know

trylovetom commented 4 months ago

same here with Bun v1.1.18 SCR-20240708-d4b