scala-network / XLArig

An XMRig fork with support for latest XLA PoW algorithms
GNU General Public License v3.0
124 stars 52 forks source link

Segmentation fault on Raspberry Pi 3 #28

Closed vanga83 closed 3 years ago

vanga83 commented 3 years ago

I keep getting segmentation fault on my Raspberry Pi 3. Switching to a new SD card does the same thing. Majority of the time it'll have a segmentation fault and a very small chance of it actually starting. I thought it might be just my Pi not building it correctly but when I tried xmrig for Monero, it starts up perfectly each time. This didn't happen before with v5.2.0 and older. Would it be due to not having AES on the Pi? I also have a Nanopi Neo2 and it works perfectly there each time I start it up. I've tried this on the no longer in use Cxcore Ubuntu 18.04 64 bit, official Ubuntu 20.04 64 bit, and Raspberry Pi OS 64 bit Beta which all came out with the same results.

woodycal commented 3 years ago

Try the following.

Sudo apt-get install -y raspbian-nspawn-64

Enter the 64bit shell with following command:

ds64-shell

Once in shell go ahead and install XLArig as per build instructions but change the cmake part to:

cmake ..

Your most likely getting this error because either your installing it in 32bit os or cmake option. As the reason why it installs on other sbcs is because they use full 64bit os unlike raspbian

Any problems jump over to their discord channel

vanga83 commented 3 years ago

I saw that before and tried installing it but it doesn't install in a 64 bit OS since all I have are 64 bit OSes which gives better performance.

I'll try again when I have time with the cmake.

vanga83 commented 3 years ago

Sadly, still the same issue.

Tried starting a few times and it's now about a 50/50 chance on it starting up instead of like a 1/100 chance. Might be exaggerating a bit there, but that's how it felt like. Weird that this is the same result with both Raspberry Pi 3 I have. I guess I'll leave it at that and keep rebooting until it starts.

woodycal commented 3 years ago

Hi

I did some testing yesterday and their is a Segmentation fault when running XLArig with a device with less then 4 gb ram in the current version of xlarig. Until they update xlarig you can try version XLArig 5.1.0 which i tested works on a nanopi fire 3.

Also this is a guide to install on rapsberry pi https://github.com/israel-p-s/Scala/blob/main/HowToMineWithRPI.md

vanga83 commented 3 years ago

Thanks for the quick response! Weird though since my Nanopi Neo2 only has 512MB of RAM and it works perfectly fine there each time it starts up and it's running Armbian. Would it be due to the kernel provided for the OSes that I have for the Raspberry Pi 3? I only use 64 bit OSes for the Raspberry Pi.

I think the guide you linked is for 32 bit Raspbian/Raspberry Pi OS only but I could go that route. I was on 5.2.0 previously and didn't have any issues on that version. I'll roll back the prior versions to see if I still have problems.

woodycal commented 3 years ago

It could well be related to os also but considering i got a segmentation fault on my nanopi fire 3 which also is running an armbian os says that the bug from xmrig https://github.com/xmrig/xmrig/issues/1825 has come through to xlarig. Until they do a new version with lastest xmrig pull anyone with less then 4gb ram will encounter weird errors.

Also it would really help if we could see what happens after you hit cmake .. if you could provide what happens after that might help in debugging if you still get the error.

vanga83 commented 3 years ago

I didn't get any errors on cmake that I noticed. Let me run both ways with and without the options and put it on here. Give me some time to run it.

vanga83 commented 3 years ago

I still had my ssh terminal window open and it had all the things I did with and without the cmake options.

pi@rpi303:~/XLArig/build $ cmake .. -DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON -- The C compiler identification is GNU 10.2.1 -- The CXX compiler identification is GNU 10.2.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Use ARM_TARGET=8 (aarch64) -- Performing Test XMRIG_ARM_CRYPTO -- Performing Test XMRIG_ARM_CRYPTO - Success -- Looking for syslog.h -- Looking for syslog.h - found -- Found UV: /home/pi/XLArig/scripts/deps/lib/libuv.a -- Looking for builtin___clear_cache -- Looking for builtin___clear_cache - found -- WITH_MSR=OFF -- Found OpenSSL: /home/pi/XLArig/scripts/deps/lib/libcrypto.a (found version "1.1.1i") -- Configuring done -- Generating done -- Build files have been written to: /home/pi/XLArig/build

pi@rpi303:~/XLArig/build $ cmake .. -- The C compiler identification is GNU 10.2.1 -- The CXX compiler identification is GNU 10.2.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Use ARM_TARGET=8 (aarch64) -- Performing Test XMRIG_ARM_CRYPTO -- Performing Test XMRIG_ARM_CRYPTO - Success -- Looking for syslog.h -- Looking for syslog.h - found -- Found UV: /usr/lib/aarch64-linux-gnu/libuv.a -- Looking for builtin___clear_cache -- Looking for builtin___clear_cache - found -- WITH_MSR=OFF -- Found OpenSSL: /usr/lib/aarch64-linux-gnu/libcrypto.so (found version "1.1.1d") -- Configuring done -- Generating done -- Build files have been written to: /home/pi/XLArig/build

woodycal commented 3 years ago

should be cmake .. with no flags as per xmrig instructions. Also are you deleting xlarig folder when your rebuilding ?

vanga83 commented 3 years ago

Yes, I delete the entire XLArig folder and start over each time.

vanga83 commented 3 years ago

I've switched to v5.1.0 for now like you mentioned and it's working again. Thank you so much for your help! I'll wait until next updated version to test out if there are any problems.

woodycal commented 3 years ago

I've switched to v5.1.0 for now like you mentioned and it's working again. Thank you so much for your help! I'll wait until next updated version to test out if there are any problems.

Just out of interest did you install this on the 32bit os in the 64bit shell or just used to 64bit beta raspbian os without the 64bit shell command?

vanga83 commented 3 years ago

I've switched to v5.1.0 for now like you mentioned and it's working again. Thank you so much for your help! I'll wait until next updated version to test out if there are any problems.

Just out of interest did you install this on the 32bit os in the 64bit shell or just used to 64bit beta raspbian os without the 64bit shell command?

I just used the 64 bit beta without the shell command.

Teredic commented 3 years ago

Hi, i just compiled a beta build of xlarig 5.2.2 for armV8 : xlarig522-armv8_beta.zip

Could you please try it and tell me if you get a seg fault ?

woodycal commented 3 years ago

Hi, i just compiled a beta build of xlarig 5.2.2 for armV8 : xlarig522-armv8_beta.zip

Could you please try it and tell me if you get a seg fault ?

Still error posted screenshot in discord.

Teredic commented 3 years ago

the instructions for RPis has been included into the building instructions, and the armv8 build for xlarig 5.2.2 will be compiled that way too.