Re: [Qemu-devel] [PATCH RFC v7 0/9] qemu_thread_create: propagate errors to callers to check

2018-11-05 Thread no-reply
Hi,

This series failed docker-quick@centos7 build test. Please find the testing 
commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

Type: series
Message-id: 20181101101715.9443-1-...@suse.com
Subject: [Qemu-devel] [PATCH RFC v7 0/9] qemu_thread_create: propagate errors 
to callers to check

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-quick@centos7 SHOW_ENV=1 J=8
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
3e277b70f1 qemu_thread_create: propagate the error to callers to handle
39551a72c7 migration: add more error handling for postcopy_ram_enable_notify
733f7a07cb migration: remove unused _err parameter in migrate_set_error
46e34c2c06 migration: fix the multifd code when receiving less channels
d2c4705d34 migration: fix the multifd code when sending less channels
8ce0f380f1 migration: fix some segmentation faults when using multifd
37dbd330d4 qemu_thread_join: fix segmentation fault
b10333fc35 qemu_init_vcpu: add a new Error parameter to propagate
3626dde437 Fix segmentation fault when qemu_signal_init fails

=== OUTPUT BEGIN ===
  BUILD   centos7
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-skht4o_b/src'
  GEN 
/var/tmp/patchew-tester-tmp-skht4o_b/src/docker-src.2018-11-05-13.16.56.15391/qemu.tar
Cloning into 
'/var/tmp/patchew-tester-tmp-skht4o_b/src/docker-src.2018-11-05-13.16.56.15391/qemu.tar.vroot'...
done.
Checking out files:   9% (632/6451)   
Checking out files:  10% (646/6451)   
Checking out files:  11% (710/6451)   
Checking out files:  12% (775/6451)   
Checking out files:  13% (839/6451)   
Checking out files:  14% (904/6451)   
Checking out files:  14% (932/6451)   
Checking out files:  15% (968/6451)   
Checking out files:  16% (1033/6451)   
Checking out files:  17% (1097/6451)   
Checking out files:  17% (1135/6451)   
Checking out files:  18% (1162/6451)   
Checking out files:  19% (1226/6451)   
Checking out files:  20% (1291/6451)   
Checking out files:  21% (1355/6451)   
Checking out files:  22% (1420/6451)   
Checking out files:  23% (1484/6451)   
Checking out files:  24% (1549/6451)   
Checking out files:  25% (1613/6451)   
Checking out files:  25% (1629/6451)   
Checking out files:  26% (1678/6451)   
Checking out files:  27% (1742/6451)   
Checking out files:  28% (1807/6451)   
Checking out files:  29% (1871/6451)   
Checking out files:  30% (1936/6451)   
Checking out files:  31% (2000/6451)   
Checking out files:  32% (2065/6451)   
Checking out files:  33% (2129/6451)   
Checking out files:  34% (2194/6451)   
Checking out files:  35% (2258/6451)   
Checking out files:  36% (2323/6451)   
Checking out files:  37% (2387/6451)   
Checking out files:  38% (2452/6451)   
Checking out files:  39% (2516/6451)   
Checking out files:  40% (2581/6451)   
Checking out files:  41% (2645/6451)   
Checking out files:  42% (2710/6451)   
Checking out files:  43% (2774/6451)   
Checking out files:  44% (2839/6451)   
Checking out files:  45% (2903/6451)   
Checking out files:  46% (2968/6451)   
Checking out files:  47% (3032/6451)   
Checking out files:  48% (3097/6451)   
Checking out files:  49% (3161/6451)   
Checking out files:  50% (3226/6451)   
Checking out files:  51% (3291/6451)   
Checking out files:  52% (3355/6451)   
Checking out files:  53% (3420/6451)   
Checking out files:  54% (3484/6451)   
Checking out files:  55% (3549/6451)   
Checking out files:  56% (3613/6451)   
Checking out files:  57% (3678/6451)   
Checking out files:  58% (3742/6451)   
Checking out files:  59% (3807/6451)   
Checking out files:  60% (3871/6451)   
Checking out files:  61% (3936/6451)   
Checking out files:  62% (4000/6451)   
Checking out files:  63% (4065/6451)   
Checking out files:  64% (4129/6451)   
Checking out files:  65% (4194/6451)   
Checking out files:  66% (4258/6451)   
Checking out files:  67% (4323/6451)   
Checking out files:  68% (4387/6451)   
Checking out files:  69% (4452/6451)   
Checking out files:  70% (4516/6451)   
Checking out files:  71% (4581/6451)   
Checking out files:  72% (4645/6451)   
Checking out files:  73% (4710/6451)   
Checking out files:  74% (4774/6451)   
Checking out files:  75% (4839/6451)   
Checking out files:  75% (4894/6451)   
Checking out files:  76% (4903/6451)   
Checking out files:  77% (4968/6451)   
Checking out files:  78% (5032/6451)   
Checking out files:  79% (5097/6451)   
Checking out files:  80% (5161/6451)   
Checking out files:  81% (5226/6451)   
Checking out files:  82% (5290/6451)   
Checking out files:  83% (5355/6451)   
Checking out files:  84% (5419/6451)   
Checking out files:  85% (5484/6451)   
Checking out files:  86% (5548/6451)   
Checking out files:  87% (5613/6451)   
Checking out files:  88% (5677/6451)   
Checking out files:  89% (5742/6451)   
Checking out files:  90% (5806/6451)   
Checking out files:  91% (5871/6451)   
Checking out files:  92% (5935/6451

Re: [Qemu-devel] [PATCH RFC v7 0/9] qemu_thread_create: propagate errors to callers to check

2018-11-04 Thread Fei Li

Sorry that somehow forget the "#include "qemu/error-report.h" for
hw/usb/ccid-card-emulated.c

Have a nice day, thanks
Fei

On 11/04/2018 02:09 AM, no-re...@patchew.org wrote:

Hi,

This series failed docker-quick@centos7 build test. Please find the testing 
commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

Type: series
Message-id: 20181101101715.9443-1-...@suse.com
Subject: [Qemu-devel] [PATCH RFC v7 0/9] qemu_thread_create: propagate errors 
to callers to check

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-quick@centos7 SHOW_ENV=1 J=8
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
8239f692a6 qemu_thread_create: propagate the error to callers to handle
f73c91c32a migration: add more error handling for postcopy_ram_enable_notify
6b8c9d0a7b migration: remove unused _err parameter in migrate_set_error
adcb648e2e migration: fix the multifd code when receiving less channels
ce89d9baf9 migration: fix the multifd code when sending less channels
a06e512206 migration: fix some segmentation faults when using multifd
7f516dc786 qemu_thread_join: fix segmentation fault
a6f6f24ff3 qemu_init_vcpu: add a new Error parameter to propagate
b44013aa26 Fix segmentation fault when qemu_signal_init fails

=== OUTPUT BEGIN ===
   BUILD   centos7
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-6f6bzbwa/src'
   GEN 
/var/tmp/patchew-tester-tmp-6f6bzbwa/src/docker-src.2018-11-03-14.07.14.17130/qemu.tar
Cloning into 
'/var/tmp/patchew-tester-tmp-6f6bzbwa/src/docker-src.2018-11-03-14.07.14.17130/qemu.tar.vroot'...
done.
Your branch is up-to-date with 'origin/test'.
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into 
'/var/tmp/patchew-tester-tmp-6f6bzbwa/src/docker-src.2018-11-03-14.07.14.17130/qemu.tar.vroot/dtc'...
Submodule path 'dtc': checked out '88f18909db731a627456f26d779445f84e449536'
Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered 
for path 'ui/keycodemapdb'
Cloning into 
'/var/tmp/patchew-tester-tmp-6f6bzbwa/src/docker-src.2018-11-03-14.07.14.17130/qemu.tar.vroot/ui/keycodemapdb'...
Submodule path 'ui/keycodemapdb': checked out 
'6b3d716e2b6472eb7189d3220552280ef3d832ce'
   COPYRUNNER
 RUN test-quick in qemu:centos7
Packages installed:
SDL-devel-1.2.15-14.el7.x86_64
bison-3.0.4-1.el7.x86_64
bzip2-1.0.6-13.el7.x86_64
bzip2-devel-1.0.6-13.el7.x86_64
ccache-3.3.4-1.el7.x86_64
csnappy-devel-0-6.20150729gitd7bc683.el7.x86_64
flex-2.5.37-3.el7.x86_64
gcc-4.8.5-28.el7_5.1.x86_64
gettext-0.19.8.1-2.el7.x86_64
git-1.8.3.1-14.el7_5.x86_64
glib2-devel-2.54.2-2.el7.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libepoxy-devel-1.3.1-2.el7_5.x86_64
libfdt-devel-1.4.6-1.el7.x86_64
lzo-devel-2.06-8.el7.x86_64
make-3.82-23.el7.x86_64
mesa-libEGL-devel-17.2.3-8.20171019.el7.x86_64
mesa-libgbm-devel-17.2.3-8.20171019.el7.x86_64
nettle-devel-2.7.1-8.el7.x86_64
package g++ is not installed
package librdmacm-devel is not installed
pixman-devel-0.34.0-1.el7.x86_64
spice-glib-devel-0.34-3.el7_5.1.x86_64
spice-server-devel-0.14.0-2.el7_5.4.x86_64
tar-1.26-34.el7.x86_64
vte-devel-0.28.2-10.el7.x86_64
xen-devel-4.6.6-12.el7.x86_64
zlib-devel-1.2.7-17.el7.x86_64

Environment variables:
PACKAGES=bison bzip2 bzip2-devel ccache csnappy-devel flex  
   g++ gcc gettext git glib2-devel libaio-devel 
libepoxy-devel libfdt-devel librdmacm-devel lzo-devel make 
mesa-libEGL-devel mesa-libgbm-devel nettle-devel pixman-devel 
SDL-devel spice-glib-devel spice-server-devel tar vte-devel 
xen-devel zlib-devel
HOSTNAME=ec6a074d2e2d
MAKEFLAGS= -j8
J=8
CCACHE_DIR=/var/tmp/ccache
EXTRA_CONFIGURE_OPTS=
V=
SHOW_ENV=1
PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
TARGET_LIST=
SHLVL=1
HOME=/home/patchew
TEST_DIR=/tmp/qemu-test
FEATURES= dtc
DEBUG=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu 
--prefix=/tmp/qemu-test/install
No C++ compiler available; disabling C++ specific optional code
Install prefix/tmp/qemu-test/install
BIOS directory/tmp/qemu-test/install/share/qemu
firmware path /tmp/qemu-test/install/share/qemu-firmware
binary directory  /tmp/qemu-test/install/bin
library directory /tmp/qemu-test/install/lib
module directory  /tmp/qemu-test/install/lib/qemu
libexec directory /tmp/qemu-test/install/libexec
include directory /tmp/qemu-test/install/include
config directory  /tmp/qemu-test/install/etc
local state directory   /tmp/qemu-test/install/var
Manual directory  /tmp/qemu-test/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path   /tmp/qemu-test/src
GIT binarygit
GIT submodules
C compilercc
Host C compiler   cc
C++ compiler
Objective-C compiler cc
ARFLAGS   rv
CFLAGS

Re: [Qemu-devel] [PATCH RFC v7 0/9] qemu_thread_create: propagate errors to callers to check

2018-11-03 Thread no-reply
Hi,

This series failed docker-quick@centos7 build test. Please find the testing 
commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

Type: series
Message-id: 20181101101715.9443-1-...@suse.com
Subject: [Qemu-devel] [PATCH RFC v7 0/9] qemu_thread_create: propagate errors 
to callers to check

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-quick@centos7 SHOW_ENV=1 J=8
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
8239f692a6 qemu_thread_create: propagate the error to callers to handle
f73c91c32a migration: add more error handling for postcopy_ram_enable_notify
6b8c9d0a7b migration: remove unused _err parameter in migrate_set_error
adcb648e2e migration: fix the multifd code when receiving less channels
ce89d9baf9 migration: fix the multifd code when sending less channels
a06e512206 migration: fix some segmentation faults when using multifd
7f516dc786 qemu_thread_join: fix segmentation fault
a6f6f24ff3 qemu_init_vcpu: add a new Error parameter to propagate
b44013aa26 Fix segmentation fault when qemu_signal_init fails

=== OUTPUT BEGIN ===
  BUILD   centos7
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-6f6bzbwa/src'
  GEN 
/var/tmp/patchew-tester-tmp-6f6bzbwa/src/docker-src.2018-11-03-14.07.14.17130/qemu.tar
Cloning into 
'/var/tmp/patchew-tester-tmp-6f6bzbwa/src/docker-src.2018-11-03-14.07.14.17130/qemu.tar.vroot'...
done.
Your branch is up-to-date with 'origin/test'.
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into 
'/var/tmp/patchew-tester-tmp-6f6bzbwa/src/docker-src.2018-11-03-14.07.14.17130/qemu.tar.vroot/dtc'...
Submodule path 'dtc': checked out '88f18909db731a627456f26d779445f84e449536'
Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered 
for path 'ui/keycodemapdb'
Cloning into 
'/var/tmp/patchew-tester-tmp-6f6bzbwa/src/docker-src.2018-11-03-14.07.14.17130/qemu.tar.vroot/ui/keycodemapdb'...
Submodule path 'ui/keycodemapdb': checked out 
'6b3d716e2b6472eb7189d3220552280ef3d832ce'
  COPYRUNNER
RUN test-quick in qemu:centos7 
Packages installed:
SDL-devel-1.2.15-14.el7.x86_64
bison-3.0.4-1.el7.x86_64
bzip2-1.0.6-13.el7.x86_64
bzip2-devel-1.0.6-13.el7.x86_64
ccache-3.3.4-1.el7.x86_64
csnappy-devel-0-6.20150729gitd7bc683.el7.x86_64
flex-2.5.37-3.el7.x86_64
gcc-4.8.5-28.el7_5.1.x86_64
gettext-0.19.8.1-2.el7.x86_64
git-1.8.3.1-14.el7_5.x86_64
glib2-devel-2.54.2-2.el7.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libepoxy-devel-1.3.1-2.el7_5.x86_64
libfdt-devel-1.4.6-1.el7.x86_64
lzo-devel-2.06-8.el7.x86_64
make-3.82-23.el7.x86_64
mesa-libEGL-devel-17.2.3-8.20171019.el7.x86_64
mesa-libgbm-devel-17.2.3-8.20171019.el7.x86_64
nettle-devel-2.7.1-8.el7.x86_64
package g++ is not installed
package librdmacm-devel is not installed
pixman-devel-0.34.0-1.el7.x86_64
spice-glib-devel-0.34-3.el7_5.1.x86_64
spice-server-devel-0.14.0-2.el7_5.4.x86_64
tar-1.26-34.el7.x86_64
vte-devel-0.28.2-10.el7.x86_64
xen-devel-4.6.6-12.el7.x86_64
zlib-devel-1.2.7-17.el7.x86_64

Environment variables:
PACKAGES=bison bzip2 bzip2-devel ccache csnappy-devel flex  
   g++ gcc gettext git glib2-devel libaio-devel 
libepoxy-devel libfdt-devel librdmacm-devel lzo-devel make 
mesa-libEGL-devel mesa-libgbm-devel nettle-devel pixman-devel 
SDL-devel spice-glib-devel spice-server-devel tar vte-devel 
xen-devel zlib-devel
HOSTNAME=ec6a074d2e2d
MAKEFLAGS= -j8
J=8
CCACHE_DIR=/var/tmp/ccache
EXTRA_CONFIGURE_OPTS=
V=
SHOW_ENV=1
PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
TARGET_LIST=
SHLVL=1
HOME=/home/patchew
TEST_DIR=/tmp/qemu-test
FEATURES= dtc
DEBUG=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu 
--prefix=/tmp/qemu-test/install
No C++ compiler available; disabling C++ specific optional code
Install prefix/tmp/qemu-test/install
BIOS directory/tmp/qemu-test/install/share/qemu
firmware path /tmp/qemu-test/install/share/qemu-firmware
binary directory  /tmp/qemu-test/install/bin
library directory /tmp/qemu-test/install/lib
module directory  /tmp/qemu-test/install/lib/qemu
libexec directory /tmp/qemu-test/install/libexec
include directory /tmp/qemu-test/install/include
config directory  /tmp/qemu-test/install/etc
local state directory   /tmp/qemu-test/install/var
Manual directory  /tmp/qemu-test/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path   /tmp/qemu-test/src
GIT binarygit
GIT submodules
C compilercc
Host C compiler   cc
C++ compiler  
Objective-C compiler cc
ARFLAGS   rv
CFLAGS-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS   -I/usr/include/pixman-1-Werror   -pthread 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -fPIE -DPIE

[Qemu-devel] [PATCH RFC v7 0/9] qemu_thread_create: propagate errors to callers to check

2018-11-01 Thread Fei Li
Hi,

This idea comes from BiteSizedTasks, and this patch series implement
the error checking of qemu_thread_create: make qemu_thread_create
return a flag to indicate if it succeeded rather than failing with an
error; make all callers check it.

The first and the third patch fixes some segmentation faults occured
during the debugging.   The second patch paves the way for the last
patch as that patch is too long.   The last patch modifies the
qemu_thread_create() and makes it return a bool to all direct callers
to indicate if it succeeds.   The middle five fix some migration
issues.

Please help to review, thanks. :)

