WalletWasabi: 1.1.10 consistently crashes on startup on NixOS
General Description
I tried building version 1.1.10 for NixOS, but found that the program crashes on startup, consistently. In the included logs below, the first run is after an upgrade from 1.1.9.2, then I attempt to show the version (wasabiwallet --version
command seems to hang indefinitely and I ^C
it eventually). The second (and third, …) run still crashes, but without the messages around Old Index file
, presumably because those were deleted during the first run. If I downgrade to 1.1.9.2 at this point, that version of the software also crashes, with a different stacktrace included below. However, on subsequent runs, 1.1.9.2 manages to start, and gets to work re-downloading the block filters, so the situation can be managed by not upgrading for now.
How To Reproduce?
- Launch
wasabiwallet
on NixOS
Operating System
NixOS 20.03.git.5de7286 (Markhor)
Logs
After upgrade from 1.1.9.2
$ wasabiwallet
2019-12-14 08:57:00 INFO Program (44) Wasabi GUI started (f3ba122e-7fd1-450c-86ab-f0a1cd18e708).
2019-12-14 08:57:04 INFO Global (158) Config is successfully initialized.
2019-12-14 08:57:04 WARNING IndexStore (111) Old Index file detected. Deleting it.
2019-12-14 08:57:04 INFO TransactionStore (28) ConfirmedStore.InitializeAsync finished in 3 milliseconds.
2019-12-14 08:57:04 INFO TransactionStore (28) MempoolStore.InitializeAsync finished in 26 milliseconds.
2019-12-14 08:57:04 INFO TorProcessManager (249) Starting Tor monitor...
2019-12-14 08:57:04 INFO Global (220) TorProcessManager is initialized.
2019-12-14 08:57:04 WARNING IndexStore (114) Successfully deleted old Index file.
2019-12-14 08:57:04 WARNING Program (95) System.NullReferenceException: Object reference not set to an instance of an object.
at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform.UnmanagedBlob.DoDispose()
at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform.UnmanagedBlob.Finalize()
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform.UnmanagedBlob.DoDispose()
at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform.UnmanagedBlob.Finalize()
Aborted (core dumped)
Checking for version seems to hang
$ wasabiwallet --version
Wasabi Client Version: 1.1.10.0
Compatible Coordinator Version: 3
Compatible Bitcoin Core Version: 0.18.1
Compatible Hardware Wallet Interface Version: 1.0.3
^C
$
Attempting to run again still crashes
$ wasabiwallet
2019-12-14 08:57:39 INFO Program (44) Wasabi GUI started (180e0f20-25fc-463b-9385-52ee5e9e69d5).
2019-12-14 08:57:43 INFO Global (158) Config is successfully initialized.
2019-12-14 08:57:43 INFO IndexStore (43) InitializeAsync finished in 52 milliseconds.
2019-12-14 08:57:43 INFO TransactionStore (28) MempoolStore.InitializeAsync finished in 24 milliseconds.
2019-12-14 08:57:43 INFO TransactionStore (28) ConfirmedStore.InitializeAsync finished in 4 milliseconds.
2019-12-14 08:57:43 INFO TorProcessManager (249) Starting Tor monitor...
2019-12-14 08:57:43 INFO Global (220) TorProcessManager is initialized.
2019-12-14 08:57:43 INFO TorProcessManager (66) Tor is already running.
2019-12-14 08:57:43 INFO AllTransactionStore (27) InitializeAsync finished in 436 milliseconds.
2019-12-14 08:57:43 INFO BitcoinStore (39) InitializeAsync finished in 481 milliseconds.
2019-12-14 08:57:43 INFO Global (394) Loaded AddressManager from `/home/user/.walletwasabi/client/AddressManager/AddressManagerMain.dat`.
2019-12-14 08:57:43 INFO HostedServices (49) Started Software Update Checker.
2019-12-14 08:57:43 INFO MainWindow.xaml (74) UiConfig is successfully initialized.
2019-12-14 08:57:43 INFO Global (329) Start connecting to nodes...
2019-12-14 08:57:43 INFO Global (351) Start synchronizing filters...
2019-12-14 08:57:49 WARNING Program (95) System.NullReferenceException: Object reference not set to an instance of an object.
at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform.UnmanagedBlob.DoDispose()
at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform.UnmanagedBlob.Finalize()
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform.UnmanagedBlob.DoDispose()
at Avalonia.Shared.PlatformSupport.StandardRuntimePlatform.UnmanagedBlob.Finalize()
Aborted (core dumped)
Downgrading to 1.1.9.2 crashes on first run
2019-12-14 09:04:37 INFO Program (43) Wasabi GUI started (7a7895b2-ec7d-469b-9627-de3872333306).
2019-12-14 09:04:43 INFO Global (142)Config is successfully initialized.
2019-12-14 09:04:43 ERROR IndexStore (125) An index file got corrupted. Deleting index files...
2019-12-14 09:04:43 INFO HwiProcessManager (240) Updating HWI...
2019-12-14 09:04:43 INFO HwiProcessManager (270) Extracted /nix/store/24g50jpfpqqham13b542pak236mk073r-wasabiwallet-1.1.9.2/opt/wasabiwallet/Hwi/Software/hwi-linux64.zip to `/home/user/.walletwasabi/client/hwi`.
2019-12-14 09:04:43 INFO HwiProcessManager (282) Shell command executed: chmod -R 750 /home/user/.walletwasabi/client/hwi.
2019-12-14 09:04:43 INFO TorProcessManager (253) Starting Tor monitor...
2019-12-14 09:04:43 INFO Global (203)TorProcessManager is initialized.
2019-12-14 09:04:43 CRITICAL Program (66)System.FormatException: Invalid hex length
at NBitcoin.uint256..ctor(String str)
at WalletWasabi.Backend.Models.FilterModel.FromHeightlessLine(String line, Height height)
at WalletWasabi.Stores.IndexStore.InitializeFiltersAsync()
at WalletWasabi.Stores.IndexStore.InitializeAsync(String workFolderPath, Network network, HashChain hashChain)
at WalletWasabi.Stores.BitcoinStore.InitializeAsync(String workFolderPath, Network network)
at WalletWasabi.Gui.Global.InitializeNoWalletAsync()
at WalletWasabi.Gui.Program.<>c__DisplayClass1_0.<<Main>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority)
at Avalonia.X11.X11PlatformThreading.CheckSignaled()
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Application.Run(Window mainWindow)
at WalletWasabi.Gui.Program.Main(String[] args)
2019-12-14 09:04:43 INFO Global (620)UpdateChecker is stopped.
2019-12-14 09:04:43 INFO Global (626)Synchronizer is stopped.
2019-12-14 09:04:43 INFO TorProcessManager (66) Tor is already running.
^C2019-12-14 09:06:44 WARNING Global (173) Process was signaled for killing.
^C2019-12-14 09:08:08 WARNING Global (173) Process was signaled for killing.
^C2019-12-14 09:08:10 WARNING Global (173) Process was signaled for killing.
$
Wasabi Version
Which wasabi release are you using? Where did you download it from?
1.1.10.0, installed via NixOS package.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 52 (17 by maintainers)
I’m happy to report that the v1.1.10.2-200122 build does not crash on startup on NixOS, and as far as I can tell in some basic testing seems to have no major issues, so the Avalonia fixes seem to have helped.
Awesome! Closing. Will try to release silently tomorrow.
aaand fixed on master 😃
Confirmed on Lubuntu 14.04 VM with the current release (1.1.10.2).
Thanks @nopara73. Could you also creating a release? (on your own fork of the repo is fine)
(The current Nix package for Wasabi just unpacks the released
.tar.gz
and patches thewassabee
binary and.so
files. https://github.com/NixOS/nixpkgs/pull/73262/ did land, so in theory we could switch the Nix package to build usingdotnet-sdk
3.1, but I don’t know how much time I can spend on looking into that, so testing from a released.tar.gz
would speed things up.)@jmacato sure:
wasabiwallet
.Thanks for the fix, but v1.1.10.1 seems to still have the issue reported here on NixOS (the hang on
--version
does appear to be fixed though):oh okay, seems someone also encountered this on Avalonia 0.9 (via Arch Linux). This PR should hopefully fix this: https://github.com/AvaloniaUI/Avalonia/pull/3363
and Chromium seems to have stumbled upon this bug 10 months ago: https://r882-11cdd11fc1da-maruel-dot-chromiumcodereview.appspot.com/1707283002/ (credits to: @PJB3005)
Also maybe @MaxHillebrand with your new monster, can you fire up a lubuntu vm?
It’s actually Lubuntu (a light version of Ubuntu). Not sure any differences
Here’s it: https://github.com/zkSNACKs/WalletWasabi/issues/2939#issuecomment-577087483
@molnard as we also need a packaged binary for testing on tails, it would really be great if you can make both
.deb
and.tar.gz
in your own fork and provide a download link. 🙏Here we go again. Can you try the master branch from code? https://github.com/zkSNACKs/WalletWasabi/pull/2988
This is usually from the binary not able to find a library that it’s linked against. If you do
ldd .walletwasabi/client/tor/Tor/tor
you’ll see that it couldn’t a few things. Alternatively, a binary might dodlopen
in which you wouldn’t see it ldd, even though a particular library is needed. If you’re setting a runpath with patchelf, then you’ll want to keep$ORIGIN
in the runpath so that it’s able to pick up other binaries in the same directory (E.g. --set-rpath ‘$ORIGIN:${rpath}’)NixOS is very different as it doesn’t conform to FHS:
All packages are installed in /nix/store/ at hashed paths (hash is based on all dependencies and configuration settings), so the only way they can run is if they reference their dependencies exactly, this allows for greater reproducibility of builds, as well allows for a way to gracefully add or remove packages from an environment. Example:
you can add or remove packages from a given environment without affecting your global system.
Fwiw, I’m not seeing this issue with a missing bundled
tor
binary on my system:This is with wasabi 1.1.9.2, which is the latest version that’s functional for me at time of writing. Did you notice your issue around a missing bundled
tor
binary with that version of wasabi, or on another version?Right, I filed that issue as well. Unless I’m mistaken, the “no such file or directory” errors seen there are about not finding hwi-related files though, not Tor: https://github.com/zkSNACKs/WalletWasabi/issues/2289#issuecomment-532969715
(to complicate matters slightly, there were indeed some Tor-related issues around connectivity for that issue, but that ended up being irrelevant to the “no such file or directory” errors, see https://github.com/zkSNACKs/WalletWasabi/issues/2289#issuecomment-534207288)
Right, as a reference for others, the historical issue that led to the current state of the Wasabi project not officially supporting the community-provided Nix packages is here: https://github.com/zkSNACKs/WalletWasabi/issues/2130
Right, it is in my (unofficial, since I’m not in
maintainers
for this specific package yet it seems) role as NixOS package maintainer that I filed this issue; I’m trying to build a version of Wasabi that I can use: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/blockchains/wasabiwallet/default.nix. 😃Via the info above, I think that this shouldn’t be necessary, since the Wasabi Tor integration seems to work well in my usage on NixOS to date with version 1.1.9.2 and earlier. We can look into the “missing bundled tor binary” issue you reported above independently, if it can be reproduced.
I installed a NixOS 19.09.1686 in a VM and followed the instructions provided by @mmahut . It failed immediately with the exact same error:
Clearly there is a problem with
Avalonia
here but it is also important to see that there exist another important issue withTor
.NixOS cannot find
tor
even when it is there. I found that this same problem is affecting other projects too and this is a relevant answer in StackOverflow:Source: https://unix.stackexchange.com/questions/91577/cannot-execute-binary-in-nixos-no-such-file-or-directory
There is also this issue about wasabi not finding the tor executable in NixOS.
Apparently NixOS is a bit different that other linux distros and we have to decide if we want to support it officially because it will require further investigation, changes and testing specially focused on this distro.
I have checked the wasabi package for NixOS and looks okay, it is maintained by the NixOS community and we could, alternatively, let them to deal with this if they really want to support Wasabi. I mean, I think they would need to patch
Tor
withpatchElf
and invoke wasabi with the appropriate LD_LIBRARY_PATH paths (this is what i suspect is making Avalonia to fail, but i am not sure).When looking at something else, I came across https://github.com/NixOS/nixpkgs/pull/73262/, which helped a bit in demystifying how dotnet builds works on NixOS for me (I’m not a dotnet dev and also fairly new to NixOS). That PR, which is unmerged at time of writing, makes it possible to use different dotnet-sdk versions for different Nix packages, and shows that the only supported
dotnet-sdk
version on Nix before that is 2.2.Since Wasabi uses
dotnet-sdk
3.1 now, I was thinking that this could be related to the current issue.However, trying out the PR and switching Wasabi to 3.1 still leads to the same Avalonia-related
NullReferenceException
as before. Also,dotnet-sdk
isn’t actually used to build thewasabiwallet
package from source, but rather it is (afaict) required to patch.so
files and thewassabee
binary that the Nix package fetches from the released tarball, as seen in thewasabiwallet
package.In short, I’m not sure if the dotnet-sdk 2.2 vs 3.1 thing is relevant here. Perhaps @mmahut can shed some light on this as the original author and maintainer of the wasabiwallet Nix package? At any rate following this issue might be useful, so we can figure out how to proceed with Wasabi on Nix.
I’d want to avoid this becoming a drain on Wasabi developers, since you made it clear back in https://github.com/zkSNACKs/WalletWasabi/issues/2130 that the project is not interested in officially supporting Nix packaging at this time.
It seems the this and https://github.com/zkSNACKs/WalletWasabi/issues/2836 are not the same, the other one is resolved.
Version check hangs for me too, so that’s unrelated. Opened an issue for that: https://github.com/zkSNACKs/WalletWasabi/issues/2857