All of lore.kernel.org
 help / color / mirror / Atom feed
* Build failure
@ 2012-11-14  9:15 Andreas Müller
  2012-11-14  9:30 ` Andreas Müller
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Müller @ 2012-11-14  9:15 UTC (permalink / raw)
  To: openembedded-core

Ciao,

with latest layer HEADS and build from scratch I get:

KeyError: 'getpwnam(): name not found: root'

ERROR: The stack trace of python calls that resulted in this
exception/failure was:
ERROR:   File "fixup_perms", line 227, in <module>
ERROR:
ERROR:   File "fixup_perms", line 155, in fixup_perms
ERROR:
ERROR:   File "fixup_perms", line 32, in __init__
ERROR:
ERROR:   File "fixup_perms", line 42, in _setdir
ERROR:
ERROR:   File "fixup_perms", line 66, in _procuid
ERROR:
ERROR: The code that was being executed was:
ERROR:      0223:                    each_file = os.path.join(root, f)
ERROR:      0224:                    fix_perms(each_file,
fs_perms_table[dir].fmode, fs_perms_table[dir].fuid,
fs_perms_table[dir].fgid, dir)
ERROR:      0225:
ERROR:      0226:
ERROR:  *** 0227:fixup_perms(d)
ERROR:      0228:
ERROR: [From file: 'fixup_perms', lineno: 227, function: <module>]
ERROR:      0151:    for path in target_path_vars:
ERROR:      0152:        dir = d.getVar(path, True) or ""
ERROR:      0153:        if dir == "":
ERROR:      0154:            continue
ERROR:  *** 0155:        fs_perms_table[dir] =
fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir),
d))
ERROR:      0156:
ERROR:      0157:    # Now we actually load from the configuration files
ERROR:      0158:    for conf in get_fs_perms_list(d).split():
ERROR:      0159:        if os.path.exists(conf):
ERROR: [From file: 'fixup_perms', lineno: 155, function: fixup_perms]
ERROR: Function failed: fixup_perms
ERROR: Logfile of failure stored in:
/home/andreas/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/util-macros-1_1.17-r0/temp/log.do_package.28653
ERROR: Task 4450
(/home/andreas/data/oe-core/sources/openembedded-core/meta/recipes-graphics/xorg-util/util-macros_1.17.bb,
do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3985 tasks of which 397 didn't need to
be rerun and 1 failed.

The only additional information I found up to now:

* the code mentioned in error message is found in package.bbclass.
* in sysroot/etc/passwd there is a line 'root::0:0:root:/home/root:/bin/sh'

Any ideas?

Andreas



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Build failure
  2012-11-14  9:15 Build failure Andreas Müller
@ 2012-11-14  9:30 ` Andreas Müller
  2014-04-04 17:18   ` util-macros.do_package failed " Robert Yang
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Müller @ 2012-11-14  9:30 UTC (permalink / raw)
  To: openembedded-core

On Wed, Nov 14, 2012 at 10:15 AM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> Ciao,
>
> with latest layer HEADS and build from scratch I get:
>
> KeyError: 'getpwnam(): name not found: root'
>
> ERROR: The stack trace of python calls that resulted in this
> exception/failure was:
> ERROR:   File "fixup_perms", line 227, in <module>
> ERROR:
> ERROR:   File "fixup_perms", line 155, in fixup_perms
> ERROR:
> ERROR:   File "fixup_perms", line 32, in __init__
> ERROR:
> ERROR:   File "fixup_perms", line 42, in _setdir
> ERROR:
> ERROR:   File "fixup_perms", line 66, in _procuid
> ERROR:
> ERROR: The code that was being executed was:
> ERROR:      0223:                    each_file = os.path.join(root, f)
> ERROR:      0224:                    fix_perms(each_file,
> fs_perms_table[dir].fmode, fs_perms_table[dir].fuid,
> fs_perms_table[dir].fgid, dir)
> ERROR:      0225:
> ERROR:      0226:
> ERROR:  *** 0227:fixup_perms(d)
> ERROR:      0228:
> ERROR: [From file: 'fixup_perms', lineno: 227, function: <module>]
> ERROR:      0151:    for path in target_path_vars:
> ERROR:      0152:        dir = d.getVar(path, True) or ""
> ERROR:      0153:        if dir == "":
> ERROR:      0154:            continue
> ERROR:  *** 0155:        fs_perms_table[dir] =
> fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir),
> d))
> ERROR:      0156:
> ERROR:      0157:    # Now we actually load from the configuration files
> ERROR:      0158:    for conf in get_fs_perms_list(d).split():
> ERROR:      0159:        if os.path.exists(conf):
> ERROR: [From file: 'fixup_perms', lineno: 155, function: fixup_perms]
> ERROR: Function failed: fixup_perms
> ERROR: Logfile of failure stored in:
> /home/andreas/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/util-macros-1_1.17-r0/temp/log.do_package.28653
> ERROR: Task 4450
> (/home/andreas/data/oe-core/sources/openembedded-core/meta/recipes-graphics/xorg-util/util-macros_1.17.bb,
> do_package) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 3985 tasks of which 397 didn't need to
> be rerun and 1 failed.
>
> The only additional information I found up to now:
>
> * the code mentioned in error message is found in package.bbclass.
> * in sysroot/etc/passwd there is a line 'root::0:0:root:/home/root:/bin/sh'
>
> Any ideas?
>
Additional info: After running

bitbake -ccleansstate util-macros util-macros-native

the build continues as without issues. Some missing dependency race?

Andreas



^ permalink raw reply	[flat|nested] 7+ messages in thread

* util-macros.do_package failed Re: Build failure
  2012-11-14  9:30 ` Andreas Müller
