You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The panic occurs inside sendRequest.done() at line 1656 of producer_partition.go
MessageID passed to done() is nil ({0x0, 0x0} in the stack trace)
The nil dereference is at offset 0x28 (40 bytes), suggesting a field access on the nil MessageID
This is triggered during producer reconnection when newPartitionProducer (line 239) calls FailTimeoutMessages (line 1006) to clean up timed-out pending messages
The user callback is never reached — the panic happens inside done() before invoking the callback
The issue happens under heavy timeout load (multiple brokers simultaneously returning send timeout errors)
This crash kills the entire Go process since the panic occurs in an internal library goroutine that we cannot recover from
Suggested fix
Add a nil check for MessageID inside sendRequest.done() before accessing any of its fields, or ensure FailTimeoutMessages passes a non-nil sentinel MessageID when failing messages.
Search before asking
Version
v0.17.0
Minimal reproduction steps
SendTimeoutconfigurednewPartitionProducer)FailTimeoutMessagesis called to clean up pending messagessendRequest.done()Expected behavior
FailTimeoutMessagesshould safely fail all pending messages without panicking, even whenMessageIDis nil.Actual behavior
The process panics with:
Analysis
sendRequest.done()at line 1656 ofproducer_partition.goMessageIDpassed todone()is nil ({0x0, 0x0}in the stack trace)0x28(40 bytes), suggesting a field access on the nil MessageIDnewPartitionProducer(line 239) callsFailTimeoutMessages(line 1006) to clean up timed-out pending messagesdone()before invoking the callbackContext
sr.done(). This fix is included in v0.17.0, but the panic still occurs.Suggested fix
Add a nil check for
MessageIDinsidesendRequest.done()before accessing any of its fields, or ensureFailTimeoutMessagespasses a non-nil sentinel MessageID when failing messages.Are you willing to submit a PR?