systemd: ignore qemu output, and check its return code
cover systemd: ignore qemu output, and check its return code
From: "Roy.Li" <[email protected]>
The following changes since commit 8fc6904fe97438478119db6cd23b7b4eb33b50aa:
curl: add upstream status to patch (2013-07-18 12:21:13 -0700)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib roy/systemd
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/systemd
Roy.Li (1):
systemd: ignore qemu output, and check its return code
meta/recipes-core/systemd/systemd_204.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.10.4
PATCH 1/1 systemd: ignore qemu output, and check its return code
From: "Roy.Li" <[email protected]>
qemu prints errors sometime, but it works well, the error information can be captured by rpm, and lead to rpm failure. like:
$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \ -E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D qemu: Unsupported syscall: 240 $echo $? $ 0
--- meta/recipes-core/systemd/systemd_204.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_204.bb +3 -1
@@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300" pkg_postinst_udev-hwdb () { if test -n "$D"; then ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ - --root $D + --root $D 2>/dev/null + + [ $? -ne 0 ] && exit 1 else udevadm hwdb --update fi
Signature · 1 line
1.7.10.4
Quoted 8 lines · On Jul 23, 2013, at 10:24 PM, <[email protected]> wrote:
From: "Roy.Li" <[email protected]>
qemu prints errors sometime, but it works well, the error information can be captured by rpm, and lead to rpm failure. like:
$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \ -E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D qemu: Unsupported syscall: 240
hmm this is a qemu issue and I bet qemu is segfaulting This should be fixed. Can you try porting
http://lists.gnu.org/archive/html/qemu-devel/2010-02/msg00870.html
To qemu please ?
Then you won't need this patch.
Quoted 8 lines · Khem Raj
Quoted 5 lines · On Jul 23, 2013, at 10:24 PM, <[email protected]> wrote:
From: "Roy.Li" <[email protected]>
qemu prints errors sometime, but it works well, the error information can be captured by rpm, and lead to rpm failure. like:
Quoted 8 lines
Quoted 3 lines
$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \ -E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D qemu: Unsupported syscall: 240hmm this is a qemu issue and I bet qemu is segfaulting This should be fixed. Can you try porting
qemu is not segfaulting, except error message, it returns 0, and udevadm hwdb finished its task.
why was this patch be not merged, it was submitted on 02/2010
-Roy
Quoted 6 lines
To qemu please ?
Then you won't need this patch.
Signature · 2 lines
Best Reagrds, Roy | RongQing Li
Quoted 2 lines · Rongqing Li
qemu is not segfaulting, except error message, it returns 0, and udevadm hwdb finished its task.
A bit of googling takes you to
https://bugs.launchpad.net/ubuntu/+source/qemu-linaro/+bug/758424.
Key quote:
"We only implement the futex syscalls if CONFIG_USE_NPTL. This isn't defined for the i386 target (the necessary support in target-i386 for pushing atomic insns up to the linux-user top level loop isn't implemented). The upshot is that running multithreaded programs in linux-user i386-target isn't supported and this is just one of the symptoms."
Not segfaulting != working when multithreaded programs don't have futexs. We'll be seeing this more in the future now that GLib assumes you can thread.
Ross
Quoted 15 lines · Ross
Quoted 2 lines · Rongqing Li
qemu is not segfaulting, except error message, it returns 0, and udevadm hwdb finished its task.
A bit of googling takes you to
https://bugs.launchpad.net/ubuntu/+source/qemu-linaro/+bug/758424.
Key quote:"We only implement the futex syscalls if
CONFIG_USE_NPTL. This isn't defined for the i386 target (the necessary support in target-i386 for pushing atomic insns up to the linux-user top level loop isn't implemented). The upshot is that running multithreaded programs in linux-user i386-target isn't supported and this is just one of the symptoms."
Quoted 6 lines
Not segfaulting != working when multithreaded programs don't have futexs. We'll be seeing this more in the future now that GLib assumes you can thread.
Ross
I see this bug was not fixed from 2011-11, what should I do?
I know my patch works well on my machine.
-Roy
Signature · 2 lines
Best Reagrds, Roy | RongQing Li
ping
Quoted 32 lines · On 07/24/2013 01:24 PM, [email protected] wrote:
From: "Roy.Li" <[email protected]>
qemu prints errors sometime, but it works well, the error information can be captured by rpm, and lead to rpm failure. like:
$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \ -E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D qemu: Unsupported syscall: 240 $echo $? $ 0Signed-off-by Roy.Li <[email protected]>--- meta/recipes-core/systemd/systemd_204.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/recipes-core/systemd/systemd_204.bb +3
-1@@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300" pkg_postinst_udev-hwdb () { if test -n "$D"; then ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ - --root $D + --root $D 2>/dev/null + + [ $? -ne 0 ] && exit 1 else udevadm hwdb --update fi
Signature · 2 lines
Best Reagrds, Roy | RongQing Li
Quoted 6 lines · Rongqing Li
meta/recipes-core/systemd/systemd_204.bb ALTERNATIVE_PRIORITY[poweroff] ?= "300" · line 282
Quoted 6 lines
${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')}hwdb --update \
meta/recipes-core/systemd/systemd_204.bb +3
-1- --root $D + --root $D 2>/dev/null + + [ $? -ne 0 ] && exit 1
The $? check can be removed replaced by set -e, as many postinst scripts do already.
Why/where is the output from runqemu considered an error? I wasn't aware that logs were monitored for that error message. I don't think we should be hiding the output of runqemu as any real errors will also be hidden.
Ross
Quoted 11 lines · Ross
Quoted 6 lines · Rongqing Li
meta/recipes-core/systemd/systemd_204.bb ALTERNATIVE_PRIORITY[poweroff] ?= "300" · line 282
Quoted 6 lines
${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')}hwdb --update \
meta/recipes-core/systemd/systemd_204.bb +3
-1- --root $D + --root $D 2>/dev/null + + [ $? -ne 0 ] && exit 1The $? check can be removed replaced by set -e, as many postinst scripts do already.
Quoted 6 lines
Why/where is the output from runqemu considered an error? I wasn't aware that logs were monitored for that error message. I don't think we should be hiding the output of runqemu as any real errors will also be hidden.
Ross
I always get the below on error on my machine(Ubuntu 12.10) when enable systemd:
| 102:Installing libnfsidmap0 ######################################## [ 26%] | 103:Installing run-postinsts ######################################## [ 26%] | Output from run-postinsts-1.0-r9@i586: | -- | 257:Installing liberation-fo.. ######################################## [ 65%] | 258:Installing glib-networking ######################################## [ 65%] | 259:Installing wpa-supplicant ######################################## [ 66%] | 260:Installing udev-hwdb ######################################## [ 66%] | Output from udev-hwdb-1:204-r0@i586: | ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded: ignored. | qemu: Unsupported syscall: 240 | 261:Installing udev ######################################## [ 66%] | 262:Installing util-linux-fsck ######################################## [ 67%] | Output from util-linux-fsck-2.23.2-r0@i586: | update-alternatives: Linking /buildarea/build/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/rootfs//sbin/fsck.minix to /sbin/fsck.minix.util-linux | | ERROR: Function failed: do_rootfs (log file is located at /buildarea/build/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.26461)
ERROR: Task 7 (/buildarea/build/poky/meta/recipes-sato/images/core-image-sato.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5548 tasks of which 924 didn't need to be rerun and 1 failed.
No currently running tasks (5547 of 5549)
Summary: 1 task failed:
/buildarea/build/poky/meta/recipes-sato/images/core-image-sato.bb,do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
After using the patch, it works well.
Other place used the same method to handle the qemu_run_binary result:
lirq@lirq-OptiPlex-780:/buildarea/build/poky/meta$ grep qemu_run_binary ./ -r -A2
./classes/qemu.bbclass:# ${@qemu_run_binary(d, '$D', '/usr/bin/test_app')} [test_app arguments]
./classes/qemu.bbclass-#
./classes/qemu.bbclass:def qemu_run_binary(data, rootfs_path, binary):
./classes/qemu.bbclass- qemu_binary = qemu_target_binary(data)
./classes/qemu.bbclass- if qemu_binary == "qemu-allarch":
--
./classes/gtk-immodules-cache.bbclass: ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
./classes/gtk-immodules-cache.bbclass- $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
./classes/gtk-immodules-cache.bbclass- sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules
--
./classes/gtk-immodules-cache.bbclass: ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
./classes/gtk-immodules-cache.bbclass- $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
./classes/gtk-immodules-cache.bbclass- sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules
--
./recipes-graphics/pango/pango.inc: ${@qemu_run_binary(d, '$D','${bindir}/${MLPREFIX}pango-querymodules')} \
./recipes-graphics/pango/pango.inc- $D${libdir}/pango/${LIBV}/modules/*.so \
./recipes-graphics/pango/pango.inc- > $D${sysconfdir}/pango/${MLPREFIX}pango.modules 2>/dev/null-Roy
Quoted 2 lines
Signature · 2 lines
Best Reagrds, Roy | RongQing Li
Quoted 2 lines · Rongqing Li
| ERROR: ld.so: object 'libpseudo.so' from
LD_PRELOADcannot be preloaded:
ignored.
That's probably what's causing the problem, not the syscall warning.
It looks like https://bugzilla.yoctoproject.org/show_bug.cgi?id=4843
which is tricky to replicate, maybe you should speak to Peter about your configuration so we can finally fix it.
Ross
Quoted 6 lines · Rongqing Li
ping
Quoted 3 lines · On 07/24/2013 01:24 PM, [email protected] wrote:
From: "Roy.Li" <[email protected]>
qemu prints errors sometime, but it works well,
how do you know ?
Quoted 38 lines
Quoted 30 lines
the error information
can be captured by rpm, and lead to rpm failure. like:$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \ -E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D qemu: Unsupported syscall: 240 $echo $? $ 0Signed-off-by Roy.Li <[email protected]>--- meta/recipes-core/systemd/systemd_204.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/recipes-core/systemd/systemd_204.bb +3
-1@@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300" pkg_postinst_udev-hwdb () { if test -n "$D"; then ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ - --root $D + --root $D 2>/dev/null + + [ $? -ne 0 ] && exit 1 else udevadm hwdb --update fiSignature · 6 lines
Best Reagrds, Roy | RongQing Li _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 5 lines · Khem Raj
Quoted 2 lines · Rongqing Li
ping
Quoted 8 lines
Quoted 4 lines · On 07/24/2013 01:24 PM, [email protected] wrote:
Quoted 3 lines
From: "Roy.Li" <[email protected]>
qemu prints errors sometime, but it works well,
how do you know ?
echo $? and output of "udevadm hwdb --update --root $D" shows it works well.
-Roy
Quoted 41 lines
Quoted 38 lines
Quoted 20 lines
the error information
can be captured by rpm, and lead to rpm failure. like:$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \ -E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D qemu: Unsupported syscall: 240 $echo $? $ 0Signed-off-by Roy.Li <[email protected]>--- meta/recipes-core/systemd/systemd_204.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/recipes-core/systemd/systemd_204.bb +0
-0meta/recipes-core/systemd/systemd_204.bb ALTERNATIVE_PRIORITY[poweroff] ?= "300" · line 285
Quoted 10 lines
meta/recipes-core/systemd/systemd_204.bb +3
-1@@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300" pkg_postinst_udev-hwdb () { if test -n "$D"; then ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \ - --root $D + --root $D 2>/dev/null + + [ $? -ne 0 ] && exit 1 else udevadm hwdb --update fi--
Best Reagrds,
Roy | RongQing Li
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
Best Reagrds, Roy | RongQing Li