MoneroOcean/meta-miner

Duplicate shares when switching from c29b to ethash

Joseba73 opened this issue · 1 comments

This issue was monitored since a few days. When switching from cuckaroo29b to ethash mining all shares are rejected as duplicates. Then of course IP is banned.
I think I didn't noticed it before because this switching is quite rare but this might be a new issue, dunno. All other monitored switching pairs work fine from weeks.
The result is the same with GMiner or T-rex with ethash: duplicate shares

+----------------------------------------------------------------+
| GMiner v2.58 |
+----------------------------------------------------------------+
Algorithm: Cuckaroo29b
DevFee: 4%
Stratum server:
host: 127.0.0.1:3333
user: WALLET
password: GPU~c29b
Power calculator: off
Color output: on
Watchdog: on
API: off
Log to file: off
Selected devices: GPU0
Intensity: 100
Temperature limits: 90/120
02:13:12 P2 State Disabled
02:13:13 Nvidia Driver: 471.68
02:13:14 GPU0 NVIDIA GeForce RTX 2060 6GB: Selected 5GB Solver
Pool (gulf.moneroocean.stream:10256) <-> miner link was established due to new miner connection
02:13:14 Connected to 127.0.0.1:3333 [127.0.0.1]
02:13:14 Authorized on Stratum Server
02:13:14 New Job: 17170242 Diff: 6
02:13:14 Started Mining on GPU0: NVIDIA GeForce RTX 2060 6GB [0000:26:00.0]
02:13:24 New Job: 17170664 Diff: 6
02:13:30 GPU0: Share #1 accepted 58 ms

...

