[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-users
Subject:    Re: error writing to stdout
From:       Mike Pumford <mpumford () mudcovered ! org ! uk>
Date:       2018-12-13 18:11:27
Message-ID: c98da911-1f84-c4fa-d737-320609093bf8 () mudcovered ! org ! uk
[Download RAW message or body]



On 13/12/2018 18:01, Mike Pumford wrote:

> I've dropped pkgsrc-users as while its package builds that are causing 
> the blow up this is clearly a system issue not a package issue.
> 
Okay. I've just dug into stdio and the kernel and one obvious thing is 
that libc calling write() doesn't handle EINTR which seems like a huge 
hole but perhaps there is some system knowledge I'm missing here?

Since the problem is being seen with make/gmake there could well be a 
lot of SIGCHLD signals floating around as the various processes exit. If 
that coincided with a stdio write to a slow device at the wrong point in 
time we would get an unexpected error back from the underlying write 
call which would then mess up the stream state and block further IO 
which seems to match the symptoms.

__sflush doesn't handle that in lib/libc/stdio/fflush.c. Doesn't look on 
the surface like any of the libc functions do.

Mike
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic