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

Segmentation fault in Windows 10 #38

Open
galmiza opened this issue Jun 8, 2021 · 5 comments
Open

Segmentation fault in Windows 10 #38

galmiza opened this issue Jun 8, 2021 · 5 comments

Comments

@galmiza
Copy link

galmiza commented Jun 8, 2021

Hello,

I compiled the source using msys2/mingw64 on Windows 10.
The execution stops just after P1 table is created with error: segmentation fault.
Data is successfully created in temp drive.

Below some details about the execution with gdb.

Working Directory:   f:/
Working Directory 2: f:/
Plot Name: plot-k32-2021-06-08-14-02-53a515aecd736d6f9ab0a2d3f7a12eb62a907d5416ceab1b87bfe5ab419d84cb
[New Thread 15752.0x4db8]
[New Thread 15752.0x3d00]
[New Thread 15752.0x2edc]
[New Thread 15752.0x36b0]
[New Thread 15752.0x26dc]
[New Thread 15752.0x380]
[New Thread 15752.0x6ec]
[New Thread 15752.0x3d34]
[New Thread 15752.0x384c]
[New Thread 15752.0x19a4]
[New Thread 15752.0x4448]
[New Thread 15752.0x3c8]
[P1] Table 1 took 67.874 sec
[Thread 15752.0x4e6c exited with code 0]
[Thread 15752.0x2cf4 exited with code 0]
[Thread 15752.0x3fa4 exited with code 0]
[Thread 15752.0x2edc exited with code 0]
[Thread 15752.0x26dc exited with code 0]
[Thread 15752.0x6ec exited with code 0]
[Thread 15752.0x3d34 exited with code 0]
[Thread 15752.0x384c exited with code 0]
[Thread 15752.0x19a4 exited with code 0]
[Thread 15752.0x4448 exited with code 0]
[Thread 15752.0x3c8 exited with code 0]
[Thread 15752.0x4db8 exited with code 0]
[Thread 15752.0x36b0 exited with code 0]
[Thread 15752.0x380 exited with code 0]
[Thread 15752.0x3d00 exited with code 0]
[New Thread 15752.0x3b2c]
[New Thread 15752.0x27a4]
[New Thread 15752.0x44e4]
[New Thread 15752.0x166c]
[New Thread 15752.0x271c]
[New Thread 15752.0x30b4]
[New Thread 15752.0x4b4]
[New Thread 15752.0x3ca4]
[New Thread 15752.0xe30]
[New Thread 15752.0xe9c]
[New Thread 15752.0x3568]
[New Thread 15752.0x4554]
[New Thread 15752.0x3ab0]
[New Thread 15752.0x2968]
[New Thread 15752.0x246c]
[New Thread 15752.0x1b88]
[New Thread 15752.0x4a0c]
[New Thread 15752.0x2130]
[New Thread 15752.0x1890]
[New Thread 15752.0x3e90]
[New Thread 15752.0x47a8]
[New Thread 15752.0x4e70]
[New Thread 15752.0x3350]
[New Thread 15752.0x3ec8]
[New Thread 15752.0x2b40]
[New Thread 15752.0x3288]
[New Thread 15752.0x4b34]
[New Thread 15752.0xca4]
[New Thread 15752.0x1e18]
[New Thread 15752.0xabc]

Thread 23 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 15752.0x4b4]
0x00007ff75387d080 in blake3_compress_xof_sse41 ()
(gdb)
@sigi77777
Copy link

please do not post any exe, in this way we can prevent the new plotter from spreading accross non technical people. (p.s: I dont have it yet as well, but i am working on building it for windows.)

@twig123
Copy link

twig123 commented Jun 8, 2021

I compiled the source using msys2/mingw64 on Windows 10.

Could you provide details on how you ran the build? I've tried with Visual Studio and MSYS2... but obviously I'm missing information as I can't it configured correctly.

@galmiza
Copy link
Author

galmiza commented Jun 8, 2021

Well, I actually did horrible changes a bit everywhere in various files from the git project.
I didn't even properly track all as it would slow me down a LOT.
The idea is to retro-document from a working solution if I find one.

For instance, I

  • disabled completely sodium which always return compilation errors.
    -uninstalled sodium from msys2
    -removed all references to sodium (by rewritting some preprocessor options)
    -rewrote the randombytes_buf function (which was based on sodium)
  • added and compiled uint128_t from its git (as for some reasons it wasn't accepted)
  • injected everywhere I could preprocessor options to tell the compiler the target is Windows (as it seems not to detect it)
  • ... and counting

Yup, it is a real mess, I'm not an expert in Windows or compiler at all.
Every micro step towards a solution leads to dozens of new problems. It seems it is never ending.

Edit: Obvioulsy the target is to minimize the changes and even undo some I listed above.

@madMAx43v3r
Copy link
Owner

That's some dedication, but keep in mind any replacement of randombytes_buf needs to be cryptographically safe.

@galmiza
Copy link
Author

galmiza commented Jun 8, 2021

Very right. Replacements are dangerous.
Yeah I tried quite a few things guided by the errors I faced. No real strategy, just a few brute force tries :D
Thanks for spending time on that project, the little I could see is already impressive!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants