Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes crashed by goroutine deadlock #1842

Closed
baurine opened this issue Dec 10, 2021 · 7 comments
Closed

Sometimes crashed by goroutine deadlock #1842

baurine opened this issue Dec 10, 2021 · 7 comments

Comments

@baurine
Copy link

baurine commented Dec 10, 2021

Error message:

[17:20:33] Starting 'esbuild:build'...
Build started
Build ended: 4858ms
fatal error: all goroutines are asleep - deadlock!
[17:20:42] Finished 'esbuild:build' after 9.27 s
[17:20:42] Finished 'build' after 17 s

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0x0)
        runtime/sema.go:56 +0x25
sync.(*WaitGroup).Wait(0xc0000b8000)
        sync/waitgroup.go:130 +0x71
main.runService(0x1)
        github.com/evanw/esbuild/cmd/esbuild/service.go:138 +0x4cb
main.main()
        github.com/evanw/esbuild/cmd/esbuild/main.go:203 +0x1eb

goroutine 18 [chan receive]:
main.runService.func1()
        github.com/evanw/esbuild/cmd/esbuild/service.go:66 +0x4b
created by main.runService
        github.com/evanw/esbuild/cmd/esbuild/service.go:64 +0x212

goroutine 19 [chan receive]:
main.(*serviceType).sendRequest(0xc0000d2140, {0x80ecc0, 0xc00aea3260})
        github.com/evanw/esbuild/cmd/esbuild/service.go:163 +0xda
main.runService.func2()
        github.com/evanw/esbuild/cmd/esbuild/service.go:92 +0x39
created by main.runService
        github.com/evanw/esbuild/cmd/esbuild/service.go:89 +0x313
Done in 17.36s.

It does not always happen, but I met this error several times in 3 weeks.

esbuild version: 0.13.14

@evanw
Copy link
Owner

evanw commented Dec 11, 2021

Sorry but there's nothing I can do with this report. You would need to provide a way to reproduce this for me to fix it. Marking as unactionable.

@baurine
Copy link
Author

baurine commented Dec 12, 2021

Sorry but there's nothing I can do with this report. You would need to provide a way to reproduce this for me to fix it. Marking as unactionable.

understandable.

@evanw
Copy link
Owner

evanw commented Jan 6, 2022

I'm going to close this issue since there's nothing I can do here. I'm happy to fix any issues that I can reproduce but I'll need a way to reproduce it.

@evanw evanw closed this as completed Jan 6, 2022
@chrisvariety
Copy link

Just ran into this myself. If it's helpful for anyone else, restarting my computer solved it--

@MarcCelani-at
Copy link

MarcCelani-at commented May 17, 2022

We are seeing something like this:

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0x987980?)
	runtime/sema.go:56 +0x25
sync.(*WaitGroup).Wait(0xc00013a000?)
	sync/waitgroup.go:136 +0x52
main.runService(0x1)
	github.com/evanw/esbuild/cmd/esbuild/service.go:177 +0x43b
main.main()
	github.com/evanw/esbuild/cmd/esbuild/main.go:208 +0x1f0

goroutine 18 [chan receive]:
main.runService.func1()
	github.com/evanw/esbuild/cmd/esbuild/service.go:110 +0x5a
created by main.runService
	github.com/evanw/esbuild/cmd/esbuild/service.go:108 +0x16b

goroutine 19 [chan receive]:
main.(*serviceType).sendRequest(0xc00013e2c0, {0x85f340, 0xc022a21530})
	github.com/evanw/esbuild/cmd/esbuild/service.go:203 +0xfa
main.runService.func2()
	github.com/evanw/esbuild/cmd/esbuild/service.go:132 +0x39
created by main.runService

I know this isn't a repro case (this is happening on our monorepo, so not exactly easy to share with you) but just adding to this list of affected users.

This is on 0.14.36

@tanduongfinblox
Copy link

I have just run into it. My code run as normal yesterday and today I got this error message:

npm run dev

> dev
> concurrently "npm run dev:css" "NODE_ENV=development remix dev"

[0] 
[0] > dev:css
[0] > tailwindcss -w -i ./styles/app.css -o app/styles/app.generated.css
[0] 
[0] 
[0] Rebuilding...
[0] Done in 250ms.
[1] Watching Remix app in development mode...
[1] 💿 Built in 528ms
[1] Remix App Server started at http://localhost:3000 (http://192.168.1.6:3000)
[1] Error: Promise rejected with value: NodeResponse [Response] {
[1]   size: 0,
[1]   [Symbol(Body internals)]: {
[1]     body: null,
[1]     type: null,
[1]     size: 0,
[1]     boundary: null,
[1]     disturbed: false,
[1]     error: null
[1]   },
[1]   [Symbol(Response internals)]: {
[1]     url: undefined,
[1]     status: 302,
[1]     statusText: '',
[1]     headers: {
[1]       location: '/login',
[1]       'set-cookie': '_session=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; HttpOnly; SameSite=Lax'
[1]     },
[1]     counter: 0,
[1]     highWaterMark: undefined
[1]   }
[1] }
[1]     at process.<anonymous> (/Users/tanduong/Documents/Code/finblox/monorep/web/app/node_modules/hard-rejection/index.js:15:12)
[1]     at process.emit (node:events:390:28)
[1]     at process.emit (/Users/tanduong/Documents/Code/finblox/monorep/web/app/node_modules/source-map-support/source-map-support.js:516:21)
[1]     at emit (node:internal/process/promises:136:22)
[1]     at processPromiseRejections (node:internal/process/promises:242:25)
[1]     at processTicksAndRejections (node:internal/process/task_queues:97:32)
[1] fatal error: all goroutines are asleep - deadlock!
[1] 
[1] goroutine 1 [semacquire]:
[1] sync.runtime_Semacquire(0x14000113b50)
[1]     runtime/sema.go:56 +0x38
[1] sync.(*WaitGroup).Wait(0x14000113b48)
[1]     sync/waitgroup.go:130 +0xa4
[1] main.runService(0x1)
[1]     github.com/evanw/esbuild/cmd/esbuild/service.go:177 +0x42c
[1] main.main()
[1]     github.com/evanw/esbuild/cmd/esbuild/main.go:207 +0x1f0
[1] 
[1] goroutine 18 [chan receive]:
[1] main.runService.func1(0x14000113b30)
[1]     github.com/evanw/esbuild/cmd/esbuild/service.go:110 +0x58
[1] created by main.runService
[1]     github.com/evanw/esbuild/cmd/esbuild/service.go:108 +0x13c
[1] 
goroutine 19 [chan receive]:
[1] main.(*serviceType).sendRequest(0x14000113b30, {0x104fcd4e0, 0x1400905a330})
[1]     github.com/evanw/esbuild/cmd/esbuild/service.go:203 +0x128
[1] main.runService.func2(0x14000113b30)
[1]     github.com/evanw/esbuild/cmd/esbuild/service.go:132 +0x40
[1] created by main.runService
[1]     github.com/evanw/esbuild/cmd/esbuild/service.go:129 +0x24c
[1] NODE_ENV=development remix dev exited with code 1

@CanRau
Copy link

CanRau commented Aug 3, 2022

Anyone using Prisma could try prisma generate which should fix it according to prisma/prisma#12016

Unfortunately I'm not using Prisma but better-sqlite3 instead and still run into the exact problem.

It started around a week ago right before vacation and I'm not exactly sure what I did (git won't help much in this case) I've got it temporarily fixed just to crash again and can't get it back working 😰

Sadly it's really hard to tell (for me) from the error what's causing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants