Skip to contentSkip to conversation

vhost-user-test failure

Qemu-devel Eduardo Habkost 4 participants 8 messages Sep 23, 2016 – Sep 26, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

I hit a weird vhost-user-test failure on travis-ci recently, on a branch where I didn't touch any vhost-related code. From a quick look at the code, it looks like the vhost-user code is unhappy to see a disconnected socket.

I wasn't able to reproduce it. It seems to be a hard to reproduce race between vhost-user code and socket reconnection.

The failure can be seen at:

https://travis-ci.org/ehabkost/qemu-hacks/jobs/162077239

Error output:

**
ERROR:tests/vhost-user-test.c:715:test_reconnect: child process (/i386/vhost-user/reconnect/subprocess [23792]) failed unexpectedly
qemu-system-i386: Failed to set msg fds.
qemu-system-i386: vhost VQ 0 ring restore failed: -1: Resource temporarily unavailable (11)
qemu-system-i386: Failed to set msg fds.
qemu-system-i386: vhost VQ 1 ring restore failed: -1: Resource temporarily unavailable (11)
GTester: last random seed: R02S2892f6ad84bd5d03acd54cb75f444243
make: *** [check-qtest-i386] Error 1

Signature · 1 line
Eduardo
#1 lore raw
Quoted 7 lines · Eduardo Habkost

Hi,

I hit a weird vhost-user-test failure on travis-ci recently, on a branch where I didn't touch any vhost-related code. From a quick look at the code, it looks like the vhost-user code is unhappy to see a disconnected socket.

Quoted 6 lines

I wasn't able to reproduce it. It seems to be a hard to reproduce race between vhost-user code and socket reconnection.

The failure can be seen at:

https://travis-ci.org/ehabkost/qemu-hacks/jobs/162077239

Maxime looked at something similiar. Any idea?

Quoted 13 lines

Error output:

**
ERROR:tests/vhost-user-test.c:715:test_reconnect: child process (/i386/vhost-user/reconnect/subprocess [23792]) failed unexpectedly
qemu-system-i386: Failed to set msg fds.
qemu-system-i386: vhost VQ 0 ring restore failed: -1: Resource temporarily unavailable (11)
qemu-system-i386: Failed to set msg fds.
qemu-system-i386: vhost VQ 1 ring restore failed: -1: Resource temporarily unavailable (11)
GTester: last random seed: R02S2892f6ad84bd5d03acd54cb75f444243
make: *** [check-qtest-i386] Error 1

Signature · 1 line
Eduardo
#2 lore raw
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Eduardo Habkost

Hi,

I hit a weird vhost-user-test failure on travis-ci recently, on a branch where I didn't touch any vhost-related code. From a quick look at the code, it looks like the vhost-user code is unhappy to see a disconnected socket.

Quoted 8 lines
Quoted 6 lines

I wasn't able to reproduce it. It seems to be a hard to reproduce race between vhost-user code and socket reconnection.

The failure can be seen at:

https://travis-ci.org/ehabkost/qemu-hacks/jobs/162077239

Maxime looked at something similiar. Any idea?

No, not really.
Marc-André contributed a lot to these tests, I add him in cc: in case he has an idea.

I will have a look in the mean time.

Maxime

Quoted 14 lines
Quoted 14 lines

Error output:

**
ERROR:tests/vhost-user-test.c:715:test_reconnect: child process (/i386/vhost-user/reconnect/subprocess [23792]) failed unexpectedly
qemu-system-i386: Failed to set msg fds.
qemu-system-i386: vhost VQ 0 ring restore failed: -1: Resource temporarily unavailable (11)
qemu-system-i386: Failed to set msg fds.
qemu-system-i386: vhost VQ 1 ring restore failed: -1: Resource temporarily unavailable (11)
GTester: last random seed: R02S2892f6ad84bd5d03acd54cb75f444243
make: *** [check-qtest-i386] Error 1

--
Eduardo

#3 lore raw

This time with Marc-André in cc:...

Quoted 44 lines · Maxime Coquelin
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Eduardo Habkost

Hi,

I hit a weird vhost-user-test failure on travis-ci recently, on a branch where I didn't touch any vhost-related code. From a quick look at the code, it looks like the vhost-user code is unhappy to see a disconnected socket.

Quoted 8 lines
Quoted 6 lines

I wasn't able to reproduce it. It seems to be a hard to reproduce race between vhost-user code and socket reconnection.

The failure can be seen at:

