WalletWasabi / WalletWasabi

Open-source, non-custodial, privacy preserving Bitcoin wallet for Windows, Linux, and Mac.
https://wasabiwallet.io
MIT License
2.13k stars 497 forks source link

Segmentation Fault on Debian (bookworm) #13164

Open remcoros opened 3 months ago

remcoros commented 3 months ago

General Description

I am investigating a Segmentation Fault happening in the StartOS service wrapper. Wasabi is running in a docker container based on Debian bookworm.

The segmentation fault is happening during the initial filter download and the .NET trace logs were not giving any additional information on the reason of the crash.

As this is a very specific setup, I did some digging myself:

(lldb) bt
* thread #1, name = 'wassabee', stop reason = signal SIGSEGV
  * frame #0: 0x00007f2cf74e13f4 libSkiaSharp.so`___lldb_unnamed_symbol2944 + 68
    frame #1: 0x00007f2cf74d5fe8 libSkiaSharp.so`___lldb_unnamed_symbol2828 + 136
    frame #2: 0x00007f2cf78432cc libSkiaSharp.so`___lldb_unnamed_symbol12809 + 1436
    frame #3: 0x00007f2cf7842550 libSkiaSharp.so`___lldb_unnamed_symbol12803 + 160
    frame #4: 0x00007f2cf784209d libSkiaSharp.so`___lldb_unnamed_symbol12802 + 637
    frame #5: 0x00007f2cf78440a9 libSkiaSharp.so`___lldb_unnamed_symbol12811 + 1849
    frame #6: 0x00007f2cf783222b libSkiaSharp.so`___lldb_unnamed_symbol12552 + 395
    frame #7: 0x00007f2cf749b84e libSkiaSharp.so`___lldb_unnamed_symbol1957 + 158
    frame #8: 0x00007f2cf7487b70 libSkiaSharp.so`___lldb_unnamed_symbol1603 + 528
    frame #9: 0x00007f2cf7484e7a libSkiaSharp.so`___lldb_unnamed_symbol1579 + 330
    frame #10: 0x00007f2cf748520f libSkiaSharp.so`___lldb_unnamed_symbol1588 + 63
    frame #11: 0x00007f6dd3368759
    frame #12: 0x00007f6dd32cdad7
(lldb) thread list
Process 3139 stopped
* thread #1: tid = 3154, 0x00007f2cf74e13f4 libSkiaSharp.so`___lldb_unnamed_symbol2944 + 68, name = 'wassabee', stop reason = signal SIGSEGV
  thread #2: tid = 3146, 0x00007f6e4baf71dc libc.so.6`read + 76, stop reason = signal 0
  thread #3: tid = 3139, 0x00007f6e4bb07e26 libc.so.6`epoll_wait + 86, stop reason = signal 0

This looks like a crash inside libSkiaSharp.so. I could not get the debug symbols for SkiaSharp working, so the actual method name is unknown.

But that gave me enough information to find this issue in Avalonia UI: https://github.com/AvaloniaUI/Avalonia/issues/15120 (Mysterious segmentation fault in skia native code when changing shape stroke thickness) And the fix: https://github.com/AvaloniaUI/Avalonia/pull/15153

Since Wasabi uses "StrokeThickness" in its RingProgress control, and if I understand correctly, that control is used to show the progress during filter downloads, I suspect Wasabi is hitting this bug.

The fix PR is merged for Avalonia UI 11.1, but Wasabi is using a custom build of 11.0.

Hope this is enough information for you. Let me know if I can be of help!

Operating System

Debian bookworm (in a docker container)

Logs

n/a

Wasabi Version

2.0.7.x and 2.0.8

remcoros commented 3 months ago

Also happening on Ubuntu noble.

A workaround seems to be to install proper GPU drivers, and enable GPU support on the docker container and in Wasabi.

lontivero commented 3 months ago

Thank you very much for you help.