Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

tests do not pass on current head for rustc 1.70.0 #116

Open
PascalinDe opened this issue Jun 19, 2023 · 4 comments
Open

tests do not pass on current head for rustc 1.70.0 #116

PascalinDe opened this issue Jun 19, 2023 · 4 comments
Assignees

Comments

@PascalinDe
Copy link
Member

PascalinDe commented Jun 19, 2023

tests do not pass when following instructions in README.md

version of Rust compiler

~/src/lightarti-rest$ rustc --version
rustc 1.70.0 (90c541806 2023-05-31)

output:

$ make dircache
[...]
$ cargo test
[...]
    Finished test [unoptimized + debuginfo] target(s) in 40.07s
     Running unittests src/lib.rs (target/debug/deps/lightarti_rest-67ccfbb00f1b27cf)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/client.rs (target/debug/deps/client-04261347f66a5a5e)

running 4 tests
2023-06-19T15:30:46.676640Z DEBUG arti_client::client: It appears we have the lock on our state files.
2023-06-19T15:30:46.676640Z DEBUG arti_client::client: It appears we have the lock on our state files.
2023-06-19T15:30:46.676641Z DEBUG arti_client::client: It appears we have the lock on our state files.
2023-06-19T15:30:46.676640Z DEBUG arti_client::client: It appears we have the lock on our state files.
2023-06-19T15:30:46.676702Z DEBUG lightarti_rest::flatfiledirmgr: consensus.txt loaded
2023-06-19T15:30:46.676706Z DEBUG lightarti_rest::flatfiledirmgr: consensus.txt loaded
2023-06-19T15:30:46.676706Z DEBUG lightarti_rest::flatfiledirmgr: consensus.txt loaded
2023-06-19T15:30:46.676712Z DEBUG lightarti_rest::flatfiledirmgr: churn.txt loaded
2023-06-19T15:30:46.676715Z DEBUG lightarti_rest::flatfiledirmgr: consensus.txt loaded
2023-06-19T15:30:46.676717Z DEBUG lightarti_rest::flatfiledirmgr: churn.txt loaded
2023-06-19T15:30:46.676719Z DEBUG lightarti_rest::flatfiledirmgr: churn.txt loaded
2023-06-19T15:30:46.676723Z DEBUG lightarti_rest::flatfiledirmgr: churn.txt loaded
2023-06-19T15:30:46.683194Z DEBUG tor_circmgr: Lock not held; no state to flush.
2023-06-19T15:30:46.683194Z DEBUG tor_circmgr: Lock not held; no state to flush.
2023-06-19T15:30:46.683200Z DEBUG tor_circmgr: Lock not held; no state to flush.
2023-06-19T15:30:46.683249Z DEBUG tor_circmgr: Lock not held; no state to flush.
test test_get_short ... FAILED
test test_get_many_headers ... FAILED
test test_post ... FAILED
test test_get_long_response ... FAILED

failures:

---- test_get_short stdout ----
thread 'test_get_short' panicked at 'create client: create tor client

Caused by:
    0: tor: Tor network protocol violation (bug, incompatibility, or attack): Unable to bootstrap a working directory
    1: Unable to bootstrap a working directory
    2: Directory object expired or not yet valid
    3: Object is not currently valid', tests/client.rs:66:14

---- test_get_many_headers stdout ----
thread 'test_get_many_headers' panicked at 'create client: create tor client

Caused by:
    0: tor: Tor network protocol violation (bug, incompatibility, or attack): Unable to bootstrap a working directory
    1: Unable to bootstrap a working directory
    2: Directory object expired or not yet valid
    3: Object is not currently valid', tests/client.rs:66:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- test_post stdout ----
thread 'test_post' panicked at 'create client: create tor client

Caused by:
    0: tor: Tor network protocol violation (bug, incompatibility, or attack): Unable to bootstrap a working directory
    1: Unable to bootstrap a working directory
    2: Directory object expired or not yet valid
    3: Object is not currently valid', tests/client.rs:66:14

---- test_get_long_response stdout ----
thread 'test_get_long_response' panicked at 'create client: create tor client

Caused by:
    0: tor: Tor network protocol violation (bug, incompatibility, or attack): Unable to bootstrap a working directory
    1: Unable to bootstrap a working directory
    2: Directory object expired or not yet valid
    3: Object is not currently valid', tests/client.rs:66:14


failures:
    test_get_long_response
    test_get_many_headers
    test_get_short
    test_post

test result: FAILED. 0 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

error: test failed, to rerun pass `--test client`

there were no issues in the compiling step

blocking #117

@PascalinDe
Copy link
Member Author

I created a minimal Dockerfile and reproduced on a newly cloned repo:

FROM rust:1.70-bookworm

COPY . .
RUN apt-get update && apt-get install make
RUN make dircache
ENTRYPOINT ["cargo", "test"]

@ineiti
Copy link
Member

ineiti commented Jun 20, 2023

The error is a bit strange:

    0: tor: Tor network protocol violation (bug, incompatibility, or attack): Unable to bootstrap a working directory

So either the tor network updated the nodes, and the arti-version we're using cannot connect to it anymore, or there is something not-tor-compatible going on in your network setup.

Can you try to re-run the github workflows? IIRC, they also run the tests.

@PascalinDe PascalinDe self-assigned this Jun 30, 2023
@PascalinDe
Copy link
Member Author

@ineiti I'm not really sure that I understand how all of this is working, but given that the error refers to the directory, is it possible that the outdated directory cache from https://github.com/c4dt/lightarti-directory/releases/tag/2022-12-11 is the problem?

the README says it'd get updated every day, but the latest update is from 12/22

@PascalinDe
Copy link
Member Author

it seems that GitHub disables scheduled workflows after 2 months of inactivity:

This scheduled workflow is disabled because there hasn't been activity in this repository for at least 60 days. Enable this workflow to resume scheduled runs.

https://github.com/c4dt/lightarti-directory/actions/workflows/update.yaml

shall I re-enable the workflow?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants