Skip to contentSkip to conversation

complete test-i386-xcpkern-i386-pv

xen-unstable bisection xen.org 2 participants 4 messages Jun 3, 2011

lore
Share & tools
lore

xen.org

author Acked-by Ian Campbell Acked-by Ian Campbell
#0 lore raw

branch xen-unstable
xen branch xen-unstable
job test-i386-xcpkern-i386-pv
test guest-start

Tree: http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.hg
Tree: http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.pq.hg
Tree: http://hg.uk.xensource.com/xen-unstable.hg

*** Found and reproduced problem changeset ***

Bug is in tree: http://hg.uk.xensource.com/xen-unstable.hg
Bug introduced: a44b12ee2fd3
Bug not present: 6d4b7530cee1

  changeset:   23401:a44b12ee2fd3
  user:        W. Michael Petullo <[email protected]>
  date:        Wed May 25 10:45:24 2011 +0100

tools/hotplug: support vif-post.d hook arrangements

New feature: you can drop hook scripts into
/etc/xen/scripts/vif-post.d/*.hook

For bisection revision-tuple graph see:
http://www.chiark.greenend.org.uk/~xensrcts/results/bisect.xen-unstable.test-i386-xcpkern-i386-pv.guest-start.html
Revision IDs in each graph node refer, respectively, to the Trees above.

----------------------------------------
Searching for failure / basis pass:
7491 fail [host=potato-beetle] / 7320 [host=itch-mite] 7315 [host=woodlouse] 7307 [host=woodlouse] 7285 [host=woodlouse] 7139 [host=leaf-beetle] 7134 [host=woodlouse] 7130 [host=leaf-beetle] 7128 [host=woodlouse] 7122 [host=leaf-beetle] 7115 [host=woodlouse] 7111 ok.
Failure / basis pass flights: 7491 / 7111
(tree in latest but not in basispass: git://hg.uk.xensource.com/HG/qemu-xen-unstable.git)
(tree in basispass but not in latest: git://mariner.uk.xensource.com/qemu-xen-unstable.git)
Tree: http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.hg
Tree: http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.pq.hg
Tree: http://hg.uk.xensource.com/xen-unstable.hg
Latest 32fc6955a6a5 fa15f90e6ac2 221f431092c0
Basis pass 32fc6955a6a5 fa15f90e6ac2 f531ed84b066
Generating revisions with ./adhoc-revtuple-generator http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.hg#32fc6955a6a5-32fc6955a6a5 http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.pq.hg#fa15f90e6ac2-fa15f90e6ac2 http://hg.uk.xensource.com/xen-unstable.hg#f531ed84b066-221f431092c0
pulling from http://hg.uk.xensource.com/xen-unstable.hg
searching for changes
no changes found
pulling from http://hg.uk.xensource.com/xen-unstable.hg
searching for changes
no changes found
Loaded 1001 nodes in revision graph
Searching for test results:
7487 fail 32fc6955a6a5 fa15f90e6ac2 221f431092c0
7489 pass 32fc6955a6a5 fa15f90e6ac2 ba8da39c6729
7490 pass 32fc6955a6a5 fa15f90e6ac2 a49b166232ec
7491 fail 32fc6955a6a5 fa15f90e6ac2 221f431092c0
7492 [host=earwig]
7495 [host=earwig]
7111 pass 32fc6955a6a5 fa15f90e6ac2 f531ed84b066
7496 [host=earwig]
7130 [host=leaf-beetle]
7498 [host=earwig]
7160 []
7285 [host=woodlouse]
7275 []
7122 [host=leaf-beetle]
7467 [host=woodlouse]
7315 [host=woodlouse]
7335 []
7320 [host=itch-mite]
7500 fail 32fc6955a6a5 fa15f90e6ac2 956438803307
7470 [host=woodlouse]
7139 [host=leaf-beetle]
7115 [host=woodlouse]
7264 []
7209 []
7501 fail 32fc6955a6a5 fa15f90e6ac2 f979a1a69fe3
7331 []
7240 []
7179 []
7150 []
7503 pass 32fc6955a6a5 fa15f90e6ac2 6d4b7530cee1
7504 fail 32fc6955a6a5 fa15f90e6ac2 a44b12ee2fd3
7505 pass 32fc6955a6a5 fa15f90e6ac2 6d4b7530cee1
7506 fail 32fc6955a6a5 fa15f90e6ac2 a44b12ee2fd3
7507 pass 32fc6955a6a5 fa15f90e6ac2 6d4b7530cee1
7508 fail 32fc6955a6a5 fa15f90e6ac2 a44b12ee2fd3
7472 fail 32fc6955a6a5 fa15f90e6ac2 4d28306d6e33
7307 [host=woodlouse]
7134 [host=woodlouse]
7202 []
7170 []
7128 [host=woodlouse]
7225 []
7474 [host=woodlouse]
7144 []
7475 pass 32fc6955a6a5 fa15f90e6ac2 f531ed84b066
7477 fail 32fc6955a6a5 fa15f90e6ac2 4d28306d6e33
7478 fail 32fc6955a6a5 fa15f90e6ac2 183c1a134e7b
7185 []
7479 fail 32fc6955a6a5 fa15f90e6ac2 221f431092c0
7219 []
7337 []
7341 []
7342 []
7343 [host=itch-mite]
7346 [host=earwig]
7480 [host=woodlouse]
7364 [host=woodlouse]
7366 [host=leaf-beetle]
7369 [host=itch-mite]
7371 fail 32fc6955a6a5 fa15f90e6ac2 14eb8e1fcd82
7373 []
7375 []
7391 [host=woodlouse]
7482 [host=woodlouse]
7483 [host=woodlouse]
7402 fail 32fc6955a6a5 fa15f90e6ac2 d7c755c25bb9
7484 [host=woodlouse]
7409 fail 32fc6955a6a5 fa15f90e6ac2 d7c755c25bb9
7485 [host=earwig]
7420 [host=earwig]
7438 [host=leaf-beetle]
7486 pass 32fc6955a6a5 fa15f90e6ac2 f531ed84b066
Searching for interesting versions
Result found: flight 7111 (pass), for basis pass
Result found: flight 7479 (fail), for basis failure
Repro found: flight 7486 (pass), for basis pass
Repro found: flight 7487 (fail), for basis failure
0 revisions at 32fc6955a6a5 fa15f90e6ac2 6d4b7530cee1
No revisions left to test, checking graph state.
Result found: flight 7503 (pass), for last pass
Result found: flight 7504 (fail), for first failure
Repro found: flight 7505 (pass), for last pass
Repro found: flight 7506 (fail), for first failure
Repro found: flight 7507 (pass), for last pass
Repro found: flight 7508 (fail), for first failure

*** Found and reproduced problem changeset ***

Bug is in tree: http://hg.uk.xensource.com/xen-unstable.hg
Bug introduced: a44b12ee2fd3
Bug not present: 6d4b7530cee1

pulling from http://hg.uk.xensource.com/xen-unstable.hg
searching for changes
no changes found

  changeset:   23401:a44b12ee2fd3
  user:        W. Michael Petullo <[email protected]>
  date:        Wed May 25 10:45:24 2011 +0100

tools/hotplug: support vif-post.d hook arrangements

New feature: you can drop hook scripts into
/etc/xen/scripts/vif-post.d/*.hook

Revision graph left in /home/xc_osstest/results/bisect.xen-unstable.test-i386-xcpkern-i386-pv.guest-start.{dot,ps,png,html}.
----------------------------------------
7508: ALL FAIL

flight 7508 xen-unstable real-bisect [real]
http://www.chiark.greenend.org.uk/~xensrcts/logs/7508/

jobs:
test-i386-xcpkern-i386-pv fail

------------------------------------------------------------
sg-report-flight on woking.cam.xci-test.com
logs: /home/xc_osstest/logs
images: /home/xc_osstest/images

Logs, config files, etc. are available at
http://www.chiark.greenend.org.uk/~xensrcts/logs

Test harness code can be found at
http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary

#1 lore raw
Quoted 20 lines · Ian Jackson

branch xen-unstable
xen branch xen-unstable
job test-i386-xcpkern-i386-pv
test guest-start

Tree: http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.hg
Tree: http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.pq.hg
Tree: http://hg.uk.xensource.com/xen-unstable.hg

*** Found and reproduced problem changeset ***

Bug is in tree: http://hg.uk.xensource.com/xen-unstable.hg
Bug introduced: a44b12ee2fd3
Bug not present: 6d4b7530cee1

  changeset:   23401:a44b12ee2fd3
  user:        W. Michael Petullo <[email protected]>
  date:        Wed May 25 10:45:24 2011 +0100
Quoted 7 lines

tools/hotplug: support vif-post.d hook arrangements

New feature: you can drop hook scripts into
/etc/xen/scripts/vif-post.d/*.hook

Urk!

http://www.chiark.greenend.org.uk/~xensrcts/logs/7491/ contains an instance of this failure, specifically
http://www.chiark.greenend.org.uk/~xensrcts/logs/7491/test-amd64-xcpkern-i386-pv/info.html

ts-guest-start ends:
Error: Device 0 (vif) could not be connected. /etc/xen/scripts/vif-bridge failed; error detected.
and in
http://www.chiark.greenend.org.uk/~xensrcts/logs/7491/test-amd64-xcpkern-i386-pv/gall-mite---var-log-syslog.gz
I see:

        Jun  2 17:19:50 gall-mite logger: /etc/xen/scripts/vif-bridge: iptables setup failed. This may affect guest networking.
        Jun  2 17:19:50 gall-mite logger: /etc/xen/scripts/vif-bridge: Writing backend/vif/1/0/hotplug-error /etc/xen/scripts/vif-bridge failed; error detected. backend/vif/1/0/hotplug-status error to xenstore.
        Jun  2 17:19:51 gall-mite logger: /etc/xen/scripts/vif-bridge: /etc/xen/scripts/vif-bridge failed; error detected.

That message comes from the "trap sigerr ERR". The hotplug script has "set -e" so some command has failed.

My guess is that when there are no hooks at all this:

    for f in /etc/xen/scripts/${1}-${2}.d/*.hook; do
        [ -x "$f" ] && . "$f"
    done

expands into a literal

	[ -x ".....*.hook" ] && . "..... *.hook"

and since ....*.hook doesn't exist the overall result of this expression is failure. The same would happen for any *.hook which wasn't executable.

Perhaps the following helps?

8<------------------------------------------------------------------

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1307092942 -3600
# Node ID bd110eb1481a650db3406bf2da80c76b1bfd7e7d # Parent 53e2d7b6f5eac55b992d13546c346ba372cbef74 tools/hotplug: do not fail if a hook isn't executable.

[ -x "..." ] && . "..." will return failure if the hook "..." is not executable (or doesn't exist). Invert the logic so that this case is correctly considered a success.

tools/hotplug/Linux/xen-hotplug-common.sh +1 -1
diff -r 53e2d7b6f5ea -r bd110eb1481a tools/hotplug/Linux/xen-hotplug-common.sh
@@ -106,7 +106,7 @@ xenstore_write() {
 #
 call_hooks() {
   for f in /etc/xen/scripts/${1}-${2}.d/*.hook; do
-    [ -x "$f" ] && . "$f"
+    [ ! -x "$f" ] || . "$f"
   done
 }
 
Quoted 165 lines

For bisection revision-tuple graph see:
http://www.chiark.greenend.org.uk/~xensrcts/results/bisect.xen-unstable.test-i386-xcpkern-i386-pv.guest-start.html
Revision IDs in each graph node refer, respectively, to the Trees above.

----------------------------------------
Searching for failure / basis pass:
7491 fail [host=potato-beetle] / 7320 [host=itch-mite] 7315 [host=woodlouse] 7307 [host=woodlouse] 7285 [host=woodlouse] 7139 [host=leaf-beetle] 7134 [host=woodlouse] 7130 [host=leaf-beetle] 7128 [host=woodlouse] 7122 [host=leaf-beetle] 7115 [host=woodlouse] 7111 ok.
Failure / basis pass flights: 7491 / 7111
(tree in latest but not in basispass: git://hg.uk.xensource.com/HG/qemu-xen-unstable.git)
(tree in basispass but not in latest: git://mariner.uk.xensource.com/qemu-xen-unstable.git)
Tree: http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.hg
Tree: http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.pq.hg
Tree: http://hg.uk.xensource.com/xen-unstable.hg
Latest 32fc6955a6a5 fa15f90e6ac2 221f431092c0
Basis pass 32fc6955a6a5 fa15f90e6ac2 f531ed84b066
Generating revisions with ./adhoc-revtuple-generator http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.hg#32fc6955a6a5-32fc6955a6a5 http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27.pq.hg#fa15f90e6ac2-fa15f90e6ac2 http://hg.uk.xensource.com/xen-unstable.hg#f531ed84b066-221f431092c0
pulling from http://hg.uk.xensource.com/xen-unstable.hg
searching for changes
no changes found
pulling from http://hg.uk.xensource.com/xen-unstable.hg
searching for changes
no changes found
Loaded 1001 nodes in revision graph
Searching for test results:
7487 fail 32fc6955a6a5 fa15f90e6ac2 221f431092c0
7489 pass 32fc6955a6a5 fa15f90e6ac2 ba8da39c6729
7490 pass 32fc6955a6a5 fa15f90e6ac2 a49b166232ec
7491 fail 32fc6955a6a5 fa15f90e6ac2 221f431092c0
7492 [host=earwig]
7495 [host=earwig]
7111 pass 32fc6955a6a5 fa15f90e6ac2 f531ed84b066
7496 [host=earwig]
7130 [host=leaf-beetle]
7498 [host=earwig]
7160 []
7285 [host=woodlouse]
7275 []
7122 [host=leaf-beetle]
7467 [host=woodlouse]
7315 [host=woodlouse]
7335 []
7320 [host=itch-mite]
7500 fail 32fc6955a6a5 fa15f90e6ac2 956438803307
7470 [host=woodlouse]
7139 [host=leaf-beetle]
7115 [host=woodlouse]
7264 []
7209 []
7501 fail 32fc6955a6a5 fa15f90e6ac2 f979a1a69fe3
7331 []
7240 []
7179 []
7150 []
7503 pass 32fc6955a6a5 fa15f90e6ac2 6d4b7530cee1
7504 fail 32fc6955a6a5 fa15f90e6ac2 a44b12ee2fd3
7505 pass 32fc6955a6a5 fa15f90e6ac2 6d4b7530cee1
7506 fail 32fc6955a6a5 fa15f90e6ac2 a44b12ee2fd3
7507 pass 32fc6955a6a5 fa15f90e6ac2 6d4b7530cee1
7508 fail 32fc6955a6a5 fa15f90e6ac2 a44b12ee2fd3
7472 fail 32fc6955a6a5 fa15f90e6ac2 4d28306d6e33
7307 [host=woodlouse]
7134 [host=woodlouse]
7202 []
7170 []
7128 [host=woodlouse]
7225 []
7474 [host=woodlouse]
7144 []
7475 pass 32fc6955a6a5 fa15f90e6ac2 f531ed84b066
7477 fail 32fc6955a6a5 fa15f90e6ac2 4d28306d6e33
7478 fail 32fc6955a6a5 fa15f90e6ac2 183c1a134e7b
7185 []
7479 fail 32fc6955a6a5 fa15f90e6ac2 221f431092c0
7219 []
7337 []
7341 []
7342 []
7343 [host=itch-mite]
7346 [host=earwig]
7480 [host=woodlouse]
7364 [host=woodlouse]
7366 [host=leaf-beetle]
7369 [host=itch-mite]
7371 fail 32fc6955a6a5 fa15f90e6ac2 14eb8e1fcd82
7373 []
7375 []
7391 [host=woodlouse]
7482 [host=woodlouse]
7483 [host=woodlouse]
7402 fail 32fc6955a6a5 fa15f90e6ac2 d7c755c25bb9
7484 [host=woodlouse]
7409 fail 32fc6955a6a5 fa15f90e6ac2 d7c755c25bb9
7485 [host=earwig]
7420 [host=earwig]
7438 [host=leaf-beetle]
7486 pass 32fc6955a6a5 fa15f90e6ac2 f531ed84b066
Searching for interesting versions
Result found: flight 7111 (pass), for basis pass
Result found: flight 7479 (fail), for basis failure
Repro found: flight 7486 (pass), for basis pass
Repro found: flight 7487 (fail), for basis failure
0 revisions at 32fc6955a6a5 fa15f90e6ac2 6d4b7530cee1
No revisions left to test, checking graph state.
Result found: flight 7503 (pass), for last pass
Result found: flight 7504 (fail), for first failure
Repro found: flight 7505 (pass), for last pass
Repro found: flight 7506 (fail), for first failure
Repro found: flight 7507 (pass), for last pass
Repro found: flight 7508 (fail), for first failure

*** Found and reproduced problem changeset ***

Bug is in tree: http://hg.uk.xensource.com/xen-unstable.hg
Bug introduced: a44b12ee2fd3
Bug not present: 6d4b7530cee1

pulling from http://hg.uk.xensource.com/xen-unstable.hg
searching for changes
no changes found

  changeset:   23401:a44b12ee2fd3
  user:        W. Michael Petullo <[email protected]>
  date:        Wed May 25 10:45:24 2011 +0100

tools/hotplug: support vif-post.d hook arrangements

New feature: you can drop hook scripts into
/etc/xen/scripts/vif-post.d/*.hook

Revision graph left in /home/xc_osstest/results/bisect.xen-unstable.test-i386-xcpkern-i386-pv.guest-start.{dot,ps,png,html}.
----------------------------------------
7508: ALL FAIL

flight 7508 xen-unstable real-bisect [real]
http://www.chiark.greenend.org.uk/~xensrcts/logs/7508/

jobs:
test-i386-xcpkern-i386-pv fail

------------------------------------------------------------
sg-report-flight on woking.cam.xci-test.com
logs: /home/xc_osstest/logs
images: /home/xc_osstest/images

Logs, config files, etc. are available at
http://www.chiark.greenend.org.uk/~xensrcts/logs

Test harness code can be found at
http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Ian Campbell writes ("Re: [Xen-devel] [xen-unstable bisection] complete test-i386-xcpkern-i386-pv"):

Quoted 1 line · Ian Jackson

...

Quoted 7 lines
Quoted 7 lines

tools/hotplug: support vif-post.d hook arrangements

New feature: you can drop hook scripts into
/etc/xen/scripts/vif-post.d/*.hook

I had a suspicion it might be that ...

Quoted 2 lines

That message comes from the "trap sigerr ERR". The hotplug script has "set -e" so some command has failed.

It's a shame that we don't get the stderr output under xend. Still, let's not try to fix that ...

Quoted 11 lines

My guess is that when there are no hooks at all this:

    for f in /etc/xen/scripts/${1}-${2}.d/*.hook; do
        [ -x "$f" ] && . "$f"
    done

expands into a literal

	[ -x ".....*.hook" ] && . "..... *.hook"

and since ....*.hook doesn't exist the overall result of this expression is failure. The same would happen for any *.hook which wasn't executable.

No.

mariner:~> bash -ec 'trap "echo e" ERR; false && echo a; echo b'
b
mariner:~> dash -ec 'for f in /etc/xen/scripts/${1}-${2}.d/*.hook; do [ -x "$f" ] && . "$f"; done; echo ok' ok
mariner:~> ls /etc/xen/scripts
/bin/ls: cannot access /etc/xen/scripts: No such file or directory
mariner:~>

set -e and the ERR trap don't apply to && and || lists at all. This is arguably a specification bug.

Quoted 1 line

Perhaps the following helps?

I think we need more diagnosis. I'll investigate.

Ian.

#3 lore raw
Quoted 1 line · I wrote:

I think we need more diagnosis. I'll investigate.

I was able to repro this trivially. Your analysis was nearly right. I have just pushed the fix below, which should sort it out I think.

# HG changeset patch
# User Ian Jackson <[email protected]>
# Date 1307109870 -3600
# Node ID 921dcd80f79120bd9938b4ee0fec7428b2da0f6e
# Parent 0791661a32d8eba917c87feacf2c955b85521ad1 tools/hotplug: Fix hotplug hook script arrangements not to always fail

The new feature introduced in 23401:a44b12ee2fd3 was broken; it in general always fails, at least if there are no hotplug scripts.

If there are no hooks, call_hooks ends up running this:
[ -x ".....*.hook" ] && . "..... *.hook"

This does not directly trigger set -e and sigerr. However, it is the last command exected in call_hooks. So the return status of call_hooks is an error, and thus a sigerr happens when call_hooks returns.

The bug affects xl and xm. However xl does not detect failure of the hotplug script.

Change the script to use if...then rather than &&, as the latter has very confusing and undesirable semantics.

tools/hotplug/Linux/xen-hotplug-common.sh +1 -1
diff -r 0791661a32d8 -r 921dcd80f791 tools/hotplug/Linux/xen-hotplug-common.sh
@@ -106,7 +106,7 @@ xenstore_write() {
 #
 call_hooks() {
   for f in /etc/xen/scripts/${1}-${2}.d/*.hook; do
-    [ -x "$f" ] && . "$f"
+    if [ -x "$f" ]; then . "$f"; fi
   done
 }