Opened 5 years ago

Last modified 23 months ago

#13147 new defect

Curious debian hurd unit test failure

Reported by: Sebastian Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-client test unit-test debian hurd needs-hurd
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

0.2.5.7-rc and master fail unit tests on the hurd.

The failing test is util/spawn_background_fail, the reported error is (line 2832 in current master):
assert((expected_status) == (process_handle->status)): 1 vs 0.

This only happens when running all unit tests, when I just say src/test/test util/spawn_background_fail, the test passes.

I'm setting this for 0.2.5.x-final because it would be nice to build there for the next release (it's a regression to fail tests against 0.2.4-stable), but if nobody has any ideas I guess we'll defer it

Originally reported by weasel

Child Tickets

Change History (15)

comment:1 Changed 5 years ago by nickm

Interesting indeed. Here are some ways to track it down:

  • Which test(s) need to happen before util/spawn_background_fail to make it fail?
  • What does valgrind say?
  • Can you use git bisect to find which commit introduced this problem?

comment:2 Changed 5 years ago by Sebastian

  • is there a way to run all tests from a subdir via wildcard patterns or so?
  • valgrind isn't available on hurd :/
  • ok, bisecting

comment:3 Changed 5 years ago by nickm

is there a way to run all tests from a subdir via wildcard patterns or so?

You can use ".." as a wildcard at the end of a test description. eg, you can say ./src/test/test util.. crypto.. or even ./src/test/test util/str.. crypto/pk...

You can also use ":" as negating prefix to disable a test or subset of tests, as in ./src/test/test :crypto/pk :util/..

comment:4 Changed 5 years ago by Sebastian

Quick branch unittest_explain in my repo to add this to HACKING. Maybe it's adequate

comment:5 Changed 5 years ago by nickm

merged it; thanks!

comment:6 Changed 5 years ago by Sebastian

the bad commit is e3833193af11dc425 :/

comment:7 Changed 5 years ago by Sebastian

The test fails reliably when I run src/test/test crypto/curve25519_impl util/spawn_background_fail

comment:8 Changed 5 years ago by Sebastian

(this is not the only test that makes it fail, even running src/test/test :crypto makes that test fail. But it is one example)

comment:9 Changed 5 years ago by nickm

So for this kind of heisenbug, I'd maybe suspect that there is some buffer on the stack that is getting read in an unitialized state in the spawn_util_background tests.

Also, notify_pending_waitpid_callbacks() in run_util_spawn_background() might be doing something odd.

comment:10 Changed 5 years ago by ioerror

I have access to Debian porter boxes with GNU/Hurd. I'd be willing to poke at things if it would be useful.

comment:11 Changed 4 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.???

I'll backport a fix to the tests to 0.2.6 if somebody does one soon, but this doesn't belong in 0.2.5

comment:12 Changed 2 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:13 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:14 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:15 Changed 23 months ago by nickm

Keywords: tor-client test unit-test debian hurd needs-hurd added
Severity: Normal
Note: See TracTickets for help on using tickets.