Windows build issues #1622

Closed
opened 2020-05-02 07:48:36 +02:00 by PeterSurda · 3 comments
PeterSurda commented 2020-05-02 07:48:36 +02:00 (Migrated from github.com)

There are multiple problems with the windows build.

  • 32bit: one user is reporting problems with his XP. It uses an older CPU (Xeon X5450) so that may be why. Maybe it can be tested by forcing an older CPU in qemu settings. I tried various versions of OpenSSL DLL, both the ones from slwebpro and cross-compiled with mingw. The result is the same. He says the old bitmsghash DLLs (which I built with MSVC) worked. Here is the error:
WARNING - Using default logger configuration
ERROR - C PoW test fail.
Traceback (most recent call last):
  File "proofofwork.py", line 306, in init
  File "proofofwork.py", line 117, in _doCPoW
WindowsError: [Error -1073741795] Windows Error 0xC000001D
ERROR - C PoW test fail.
Traceback (most recent call last):
  File "proofofwork.py", line 316, in init
  File "proofofwork.py", line 117, in _doCPoW
WindowsError: [Error -1073741795] Windows Error 0xC000001D

I can't reproduce this myself and I have no other reports of problems with XP.

  • 64bit: crashes. Seems to be fixed by downgrading Pyinstaller. However, I think that's just masking the actual bug, which is that the cryptography isn't working correctly. Pubkey and getpubkey objects it creates can't be decoded by others and vice versa. Sending and receiving messages seems to work though. I have no idea what's wrong. I tried multiple versions of OpenSSL, DLL from slwebpro or self-compiled, and I don't see any difference. EDIT: It only seems to affect Windows 10. On Windows 7 it works without problems. Also the 32bit version works ok on the same w10 system.
There are multiple problems with the windows build. - **32bit**: one user is reporting problems with his XP. It uses an older CPU (Xeon X5450) so that may be why. Maybe it can be tested by forcing an older CPU in qemu settings. I tried various versions of OpenSSL DLL, both the ones from slwebpro and cross-compiled with mingw. The result is the same. He says the old bitmsghash DLLs (which I built with MSVC) worked. Here is the error: ``` WARNING - Using default logger configuration ERROR - C PoW test fail. Traceback (most recent call last): File "proofofwork.py", line 306, in init File "proofofwork.py", line 117, in _doCPoW WindowsError: [Error -1073741795] Windows Error 0xC000001D ERROR - C PoW test fail. Traceback (most recent call last): File "proofofwork.py", line 316, in init File "proofofwork.py", line 117, in _doCPoW WindowsError: [Error -1073741795] Windows Error 0xC000001D ``` I can't reproduce this myself and I have no other reports of problems with XP. - **64bit**: crashes. Seems to be fixed by downgrading Pyinstaller. However, I think that's just masking the actual bug, which is that the cryptography isn't working correctly. Pubkey and getpubkey objects it creates can't be decoded by others and vice versa. Sending and receiving messages seems to work though. I have no idea what's wrong. I tried multiple versions of OpenSSL, DLL from slwebpro or self-compiled, and I don't see any difference. **EDIT:** It only seems to affect Windows 10. On Windows 7 it works without problems. Also the 32bit version works ok on the same w10 system.
PeterSurda commented 2020-10-05 13:00:54 +02:00 (Migrated from github.com)

The 64bit problem with w10 happens due to how the OpenSSL pointers are handled in pyelliptic. Currently, the input/output are just treated as void pointers and data is accessed through an offset. I suspect that on some systems this creates a problem with some memory protection subsystems and leads to a memory access violation. pycoin also uses OpenSSL through ctypes, but it defines bignum as a struct. Running the pycoin unit tests on windows 10 64bit succeeds. Therefore, the pyelliptic code should be refactored to use bignum and EC_point as structs rather than void pointers. This may also solve the problem for the guy with the older xeon.

The 64bit problem with w10 happens due to how the OpenSSL pointers are handled in pyelliptic. Currently, the input/output are just treated as void pointers and data is accessed through an offset. I suspect that on some systems this creates a problem with some memory protection subsystems and leads to a memory access violation. [pycoin](https://github.com/richardkiss/pycoin) also uses OpenSSL through ctypes, but it defines bignum as a struct. Running the pycoin unit tests on windows 10 64bit succeeds. Therefore, the pyelliptic code should be refactored to use bignum and EC_point as structs rather than void pointers. This may also solve the problem for the guy with the older xeon.
g1itch commented 2020-10-05 16:28:44 +02:00 (Migrated from github.com)

There is also an option to use pyd on Windows: 04ef9b9

There is also an option to use pyd on Windows: 04ef9b9
PeterSurda commented 2021-01-03 14:36:16 +01:00 (Migrated from github.com)

The 64bit problem can be reproduced when running the unit tests under wine on linux.

The 64bit problem can be reproduced when running the unit tests under wine on linux.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-12-13#1622
No description provided.