Opened 5 years ago

Closed 4 years ago

#14182 closed defect (worksforme)

cross-built tor (mingw under linux) fails to complete test suite

Reported by: weasel Owned by:
Priority: Medium Milestone: Tor: 0.2.7.x-final
Component: Core Tor/Tor Version: Tor: 0.2.7
Severity: Keywords: 027-triaged-1-in, SponsorS, PostFreeze027
Cc: rl1987@… Actual Points:
Parent ID: Points: medium
Reviewer: Sponsor:

Description

Hi,

building Tor under Linux for windows [1] results in a test.exe binary that fails its test suite [2,3] (both natively and under wine).

15:13:29 util/spawn_background_ok: 
15:13:29   FAIL src/test/test_util.c:3580: assert(MATCH_PROCESS_STATUS(expected_status, status))
15:13:29   [spawn_background_ok FAILED]
15:13:29 util/spawn_background_fail: OK
15:13:29 util/spawn_background_partial_read: 
15:13:29   FAIL src/test/test_util.c:3736: assert(expected_status OP_EQ status): 1 vs -1
15:13:29   [spawn_background_partial_read FAILED]
15:13:29 util/spawn_background_exit_early: 
15:13:29   FAIL src/test/test_util.c:3736: assert(expected_status OP_EQ status): 1 vs -1
15:13:29   [spawn_background_exit_early FAILED]
15:13:29 util/spawn_background_waitpid_notify: 
15:13:29   FAIL src/test/test_util.c:3839: assert(status OP_EQ PROCESS_STATUS_RUNNING): -1 vs 1
15:13:29   [spawn_background_waitpid_notify FAILED]

A native build [4] (with a different mingw version presumably) does not exhibit this issue.

You should be able to reproduce this issue on dixie. Ping me if you need help
battling schroot.

Cheers,
weasel

  1. https://jenkins.torproject.org/job/tor-ci-mingwcross/
  2. https://jenkins.torproject.org/job/tor-ci-mingwcross-test-native/
  3. https://jenkins.torproject.org/job/tor-ci-mingwcross-test/
  4. https://jenkins.torproject.org/job/tor-ci-windows/

Child Tickets

Attachments (1)

log (66.3 KB) - added by weasel 5 years ago.
result of WINEPREFIX=pwd/wine wine64 ./test.exe --debug --verbose util/spawn_background_partial_read > ~/log 2>&1

Download all attachments as: .zip

Change History (13)

comment:1 Changed 5 years ago by weasel

<nickm> one thing that would help is the output of "./src/test/test --debug --verbose util/spawn_background_partial_read"

[please disregard the wine noise re fixme:toolhelp]

[jessie-amd64-sbuild] weasel@dixie:~/tmp/RESULT/bin$ WINEPREFIX=`pwd`/wine wine64 ./test.exe --debug --verbose util/spawn_background_partial_read
Jan 12 18:35:01.665 [info] crypto_early_init(): OpenSSL version matches version from headers (100010bf: OpenSSL 1.0.1k 8 Jan 2015).
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
Jan 12 18:35:01.987 [info] crypto_global_init(): NOT using OpenSSL engine support.
Jan 12 18:35:01.987 [info] evaluate_evp_for_aes(): This version of OpenSSL has a known-good EVP counter-mode implementation. Using it.
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
Jan 12 18:35:02.000 [debug] check_private_dir(): stat()ing C:\users\weasel\Temp\tor_test_64_njlh7vth
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 128.31.0.39:9131 (9695)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 86.59.21.38:80 (847B)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 194.109.206.212:80 (7EA6)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 16 dirserver at 82.94.251.203:80 (4A0C)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 131.188.40.189:80 (F204)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 193.23.244.244:80 (7BE6)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 208.83.223.34:443 (0AD3)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 171.25.193.9:443 (BD6A)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 154.35.32.5:80 (CF6D)
Jan 12 18:35:02.001 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 199.254.238.52:80 (74A9)
util/spawn_background_partial_read: Jan 12 18:35:02.005 [warn] Failed to create child process test-child.exe: File not found.


  FAIL src/test/test_util.c:3736: assert(expected_status OP_EQ status): 1 vs -1
  [spawn_background_partial_read FAILED]
1/1 TESTS FAILED. (0 skipped)
[jessie-amd64-sbuild] weasel@dixie:~/tmp/RESULT/bin$ 

comment:2 Changed 5 years ago by weasel

Copied over test-child.exe as well:

[jessie-amd64-sbuild] weasel@dixie:~/tmp/RESULT/bin$ WINEPREFIX=pwd/wine wine64 ./test.exe --debug --verbose util/spawn_background_partial_read > ~/log 2>&1

also fails. See attached log file.

Changed 5 years ago by weasel

Attachment: log added

result of WINEPREFIX=pwd/wine wine64 ./test.exe --debug --verbose util/spawn_background_partial_read > ~/log 2>&1

comment:3 Changed 5 years ago by nickm

Jan 12 18:43:28.844 [info] test_util_spawn_background_partial_read_impl(): tor_read_all_handle() returned 0
623	Jan 12 18:43:28.844 [info] test_util_spawn_background_partial_read_impl(): tor_read_all_handle() returned 0
624	Jan 12 18:43:28.844 [info] test_util_spawn_background_partial_read_impl(): tor_read_all_handle() returned 5
625	
626	    OK src/test/test_util.c:3757: assert(pos > 0)
627	  FAIL src/test/test_util.c:3759: assert(expected_out[expected_out_ctr] OP_EQ stdout_buf): <OUT
628	
629	--test
630	
631	SLEEPING
632	
633	> vs <OUT
634	
635	>

looks like we should have read some more. I wonder why we thought this test would ever work. Should investigate it more.

comment:4 Changed 5 years ago by weasel

It seems to work when running natively. Under wine it's racey -- sometimes it works, often it doesn't. Maybe it's always a race and we just win most of the time.

comment:5 Changed 5 years ago by nickm

Maybe it's always a race and we just win most of the time.

That's my theory, yeah.

comment:6 Changed 5 years ago by rl1987

Cc: rl1987@… added

comment:7 Changed 5 years ago by nickm

Milestone: Tor: 0.2.7.x-final

comment:8 Changed 5 years ago by nickm

Status: newassigned

comment:9 Changed 5 years ago by nickm

Keywords: 027-triaged-1-in added

Marking more tickets as triaged-in for 0.2.7

comment:10 Changed 5 years ago by isabela

Keywords: SponsorS added
Points: medium
Version: Tor: unspecifiedTor: 0.2.7

comment:11 Changed 4 years ago by nickm

Keywords: PostFreeze027 added

If we wind up with a nice patch for any of these in the appropriate window, we should sure merge it.

comment:12 Changed 4 years ago by nickm

Resolution: worksforme
Status: assignedclosed

This seems to be happy for now, and to have been happy for a long time. Except for 0.2.5 it's been unhappy for a long time.

I'm going to call it worksforme for now, but I'll reopen if it stops working

Note: See TracTickets for help on using tickets.