https://travis-ci.org/ehabkost/qemu-hacks/jobs/162077239

Maxime looked at something similiar. Any idea?

No, not really.
Marc-André contributed a lot to these tests, I add him in cc: in case he has an idea.

I will have a look in the mean time.

Maxime

Quoted 17 lines
Quoted 17 lines

Error output:

**
ERROR:tests/vhost-user-test.c:715:test_reconnect: child process
(/i386/vhost-user/reconnect/subprocess [23792]) failed unexpectedly
qemu-system-i386: Failed to set msg fds.
qemu-system-i386: vhost VQ 0 ring restore failed: -1: Resource
temporarily unavailable (11)
qemu-system-i386: Failed to set msg fds.
qemu-system-i386: vhost VQ 1 ring restore failed: -1: Resource
temporarily unavailable (11)
GTester: last random seed: R02S2892f6ad84bd5d03acd54cb75f444243
make: *** [check-qtest-i386] Error 1

--
Eduardo

#4 lore raw

Hi

----- Original Message -----

Quoted 28 lines

This time with Marc-André in cc:...

Quoted 25 lines · Maxime Coquelin
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Eduardo Habkost

Hi,

I hit a weird vhost-user-test failure on travis-ci recently, on a branch where I didn't touch any vhost-related code. From a quick look at the code, it looks like the vhost-user code is unhappy to see a disconnected socket.

Quoted 8 lines
Quoted 6 lines

I wasn't able to reproduce it. It seems to be a hard to reproduce race between vhost-user code and socket reconnection.

The failure can be seen at:

https://travis-ci.org/ehabkost/qemu-hacks/jobs/162077239

Maxime looked at something similiar. Any idea?

No, not really.
Marc-André contributed a lot to these tests, I add him in cc: in case he has an idea.

I will have a look in the mean time.

