Freeze on __write_nocancel Freeze on __write_nocancel unix unix

Freeze on __write_nocancel


You said that the output is being written to stderr. If stderr is not being constantly read by a separate process, the I/O buffer may be full so it is waiting for stderr to be read before it writes more.

If process A is writing to stderr and process B normally reads from stderr but is currently waiting on process A, this could cause deadlock. In your case, it could only cause deadlock if the write to stderr is too large since a smaller write would succeed immediately and free process A, thus freeing process B to read from stderr.

This is some speculation on my part but in general I would assume that your issue is that you're waiting to write to a full buffer.