pi-apps icon indicating copy to clipboard operation
pi-apps copied to clipboard

Xmrig crashes on running

Open GYKgamer opened this issue 2 years ago • 13 comments

Confirmations

  • [X] I searched for similar bug reports in https://github.com/Botspot/pi-apps/issues and found none were relevant.
  • [X] I tried updating Pi Apps and the issue is still not fixed. How to update Pi Apps?

What happened?

Xmrig crashes on running

Description

When typing "xmrig" It starts for about 5 seconds then just freezes the system, then restarts. image

What is your operating system?

Raspberry pi OS 32bit

(Optional) Error log? Terminal output? Debug messages?

No response

GYKgamer avatar Aug 02 '22 07:08 GYKgamer

A VNC connection is going to make this more complicated to troubleshoot. VNC could be freezing with this high CPU load, or maybe xmrig is using enough internet that vnc can't get a picture through. It's also possible that the high CPU usage of xmrig is overloading your power supply. An official RPi power supply should handle it without issue, but this could be the cause if you are just using a phone charger, for example.

I would first suggest trying to get a direct, hardware display connection to the Pi. This will help rule out a lot of stuff. For example, when you run xmrig, does the screen continue responding just fine? Then it's a problem with VNC. If the screen goes black when you run xmrig, it is probably an insufficient power supply, or an unstable overclock. You can also watch the Pi's red power LED to see if it grows dimmer when xmrig runs.

Botspot avatar Aug 02 '22 14:08 Botspot

I'm using the official power supply, no overclock. When looking at the LEDS Red is always on, but green flashes very fast. As for the screen, its very interesting. It flashes off (video linked below) and it restarts

GYKgamer avatar Aug 02 '22 14:08 GYKgamer

https://user-images.githubusercontent.com/41442793/182403972-5f717bef-ba0d-42d1-a510-6ce6b045fc54.mp4

GYKgamer avatar Aug 02 '22 14:08 GYKgamer

Does xmrig --stress cause a similar crash?

Also try running only 1 CPU core at a time, with this command: xmrig --stress -t 1

Botspot avatar Aug 02 '22 18:08 Botspot

It flashes off (video linked below) and it restarts

When you say "it restarts", I assume you mean the pi restarts. If this is not correct, please clarify.

Botspot avatar Aug 02 '22 18:08 Botspot

Does xmrig --stress cause a similar crash?

It does

Also try running only 1 CPU core at a time, with this command: xmrig --stress -t 1

Does not crash the raspberry pi! however gives me an error image

GYKgamer avatar Aug 02 '22 18:08 GYKgamer

Well let's see if that's a problem with your compiled xmrig binary. After all, Pi-Apps downloads and compiles xmrig from source on every machine locally. On your system, it may have downloaded new commits from the xmrig repo, or maybe compilation encountered some sort of interruption or malfunction that results in a segmentation fault. This is assuming that your system and OS are 100% stable.

Here is my xmrig program which runs fine on my PiOS 32-bit system: xmrig.zip Extract it to /usr/local/bin, and make sure the new file replaces the old one at /usr/local/bin/xmrig.

Botspot avatar Aug 02 '22 20:08 Botspot

Also, please send me the contents of your ~/.config/xmrig.json file.

Botspot avatar Aug 02 '22 20:08 Botspot

Extract it to /usr/local/bin, and make sure the new file replaces the old one at /usr/local/bin/xmrig.

Tried to, failed with errors telling me I have to permission (Please tell me the commands to fix this)

GYKgamer avatar Aug 02 '22 20:08 GYKgamer

Also, please send me the contents of your ~/.config/xmrig.json file.

xmrig.zip

GYKgamer avatar Aug 02 '22 20:08 GYKgamer

Extract it to /usr/local/bin, and make sure the new file replaces the old one at /usr/local/bin/xmrig.

Tried to, failed with errors telling me I have to permission (Please tell me the commands to fix this)

Either you can use the file manager to extract it to your home folder, then use sudo mv to move it to /usr/local/bin, or do the whole thing in a root file manager that can be launched with sudo pcmanfm.

Botspot avatar Aug 02 '22 21:08 Botspot

Here is my xmrig program which runs fine on my PiOS 32-bit system: xmrig.zip

tried running with the new file but it still crashed

GYKgamer avatar Aug 02 '22 21:08 GYKgamer

Here is my xmrig program which runs fine on my PiOS 32-bit system: xmrig.zip

tried running with the new file but it still crashed

And I tried running my xmrig with your config file and my pi did not crash. It must be some sort of issue with your system, @GYKgamer. Could you try installing and running Geekbench?

Botspot avatar Aug 03 '22 01:08 Botspot

Tried to install, got an error saying that I don't have arm64 but have armhf. After that raspberry pi crashed again. This might not be an error with xmrig. But more with my system instead

GYKgamer avatar Aug 04 '22 17:08 GYKgamer

Geekbench should install fine on armhf, so please share the error @GYKgamer.

Botspot avatar Aug 05 '22 14:08 Botspot

image

GYKgamer avatar Aug 05 '22 15:08 GYKgamer

image

Installing Geekbench from Pi-Apps should work.

Botspot avatar Aug 05 '22 16:08 Botspot

https://browser.geekbench.com/v5/cpu/16456631

GYKgamer avatar Aug 05 '22 17:08 GYKgamer

https://browser.geekbench.com/v5/cpu/16456631

Well if Geekbench ran without crashing your system, then I am not sure this could be a system instability issue. That SegFault when you ran --stress with 1 core might yield a clue, but I'm no expert in the inner workings of Xmrig.

At this point, I suggest you open an issue on the xmrig repository and list your findings. Hopefully someone there will be able to help you.

I suggest you list these facts in your issue:

  • When running with 4 cores, the system crashes and restarts.
  • Other CPU-intensive tools to not crash the system.
  • When running with 1 core, a segfault occurs.
  • No change when using an xmrig binary that is known to work.

And it's probably also a good idea to include a link back to this issue.

Botspot avatar Aug 05 '22 17:08 Botspot

Alright, thanks for your help.

GYKgamer avatar Aug 05 '22 17:08 GYKgamer