xmrig / xmrig-proxy

Monero (XMR) Stratum protocol proxy
https://xmrig.com/proxy
GNU General Public License v3.0
613 stars 338 forks source link

xmrig-proxy crash with Error traps: xmrig-proxy[1661] general protection fault ip #558

Open bwq90 opened 7 months ago

bwq90 commented 7 months ago

I am using latest xmrig-proxy v6.21.0. My proxy often crashes after every few hours. I looked up the error using dmesg and got following output

[Wed Mar 13 15:59:02 2024] traps: xmrig-proxy[1661] general protection fault ip:55c91a258cda sp:7ffcfc075f60 error:0 in xmrig-proxy[55c91a154000+1c1000]

[Wed Mar 13 16:00:01 2024] TCP: request_sock_TCP: Possible SYN flooding on port 82. Sending cookies. Check SNMP counters.

[Wed Mar 13 16:02:37 2024] xmrig-proxy[9226]: segfault at 31 ip 0000000000000031 sp 00007ffda2ee9208 error 14 in xmrig-proxy[557d8e0a6000+bb000]

[Wed Mar 13 16:02:37 2024] Code: Unable to access opcode bytes at RIP 0x7.

[Wed Mar 13 16:03:01 2024] TCP: request_sock_TCP: Possible SYN flooding on port 82. Sending cookies. Check SNMP counters.

My Operating System and PC Specs:

Description: Ubuntu 22.04.4 LTS Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz 128GB RAM 500GB SSD

It is a fresh installed OS with no other process. CPU usage is at 1% and almost all RAM is available. Yet I get this error.

bwq90 commented 7 months ago

@SChernykh Sorry for being a pain. I have tuned the tcp mem in sysctl. Now I don't get the previous tcp memory issues in sysctl.

But this random segfault and traps issue is crashing the proxy. How can I diagnose the root cause which causes the traps generation protection fault error.

I also removed custom diff and custom diff stats. Now xmrig doesn't consume any RAM. I have 90% RAM free and CPU is also idle mostly.

But miner count is very high. Does this mean I should add a node in parallel for xmrig proxy? or there is something else which can fix and handle the load on the same server

SChernykh commented 7 months ago

If you could compile xmrig-proxy, run it under gdb and get a call stack for this crash, it would help a lot. I can't say what is wrong based on these logs, it just crashes somewhere.

bwq90 commented 7 months ago

I will try to do that. Meanwhile I have added three parallel servers nodes for xmrig proxy load balancing. Can you confirm if there are some best practices or recommended conf changes if we are running multiple xmrig proxy servers in parallel for same miners. I mean features like keep alive. Or if miner gets job from one xmrig proxy and submits the share to another after DNS response to different IP of xmrig proxy.