oven-sh / bun

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

bunx command causes terminal to freeze entirely in WSL2 #7632

Closed aamirv1 closed 9 months ago

aamirv1 commented 10 months ago

What version of Bun is running?

1.0.17+5e60861c3

What platform is your computer?

Microsoft Windows NT 10.0.22621.0 x64

What steps can reproduce the bug?

I ran the following command in the terminal in WSL2 (windows 11) and the terminal freezes entirely after first step (becomes unresponsive even ctrl + c also does nothing) bunx --bun create-next-app@latest my-app --typescript --tailwind --eslint

I have to close the terminal instance for the terminal to start working again. I have tried it with windows terminal and VSCode terminal as well, it freezes both of them.

attaching screenshot of the step at which terminal freezes image

What is the expected behavior?

Expected behaviour is that it completes all the question for setting up a next app (example with help of npm)

image

What do you see instead?

I see that the terminal is frozen as soon as I select option for the first question and I have to close the terminal instance.

image

Additional information

No response

Jarred-Sumner commented 9 months ago

native stack trace:

epoll_wait (@epoll_wait:25)
us_loop_run_bun_tick (/root/bun/packages/bun-usockets/src/eventing/epoll_kqueue.c:0)
src.deps.uws.PosixLoop.tick (/root/bun/src/deps/uws.zig:970)
src.bun.js.event_loop.EventLoop.autoTickActive (/root/bun/src/bun.js/event_loop.zig:1130)
src.bun_js.Run.start (/root/bun/src/bun_js.zig:370)
src.bun.js.javascript.OpaqueWrap__anon_46832__struct_84727.callback (/root/bun/src/bun.js/javascript.zig:105)
::JSC__VM__holdAPILock(JSC__VM *, void *, void (*)(void *)) (/root/bun/src/bun.js/bindings/bindings.cpp:4363)
src.bun.js.bindings.shimmer.Shimmer("JSC","VM",src.bun.js.bindings.bindings.VM).cppFn (/root/bun/src/bun.js/bindings/shimmer.zig:186)
src.bun.js.bindings.bindings.VM.holdAPILock (/root/bun/src/bun.js/bindings/bindings.zig:5149)
src.bun_js.Run.boot (/root/bun/src/bun_js.zig:245)
src.cli.Command.maybeOpenWithBunJS (/root/bun/src/cli.zig:1789)
src.cli.Command.start (/root/bun/src/cli.zig:1690)
src.cli.Cli.start__anon_5109 (/root/bun/src/cli.zig:58)
src.main.main (/root/bun/src/main.zig:46)
start.callMain (/root/bun/.cache/zig/lib/std/start.zig:575)
start.initEventLoopAndCallMain (/root/bun/.cache/zig/lib/std/start.zig:519)
start.callMainWithArgs (/root/bun/.cache/zig/lib/std/start.zig:469)
main (/root/bun/.cache/zig/lib/std/start.zig:484)
___lldb_unnamed_symbol3187 (@___lldb_unnamed_symbol3187:29)
__libc_start_main (@__libc_start_main:44)
_start (@_start:15)
paperdave commented 9 months ago

Fixed in #7650