Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libznn crashes during initialization on Windows #4

Closed
sol-znn opened this issue May 25, 2023 · 4 comments
Closed

libznn crashes during initialization on Windows #4

sol-znn opened this issue May 25, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@sol-znn
Copy link
Member

sol-znn commented May 25, 2023

Describe the bug
Some community members have reported Syrius instability since libznn has been updated to v0.0.5.
This report is to address Layiid's specific issue.
Upon launching any version of Syrius that uses the latest libznn.dll file, the application crashes when znnd is supposed to initialize.

Note: few users have encountered this issue and it's not easily reproducible.

To Reproduce
Steps to reproduce the behavior:

  1. Download any release of Syrius >=v0.0.6
  2. Delete the znn directory
    • Windows location: C:\Users\<user>\AppData\Roaming\znn\
  3. Launch Syrius

Expected behavior
After the Syrius launch animation completes, a wallet configuration screen should be displayed.
If Syrius was executed via a terminal/command prompt, then znnd should print data while it's initializing.

Screenshots
The application crashes after this frame:

Symptom in the terminal:

versus what we expect to see:

From within Syrius, selecting the embedded node: video

Desktop (please complete the following information):

  • znnd version: v0.0.5 (specifically libznn.dll)
  • OS: Windows (possibly other OS)
  • Commit hash: 58eaa81

Additional context
Layiid's case: recently installed Windows 10 on a high-performance machine. His other computer is not experiencing this issue.

Troubleshooting

  1. Given libznn.dll was produced with ghaction-xgo, we generated another copy of libznn.dll using the Makefile.
    • Result: no difference
  2. Syrius v0.0.6 was launched with the previous, stable version of libznn.dll
    • Result: no crash, though there were some undesirable UI/UX anomalies
  3. Syrius v0.0.5 is stable on Layiid's machine
  4. Given the beforeAction() text should be printed to the terminal, we attempted to print data/log errors here.
    • Result: no difference
    • Idea: use panic to print a stack trace at the time of the crash. Need to identify where to place it.

Stack trace
None available.

@sol-znn sol-znn added the bug Something isn't working label May 25, 2023
@sol-znn sol-znn self-assigned this May 25, 2023
@sol-znn
Copy link
Member Author

sol-znn commented Jun 9, 2023

Romeo reported similar symptoms.
In his case, Syrius v0.0.6 and v0.0.7 crash immediately after the launch animation, though v0.0.6 was working until recently.
He stated that he did not change anything specifically and may have installed Windows updates.

Troubleshooting steps

  • Deleted appdata directory
  • Updated to Syrius v0.0.7
  • Replaced libznn.dll with a different copy

Stack trace

Faulting application name: syrius.exe, version: 0.0.6.0, time stamp: 0x6438433d
Faulting module name: libznn.dll, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0x80000003
Fault offset: 0x000000000006eb61
Faulting process id: 0x4810
Faulting application start time: 0x01d99b249657de73
Faulting application path: C:\Zenon\0.0.6\syrius.exe
Faulting module path: C:\Zenon\0.0.6\libznn.dll

@sol-znn
Copy link
Member Author

sol-znn commented Jun 9, 2023

I believe the issue is happening while znnd is initializing (init() phase).

Troubleshooting with Layiid

  1. Download LiteIDE from their release page on Github and extract it
  2. Go to .\liteidex38.2.win64-qt5.15.2\liteide\bin\ and run liteide.exe
  3. In LiteIDE, open the folder for the go-zenon project
  4. Click the Terminal tab and cd to the .\go-zenon\cmd\libznn\ directory
  5. Run: set GODEBUG=inittrace=1
  6. Run: go run main_libznn.go

Results
Error - layiid_inittrace.txt
No error - sol_inittrace.txt

Alternate troubleshooting ideas

  1. In LiteIDE, open the folder for the go-zenon project
  2. Click the Terminal tab and cd to the .\go-zenon\cmd\libznn\ directory
  3. Run: set GODEBUG=inittrace=1
  4. Run: go mod tidy -v
  5. Run: go run main_libznn.go
  6. send me the output for 4 and 5

Also wondering what happens when znnd is executed

  1. close syrius and any standalone copies of the node that are running on this machine
  2. In LiteIDE, open the folder for the go-zenon project
  3. Click the Terminal tab and cd to the .\go-zenon\cmd\znnd\ directory
  4. Run: set GODEBUG=inittrace=1
  5. Run: go run main.go
  6. send me the output for 5
    Note: you can stop the process with Ctrl-C

@sol-znn
Copy link
Member Author

sol-znn commented Jul 29, 2023

It was much easier to troubleshoot this problem once I was able to reproduce it consistently on my machine.

I'm still not sure what's causing the crash, though I've narrowed it two suspects: xgo >=1.20.0 and go >=1.20.0 (installed)

Here's what I've found:

  • using the instance of go (1.20.6) installed on my system, the libznn file results in a crash
  • using an archived version of go 1.20.6 (not installed), the libznn file seems to work correctly
  • the github workflow generates a functional libznn file when we use xgo <=1.19.10
  • the same workflow using xgo 1.20.0 generates a file that crashes

Further considerations: golang/go#60996 (comment)

We might just have to use xgo 1.19.10 for now.

Patch: sol-znn@f0e1881

@sol-znn
Copy link
Member Author

sol-znn commented Jul 29, 2023

Until this patch is included in a Syrius release, we'll manually apply it to our existing client files to test it.

1, https://github.com/Sol-Sanctum/go-zenon/releases
2. Download and extract the libznn-windows-amd64.zip
3. Go to your Syrius folder and delete the existing libznn.dll
4. Copy the extracted .dll file to this folder and rename it to libznn.dll
5. Launch Syrius and try to use your embedded node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant