Openembedded Core Discussions
 help / color / mirror / Atom feed
* do_root_fs failing on flock command
@ 2013-08-27 12:07 Jack Mitchell
  2013-08-27 12:16 ` Phil Blundell
  2013-08-27 12:21 ` Richard Purdie
  0 siblings, 2 replies; 5+ messages in thread
From: Jack Mitchell @ 2013-08-27 12:07 UTC (permalink / raw)
  To: openembedded-core

I'm attempting to build core-image-minimal using oe-core + 
meta-beagleboard on an NFS mount. I'm running into the following error:

> [jack@archAntec beaglebone]$ bitbake core-image-minimal
> Loading cache: 100% 
> |#######################################################################################################| 
> ETA:  00:00:00
> Loaded 1193 entries from dependency cache.
>
> Build Configuration:
> BB_VERSION        = "1.19.1"
> BUILD_SYS         = "x86_64-linux"
> NATIVELSBSTRING   = "Arch-Linux"
> TARGET_SYS        = "arm-oe-linux-gnueabi"
> MACHINE           = "beaglebone"
> DISTRO_VERSION    = "oe-core.0"
> TUNE_FEATURES     = "armv7a vfp neon"
> TARGET_FPU        = "vfp-neon"
> meta              = "master:2ac7783e04f5e8e6005f967e1a6dd65d2fc6a19a"
> common-bsp        = "master:f02fabd39cd49bf5932fa5f90e83084d49a8cbe2"
>
> NOTE: Resolving any missing task queue dependencies
> NOTE: Preparing runqueue
> NOTE: Executing SetScene Tasks
> NOTE: Executing RunQueue Tasks
> ERROR: Function failed: do_rootfs (log file is located at 
> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520)
> ERROR: Logfile of failure stored in: 
> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520
> Log data follows:
> | DEBUG: Executing python function rootfs_process_ignore
> | DEBUG: Python function rootfs_process_ignore finished
> | DEBUG: Executing python function rootfs_runtime_mapping
> | DEBUG: Python function rootfs_runtime_mapping finished
> | DEBUG: Executing shell function do_rootfs
> | flock: 
> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/deploy/ipk/Packages.flock: 
> Bad file descriptor
> | WARNING: 
> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.do_rootfs.19520:1 
> exit 65 from
> |   flock $pkgdir/Packages.flock -c "opkg-make-index -r 
> $pkgdir/Packages -p $pkgdir/Packages -m $pkgdir/"
> | ERROR: Function failed: do_rootfs (log file is located at 
> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520)
> ERROR: Task 7 
> (/mnt/mediaserver/Projects/oe-core/meta/recipes-core/images/core-image-minimal.bb, 
> do_rootfs) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 1580 tasks of which 1579 didn't need to 
> be rerun and 1 failed.
> No currently running tasks (1579 of 1581)
>
> Summary: 1 task failed:
> /mnt/mediaserver/Projects/oe-core/meta/recipes-core/images/core-image-minimal.bb, 
> do_rootfs
> Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Does anyone have any insight to why this may be failing. It mentions a 
bad file descriptor, so I assume it is related to building on an NFS mount.

Cheers,
Jack.

-- 
   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   Cambrideshire, UK
   http://www.embed.me.uk
--



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

* Re: do_root_fs failing on flock command
  2013-08-27 12:07 do_root_fs failing on flock command Jack Mitchell
@ 2013-08-27 12:16 ` Phil Blundell
  2013-08-27 12:38   ` Jack Mitchell
  2013-08-27 12:21 ` Richard Purdie
  1 sibling, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2013-08-27 12:16 UTC (permalink / raw)
  To: ml; +Cc: openembedded-core

On Tue, 2013-08-27 at 13:07 +0100, Jack Mitchell wrote:
> Does anyone have any insight to why this may be failing. It mentions a 
> bad file descriptor, so I assume it is related to building on an NFS mount.

There's no particular reason that flock() oughtn't to work on NFS.  If
you happened to be mounted with -o nolock then you wouldn't get the
correct semantics versus lockers on other hosts, but you shouldn't be
getting -EBADF under any circumstances that I can think of.

If you run flock by hand against a file on the same mount, does it work?
If it fails, what does the output from strace look like?

p.




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

* Re: do_root_fs failing on flock command
  2013-08-27 12:07 do_root_fs failing on flock command Jack Mitchell
  2013-08-27 12:16 ` Phil Blundell
@ 2013-08-27 12:21 ` Richard Purdie
  2013-08-27 12:31   ` Jack Mitchell
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2013-08-27 12:21 UTC (permalink / raw)
  To: ml; +Cc: openembedded-core

