Bug 14175 - Gatesgarth no longer building under WSL2
Summary: Gatesgarth no longer building under WSL2
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 3.2.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.3 M2
Assignee: Anuj Mittal
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-01-04 14:20 UTC by yoctoproject
Modified: 2021-01-22 04:12 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yoctoproject 2021-01-04 14:20:58 UTC
I'm on Windows 10 with a WSL 2 Ubuntu 20.04 Distribution.

The following will reproduce my error:

cd $(mktemp -d)
git clone https://git.yoctoproject.org/git/poky --branch gatesgarth
source poky/oe-init-build-env
bitbake linux-libc-headers


This one will error out on:

ERROR: Task (/tmp/tmp.eMUNKdTbkP/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.8.bb:do_install) failed with exit code '134'
NOTE: Tasks Summary: Attempted 344 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /tmp/tmp.eMUNKdTbkP/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.8.bb:do_install
Summary: There were 2 WARNING messages shown.


I'm not entirely sure, why there is a SIGABRT somewhere. It ran perfectly fine under Dunfell, so it must be something in between.

Interesting enough: There is no `run.do_install` in the temp directory...

$ /bin/ls temp/run.do_*                                                                                       
temp/run.do_deploy_source_date_epoch
temp/run.do_fetch
temp/run.do_patch
temp/run.do_populate_lic
temp/run.do_prepare_recipe_sysroot
temp/run.do_unpack


Please let me know, what I can provide to help you on this issue.
Comment 1 Richard Purdie 2021-01-04 14:53:21 UTC
That sounds like pseudo aborting for some reason as linux-libc-headers is the first task it would run under pseudo.

Can you look WORKDIR/pseudo/pseudo.log and see if that gives any more of a clue about what happened?
Comment 2 yoctoproject 2021-01-04 15:12:15 UTC
Indeed, there's something:

$ cat pseudo/pseudo.log
debug_logfile: fd 2
pid 14987 [parent 14986], doing new pid setup and server start
Setup complete, sending SIGUSR1 to pid 14986.
path mismatch [2 links]: ino 2207517 db '/run/shm/sem.mp-nh9e4dot' req '/run/shm/af4ZYg'.
Comment 3 yoctoproject 2021-01-04 15:52:00 UTC
So I tried some things.

According to https://docs.yoctoproject.org/ref-manual/migration-3.2.html#pseudo-path-filtering-and-mismatch-behaviour I should either use the PSEUDO_DEBUG = "nfoPcvdDyerpswikVx"  flag (which doesn't seem to do anything... bummer) or use PSEUDO_IGNORE_PATHS. I did both, and the later gives me another error which might indicate a bigger problem?

pid 25910 [parent 25909], doing new pid setup and server start
Setup complete, sending SIGUSR1 to pid 25909.
path mismatch [5 links]: ino 372550 db '/tmp/tmp.eMUNKdTbkP/build/tmp/work/core2-64-poky-linux/linux-libc-headers/5.8-r0/recipe-sysroot-native/etc/terminfo/v/vt200' req '/tmp/tmp.eMUNKdTbkP/build/tmp/sysroots-components/x86_64/ncurses-native/etc/terminfo/v/vt220'.


Is there a way to be less restrictive with pseudo like it behaved in 3.1? 

If not, what is needed to solve this problem. It is a big problem right now, because I wanted to migrate onto gatesgarth this week.
Comment 4 Richard Purdie 2021-01-04 22:30:55 UTC
A temporary fix might be to try adding:

PSEUDO_IGNORE_PATHS_append = ":/run/"

(or add :/run/ to PSEUDO_IGNORE_PATHS in bitbake.conf)
Comment 5 Richard Purdie 2021-01-04 22:34:02 UTC
sorry, it should be ",/run/" as its comma delimited. I think we may need to add /run/ to the defaults as the real fix...
Comment 6 yoctoproject 2021-01-05 07:08:46 UTC
(In reply to comment #5)
> sorry, it should be ",/run/" as its comma delimited. I think we may need to
> add /run/ to the defaults as the real fix...

That seems to do the trick!
Yeah, I guess /run/ should be in the default exclude, but I don't know why it only happens on WSL (I assume you have tested other linux distributions ;) ). And it *always* happened, even on a clean WSL debian distro.

Thanks for your help!
Comment 7 Richard Purdie 2021-01-06 14:45:13 UTC
I've sent a patch to the mailing list and will add it for testing in master-next.
Comment 9 Richard Purdie 2021-01-09 09:24:34 UTC
Reassign to Anuj for gatesgarth backport