Skip to content

[dv,tcp_server] avoid conn-related assertion #27427

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kwalker27
Copy link
Contributor

Treat more errors from read/send as non-fatal, just closing the connection and allowing a new client to attach. It's preferable to avoid assertions for runtime conditions that are potentially recoverable.

Treat more errors from read/send as non-fatal, just closing the
connection and allowing a new client to attach. It's preferable to
avoid assertions for runtime conditions that are potentially
recoverable.

Signed-off-by: Kip Walker <kip@rivosinc.com>
@kwalker27 kwalker27 requested a review from a team as a code owner June 12, 2025 14:41
@kwalker27 kwalker27 requested review from hcallahan-lowrisc, rswarbrick and Razer6 and removed request for a team and hcallahan-lowrisc June 12, 2025 14:41
@andreaskurth andreaskurth requested a review from luismarques June 13, 2025 06:14
@andreaskurth
Copy link
Contributor

andreaskurth commented Jun 13, 2025

@luismarques Potentially someone from the SW team has related expertise and could review this?

@luismarques luismarques requested a review from nbdd0121 June 13, 2025 10:24
@nbdd0121
Copy link
Contributor

What error code are you observing? ECONNRESET? I'd prefer to add relevant error codes instead of silently treating all error codes as network issues.

Also -- read with 0 bytes returned means graceful disconnection from other side -- we should probably treat as such. (although this is an issue with existing code)

@kwalker27
Copy link
Contributor Author

kwalker27 commented Jun 17, 2025

What error code are you observing? ECONNRESET? I'd prefer to add relevant error codes instead of silently treating all error codes as network issues.

Also -- read with 0 bytes returned means graceful disconnection from other side -- we should probably treat as such. (although this is an issue with existing code)

Yes, one case was definitely ECONNRESET. I can add the 0 return value handling. I guess I still wonder which other possible errno values from read and send would warrant an assertion that blows up our emulation model, which is a shared and long-running resource.

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

Successfully merging this pull request may close these issues.

3 participants