Bug 352 - "bitbake poky-image-sdk" fails because eglibc-initial can't unpack
Summary: "bitbake poky-image-sdk" fails because eglibc-initial can't unpack
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 0.9
Hardware: All Multiple
: High major
Target Milestone: 0.9 M4
Assignee: Dexuan Cui
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-09-26 23:07 UTC by Dexuan Cui
Modified: 2010-12-21 06:07 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified: Program Management
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dexuan Cui 2010-09-26 23:07:30 UTC
On poky's master, when testing my 3 patches:
28abeb01b84e222501779c575b0c972157c56c46: eglibc: add FILESPATH to avoid failure on unpackdcui/eglibc Dexuan Cui 1 -0/+2 
a318064a0dba1301579f74898e507b11ef4cbfbc: trace-cmd: remove explict DEPENDS on "glibc" Dexuan Cui 1 -3/+1 
da12d03aa078765bd4fd69167b047c0f849fa972: poky-default.inc: change the hardcoded glibc-initial to ${POKYLIBC}-initial 

I always meet with the following eglibc-initial unpack failure when doing "bitbake poky-image-sdk"(I think sato also gets the same issue though I didn't try that):

tmp/work/i586-poky-linux/eglibc-initial-2.12-r7/temp/log.base_do_unpack.11606:

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
NOTE: Unpacking /home/dcui/sources/eglibc-2_12_www.eglibc.org_.svn.branches._10809_.tar.gz to /home/dcui/0927/p/build/tmp/work/i586-poky-linux/eglibc-initial-2.12-r7/

But "bitbake eglibc-initial -c unpack" can succeed...

I used the following patch to workaround the issue by disabling pseudo on unpack:

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
-   cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd)
+   cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd)

I suspect this is also a pseudo related issue.
Comment 1 Dexuan Cui 2010-09-27 08:14:20 UTC
(In reply to comment #0)
> I suspect this is also a pseudo related issue.
Sorry, I was wrong.
Now I'm trying RP's suggestion (the problem sounds very like the issue where some tarballs don't unpaack with some versions of gzip.)
Comment 2 Dexuan Cui 2010-09-27 21:36:33 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > I suspect this is also a pseudo related issue.
> Sorry, I was wrong.
> Now I'm trying RP's suggestion (the problem sounds very like the issue where
> some tarballs don't unpaack with some versions of gzip.)

Kevin and I finally got the root cause:
------------------------------------------
Recently we frequently suffer from unpack failure for eglibc-initial and gconf-dbus whose's SRC_URIs are svn repos.

Kevin and I finally got the root cause: there is race condition, e.g., after eglibc-initial's fetch succeeds, when eglibc-initial's unpack is ongoing, eglibc's fetch may be also ongoing! As a result eglibc-initial's unpack would fail. gconf-dbus and gconf-dubs-native have the same issue. More generally, PN, PN-native, PN-nativesdk have the same issue.

I suppose we'll have to consider some enhancement in bbclass. Can you please give some suggestions? Thanks!

BTW: this should be a long-standing issue. The reason why it happens so frequently may be because of the fetcher change in bitbake, which maks every build to re-generate .tar.gz file for SCM repo even when there is no rev change. We may also need to improve the fetcher change.
------------------------------------------
Comment 4 Dexuan Cui 2010-09-29 18:54:38 UTC
With Joshua's patch, I don't meet the unpack issue any longer.

Let me VERIFY the bug.