mimblewimble / grin-wallet

Grin Wallet
Apache License 2.0
183 stars 133 forks source link

Update sysinfo crate to 0.29.6 #685

Closed yeastplume closed 1 year ago

yeastplume commented 1 year ago

Due to changes in rust, compilation was failing on windows and we need to update the sysinfo crate used by tor process handling to the latest. This also comes with API changes, namely that the Process struct can't be instantiated directly and needs to be searched in the System struct.

Changes now needs to be sanity tested on all platforms to ensure tor processes still start and terminate as expected.

Also contains updates to remove deprecation warnings from chrono related updates.

yeastplume commented 1 year ago

Verified tor listener on windows and linux, Mac probably okay but can't check.

quentinlesceller commented 1 year ago

For some reasons I'm getting a segfault when running this in release mode only on macOS arm64 (m1). Debug mode runs fine.

❯ ./target/release/grin-wallet listen
Password:
zsh: segmentation fault  ./target/release/grin-wallet listen
quentinlesceller commented 1 year ago

This:

diff --git a/impls/src/tor/process.rs b/impls/src/tor/process.rs
index ed6627d..f964326 100644
--- a/impls/src/tor/process.rs
+++ b/impls/src/tor/process.rs
@@ -101,7 +101,7 @@ impl TorProcess {
                        working_dir: None,
                        stdout: None,
                        process: None,
-                       sys: System::new_all(),
+                       sys: System::new(),
                }
        }

Seems to fix the segfault. But I'm not sure if you need the new_all here.

yeastplume commented 1 year ago

Thanks! No, looks like new_all isn't needed here. Tested linux + windows again with changes.

yeastplume commented 1 year ago

That single failing windows test is driving me insane. I'm just going to merge this and deal with that separately.