rndlabs / swarm-tools-rs

Swarm Overlay Mining Utilities ⛏️
GNU General Public License v3.0
7 stars 3 forks source link

bug: auto-mine hanging #11

Open attila-lendvai opened 1 year ago

attila-lendvai commented 1 year ago

this is on Guix, which may or may not be relevant. it's a cousine of NixOS, i.e. it's not an FHS distro.

$ swarm-tools --version
swarm-tools 0.3.1
$ swarm-tools --gnosis-rpc=ws://serlap.lan:8545 overlay auto-mine -n4
Mining 4 addresses...

once i left it for hours, but nothing changed.

nethermind is fully synced and was started as:

/gnu/store/sp8gkhcz59z00i6wbqap1hyi8hcjwhm1-nethermind-binary-1.19.2/bin/Nethermind.Runner \
--Sync.TuneDbMode=HeavyWrite --Sync.FastSync=true --Network.EnableUPnP=true \
--JsonRpc.JwtSecretFile=/var/lib/nethermind/jwt-secret --JsonRpc.EnginePort=8551 \
--JsonRpc.EngineHost=localhost --JsonRpc.Port=8545 --JsonRpc.Host=10.0.8.103 \
--JsonRpc.Enabled=true --Init.LogFileName=gnosis-e.log --Init.LogDirectory=/var/log/nethermind \
--datadir=/var/lib/nethermind/gnosis-e --config=gnosis

the end of the strace output:

[...]
sendto(6, "GET / HTTP/1.1\r\nHost: serlap.lan"..., 154, MSG_NOSIGNAL, NULL, 0) = 154
futex(0x55555588eea0, FUTEX_WAIT_BITSET_PRIVATE, 1, NULL, FUTEX_BITSET_MATCH_ANY) = 0
recvfrom(6, "HTTP/1.1 101 Switching Protocols"..., 4096, 0, NULL, NULL) = 183
futex(0x55555588eb48, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x55555588eb48, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x55555588eb48, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x55555588eea0, FUTEX_WAIT_BITSET_PRIVATE, 2, NULL, FUTEX_BITSET_MATCH_ANY) = 0
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
futex(0x55555588eea0, FUTEX_WAIT_BITSET_PRIVATE, 3, NULL, FUTEX_BITSET_MATCH_ANY) = 0
brk(0x5555558a5000)                     = 0x5555558a5000
brk(0x5555558a6000)                     = 0x5555558a6000
brk(0x5555558ae000)                     = 0x5555558ae000
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
futex(0x55555588eea0, FUTEX_WAIT_BITSET_PRIVATE, 4, NULL, FUTEX_BITSET_MATCH_ANY) = 0
brk(0x5555558af000)                     = 0x5555558af000
brk(0x5555558b0000)                     = 0x5555558b0000
brk(0x5555558b1000)                     = 0x5555558b1000
brk(0x5555558b2000)                     = 0x5555558b2000
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
futex(0x55555588eea0, FUTEX_WAIT_BITSET_PRIVATE, 5, NULL, FUTEX_BITSET_MATCH_ANY) = 0
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
futex(0x55555588eea0, FUTEX_WAIT_BITSET_PRIVATE, 6, NULL, FUTEX_BITSET_MATCH_ANY) = 0
brk(0x555555919000)                     = 0x555555919000
mmap(NULL, 290816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f470d66f000
mremap(0x7f470d66f000, 290816, 577536, MREMAP_MAYMOVE) = 0x7f470c463000
munmap(0x7f470d6b6000, 679936)          = 0
brk(0x555555930000)                     = 0x555555930000
brk(0x55555595d000)                     = 0x55555595d000
mmap(NULL, 364544, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f470d703000
munmap(0x7f470c463000, 577536)          = 0
munmap(0x7f470d703000, 364544)          = 0
futex(0x55555588d0a8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x55555588eea0, FUTEX_WAIT_BITSET_PRIVATE, 7, NULL, FUTEX_BITSET_MATCH_ANY
attila-lendvai commented 1 year ago

i've created a debian stable chroot. the behavior inside the chroot appears to be the same.

maybe the issue is with some peculiarity with the rpc provider? i'm running Nethermind 1.19.2.

ldeffenb commented 1 year ago

i've created a debian stable chroot. the behavior inside the chroot seems to be the same.

Just curious about the ambiguous "seems to be the same". Does that mean it hangs as this issue describes, or that mining works inside the chroot debian stable instance?

attila-lendvai commented 1 year ago

Just curious about the ambiguous "seems to be the same". Does that mean it hangs as this issue describes, or that mining works inside the chroot debian stable instance?

EDIT: i've edited 'seems' to 'appears' in my comment above.

what i mean is that i see no difference at a cursory examination (output is the same, no CPU use, no obvious extra activity at the gnosis node).

attila-lendvai commented 1 year ago

this seems to be an auto-mine issue, because in the same setup this works:

swarm-tools overlay manual-mine -r 9 -n 190