Opened 9 months ago

Closed 7 months ago

#29731 closed defect (fixed)

tor compilation hangs frequently when building Windows testbuilds

Reported by: gk Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, GeorgKoppen201904, TorBrowserTeam201905R
Cc: boklm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I have seen frequent hangs when building tor for Windows lately, the output ps gives me always indicates that's due to Rust involvement:

boklm    27911  0.0  0.0  21032  2884 ?        S    11:10   0:00 /bin/bash -c ( cd "/var/tmp/build/tor-911f95ed9203/src/rust" ; \ .CARGO_TARGET_DIR="/var/tmp/build/tor-911f95ed9203/src/rust/target" \ .cargo build --release  \ .--frozen \ .--manifest-path "/var/tmp/build/tor-911f95ed9203/src/rust/tor_rust/Cargo.toml" )
boklm    27912  0.0  0.0  21040  2144 ?        S    11:10   0:00 /bin/bash -c ( cd "/var/tmp/build/tor-911f95ed9203/src/rust" ; \ .CARGO_TARGET_DIR="/var/tmp/build/tor-911f95ed9203/src/rust/target" \ .cargo build --release  \ .--frozen \ .--manifest-path "/var/tmp/build/tor-911f95ed9203/src/rust/tor_rust/Cargo.toml" )
boklm    27913  0.0  0.1  59928 12672 ?        Sl   11:10   0:00 cargo build --release --frozen --manifest-path /var/tmp/build/tor-911f95ed9203/src/rust/tor_rust/Cargo.toml
boklm    27993  0.0  1.5 291156 124976 ?       Sl   11:10   0:00 rustc --crate-name external external/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C debuginfo=2 -C metadata=0f05d544ad739841 -C extra-filename=-0f05d544ad739841 --out-dir /var/tmp/build/tor-911f95ed9203/src/rust/target/x86_64-pc-windows-gnu/release/deps --target x86_64-pc-windows-gnu -L dependency=/var/tmp/build/tor-911f95ed9203/src/rust/target/x86_64-pc-windows-gnu/release/deps -L dependency=/var/tmp/build/tor-911f95ed9203/src/rust/target/release/deps --extern libc=/var/tmp/build/tor-911f95ed9203/src/rust/target/x86_64-pc-windows-gnu/release/deps/liblibc-705cca6c457715c2.rlib --extern smartlist=/var/tmp/build/tor-911f95ed9203/src/rust/target/x86_64-pc-windows-gnu/release/deps/libsmartlist-42b40589a0bfb5d0.rlib --extern tor_allocate=/var/tmp/build/tor-911f95ed9203/src/rust/target/x86_64-pc-windows-gnu/release/deps/libtor_allocate-3bee9e10e00146b6.rlib

I might have seen this once with macOS builds but I think never with Linux ones.

Child Tickets

Change History (6)

comment:1 Changed 9 months ago by gk

Oh, it can happen the install target as well:

boklm     3761  0.0  0.1  29848 16108 ?        S    11:38   0:00 make install
boklm     3769  0.0  0.1  29816 16104 ?        S    11:38   0:00 make install-exec-am install-data-am
boklm     3773  0.0  0.0  21036  2988 ?        S    11:38   0:00 /bin/bash -c ( cd "/var/tmp/build/tor-911f95ed9203/src/rust" ; \ .CARGO_TARGET_DIR="/var/tmp/build/tor-911f95ed9203/src/rust/target" \ .cargo build --release  \ .--frozen \ .--manifest-path "/var/tmp/build/tor-911f95ed9203/src/rust/tor_rust/Cargo.toml" )
boklm     3774  0.0  0.0  21040  2240 ?        S    11:38   0:00 /bin/bash -c ( cd "/var/tmp/build/tor-911f95ed9203/src/rust" ; \ .CARGO_TARGET_DIR="/var/tmp/build/tor-911f95ed9203/src/rust/target" \ .cargo build --release  \ .--frozen \ .--manifest-path "/var/tmp/build/tor-911f95ed9203/src/rust/tor_rust/Cargo.toml" )
boklm     3775  0.0  0.1  43512 12084 ?        Sl   11:38   0:00 cargo build --release --frozen --manifest-path /var/tmp/build/tor-911f95ed9203/src/rust/tor_rust/Cargo.toml

But it's Rust related, too. Smells like a faketime issue (which would fit to the fact that I saw this once with macOS as well, recently, but never Linux).

comment:2 Changed 9 months ago by gk

Cc: boklm added

I wonder why we still need to use faketime here at all...

comment:3 Changed 9 months ago by gk

Interestingly enough I seem to have less issues by compiling tor separately with ./rbm/rbm build tor --target nightly --target torbrowser-windows-x86_64. I've not double-checked whether that's only luck or imagination, though. :)

comment:4 in reply to:  2 ; Changed 9 months ago by gk

Replying to gk:

I wonder why we still need to use faketime here at all...

#20426 has historical context. However, we did not set -Wl,--no-insert-timestamp back then. So, I am wondering whether doing that now would work and help with this ticket.

comment:5 in reply to:  4 Changed 7 months ago by gk

Keywords: GeorgKoppen201904 TorBrowserTeam201905R added
Status: newneeds_review

Replying to gk:

Replying to gk:

I wonder why we still need to use faketime here at all...

#20426 has historical context. However, we did not set -Wl,--no-insert-timestamp back then. So, I am wondering whether doing that now would work and help with this ticket.

This bug got so annyoing in my dev workflow that I wrote a fix for it and tested the result. I still get reproducible output without using faketime here. bug_29731_v2 (https://gitweb.torproject.org/user/gk/tor-browser-build.git/commit/?h=bug_29731_v2&id=dd007eb1419dac3905a5aa53dbbab02bea19d92b) has a fix for review.

Note: macOS is affected by the same problem and I'll open a separate bug for that. However, that's not as problematic for me right now as I usually don't build macOS nightly bundles in my setup.

comment:6 Changed 7 months ago by boklm

Resolution: fixed
Status: needs_reviewclosed

This looks good to me, and I was also able to reproduce a build with this patch. I merged it to master with commit 5c0b72bce234088834297436ff20fc6942e935a3.

Note: See TracTickets for help on using tickets.