03:06:44 Pool: 127.0.0.1:3333 Shares/Minute: 1.83
03:06:44 Uptime: 0d 00:53:30
03:06:49 GPU0: Share #99 accepted 62 ms
03:06:58 New Job: 17309372 Diff: 5
03:07:12 New Job: 17310168 Diff: 5
+---+-----+----+-----+---------+--------+------+----+------+
| ID GPU Temp Fan Speed Fidelity Shares Core Mem |
+---+-----+----+-----+---------+--------+------+----+------+
| 0 2060 62 66 % 6.64 G/s 1.03 99/0 1695 8000 |
+---+-----+----+-----+---------+--------+------+----+------+
03:07:14 Pool: 127.0.0.1:3333 Shares/Minute: 1.83
03:07:14 Uptime: 0d 00:54:00
03:07:26 New Job: 17310718 Diff: 5
03:07:42 New Job: 17310961 Diff: 5
+---+-----+----+-----+---------+--------+------+----+------+
| ID GPU Temp Fan Speed Fidelity Shares Core Mem |
+---+-----+----+-----+---------+--------+------+----+------+
| 0 2060 62 66 % 6.64 G/s 1.03 99/0 1695 8000 |
+---+-----+----+-----+---------+--------+------+----+------+
03:07:44 Pool: 127.0.0.1:3333 Shares/Minute: 1.82
03:07:44 Uptime: 0d 00:54:30
03:08:01 New Job: 17311633 Diff: 5
03:08:01 GPU0: Share #100 accepted 173 ms
03:08:02 New Job: 17311645 Diff: 5
03:08:03 New Job: 17311660 Diff: 5
Starting miner './nsfminer.exe -P stratum2+tcp://WALLET:GPU~ethash@127.0.0.1:3333 --report-hashrate --HWMON 2' to process new ethash algo
!!! Miner socket error
03:08:10 miner nsfminer 1.3.14 (No stinkin' fees edition)
03:08:10 miner Copyright 2021 Jean M. Cyr, Licensed under the terms
03:08:10 miner of the GNU General Public License Version 3
03:08:10 miner https://github.com/no-fee-ethereum-mining/nsfminer
03:08:10 miner Build: windows/release/msvc
03:08:10 miner 3rd Party: MSVC 19.16.27045.0, CUDA 11.3, Boost 1.76.0
03:08:10 miner 3rd Party: OpenSSL 1.1.1j 16 Feb 2021
03:08:10 miner Running as user:
03:08:10 miner Configured pool 127.0.0.1:3333
03:08:10 miner Selected pool 127.0.0.1:3333
03:08:10 miner Stratum mode : EthereumStratum/1.0.0 (NiceHash)
03:08:10 miner Established connection to 127.0.0.1:3333
03:08:10 miner Spinning up miners...
03:08:10 cu-0 Using Pci 0000:26:00.0: NVIDIA GeForce RTX 2060 (Compute 7.5) Memory : 6.00 GB
03:08:10 miner Extranonce set to fb9d
03:08:10 miner Authorized worker WALLET
03:08:10 miner Epoch : 438 Difficulty : 986.69 Mh
03:08:10 miner Job: 4965d91a 127.0.0.1:3333
03:08:13 cu-0 Required GPU mem: Total 4.49 GB, Cache 70.75 MB, DAG 4.42 GB, Miscellaneous 56.00 B
03:08:15 miner 0:00 A0 0.00 h - cu0 0.00 59C 0% 90.96W
03:08:19 miner Job: 9238e98b 127.0.0.1:3333
03:08:20 miner 0:00 A0 0.00 h - cu0 0.00 59C 0% 90.68W
03:08:25 miner 0:00 A0 0.00 h - cu0 0.00 59C 0% 91.24W
03:08:29 miner Job: 4ea9b4e2 127.0.0.1:3333
03:08:30 cu-0 4.42 GB of DAG data generated in 16.4 seconds
03:08:30 miner 0:00 A0 12.96 Kh - cu0 12.96 58C 0% 87.80W
03:08:35 miner 0:00 A0 33.04 Mh - cu0 33.04 58C 0% 88.19W
03:08:36 miner Job: cb901958 127.0.0.1:3333
03:08:38 miner Job: d91a0e49 127.0.0.1:3333
03:08:40 miner 0:00 A0 33.09 Mh - cu0 33.09 58C 0% 87.84W
03:08:45 miner 0:00 A0 33.08 Mh - cu0 33.08 58C 0% 87.86W
03:08:50 miner 0:00 A0 33.09 Mh - cu0 33.09 57C 0% 87.61W
03:08:52 miner Epoch : 438 Difficulty : 982.55 Mh
03:08:52 miner Job: f255ed59 127.0.0.1:3333
03:08:54 miner Job: 5ed9157e 127.0.0.1:3333
03:08:55 miner 0:00 A0 33.09 Mh - cu0 33.09 57C 0% 87.70W
03:09:00 miner 0:00 A0 33.08 Mh - cu0 33.08 57C 0% 87.56W
03:09:00 miner Job: 5d6f16e1 127.0.0.1:3333
03:09:02 miner Job: 557ea9b4 127.0.0.1:3333
03:09:05 miner 0:00 A0 33.09 Mh - cu0 33.09 57C 0% 87.71W
03:09:07 miner Job: f17a913e 127.0.0.1:3333
03:09:07 miner Job: 9227221c 127.0.0.1:3333
03:09:10 miner 0:01 A0 33.07 Mh - cu0 33.07 57C 0% 87.36W
03:09:10 miner Job: 8dfa8591 127.0.0.1:3333
03:09:15 miner 0:01 A0 33.08 Mh - cu0 33.08 57C 0% 87.41W
03:09:18 cu-0 Job: 8dfa8591 Solution: 0xfb9d00000f6e683d
03:09:18 miner Solution difficulty: 2.55 Gh
03:09:18 miner Reject reason : code:-1 message:Duplicate share
03:09:18 miner **Rejected 50 ms. 127.0.0.1:3333
03:09:20 miner 0:01 A0:R1 33.08 Mh - cu0 33.08 57C 0% 87.73W
03:09:21 miner Job: c165b851 127.0.0.1:3333
03:09:23 miner Job: 942871d6 127.0.0.1:3333
03:09:25 miner 0:01 A0:R1 33.08 Mh - cu0 33.08 56C 0% 87.51W
03:09:30 miner 0:01 A0:R1 33.08 Mh - cu0 33.08 56C 0% 87.64W
03:09:35 miner 0:01 A0:R1 33.09 Mh - cu0 33.09 56C 0% 87.42W
03:09:40 miner 0:01 A0:R1 33.09 Mh - cu0 33.09 56C 0% 87.41W
03:09:45 miner 0:01 A0:R1 33.09 Mh - cu0 33.09 56C 0% 87.07W
03:09:45 miner Job: 30aa6edb 127.0.0.1:3333
03:09:50 miner 0:01 A0:R1 33.09 Mh - cu0 33.09 56C 0% 87.36W
03:09:55 miner 0:01 A0:R1 33.08 Mh - cu0 33.08 56C 0% 87.13W
03:09:59 miner Epoch : 438 Difficulty : 974.29 Mh
03:09:59 miner Job: 951b9aef 127.0.0.1:3333
03:10:00 miner 0:01 A0:R1 33.09 Mh - cu0 33.09 56C 0% 87.37W
03:10:05 miner 0:01 A0:R1 33.08 Mh - cu0 33.08 56C 0% 86.99W
03:10:10 miner 0:02 A0:R1 33.09 Mh - cu0 33.09 56C 0% 87.03W
03:10:15 miner Job: a6cae94c 127.0.0.1:3333
03:10:15 miner 0:02 A0:R1 33.09 Mh - cu0 33.09 56C 0% 87.15W
03:10:20 miner 0:02 A0:R1 33.08 Mh - cu0 33.08 56C 0% 86.91W
03:10:21 cu-0 Job: a6cae94c Solution: 0xfb9d00000cc5f31b
03:10:21 miner Solution difficulty: 1.40 Gh
03:10:21 miner Reject reason : code:-1 message:Duplicate share
03:10:21 miner **Rejected 51 ms. 127.0.0.1:3333
03:10:25 miner 0:02 A0:R2 33.09 Mh - cu0 33.09 56C 0% 87.24W
03:10:30 miner 0:02 A0:R2 33.08 Mh - cu0 33.08 56C 0% 87.14W

I have also noticed this with other combos of miner or algo. I think I've had it happen with autolykos2 on T-Rex as the rejecting algo. But the T-Rex changelog said some stuff about corrupt shares and I thought it was just that version. It happens so randomly I'm not sure if the problem is still there with v0.24.2... But it's not just when switching to ethash.

My suspicion is just something with miner init didn't work right -- shutdown of old miner to startup of new miner needs settle-delay to allow for the previous miner to fully exit? I have not seen this with a service restart in systemd with miners, it either goes some hundreds of ms slower or actually awaits all the killed pids to go away before starting again.

Definitely some sort of state/timing problem. Adding a relaunch delay in general is probably good, it really forks crazy fast when a GPU goes absent, etc.