#Segmentation fault (core dumped)

1 messages · Page 1 of 1 (latest)

arctic radish
#

Version: 1.0.30
Device: Linux working 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Caused when bun i, bun run, bun update and when executing compiled standalone executable.

Trace:

[ 1216.141477] bun[11601]: segfault at 5875c400000 ip 000055584f996df6 sp 00007ffc146b2130 error 4 in bun[55584f261000+2d8a000]
[ 1216.141495] Code: 00 00 48 8d 44 24 50 eb 1d 66 66 2e 0f 1f 84 00 00 00 00 00 0f b7 03 66 89 44 24 54 c6 44 24 56 00 48 8d 44 24 54 c6 40 03 00 <8b> 00 89 44 24 6c 48 8d 7c 24 78 48 8d 74 24 6c e8 85 06 00 00 0f
[ 1222.228521] bun[11670]: segfault at 20f46400000 ip 0000563d4ba1ddf6 sp 00007fff5b6aa230 error 4 in bun[563d4b2e8000+2d8a000]
[ 1222.228531] Code: 00 00 48 8d 44 24 50 eb 1d 66 66 2e 0f 1f 84 00 00 00 00 00 0f b7 03 66 89 44 24 54 c6 44 24 56 00 48 8d 44 24 54 c6 40 03 00 <8b> 00 89 44 24 6c 48 8d 7c 24 78 48 8d 74 24 6c e8 85 06 00 00 0f
[ 1225.478205] bun[11716]: segfault at 30590400000 ip 000055ffca384df6 sp 00007ffca4cdd1b0 error 4 in bun[55ffc9c4f000+2d8a000]
[ 1225.478216] Code: 00 00 48 8d 44 24 50 eb 1d 66 66 2e 0f 1f 84 00 00 00 00 00 0f b7 03 66 89 44 24 54 c6 44 24 56 00 48 8d 44 24 54 c6 40 03 00 <8b> 00 89 44 24 6c 48 8d 7c 24 78 48 8d 74 24 6c e8 85 06 00 00 0f
[ 1250.331250] node[11943]: segfault at 3545e400000 ip 000055f6c27aadf6 sp 00007ffed2e028c0 error 4 in bun[55f6c2075000+2d8a000]
[ 1250.331263] Code: 00 00 48 8d 44 24 50 eb 1d 66 66 2e 0f 1f 84 00 00 00 00 00 0f b7 03 66 89 44 24 54 c6 44 24 56 00 48 8d 44 24 54 c6 40 03 00 <8b> 00 89 44 24 6c 48 8d 7c 24 78 48 8d 74 24 6c e8 85 06 00 00 0f
[ 1270.522480] bun[12130]: segfault at 23e70400000 ip 0000563cc0a15df6 sp 00007ffd2ebd1ec0 error 4 in bun[563cc02e0000+2d8a000]
[ 1270.522493] Code: 00 00 48 8d 44 24 50 eb 1d 66 66 2e 0f 1f 84 00 00 00 00 00 0f b7 03 66 89 44 24 54 c6 44 24 56 00 48 8d 44 24 54 c6 40 03 00 <8b> 00 89 44 24 6c 48 8d 7c 24 78 48 8d 74 24 6c e8 85 06 00 00 0f
[ 1377.955874] traps: main[12668] trap invalid opcode ip:5566cefebe68 sp:7ffc0b132be0 error:0 in main[5566cdc9b000+2da8000
silver birch
#

bun run works normally for me with bun 1.0.30+1424a196f on Linux 6.1.0-18-amd64 x86_64 unknown

#

bun i <package> also works fine

#

bun update works fine when there are no updates, have not tested with an out of date package

#

bun build <file> --compile works fine and the output executable runs correctly

#

@arctic radish Could you provide more details on what you're doing to get the segfault?

#

Step by step instructions for reproducing would be ideal

arctic radish
arctic radish
brazen yarrow
#

judging by that log it appears as though both node and bun are segfaulting

#

is node installed on the system?

arctic radish
brazen yarrow
#

illegal instruction usually means the non-avx version was installed for the avx version

#

can you run curl https://bun.sh/install | bash

#

and see if it still happens?

brazen yarrow
#

can you run bun run main.ts

#

now

#

and see if it work

arctic radish
#

sounds like there is a bug with puppeteer

#

bun works when puppeteer is not in the package.json

brazen yarrow
#

this is run in node

#

internal/modules/* is node

arctic radish
#

let me check

brazen yarrow
#

probably because the postinstall script said to use node

arctic radish
#

node have same issue but doesn't return a segfault when i do npm i

brazen yarrow
#

can you try the canary build

#

i wonder if this is fixed

#

bun upgrade --canary

#

we rewrote a lot of this code recently

arctic radish
#

i think the segfault is caused by the script that automatically install deps with "bun run"