| Summary: | cyclic symlinks in rootfs cause user-space qemu to infinite loop on startup | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Alexandre Tuleu <alexandre.tuleu> | ||||
| Component: | core | Assignee: | Aníbal Limón <anibal.limon> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium | CC: | leonardo.sandoval.gonzalez, meta.mr.watcher, meta.watcher, richard.purdie, ross.burton | ||||
| Version: | 1.6 | ||||||
| Target Milestone: | 2.2 M3 | ||||||
| Hardware: | All | ||||||
| OS: | Multiple | ||||||
| URL: | https://bugs.launchpad.net/qemu/+bug/1245703 | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | Don't know | |||||
| Attachments: |
|
||||||
I created a basic recipe that installs a circular loop and added it to core-image-sato, and with master do_rootfs works fine, which implies that either qemu or fontconfig (or both) are working correctly now. I can't replicate this in fido (1.8) using a custom recipe to create a cyclic link. I can replicate this in daisy (1.6) using udev-ptest as a cyclic link. Dizzy (1.7) is building now. I'm not sure what you mean by fontconfig 2.6.34, there isn't a fontconfig release of that name. I take it back, I can replicate this with fido if I revert the udev fix. Both fontconfig and gdk-pixbuf install postinstall hooks that spin when they hit the cyclic loop. Aha, upstream bug report: https://bugs.launchpad.net/qemu/+bug/1245703 Marking as 1.9, this is too late to start meddling with qemu and there's workarounds in fido (which are currently being backported to 1.7). I suspect the easiest solution is to modify uilt/path.c in qemu such that it doesn't interate all paths at the start but does so "on demand". This would avoid it walking pieces of the tree it never uses. I have a patch which attempts to do this. Marking as resolved as oe-core 9ac5017b3328a18561c2912edfda2d7d97c675f2 fixed it. |
Created attachment 2257 [details] Custom recipe for xenomai inspired from meta-eldk When building an image that install recipes that have cyclic symlink, the do_rootfs freeze the host system after qemu has eaten all virtual memory. This is the case for the attached custom recipe, (a step in the attachement has been added to remove these cyclic links). xenomai want to install a header file hierarchy with several symlinks like those : * /usr/xenomai/include/xenomai -> /usr/xenomai/include * /usr/xenomai/include/asm-x86/xenomai -> /usr/xenomai/include/asm-x86 ... Without an ulimit, the rootfs will freeze the host system. If a large ulimit is set (ulimit -v 8000000), the postint_intercept scripts update_font_cache and update_pixbuf_cache are both segfault-ing after a few minutes. However it would mean that the same script would be run at first boot of the target system, maybe making the image not usable. From the fontconfig changelog, this utility is since version 2.6.34 robust to recursive symlink. Maybe the yocto patch or the qemu wrapping are breaking this feature The dirty patch at do_install of this custom recipe effectivelly solves the issue, and an image that would list package xenomai-dev will be build without issues I see several issues : * the postinst_intercept scripts should be robust to cyclic symlinks * A ulimit should maybe be automatically set before calling qemu at postinst_intercept step, to avoid the host system to freeze.