@ 2014-04-04 17:18   ` Robert Yang
  2014-04-04 20:01     ` Burton, Ross
  2014-04-05  8:29     ` Robert Yang
  0 siblings, 2 replies; 7+ messages in thread
From: Robert Yang @ 2014-04-04 17:18 UTC (permalink / raw)
  To: Andreas Müller, openembedded-core


Hi Andreas,

I met the error on the master, we seldom met this error, but we did meet
it once in a while, I did several rough investigations, I think that the
problem is happened when etc/passwd is being created but is null before
write anything into it, and the util-macros.do_package runs right at the
same time, here is a hack way to reproduce it: (Use qemux86 as an example):

$ bitbake base-passwd

# Move the passwd file
$ mv tmp/sysroots/qemux86/etc/passwd tmp/sysroots/qemux86/etc/passwd.bak

# Create a passwd file which is null
$ touch tmp/sysroots/qemux86/etc/passwd

$ bitbake util-macros

Then we will see the errors.

The build is be OK if there is no tmp/sysroots/qemux86/etc/passwd, maybe
the pwd.getpwnam() reads the host's /etc/passwd when there is no
tmp/sysroots/qemux86/etc/passwd (not sure about this). but it would fail
if it exists and is null.

Maybe we can let the do_package depend on base-passwd:do_populate_sysroot
to fix the problem.

Will do more investigations tomorrow.

Night.

// Robert

On 11/14/2012 05:30 PM, Andreas Müller wrote:
> On Wed, Nov 14, 2012 at 10:15 AM, Andreas Müller
> <schnitzeltony@googlemail.com> wrote:
>> Ciao,
>>
>> with latest layer HEADS and build from scratch I get:
>>
>> KeyError: 'getpwnam(): name not found: root'
>>
>> ERROR: The stack trace of python calls that resulted in this
>> exception/failure was:
>> ERROR:   File "fixup_perms", line 227, in <module>
>> ERROR:
>> ERROR:   File "fixup_perms", line 155, in fixup_perms
>> ERROR:
>> ERROR:   File "fixup_perms", line 32, in __init__
>> ERROR:
>> ERROR:   File "fixup_perms", line 42, in _setdir
>> ERROR:
>> ERROR:   File "fixup_perms", line 66, in _procuid
>> ERROR:
>> ERROR: The code that was being executed was:
>> ERROR:      0223:                    each_file = os.path.join(root, f)
>> ERROR:      0224:                    fix_perms(each_file,
>> fs_perms_table[dir].fmode, fs_perms_table[dir].fuid,
>> fs_perms_table[dir].fgid, dir)
>> ERROR:      0225:
>> ERROR:      0226:
>> ERROR:  *** 0227:fixup_perms(d)
>> ERROR:      0228:
>> ERROR: [From file: 'fixup_perms', lineno: 227, function: <module>]
>> ERROR:      0151:    for path in target_path_vars:
>> ERROR:      0152:        dir = d.getVar(path, True) or ""
>> ERROR:      0153:        if dir == "":
>> ERROR:      0154:            continue
>> ERROR:  *** 0155:        fs_perms_table[dir] =
>> fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir),
>> d))
>> ERROR:      0156:
>> ERROR:      0157:    # Now we actually load from the configuration files
>> ERROR:      0158:    for conf in get_fs_perms_list(d).split():
>> ERROR:      0159:        if os.path.exists(conf):
>> ERROR: [From file: 'fixup_perms', lineno: 155, function: fixup_perms]
>> ERROR: Function failed: fixup_perms
>> ERROR: Logfile of failure stored in:
>> /home/andreas/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/util-macros-1_1.17-r0/temp/log.do_package.28653
>> ERROR: Task 4450
>> (/home/andreas/data/oe-core/sources/openembedded-core/meta/recipes-graphics/xorg-util/util-macros_1.17.bb,
>> do_package) failed with exit code '1'
>> NOTE: Tasks Summary: Attempted 3985 tasks of which 397 didn't need to
>> be rerun and 1 failed.
>>
>> The only additional information I found up to now:
>>
>> * the code mentioned in error message is found in package.bbclass.
>> * in sysroot/etc/passwd there is a line 'root::0:0:root:/home/root:/bin/sh'
>>
>> Any ideas?
>>
> Additional info: After running
>
> bitbake -ccleansstate util-macros util-macros-native
>
> the build continues as without issues. Some missing dependency race?
>
> Andreas
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: util-macros.do_package failed Re: Build failure
  2014-04-04 17:18   ` util-macros.do_package failed " Robert Yang