I am unable to reproduce locally (over 500x iterations), and I have no clue what's going on: the warnings there aren't the problem (that's the main reason why we use the subprocess, to silence those). Do you have a local reproducer or is it only on travis? Afaik, there are no other reports of this test failing, are you sure its not related to changes on your branch?

thanks

#5 lore raw
Quoted 32 lines · Marc-André Lureau

Hi

----- Original Message -----

Quoted 28 lines

This time with Marc-André in cc:...

Quoted 25 lines · Maxime Coquelin
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Eduardo Habkost

Hi,

I hit a weird vhost-user-test failure on travis-ci recently, on a branch where I didn't touch any vhost-related code. From a quick look at the code, it looks like the vhost-user code is unhappy to see a disconnected socket.

Quoted 8 lines
Quoted 6 lines

I wasn't able to reproduce it. It seems to be a hard to reproduce race between vhost-user code and socket reconnection.

The failure can be seen at:

https://travis-ci.org/ehabkost/qemu-hacks/jobs/162077239

Maxime looked at something similiar. Any idea?

No, not really.
Marc-André contributed a lot to these tests, I add him in cc: in case he has an idea.

I will have a look in the mean time.

Quoted 6 lines

I am unable to reproduce locally (over 500x iterations), and I have no clue what's going on: the warnings there aren't the problem (that's the main reason why we use the subprocess, to silence those). Do you have a local reproducer or is it only on travis? Afaik, there are no other reports of this test failing, are you sure its not related to changes on your branch?

I don't have a local reproducer, I could only see it once on travis-ci. Maybe it is not possible to reproduce it if the machine isn't loaded enough to make the right thread/process be delayed.

I am pretty sure it's not related to my changes. Below is the diffstat between master and the commit that was being tested. All the changes were limited to x86 CPUID code (which shouldn't affect qtest code at all).

$ git diff --stat master...8de32e0
 include/hw/i386/pc.h          |   7 +-
 include/sysemu/cpus.h         |   5 +-
 target-i386/cpu.c             | 567 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------
 target-i386/cpu.h             |  15 +++-
 target-ppc/translate_init.c   |   3 +-
 tests/Makefile.include        |   2 +
 tests/test-x86-cpuid-compat.c | 171 ++++++++++++++++++++++++++++++++++++++++
 7 files changed, 516 insertions(+), 254 deletions(-)
Signature · 1 line
Eduardo
#6 lore raw

Hi,

Quoted 40 lines · Eduardo Habkost
Quoted 32 lines · Marc-André Lureau

Hi

----- Original Message -----

Quoted 28 lines

This time with Marc-André in cc:...

Quoted 25 lines · Maxime Coquelin
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Eduardo Habkost

Hi,

I hit a weird vhost-user-test failure on travis-ci recently, on a branch where I didn't touch any vhost-related code. From a quick look at the code, it looks like the vhost-user code is unhappy to see a disconnected socket.

Quoted 8 lines
Quoted 6 lines

I wasn't able to reproduce it. It seems to be a hard to reproduce race between vhost-user code and socket reconnection.

The failure can be seen at:

https://travis-ci.org/ehabkost/qemu-hacks/jobs/162077239

Maxime looked at something similiar. Any idea?

No, not really.
Marc-André contributed a lot to these tests, I add him in cc: in case he has an idea.

I will have a look in the mean time.

Quoted 6 lines

I am unable to reproduce locally (over 500x iterations), and I have no clue what's going on: the warnings there aren't the problem (that's the main reason why we use the subprocess, to silence those). Do you have a local reproducer or is it only on travis? Afaik, there are no other reports of this test failing, are you sure its not related to changes on your branch?

Quoted 4 lines

I don't have a local reproducer, I could only see it once on travis-ci. Maybe it is not possible to reproduce it if the machine isn't loaded enough to make the right thread/process be delayed.

I'm also trying to reproduce it.
Interestingly, launching the test with strace, I reproduce another problem systematically:
$> strace -o /tmp/vut -ff ./tests/vhost-user-test /x86_64/vhost-user/read-guest-mem: OK /x86_64/vhost-user/migrate: Vhost user backend fails to broadcast fake RARP OK
/x86_64/vhost-user/reconnect: OK

I'll try to load the CPU randomly when executing the test.

Regards,
Maxime

#7 lore raw
Quoted 57 lines · Maxime Coquelin

Hi,

Quoted 40 lines · Eduardo Habkost
Quoted 32 lines · Marc-André Lureau

Hi

----- Original Message -----

Quoted 28 lines

This time with Marc-André in cc:...

Quoted 25 lines · Maxime Coquelin
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Eduardo Habkost

Hi,

I hit a weird vhost-user-test failure on travis-ci recently, on a branch where I didn't touch any vhost-related code. From a quick look at the code, it looks like the vhost-user code is unhappy to see a disconnected socket.

Quoted 8 lines
Quoted 6 lines

I wasn't able to reproduce it. It seems to be a hard to reproduce race between vhost-user code and socket reconnection.

The failure can be seen at:

https://travis-ci.org/ehabkost/qemu-hacks/jobs/162077239

Maxime looked at something similiar. Any idea?

No, not really.
Marc-André contributed a lot to these tests, I add him in cc: in case he has an idea.

I will have a look in the mean time.

Quoted 6 lines

I am unable to reproduce locally (over 500x iterations), and I have no clue what's going on: the warnings there aren't the problem (that's the main reason why we use the subprocess, to silence those). Do you have a local reproducer or is it only on travis? Afaik, there are no other reports of this test failing, are you sure its not related to changes on your branch?

Quoted 4 lines

I don't have a local reproducer, I could only see it once on travis-ci. Maybe it is not possible to reproduce it if the machine isn't loaded enough to make the right thread/process be delayed.

I'm also trying to reproduce it.
Interestingly, launching the test with strace, I reproduce another problem systematically:
$> strace -o /tmp/vut -ff ./tests/vhost-user-test /x86_64/vhost-user/read-guest-mem: OK /x86_64/vhost-user/migrate: Vhost user backend fails to broadcast fake RARP OK
/x86_64/vhost-user/reconnect: OK

Quoted 1 line

I'll try to load the CPU randomly when executing the test.

FYI, I reproduced it once over ~200 runs while stressing the CPUs:
/x86_64/vhost-user/read-guest-mem: OK
/x86_64/vhost-user/migrate: OK
/x86_64/vhost-user/reconnect: **
ERROR:/home/max/projects/src/mainline/qemu/tests/vhost-user-test.c:715:test_reconnect: child process (/x86_64/vhost-user/reconnect/subprocess [8797]) failed unexpectedly
qemu-system-x86_64: Failed to set msg fds.
qemu-system-x86_64: vhost VQ 0 ring restore failed: -1: Resource temporarily unavailable (11)
qemu-system-x86_64: Failed to set msg fds.
qemu-system-x86_64: vhost VQ 1 ring restore failed: -1: Resource temporarily unavailable (11)

I'll continue the investigation.

Maxime