Open 7flash opened 2 months ago
@7flash, the latest version of Bun is v1.1.26, but this crash was reported on Bun v1.1.20.
Are you able to reproduce this crash on the latest version of Bun?
bun upgrade
@7flash can you paste the last shell script that was run?
@7flash can you paste the last shell script that was run?
I have this program running continuously for days and it looks something like this:
first.sh
while IFS= read -r it; do #iterate over things
bun second.ts "${it}" > answer.txt
vim answer.txt
done < "$things"
second.ts
const it = await Bun.password.hash(process.argv[2])
const answer = await $`python3 third.py "${it}"`
console.log(answer)
third.py
it = sys.argv[1]
answer = generate(it)
print(answer)
Its just a minimal reproduction to demonstrate the flow of my program, which you might find unconventional so let me explain:
In my terminal I am running first.sh which runs second.ts which runs third.py
The reason I am running first.sh because its the only way I can completely pause my program while I am reviewing answer.txt and fixing second/third scripts, in the same terminal window, its really special experience for me being to be able to do it in my favourite editor vim/helix instead of opening some web ui. I hope its not too crazy, but please let me know if there are any drawbacks i must be aware when building apps following this approach.
Anyway, the moment something went wrong, is most probably when I tried to airdrop some large files into my macbook where the script was running, and that might have caused the memory issue, when I noticed the script has stopped running, while being at stage of waiting response from third.py.
I am curious about what can I understand from this error message, specifically what following number mean?
shell(40) User: 28ms Commit: 1.07GB | Faults: 2868
Btw I've found something in docs which gives me hope it might be possible to switch from running script to editing file in a terminal? But it doesn't work, it's not doing anything when I run this script.
Bun.openInEditor(import.meta.url, { editor: "hx", });
How can we reproduce the crash?
No response
Relevant log output
Stack Trace (bun.report)
Bun v1.1.20 (
ae19489
) on macos aarch64 [AutoCommand]Segmentation fault at address 0x00000008
src.shell.interpreter.StatePtrUnion
src.shell.interpreter.Interpreter.Expansion.next
src.shell.interpreter.StatePtrUnion
src.shell.interpreter.Interpreter.Expansion.next
src.shell.interpreter.StatePtrUnion
src.shell.interpreter.Interpreter.Expansion.next
src.shell.interpreter.StatePtrUnion
src.shell.interpreter.Interpreter.Script.start