@ 2014-04-04 20:01     ` Burton, Ross
  2014-04-04 22:44       ` Richard Purdie
  2014-04-05  8:29     ` Robert Yang
  1 sibling, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2014-04-04 20:01 UTC (permalink / raw)
  To: Robert Yang; +Cc: OE-core

On 4 April 2014 18:18, Robert Yang <liezhi.yang@windriver.com> wrote:
> Maybe we can let the do_package depend on base-passwd:do_populate_sysroot
> to fix the problem.

I keep on thinking that we need to effectively have a readers/writer
lock on the sysroot, so that e.g. do_compile() takes a read lock and
do_populate_sysroot() takes a write lock.  This way very slim races
such as this (and aclocal disappearing, and binaries being re-written
whilst being executed, etc) just can't happen.  By having a
readers/writer lock the stalls for the actual populate of the sysroot
shouldn't have too great an impact, and would let us remove other
workarounds we've added (such as the baroque aclocal-copy).

Ross


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: util-macros.do_package failed Re: Build failure
  2014-04-04 20:01     ` Burton, Ross
@ 2014-04-04 22:44       ` Richard Purdie
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2014-04-04 22:44 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Fri, 2014-04-04 at 21:01 +0100, Burton, Ross wrote:
> On 4 April 2014 18:18, Robert Yang <liezhi.yang@windriver.com> wrote:
> > Maybe we can let the do_package depend on base-passwd:do_populate_sysroot
> > to fix the problem.
> 
> I keep on thinking that we need to effectively have a readers/writer
> lock on the sysroot, so that e.g. do_compile() takes a read lock and
> do_populate_sysroot() takes a write lock.  This way very slim races
> such as this (and aclocal disappearing, and binaries being re-written
> whilst being executed, etc) just can't happen.  By having a
> readers/writer lock the stalls for the actual populate of the sysroot
> shouldn't have too great an impact, and would let us remove other
> workarounds we've added (such as the baroque aclocal-copy).

We've tried this before and "shouldn't" doesn't work out too well in
practice.

The aclocal-copy business is actually now an improvement since it only
accesses things it depends upon which is a good thing as far as I'm
concerned. Other ways we could possibly improve:

a) Atomically moves files into the sysroot (and I guess move and delete
for atomic removal). This means they can't "half" be there.

b) Move libs in before binaries. This way a binary can't get run before
its dependencies are there.

This all continues to hack around the fact its a shared area though and
I'd imagine regardless of what tricks you play and even if you add in
locks, there will still be determinism issues.

The conclusion you then reach is that the only way you can ultimately
solve things is a sysroot per build item. You could do something that
would perform moderately well with a directory per sysroot item, then
hardlink these into individual sysroots per workdir.

In many ways, the aclocal-copy change is an experiment for that, we
should now have the pieces where we could implement such a thing...

Cheers,

Richard



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: util-macros.do_package failed Re: Build failure
  2014-04-04 17:18   ` util-macros.do_package failed " Robert Yang
  2014-04-04 20:01     ` Burton, Ross
@ 2014-04-05  8:29     ` Robert Yang
  2014-04-05  9:33       ` Richard Purdie
  1 sibling, 1 reply; 7+ messages in thread
From: Robert Yang @ 2014-04-05  8:29 UTC (permalink / raw)
  To: Andreas Müller, openembedded-core



On 04/05/2014 01:18 AM, Robert Yang wrote:
>
> Hi Andreas,
>
> I met the error on the master, we seldom met this error, but we did meet
> it once in a while, I did several rough investigations, I think that the
> problem is happened when etc/passwd is being created but is null before
> write anything into it, and the util-macros.do_package runs right at the
> same time, here is a hack way to reproduce it: (Use qemux86 as an example):
>
> $ bitbake base-passwd
>
> # Move the passwd file
> $ mv tmp/sysroots/qemux86/etc/passwd tmp/sysroots/qemux86/etc/passwd.bak
>
> # Create a passwd file which is null
> $ touch tmp/sysroots/qemux86/etc/passwd
>
> $ bitbake util-macros
>
> Then we will see the errors.
>
> The build is be OK if there is no tmp/sysroots/qemux86/etc/passwd, maybe
> the pwd.getpwnam() reads the host's /etc/passwd when there is no
> tmp/sysroots/qemux86/etc/passwd (not sure about this). but it would fail
> if it exists and is null.
>
> Maybe we can let the do_package depend on base-passwd:do_populate_sysroot
> to fix the problem.
>

It seems that this is not a good idea since once we add the following line,
it would cause all the target recipe's do_package depends on
base-passwd:do_populate_sysroot, this would cause the arch "all" depends on
eglibc since base-passwd depends on eglibc, we may need fix in another way.

do_package[depends] += "base-passwd:do_populate_sysroot"

// Robert

> Will do more investigations tomorrow.
>
> Night.
>
> // Robert
>
> On 11/14/2012 05:30 PM, Andreas Müller wrote:
>> On Wed, Nov 14, 2012 at 10:15 AM, Andreas Müller
>> <schnitzeltony@googlemail.com> wrote:
>>> Ciao,
>>>
>>> with latest layer HEADS and build from scratch I get:
>>>
>>> KeyError: 'getpwnam(): name not found: root'
>>>
>>> ERROR: The stack trace of python calls that resulted in this
>>> exception/failure was:
>>> ERROR:   File "fixup_perms", line 227, in <module>
>>> ERROR:
>>> ERROR:   File "fixup_perms", line 155, in fixup_perms
>>> ERROR:
>>> ERROR:   File "fixup_perms", line 32, in __init__
>>> ERROR:
>>> ERROR:   File "fixup_perms", line 42, in _setdir
>>> ERROR:
>>> ERROR:   File "fixup_perms", line 66, in _procuid
>>> ERROR:
>>> ERROR: The code that was being executed was:
>>> ERROR:      0223:                    each_file = os.path.join(root, f)
>>> ERROR:      0224:                    fix_perms(each_file,
>>> fs_perms_table[dir].fmode, fs_perms_table[dir].fuid,
>>> fs_perms_table[dir].fgid, dir)
>>> ERROR:      0225:
>>> ERROR:      0226:
>>> ERROR:  *** 0227:fixup_perms(d)
>>> ERROR:      0228:
>>> ERROR: [From file: 'fixup_perms', lineno: 227, function: <module>]
>>> ERROR:      0151:    for path in target_path_vars:
>>> ERROR:      0152:        dir = d.getVar(path, True) or ""
>>> ERROR:      0153:        if dir == "":
>>> ERROR:      0154:            continue
>>> ERROR:  *** 0155:        fs_perms_table[dir] =
>>> fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir),
>>> d))
>>> ERROR:      0156:
>>> ERROR:      0157:    # Now we actually load from the configuration files
>>> ERROR:      0158:    for conf in get_fs_perms_list(d).split():
>>> ERROR:      0159:        if os.path.exists(conf):
>>> ERROR: [From file: 'fixup_perms', lineno: 155, function: fixup_perms]
>>> ERROR: Function failed: fixup_perms
>>> ERROR: Logfile of failure stored in:
>>> /home/andreas/tmp/oe-core-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/util-macros-1_1.17-r0/temp/log.do_package.28653
>>>
>>> ERROR: Task 4450
>>> (/home/andreas/data/oe-core/sources/openembedded-core/meta/recipes-graphics/xorg-util/util-macros_1.17.bb,
>>>
>>> do_package) failed with exit code '1'
>>> NOTE: Tasks Summary: Attempted 3985 tasks of which 397 didn't need to
>>> be rerun and 1 failed.
>>>
>>> The only additional information I found up to now:
>>>
>>> * the code mentioned in error message is found in package.bbclass.
>>> * in sysroot/etc/passwd there is a line 'root::0:0:root:/home/root:/bin/sh'
>>>
>>> Any ideas?
>>>
>> Additional info: After running
>>
>> bitbake -ccleansstate util-macros util-macros-native
>>
>> the build continues as without issues. Some missing dependency race?
>>
>> Andreas
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: util-macros.do_package failed Re: Build failure
  2014-04-05  8:29     ` Robert Yang
