[U-Boot] Fwd: Parallel build is broken

Max Filippov jcmvbkbc at gmail.com
Wed Sep 12 03:01:37 UTC 2018


On Mon, Sep 10, 2018 at 11:46 AM, Trent Piepho <tpiepho at impinj.com> wrote:
> On Wed, 2018-09-05 at 06:57 -0500, Adam Ford wrote:
>> On Wed, Sep 5, 2018 at 3:46 AM Alex Kiernan <alex.kiernan at gmail.com> wrote:
>> >
>> > On Tue, Sep 4, 2018 at 3:54 PM Andy Shevchenko
>> > <andy.shevchenko at gmail.com> wrote:
>> > >
>> > > On Tue, Sep 4, 2018 at 5:50 PM Andy Shevchenko
>> > > <andy.shevchenko at gmail.com> wrote:
>> > > >
>> > > > On Tue, Sep 4, 2018 at 5:00 PM Tom Rini <trini at konsulko.com> wrote:
>> > > > >
>> > > > > On Tue, Sep 04, 2018 at 03:42:05PM +0300, Andy Shevchenko wrote:
>> > > > >
>> > > > > > ---------- Forwarded message ---------
>> > > > > > From: Andy Shevchenko <andy.shevchenko at gmail.com>
>> > > > > > Date: Tue, Sep 4, 2018 at 3:40 PM
>> > > > > > Subject: Parallel build is broken
>> > > > > > To: Tom Rini <trini at konsulko.com>
>> > > > > > Cc: Bin Meng <bmeng.cn at gmail.com>, Simon Glass <sjg at chromium.org>
>> > > > > >
>> > > > > >
>> > > > > > U-Boot can't be build with make -j16.
>> > > > > >
>> > > > > > Second pass passes fine.
>> > > > > >
>> > > > > > Didn't investigate myself and probably will not have time (near to
>> > > > > > vacation time for me).
>> > > > > > So, please, fix it before release.
>> > > > > >
>> > > > > > sh: echo: I/O error
>> > > > > > make[1]: *** [scripts/Makefile.build:278: common/malloc_simple.o] Error 1
>>
>> I am no expert, but I/O error to me indicates a hardware problem on
>> the build machine and not necessarily a software issue.
>
> I doubt that is the issue.  While EIO can be returned in response to a
> hardware failure, it would be very random and most likely affect
> something - the linker, a compiler - that process a lot of files or
> data, not an echo command.
>
>
>> > I've seen this problem - building inside a VMware VM. I've always
>> > found that logging out and back in appears to fix it, so possibly
>> > something related to the session... I've similarly failed to figure
>> > out what the problem is as it comes and goes.
>
> This is likely on track to the real problem.  What happened is
> something echo did returned EIO as an errno.  That failing syscall was
> probably a write(3), since echo doesn't do a whole lot else!  And why
> can write(3) return EIO, besides a hardware error?
>
>        EIO    The process is a member of  a  background  process  group
>               attempting  to  write to its controlling terminal, TOSTOP
>               is set, the calling thread is not blocking  SIGTTOU,  the
>               process is not ignoring SIGTTOU, and the process group of
>               the process is orphaned. This error may also be  returned
>               under implementation-defined conditions.
>
> I think there's a $(shell echo something &) or something like that
> somewhere.

I observe similar issue when I build QEMU except that its makefiles
use 'printf' instead of 'echo' in the 'quiet-command' macro. But I observe
the same issue even when building with V=1, i.e. when 'printf' is not
used. In that case the error comes from the make itself.
I tested a range of make versions from 3.81 to 4.2.1 and see the issue
with all of them.

When it happens under strace it looks like this (make V=0):

8341  write(1, "  CC      arch/AArch64/AArch64Di"..., 45) = -1 EAGAIN
(Resource temporarily unavailable)

or this (make V=1):

31716 write(1, "c++  -I/usr/include/pixman-1  -W"..., 1024) = 1024
31716 write(1, "tcg-op-gvec.o tcg/tcg-common.o t"..., 10240) = 7936
31716 write(1, "ut-keymap.o ../ui/input-legacy.o"..., 2304) = -1
EAGAIN (Resource temporarily unavailable)
31716 write(1, "\n", 1)                 = 1

I suspect that it's a kernel issue, as I started to notice it after the
system upgrade from Debian 8 to Debian 9.

-- 
Thanks.
-- Max


More information about the U-Boot mailing list