On Tue, 2013-08-27 at 13:07 +0100, Jack Mitchell wrote:
> I'm attempting to build core-image-minimal using oe-core + 
> meta-beagleboard on an NFS mount. I'm running into the following error:
> 
> > [jack@archAntec beaglebone]$ bitbake core-image-minimal
> > Loading cache: 100% 
> > |#######################################################################################################| 
> > ETA:  00:00:00
> > Loaded 1193 entries from dependency cache.
> >
> > Build Configuration:
> > BB_VERSION        = "1.19.1"
> > BUILD_SYS         = "x86_64-linux"
> > NATIVELSBSTRING   = "Arch-Linux"
> > TARGET_SYS        = "arm-oe-linux-gnueabi"
> > MACHINE           = "beaglebone"
> > DISTRO_VERSION    = "oe-core.0"
> > TUNE_FEATURES     = "armv7a vfp neon"
> > TARGET_FPU        = "vfp-neon"
> > meta              = "master:2ac7783e04f5e8e6005f967e1a6dd65d2fc6a19a"
> > common-bsp        = "master:f02fabd39cd49bf5932fa5f90e83084d49a8cbe2"
> >
> > NOTE: Resolving any missing task queue dependencies
> > NOTE: Preparing runqueue
> > NOTE: Executing SetScene Tasks
> > NOTE: Executing RunQueue Tasks
> > ERROR: Function failed: do_rootfs (log file is located at 
> > /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520)
> > ERROR: Logfile of failure stored in: 
> > /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520
> > Log data follows:
> > | DEBUG: Executing python function rootfs_process_ignore
> > | DEBUG: Python function rootfs_process_ignore finished
> > | DEBUG: Executing python function rootfs_runtime_mapping
> > | DEBUG: Python function rootfs_runtime_mapping finished
> > | DEBUG: Executing shell function do_rootfs
> > | flock: 
> > /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/deploy/ipk/Packages.flock: 
> > Bad file descriptor
> > | WARNING: 
> > /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.do_rootfs.19520:1 
> > exit 65 from
> > |   flock $pkgdir/Packages.flock -c "opkg-make-index -r 
> > $pkgdir/Packages -p $pkgdir/Packages -m $pkgdir/"
> > | ERROR: Function failed: do_rootfs (log file is located at 
> > /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520)
> > ERROR: Task 7 
> > (/mnt/mediaserver/Projects/oe-core/meta/recipes-core/images/core-image-minimal.bb, 
> > do_rootfs) failed with exit code '1'
> > NOTE: Tasks Summary: Attempted 1580 tasks of which 1579 didn't need to 
> > be rerun and 1 failed.
> > No currently running tasks (1579 of 1581)
> >
> > Summary: 1 task failed:
> > /mnt/mediaserver/Projects/oe-core/meta/recipes-core/images/core-image-minimal.bb, 
> > do_rootfs
> > Summary: There was 1 ERROR message shown, returning a non-zero exit code.
> 
> Does anyone have any insight to why this may be failing. It mentions a 
> bad file descriptor, so I assume it is related to building on an NFS mount.

Correct, running builds on NFS isn't really recommended or supported
(other than the downloads and sstate directories). I looks like the
locking didn't work on the NFS mount and reading the man page for flock
suggests that even if you do get NFS locking working, its still not
recommended.

Cheers,

Richard



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

* Re: do_root_fs failing on flock command
  2013-08-27 12:21 ` Richard Purdie
@ 2013-08-27 12:31   ` Jack Mitchell
  0 siblings, 0 replies; 5+ messages in thread
