[nanomsg] Possible race condition in tests/ipc_shutdown

  • From: Christian Skarby <christians@xxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Tue, 29 Sep 2015 10:55:52 +0000 (UTC)

Report to nanomsg@xxxxxxxxxxxxx as suggested by make check output.

Possible race condition in tests/ipc_shutdown?

Testing
https://github.com/nanomsg/nanomsg/releases/download/0.6-beta/nanomsg-0.6-beta.tar.gz
in vagrant using the image
http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box

To reproduce:
* Install vagrant https://www.vagrantup.com/downloads.html
* Install virtualbox https://www.virtualbox.org/wiki/Linux_Downloads
$ vagrant box add precise64
http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
$ cd workdir
$ cp /path/to/downloaded/attachment/Vagrantfile .
$ vagrant up
$ vagrant ssh # to login and inspect virtual machine

Output from 'vagrant up' showing that tests/ipc_shutdown fails now and then
(but never when stracing the test, see attached Vagrantfile for commands):
==> default: make[1]: Entering directory `/home/vagrant/nanomsg-0.6-beta'
==> default: PASS: tests/inproc
==> default: PASS: tests/inproc_shutdown
==> default: PASS: tests/ipc
==> default: src=0 type=33988
==> default: Assertion failed: src == NN_SOCK_SRC_EP && type == NN_EP_STOPPED
(src/core/sock.c:830)
==> default: /bin/bash: line 5: 8689 Aborted (core dumped)
${dir}$tst
==> default: FAIL: tests/ipc_shutdown
==> default: PASS: tests/ipc_stress
==> default: PASS: tests/tcp
==> default: PASS: tests/tcp_shutdown
==> default: PASS: tests/ws
==> default: PASS: tests/tcpmux
==> default: PASS: tests/pair
==> default: PASS: tests/pubsub
==> default: PASS: tests/reqrep
==> default: PASS: tests/pipeline
==> default: PASS: tests/survey
==> default: PASS: tests/bus
==> default: PASS: tests/block
==> default: PASS: tests/term
==> default: PASS: tests/timeo
==> default: PASS: tests/iovec
==> default: PASS: tests/msg
==> default: PASS: tests/prio
==> default: PASS: tests/poll
==> default: PASS: tests/device
==> default: PASS: tests/emfile
==> default: PASS: tests/domain
==> default: PASS: tests/trie
==> default: PASS: tests/list
==> default: PASS: tests/hash
==> default: PASS: tests/symbol
==> default: PASS: tests/separation
==> default: PASS: tests/zerocopy
==> default: PASS: tests/shutdown
==> default: PASS: tests/cmsg
==> default: ======================================
==> default: 1 of 33 tests failed
==> default: Please report to nanomsg@xxxxxxxxxxxxx
==> default: ======================================
...
==> default: 90 ok
==> default: 91 ok
==> default: src=0 type=33988
==> default: Assertion failed: src == NN_SOCK_SRC_EP && type == NN_EP_STOPPED
(src/core/sock.c:830)
==> default: 92 failed
==> default: src=0 type=33988
==> default: Assertion failed: src == NN_SOCK_SRC_EP && type == NN_EP_STOPPED
(src/core/sock.c:830)
==> default: 93 failed
==> default: src=0 type=33988
==> default: Assertion failed: src == NN_SOCK_SRC_EP && type == NN_EP_STOPPED
(src/core/sock.c:830)
==> default: 94 failed
==> default: 95 ok
==> default: 96 ok
==> default: 97 ok
==> default: 98 ok
==> default: 99 ok
==> default: 0 strace-ok
==> default: 1 strace-ok
==> default: 2 strace-ok
==> default: 3 strace-ok
==> default: 4 strace-ok
==> default: 5 strace-ok
==> default: 6 strace-ok
==> default: 7 strace-ok
==> default: 8 strace-ok
==> default: 9 strace-ok
...
==> default: 48 /tmp/ok
==> default: 52 /tmp/fail
==> default: 100 /tmp/strace-ok
==> default:wc: /tmp/strace-fail: No such file or directory
==> default: 200 total

Sometimes it also just hangs after
==> default: PASS: tests/inproc_shutdown
indicating that there might be some problem in tests/ipc aswell.

$ vagrant ssh -c "uname -a"
Linux vagrant-ubuntu-precise-64 3.8.0-39-generic #58~precise1-Ubuntu SMP Fri
May 2 21:33:40 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Other related posts:

  • » [nanomsg] Possible race condition in tests/ipc_shutdown - Christian Skarby