@ 2014-04-05  9:33       ` Richard Purdie
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2014-04-05  9:33 UTC (permalink / raw)
  To: Robert Yang; +Cc: openembedded-core

On Sat, 2014-04-05 at 16:29 +0800, Robert Yang wrote:
> 
> On 04/05/2014 01:18 AM, Robert Yang wrote:
> >
> > Hi Andreas,
> >
> > I met the error on the master, we seldom met this error, but we did meet
> > it once in a while, I did several rough investigations, I think that the
> > problem is happened when etc/passwd is being created but is null before
> > write anything into it, and the util-macros.do_package runs right at the
> > same time, here is a hack way to reproduce it: (Use qemux86 as an example):
> >
> > $ bitbake base-passwd
> >
> > # Move the passwd file
> > $ mv tmp/sysroots/qemux86/etc/passwd tmp/sysroots/qemux86/etc/passwd.bak
> >
> > # Create a passwd file which is null
> > $ touch tmp/sysroots/qemux86/etc/passwd
> >
> > $ bitbake util-macros
> >
> > Then we will see the errors.
> >
> > The build is be OK if there is no tmp/sysroots/qemux86/etc/passwd, maybe
> > the pwd.getpwnam() reads the host's /etc/passwd when there is no
> > tmp/sysroots/qemux86/etc/passwd (not sure about this). but it would fail
> > if it exists and is null.
> >
> > Maybe we can let the do_package depend on base-passwd:do_populate_sysroot
> > to fix the problem.
> >
> 
> It seems that this is not a good idea since once we add the following line,
> it would cause all the target recipe's do_package depends on
> base-passwd:do_populate_sysroot, this would cause the arch "all" depends on
> eglibc since base-passwd depends on eglibc, we may need fix in another way.
> 
> do_package[depends] += "base-passwd:do_populate_sysroot"

This is very similar to the issue:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=5612

I think I'm leaning in favour of putting in a basic passwd/group file
into the sysroot, even if we have to maintain such a copy ourselves.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-05  9:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14  9:15 Build failure Andreas Müller
2012-11-14  9:30 ` Andreas Müller
2014-04-04 17:18   ` util-macros.do_package failed " Robert Yang
2014-04-04 20:01     ` Burton, Ross
2014-04-04 22:44       ` Richard Purdie
2014-04-05  8:29     ` Robert Yang
2014-04-05  9:33       ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.