This bug is still present in the just released socat 126.96.36.199
After some more talking with upstream, it seems that the testing script fails for reasons unrelated to socat:
with this example script using SCTP I often get "Broken pipe" errors on client write. They a caused by the fact that the server/listener runs in
background detached from stdin, but wants to read from stdin. It gets EOF and consequently shuts down the SCTP connection. When the client is
not quick enough with writing the connection is already closed, thus that error.
To work around this effect run the example server in unidirectional mode, not using stdin:
socat -4 -U - SCTP-LISTEN:9999 &
btw, with TCP that script would succeed due to half close feature.
I believe we should close this as NOTABUG.
Thanks for looking into it! I am fine with close it and there is a workaround.
Could you explain why this issue only happen on VM not on bare metal?
I am not sure why, I guess it is a harder race condition on metal ?
Thanks, I will close this bug.