go
runtime_error
ai_generated
true
fatal error: all goroutines are asleep - deadlock! (channel buffer full)
ID: go/channel-buffer-overflow-block
80%Fix Rate
88%Confidence
0Evidence
2024-09-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 1.0+ | active | — | — | — |
Root Cause
A goroutine attempts to send to a buffered channel that is full, and no receiver is available, causing a deadlock.
generic中文
某个 goroutine 试图向已满的带缓冲 channel 发送数据,且没有接收者,导致死锁。
Workarounds
-
95% success
go func() { for v := range ch { // process } }() -
90% success
select { case ch <- v: default: // handle full buffer }
Dead Ends
Common approaches that don't work:
-
80% fail
May delay but not prevent deadlock if no receiver
-
60% fail
May lose data if not handled properly