Missing error paths in `write`
Closed this issue · 2 comments
pqwy commented
TCP, being a FLOW
, has a write function whose type allows for signalling of errors.
But the actual implementation of write
doesn't seem to attempt to do so.
Therefore, when a unikernel connects via TCP and starts writing, if the other end closes the connection, the write
hangs indefinitely somewhere below Pcb.write_wait_for
, even after the lower level decides to give up.
I also hit upon a memory leak with a unikernel that just keeps sending logs over TCP, but so far I failed to come up with a minimal case that reproduces this. I believe it's the hung writes keeping the buffer they've been given alive.