# fatal error: all goroutines are asleep - deadlock! (send on nil channel)

- **ID:** `go/send-on-nil-channel-blocks`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Sending to or receiving from a nil channel blocks forever. If all goroutines do this, the runtime reports deadlock.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.18 | active | — | — |
| 1.22 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   ch := make(chan int)
   ```
2. **** (85% success)
   ```
   if ch == nil { return }
ch <- v
   ```

## Dead Ends

- **** — Default turns a blocking send into a busy-loop or dropped message, not a fix for the nil channel. (70% fail)
- **** — More goroutines blocked on nil channel just produce the same deadlock. (85% fail)