From: Jack Mitchell @ 2013-08-27 12:31 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On 27/08/13 13:21, Richard Purdie wrote:
> On Tue, 2013-08-27 at 13:07 +0100, Jack Mitchell wrote:
>> I'm attempting to build core-image-minimal using oe-core +
>> meta-beagleboard on an NFS mount. I'm running into the following error:
>>
>>> [jack@archAntec beaglebone]$ bitbake core-image-minimal
>>> Loading cache: 100%
>>> |#######################################################################################################|
>>> ETA:  00:00:00
>>> Loaded 1193 entries from dependency cache.
>>>
>>> Build Configuration:
>>> BB_VERSION        = "1.19.1"
>>> BUILD_SYS         = "x86_64-linux"
>>> NATIVELSBSTRING   = "Arch-Linux"
>>> TARGET_SYS        = "arm-oe-linux-gnueabi"
>>> MACHINE           = "beaglebone"
>>> DISTRO_VERSION    = "oe-core.0"
>>> TUNE_FEATURES     = "armv7a vfp neon"
>>> TARGET_FPU        = "vfp-neon"
>>> meta              = "master:2ac7783e04f5e8e6005f967e1a6dd65d2fc6a19a"
>>> common-bsp        = "master:f02fabd39cd49bf5932fa5f90e83084d49a8cbe2"
>>>
>>> NOTE: Resolving any missing task queue dependencies
>>> NOTE: Preparing runqueue
>>> NOTE: Executing SetScene Tasks
>>> NOTE: Executing RunQueue Tasks
>>> ERROR: Function failed: do_rootfs (log file is located at
>>> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520)
>>> ERROR: Logfile of failure stored in:
>>> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520
>>> Log data follows:
>>> | DEBUG: Executing python function rootfs_process_ignore
>>> | DEBUG: Python function rootfs_process_ignore finished
>>> | DEBUG: Executing python function rootfs_runtime_mapping
>>> | DEBUG: Python function rootfs_runtime_mapping finished
>>> | DEBUG: Executing shell function do_rootfs
>>> | flock:
>>> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/deploy/ipk/Packages.flock:
>>> Bad file descriptor
>>> | WARNING:
>>> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.do_rootfs.19520:1
>>> exit 65 from
>>> |   flock $pkgdir/Packages.flock -c "opkg-make-index -r
>>> $pkgdir/Packages -p $pkgdir/Packages -m $pkgdir/"
>>> | ERROR: Function failed: do_rootfs (log file is located at
>>> /mnt/mediaserver/Projects/oe-core/beaglebone/tmp-eglibc/work/beaglebone-oe-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.19520)
>>> ERROR: Task 7
>>> (/mnt/mediaserver/Projects/oe-core/meta/recipes-core/images/core-image-minimal.bb,
>>> do_rootfs) failed with exit code '1'
>>> NOTE: Tasks Summary: Attempted 1580 tasks of which 1579 didn't need to
>>> be rerun and 1 failed.
>>> No currently running tasks (1579 of 1581)
>>>
>>> Summary: 1 task failed:
>>> /mnt/mediaserver/Projects/oe-core/meta/recipes-core/images/core-image-minimal.bb,
>>> do_rootfs
>>> Summary: There was 1 ERROR message shown, returning a non-zero exit code.
>>
>> Does anyone have any insight to why this may be failing. It mentions a
>> bad file descriptor, so I assume it is related to building on an NFS mount.
>
> Correct, running builds on NFS isn't really recommended or supported
> (other than the downloads and sstate directories). I looks like the
> locking didn't work on the NFS mount and reading the man page for flock
> suggests that even if you do get NFS locking working, its still not
> recommended.
>
> Cheers,
>
> Richard
>

Indeed, I've just been doing some further research myself and it seems 
as though flock on NFS isn't recommended. It states using fnctl is a 
better alternative, so I'm looking to see if there is a way to do that 
natively in bash which could possibly replace the use of flock. I have 
done all the build on NFS and this is the only issue I have run into, so 
I feel it's probably worthwhile to see if there is a reasonable work around.

Cheers,

-- 
   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   Cambrideshire, UK
   http://www.embed.me.uk
--


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

* Re: do_root_fs failing on flock command
  2013-08-27 12:16 ` Phil Blundell
@ 2013-08-27 12:38   ` Jack Mitchell
  0 siblings, 0 replies; 5+ messages in thread
From: Jack Mitchell @ 2013-08-27 12:38 UTC (permalink / raw)
  To: Phil Blundell; +Cc: openembedded-core

On 27/08/13 13:16, Phil Blundell wrote:
> On Tue, 2013-08-27 at 13:07 +0100, Jack Mitchell wrote:
>> Does anyone have any insight to why this may be failing. It mentions a
>> bad file descriptor, so I assume it is related to building on an NFS mount.
>
> There's no particular reason that flock() oughtn't to work on NFS.  If
> you happened to be mounted with -o nolock then you wouldn't get the
> correct semantics versus lockers on other hosts, but you shouldn't be
> getting -EBADF under any circumstances that I can think of.
>
> If you run flock by hand against a file on the same mount, does it work?
> If it fails, what does the output from strace look like?
>
> p.
>
>

http://pastebin.com/LB7nZs1q

-- 
   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   Cambrideshire, UK
   http://www.embed.me.uk
--


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

end of thread, other threads:[~2013-08-27 12:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 12:07 do_root_fs failing on flock command Jack Mitchell
2013-08-27 12:16 ` Phil Blundell
2013-08-27 12:38   ` Jack Mitchell
2013-08-27 12:21 ` Richard Purdie
2013-08-27 12:31   ` Jack Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox