-
Notifications
You must be signed in to change notification settings - Fork 269
Support tor test suite #3168
Copy link
Copy link
Open
Labels
Type: BugError or flaw producing unexpected resultsError or flaw producing unexpected results
Description
Successfully running the tor test suite under shadow would be helpful for verifying that platform functionality that tor uses works as expected under shadow.
Using the not-yet-merged execve implementation I was able to run it. Most tests pass, but there are a few failures. Some of these are worth investigating further.
config:
general:
stop_time: 600s
model_unblocked_syscall_latency: true
network:
graph:
type: 1_gbit_switch
hosts:
host:
network_node_id: 0
processes:
- path: bash
start_time: 3s`
args:
- -c
- |
set -euo pipefail
/home/jnewsome/projects/tor/src/test/test
echo done
Full test suite stdout:
shadow-tor-make-test.stdout.txt
Just the failures:
address/get_if_addrs_ioctl: [forking] Jan 01 00:00:03.038 [err] ioctl failed: Invalid argument
[get_if_addrs_ioctl FAILED]
crypto/openssl/rng_engine: [forking]
FAIL src/test/test_crypto_openssl.c:29: assert(0 OP_EQ crypto_force_rand_ssleay()): 0 vs 1
[rng_engine FAILED]
dir/bwauth_bw_file_digest256:
FAIL src/test/test_dir.c:4471: assert(-1 OP_EQ dirserv_read_measured_bandwidths(fname, NULL, NULL, digest)): -1 vs 0
[bwauth_bw_file_digest256 FAILED]
dir_handle_get/server_descriptors_all: [forking]
FAIL src/test/test_dir_handle_get.c:633: assert(body_used OP_EQ mock_routerinfo->cache_info.signed_descriptor_len): 18238 vs 2306
[server_descriptors_all FAILED]
sandbox/is_active: [forking] Jan 01 00:00:06.038 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.7.13 7c1601fb6edd780f)
FAIL src/test/test_sandbox.c:144: assert(sandbox_is_active())
[is_active FAILED]
sandbox/open_filename: [forking] Jan 01 00:00:06.042 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.7.13 7c1601fb6edd780f)
FAIL src/test/test_sandbox.c:168: assert(fd OP_EQ -1): 9 vs -1
[open_filename FAILED]
sandbox/opendir_dirname: [forking] Jan 01 00:00:06.045 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.7.13 7c1601fb6edd780f)
FAIL src/test/test_sandbox.c:269: assert(dir OP_EQ NULL): 0x55555632d490 vs (nil)
[opendir_dirname FAILED]
sandbox/openat_filename: [forking] Jan 01 00:00:06.048 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.7.13 7c1601fb6edd780f)
FAIL src/test/test_sandbox.c:247: assert(fd OP_EQ -1): 9 vs -1
[openat_filename FAILED]
sandbox/chmod_filename: [forking] Jan 01 00:00:06.052 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.7.13 7c1601fb6edd780f)
FAIL src/test/test_sandbox.c:188: assert(rc OP_EQ -1): 0 vs -1
[chmod_filename FAILED]
sandbox/chown_filename: [forking] Jan 01 00:00:06.055 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.7.13 7c1601fb6edd780f)
FAIL src/test/test_sandbox.c:206: assert(rc OP_EQ -1): 0 vs -1
[chown_filename FAILED]
sandbox/rename_filename: [forking] Jan 01 00:00:06.058 [err] install_syscall_filter(): Bug: (Sandbox) failed to load: -125 (Operation canceled)! Are you sure that your kernel has seccomp2 support? The sandbox won't work without it. (on Tor 0.4.7.13 7c1601fb6edd780f)
FAIL src/test/test_sandbox.c:226: assert(rc OP_EQ -1): 0 vs -1
[rename_filename FAILED]
tortls/verify: [forking]
FAIL src/test/test_tortls.c:512: assert(ret OP_EQ 0): -1 vs 0
[verify FAILED]
tortls/openssl/cert_is_valid: [forking]
FAIL src/test/test_tortls_openssl.c:2085: assert(ret OP_EQ 1): 0 vs 1
[cert_is_valid FAILED]
util/monotonic_time:
FAIL src/test/test_util.c:6492: assert(monotime_diff_msec(&mt1, &mt2) OP_GE 175): 0 vs 175
[monotonic_time FAILED]
14/1481 TESTS FAILED. (27 skipped)
additionally, the test compat/libevent/postloop_events deadlocks unless model_unblocked_syscall_latency is enabled, which could be a busy-loop bug in tor (but may only be an issue in the test).
Here are shadow's warnings:
$ grep -E 'WARN|ERROR' build/src/test/examples/bash/shadow.log
00:00:00.008151 [62233:shadow-worker] 00:00:03.000058030 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:00:00.008309 [62233:shadow-worker] 00:00:03.000060030 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:00:00.009371 [62233:shadow-worker] 00:00:03.000080050 [WARN] [host:11.0.0.1] [ioctl.c:50] [_syscallhandler_ioctlFileHelper] We do not yet handle ioctl request 21519 on file 2
00:00:00.009473 [62233:shadow-worker] 00:00:03.000082050 [WARN] [host:11.0.0.1] [ioctl.c:50] [_syscallhandler_ioctlFileHelper] We do not yet handle ioctl request 21519 on file 2
00:00:09.797390 [62233:shadow-worker] 00:00:03.038214360 [WARN] [host:11.0.0.1] [udp.rs:639] [shadow_rs::host::descriptor::socket::inet::udp] (LOG_ONCE) We do not yet handle ioctl request SIOCGIFCONF on tcp sockets
00:00:51.485479 [62233:shadow-worker] 00:00:03.197940420 [WARN] [host:11.0.0.1] [syscall_handler.c:564] [syscallhandler_make_syscall] Detected unsupported syscall 95 called from thread 1052 in process bash on host host
00:10:44.289734 [62233:shadow-worker] 00:00:05.590938360 [WARN] [host:11.0.0.1] [dns.c:195] [dns_resolveNameToAddress] unable to find address from name 'fractabling'
00:12:41.844376 [62233:shadow-worker] 00:00:06.038913340 [WARN] [host:11.0.0.1] [syscall_handler.c:564] [syscallhandler_make_syscall] Detected unsupported syscall 317 called from thread 1801 in process bash on host host
00:12:41.845162 [62233:shadow-worker] 00:00:06.038917340 [WARN] [host:11.0.0.1] [process.c:87] [syscallhandler_prctl] Not allowing seccomp prctl 22
00:12:42.881769 [62233:shadow-worker] 00:00:06.042251150 [WARN] [host:11.0.0.1] [syscall_handler.c:564] [syscallhandler_make_syscall] Detected unsupported syscall 317 called from thread 1802 in process bash on host host
00:12:42.882640 [62233:shadow-worker] 00:00:06.042255150 [WARN] [host:11.0.0.1] [process.c:87] [syscallhandler_prctl] Not allowing seccomp prctl 22
00:12:43.922078 [62233:shadow-worker] 00:00:06.045564680 [WARN] [host:11.0.0.1] [syscall_handler.c:564] [syscallhandler_make_syscall] Detected unsupported syscall 317 called from thread 1803 in process bash on host host
00:12:43.922853 [62233:shadow-worker] 00:00:06.045568680 [WARN] [host:11.0.0.1] [process.c:87] [syscallhandler_prctl] Not allowing seccomp prctl 22
00:12:44.920891 [62233:shadow-worker] 00:00:06.048910510 [WARN] [host:11.0.0.1] [syscall_handler.c:564] [syscallhandler_make_syscall] Detected unsupported syscall 317 called from thread 1804 in process bash on host host
00:12:44.921787 [62233:shadow-worker] 00:00:06.048914510 [WARN] [host:11.0.0.1] [process.c:87] [syscallhandler_prctl] Not allowing seccomp prctl 22
00:12:45.966656 [62233:shadow-worker] 00:00:06.052260400 [WARN] [host:11.0.0.1] [syscall_handler.c:564] [syscallhandler_make_syscall] Detected unsupported syscall 317 called from thread 1805 in process bash on host host
00:12:45.967394 [62233:shadow-worker] 00:00:06.052264400 [WARN] [host:11.0.0.1] [process.c:87] [syscallhandler_prctl] Not allowing seccomp prctl 22
00:12:46.964458 [62233:shadow-worker] 00:00:06.055548700 [WARN] [host:11.0.0.1] [syscall_handler.c:564] [syscallhandler_make_syscall] Detected unsupported syscall 317 called from thread 1806 in process bash on host host
00:12:46.965217 [62233:shadow-worker] 00:00:06.055552700 [WARN] [host:11.0.0.1] [process.c:87] [syscallhandler_prctl] Not allowing seccomp prctl 22
00:12:47.904569 [62233:shadow-worker] 00:00:06.058884470 [WARN] [host:11.0.0.1] [syscall_handler.c:564] [syscallhandler_make_syscall] Detected unsupported syscall 317 called from thread 1807 in process bash on host host
00:12:47.905328 [62233:shadow-worker] 00:00:06.058888470 [WARN] [host:11.0.0.1] [process.c:87] [syscallhandler_prctl] Not allowing seccomp prctl 22
00:14:36.369296 [62233:shadow-worker] 00:00:06.460652570 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.369436 [62233:shadow-worker] 00:00:06.460654570 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.375405 [62233:shadow-worker] 00:00:06.460726570 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.375540 [62233:shadow-worker] 00:00:06.460728570 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.380071 [62233:shadow-worker] 00:00:06.460815580 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.380880 [62233:shadow-worker] 00:00:06.460831580 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.381006 [62233:shadow-worker] 00:00:06.460833580 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.384379 [62233:shadow-worker] 00:00:06.460904590 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.385234 [62233:shadow-worker] 00:00:06.460920590 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.385359 [62233:shadow-worker] 00:00:06.460924590 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
00:14:36.388777 [62233:shadow-worker] 00:00:06.460995600 [WARN] [host:11.0.0.1] [unix.rs:2211] [shadow_rs::host::descriptor::socket::unix] Unix sockets with pathname addresses are not yet supported
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: BugError or flaw producing unexpected resultsError or flaw producing unexpected results