v7:
- Split the previous multifd-migration into two patches: the src and
  the dst. For the dst, only dump the error instead of quitting.
- Safely do the cleanup for postcopy_ram_enable_notify().
- Split the previous migration-error-handling patch into two patches.

v6:
- Add a new migration-multifd related patch. BTW, delete the previous
  vnc related patch as it has been upstreamed.
- Use error_setg_errno() to set the errno when qemu_thread_create()
  fails for both Linux and Windows implementation.
- Optimize the first patch, less codes are needed

v5:
- Remove `errno = err` in qemu_thread_create() for Linux, and change
  `return errno` to `return -1` in qemu_signal_init() to indicate
  the error in case qemu_thread_create() fails.
- Delete the v4-added qemu_cond/mutex_destroy() in iothread_complete()
  as the destroy() will be done by its callers' object_unref().

v4:
- Separate the migration compression patch from this series
- Add one more error handling patch related with migration
- Add more cleaning up code for touched functions

v3:
- Add two migration related patches to fix the segmentaion fault
- Extract the segmentation fault fix from v2's last patch to be a 
  separate patch
- Add cleaning up code for touched functions
- Update some error messages

v2:
- Pass errp straightly instead of using a local_err & error_propagate
- Return a bool: false/true to indicate if one function succeeds
- Merge v1's last two patches into one to avoid the compile error
- Fix one omitted error in patch1 and update some error messages

