cryptonote-social / csminer

csminer Monero miner from https://cryptonote.social/
GNU General Public License v3.0
58 stars 24 forks source link

Crash after screen off and then screen on #3

Closed mdcarreira closed 4 years ago

mdcarreira commented 4 years ago

When my screen was turned off, csminer started working as expected. However, when I turned on my screen again, I got the following error:

# 2020/07/26 20:29:54 INFO(miner.go,129): Got new job: 1115 w/ difficulty: 20000
# 2020/07/26 20:29:54 INFO(miner.go,110): [mining=PAUSED until screen lock. <enter> to mine anyway]
# 2020/07/26 20:31:19 INFO(miner.go,282): Screen off
# 2020/07/26 20:31:19 INFO(miner.go,129): Got new job: 1115 w/ difficulty: 20000
# 2020/07/26 20:31:19 INFO(miner.go,176): Shares    [accepted:rejected]: 368 : 2
# 2020/07/26 20:31:19 INFO(miner.go,177): Hashes          [client:pool]: 7547398 : 7360000
# 2020/07/26 20:31:19 INFO(miner.go,110): [mining=ACTIVE, threads=2]
# 2020/07/26 20:33:44 INFO(miner.go,212): Share found: 37865 1
# 2020/07/26 20:33:52 INFO(miner.go,285): Screen on
# 2020/07/26 20:34:45 WARN(client.go,279): error reading: read tcp 192.168.43.141:55313->75.144.254.101:5555: i/o timeout
# 2020/07/26 20:34:45 ERROR(client.go,249): readJSON failed: read tcp 192.168.43.141:55313->75.144.254.101:5555: i/o timeout
# 2020/07/26 20:34:45 ERROR(client.go,213): Got nil response
# 2020/07/26 20:34:45 WARN(miner.go,113): client died
# 2020/07/26 20:34:45 WARN(miner.go,238): Submit work client failure: 1115 submit work failure 1
panic: send on closed channel

goroutine 20 [running]:
github.com/cryptonote-social/csminer.kickJobDispatcher(0x455bde0, 0x0)
    /Users/dad/src/github.com/cryptonote-social/csminer/miner.go:299 +0x9e
github.com/cryptonote-social/csminer.monitorScreenSaver(0xc000090120)
    /Users/dad/src/github.com/cryptonote-social/csminer/miner.go:286 +0x11f
created by github.com/cryptonote-social/csminer.Mine
    /Users/dad/src/github.com/cryptonote-social/csminer/miner.go:77 +0xe22

This happened several times, although I could not find a easy way to reproduce it as sometimes it works as expected.

I'm using a macbook pro. Let me know if you need more info to debug.

cryptonote-social commented 4 years ago

What version? (Should say on startup)

I think this bug was fixed in 0.0.7

mdcarreira commented 4 years ago

I'm using the csminer-0.0.7-osx version.

cryptonote-social commented 4 years ago

ok thanks, I am pretty sure this is fixed in the next version which I should have up on the website imminently. I'll ping this thread when it's ready.

cryptonote-social commented 4 years ago

OK v0.1.0 is up on the website now and should solve this issue, and also provide the battery power detection on osx. Please let me know if it works for you? (Hit reload if it doesn't show: https://cryptonote.social/tools )

mdcarreira commented 4 years ago

Ok, I'll try out the new version for a couple of weeks and inform you if I face this problem again.

cryptonote-social commented 4 years ago

Sigh, seems this isn't quite fixed as it just happened on my machine:

2020/07/31 07:27:32 WARN(miner.go,133): client died

2020/07/31 07:27:34 INFO(miner.go,464): Screen active

panic: send on closed channel

goroutine 7 [running]:

github.com/cryptonote-social/csminer.kickJobDispatcher(0x4572f80, 0x0) /Users/dad/src/github.com/cryptonote-social/csminer/miner.go:484 +0x9e github.com/cryptonote-social/csminer.monitorScreenSaver(0xc000102120) /Users/dad/src/github.com/cryptonote-social/csminer/miner.go:465 +0xcf created by github.com/cryptonote-social/csminer.Mine /Users/dad/src/github.com/cryptonote-social/csminer/miner.go:94 +0xf8a

cryptonote-social commented 4 years ago

should be fixed in commit e4c78caa61ec669b453901dc6bc810242b1153f0 Will cut a new release once confirmed.

mdcarreira commented 4 years ago

Yup, I also got this error running csminer 0.1.0 in linux:

# 2020/07/31 14:06:17 INFO(miner.go,251): Share found: 322613 1
# 2020/07/31 14:18:00 INFO(csminer.go,53): Gnome screensaver turned off
# 2020/07/31 14:18:00 INFO(miner.go,464): Screen active
# 2020/07/31 14:19:19 INFO(csminer.go,49): Gnome screensaver turned on
# 2020/07/31 14:21:01 WARN(client.go,284): error reading: read tcp 192.168.43.236:40060->75.144.254.101:5555: read: connection timed out
# 2020/07/31 14:21:01 ERROR(client.go,253): readJSON failed: read tcp 192.168.43.236:40060->75.144.254.101:5555: read: connection timed out
# 2020/07/31 14:21:01 ERROR(client.go,217): Got nil response
# 2020/07/31 14:21:01 WARN(miner.go,277): Submit work client failure: 465953 submit work failure 1
# 2020/07/31 14:21:01 WARN(miner.go,133): client died
# 2020/07/31 14:21:01 ERROR(client.go,212): writing request failed: write tcp 192.168.43.236:40060->75.144.254.101:5555: use of closed network connection for client: stratum_client:cryptonote.social:5555
# 2020/07/31 14:21:01 WARN(miner.go,277): Submit work client failure: 465953 write tcp 192.168.43.236:40060->75.144.254.101:5555: use of closed network connection
panic: send on closed channel

goroutine 35 [running]:
github.com/cryptonote-social/csminer.kickJobDispatcher(0xcdba60, 0x0)
    /home/bert/src/github.com/cryptonote-social/csminer/miner.go:484 +0x9e
github.com/cryptonote-social/csminer.monitorScreenSaver(0xc000204000)
    /home/bert/src/github.com/cryptonote-social/csminer/miner.go:465 +0xcf
created by github.com/cryptonote-social/csminer.Mine
    /home/bert/src/github.com/cryptonote-social/csminer/miner.go:94 +0xf8a
cryptonote-social commented 4 years ago

A bit more work on this: 3e7568e0b52f5f4215858d3f27cc47b5efb15326

Hopefully ready for release by tonight.

cryptonote-social commented 4 years ago

Fixes released in point release 0.1.1 now available for download on the https://cryptonote.social/tools page. Closing issue for now, please re-open if you encounter further problems.