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

[Good first issue] Exception while processing response #2303

Open
superhx opened this issue Feb 14, 2025 · 7 comments
Open

[Good first issue] Exception while processing response #2303

superhx opened this issue Feb 14, 2025 · 7 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@superhx
Copy link
Collaborator

superhx commented Feb 14, 2025

Error Log

2025-02-14 09:14:38.114 +0000 ERROR [kafka.network.Processor]  Exception while processing response for 10.132.46.173:9092-10.221.143.9:40948-238589
java.lang.IllegalStateException: Attempt to retrieve channel for which there is no connection. Connection id 10.132.46.173:9092-10.221.143.9:40948-238589 existing connections [...]
	at org.apache.kafka.common.network.Selector.openOrClosingChannelOrFail(Selector.java:1005)
	at org.apache.kafka.common.network.Selector.unmute(Selector.java:771)
	at kafka.network.Processor.processNewResponses(SocketServer.scala:1090)
	at kafka.network.Processor.run(SocketServer.scala:1016)

Expect

  • Check whether the log action is reasonable.
  • If it's reasonable, then degrade it to WARN level.
@superhx superhx added the good first issue Good for newcomers label Feb 14, 2025
@decadezzz
Copy link

could you please assign this task to me?

@renoyuan
Copy link

renoyuan commented Mar 6, 2025

/assign

@fjhdream
Copy link

fjhdream commented Mar 6, 2025

Description

There is a proposal to downgrade the error level in Selector.openOrClosingChannelOrFail method from throwing an IllegalStateException to a WARN level log. After careful analysis, I believe this change would be inappropriate for the following reasons:

Analysis

  1. Based on the error call stack, this issue occurs when processing an EndThrottlingResponse in the processNewResponses() method.
  2. This error can only be triggered if a StartThrottlingResponse has been previously processed for the same channel.
  3. This suggests an abnormal situation where the KafkaChannel has been prematurely removed from the channels map, which indicates a potential bug or race condition in the code.

Reasoning

Downgrading this error to a WARN level would hide a legitimate issue that should be addressed. The IllegalStateException correctly indicates that the system has reached an inconsistent state:
A channel was throttled (via StartThrottlingResponse)
Later, when trying to unthrottle it (via EndThrottlingResponse), the channel no longer exists
This sequence should not happen in normal operation.

@cdxiaodong
Copy link

/assign

@superhx superhx assigned cdxiaodong and fjhdream and unassigned cdxiaodong Mar 8, 2025
@K-onsuki
Copy link

K-onsuki commented Mar 9, 2025

/assign

@mxllAs
Copy link

mxllAs commented Mar 13, 2025

/assign

1 similar comment
@Zhang-BC-05
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

8 participants