Fei Li (9):
  Fix segmentation fault when qemu_signal_init fails
  qemu_init_vcpu: add a new Error parameter to propagate
  qemu_thread_join: fix segmentation fault
  migration: fix some segmentation faults when using multifd
  migration: fix the multifd code when sending less channels
  migration: fix the multifd code when receiving less channels
  migration: remove unused _err parameter in migrate_set_error
  migration: add more error handling for postcopy_ram_enable_notify
  qemu_thread_create: propagate the error to callers to handle

 accel/tcg/user-exec-stub.c  |  3 +-
 cpus.c  | 79 --
 dump.c  |  6 ++-
 hw/misc/edu.c   |  6 ++-
 hw/ppc/spapr_hcall.c| 10 -
 hw/rdma/rdma_backend.c  |  4 +-
 hw/usb/ccid-card-emulated.c | 15 ++--
 include/qemu/thread.h   |  4 +-
 include/qom/cpu.h   |  2 +-
 io/task.c   |  3 +-
 iothread.c  | 16 +---
 migration/channel.c | 11 +++---
 migration/migration.c   | 68 +
 migration/migration.h   |  2 +-
 migration/postcopy-ram.c| 15 +++-
 migration/ram.c | 84 ++---
 migration/ram.h |  4 +-
 migration/savevm.c  | 12 --
 target/alpha/cpu.c  |  4 +-
 target/arm/cpu.c|  4 +-
 target/cris/cpu.c   |  4 +-
 target/hppa/cpu.c   |  4 +-
 target/i386/cpu.c   |  4 +-
 target/lm32/cpu.c   |  4 +-
 target/m68k/cpu.c   |  4 +-
 target/microblaze/cpu.c |  4 +-
 target/mips/cpu.c   |  4 +-
 target/moxie/cpu.c  |  4 +-
 target/nios2/cpu.c  |  4 +-
 target/openrisc/cpu.c   |  4 +-
 target/ppc/translate_init.inc.c |  4 +-
 target/riscv/cpu.c  |  4 +-
 target/s390x/cpu.c  |  4 +-
 target/sh4/cpu.c|  4 +-
 target/sparc/cpu.c  |  4 +-
 target/tilegx/cpu.c |  4 +-
 target/tricore/cpu.c|  4 +-
 target/unicore32/cpu.c  |  4 +-
 target/xtensa/cpu.c |  4 +-
 tests/atomic_add-bench.c|  3 +-
 tests/iothread.c|  2 +-
 tests/qht-bench.c   |  3 +-
 tests/rcutorture.c  |  3 +-
 tests/test-aio.c|  2 +-
 tests/test-rcu-list.c   |  3 +-
 ui/vnc-jobs.c   | 17 ++---
 ui/vnc-jobs.h   |  2 +-
 ui/vnc.c|  4 +-
 util/compatfd.c | 12 +-
 util/main-loop.c|  8 ++--
 util/oslib-posix.c  | 17 +++--
 util/qemu-thread-posix.c