New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnect #1135

Merged
merged 13 commits into from May 25, 2018

Conversation

Projects
None yet
4 participants
@AndreaLanfranchi
Collaborator

AndreaLanfranchi commented May 22, 2018

  • Made boost's io_service global
  • No stops of io_service which prevent restart of resolver or sockets
  • On disconnects this behavior is implemented : mining is stopped only
    if switching pools (failovers) otherwise it keeps mining trying a fast
    reconnect on same pool
  • SSL and plain TCP reconnect properly on Linux

Feed back needed on Windows.

AndreaLanfranchi and others added some commits May 18, 2018

Async Disconnect and Reconnect
Attempt to solve problems related to disconnect/reconnect for timeouts
on responses or no-work.
On PoolManager the IO_SERVICE is now persistent and never exits

On Linux
* Disconnect/Reconnect without issues for plain TCP connections
* SSL Connections get shut down properly but at first reconnect attempt
it goes timeout. After that reconnection is immediate.

On Windows
* Feedback needed.
Working UNSTABLE
Reconnects ok.
Reconnect release candidate
* Made boost's io_service global
* No stops of io_service which prevent restart of resolver or sockets
* On disconnects this behavior is implemented : mining is stopped only
if switching pools (failovers) otherwise it keeps mining trying a fast
reconnect on same pool
* SSL and plain TCP reconnect properly on Linux

Feed back needed on Windows.
@smurfy

This comment has been minimized.

Show comment
Hide comment
@smurfy

smurfy May 22, 2018

Collaborator

Does not work on windows :(

 m  18:59:03|main    |  ethminer 0.15.0.dev10-31+commit.a713f035
  m  18:59:03|main    |  Build: windows / release
 cu  18:59:03|main    |  Using grid size 8192 , block size 128
  m  18:59:04|main    |  not-connected
  i  18:59:04|<unknown>|  Selected pool eu2.ethermine.org:4444
  i  18:59:04|stratum |  Trying 91.121.222.33:4444 ...
  i  18:59:04|stratum |  Connected to eu2.ethermine.org  [91.121.222.33:4444]
  i  18:59:04|stratum |  Spinning up miners...
  i  18:59:04|cuda-0  |  No work. Pause for 3 s.
  i  18:59:04|stratum |  Subscribed to stratum server
  i  18:59:04|stratum |  Authorized worker xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  i  18:59:04|stratum |  New job #ba78aacf...   eu2.ethermine.org [91.121.222.33:4444]
  i  18:59:04|stratum |  New pool difficulty:  4.00 gigahashes
  i  18:59:07|cuda-0  |  Initialising miner 0
 cu  18:59:07|cuda-0  |  Using device: GeForce GTX 1080  (Compute 6.1)
  i  18:59:08|stratum |  New job #6e6d01bd...   eu2.ethermine.org [91.121.222.33:4444]
 cu  18:59:08|cuda-0  |  Set Device to current
 cu  18:59:08|cuda-0  |  Resetting device
 cu  18:59:08|cuda-0  |  Allocating light with size: 41418304
 cu  18:59:08|cuda-0  |  Generating mining buffers
 cu  18:59:08|cuda-0  |  Generating DAG for GPU # 0  with dagSize: 2650796416  gridSize: 8192
  m  18:59:09|main    |  Speed   0.00 Mh/s    gpu/0  0.00 43C 0%   [A0+0:R0+0:F0] Time: 00:00
  i  18:59:11|stratum |  New job #1b8b7a5e...   eu2.ethermine.org [91.121.222.33:4444]
  m  18:59:14|main    |  Speed   0.00 Mh/s    gpu/0  0.00 47C 0%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:19|main    |  Speed   0.00 Mh/s    gpu/0  0.00 48C 0%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:24|main    |  Speed  17.99 Mh/s    gpu/0 17.99 49C 0%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:29|main    |  Speed  20.92 Mh/s    gpu/0 20.92 51C 0%   [A0+0:R0+0:F0] Time: 00:00
  i  18:59:30|stratum |  New job #0967348d...   eu2.ethermine.org [91.121.222.33:4444]
  i  18:59:31|stratum |  New job #fdb95779...   eu2.ethermine.org [91.121.222.33:4444]
  i  18:59:33|stratum |  New job #b9ba2339...   eu2.ethermine.org [91.121.222.33:4444]
  m  18:59:34|main    |  Speed  21.18 Mh/s    gpu/0 21.18 52C 0%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:39|main    |  Speed  20.80 Mh/s    gpu/0 20.80 53C 2%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:44|main    |  Speed  20.92 Mh/s    gpu/0 20.92 54C 6%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:49|main    |  Speed  21.09 Mh/s    gpu/0 21.09 56C 10%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:54|main    |  Speed  20.92 Mh/s    gpu/0 20.92 56C 13%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:59|main    |  Speed  20.96 Mh/s    gpu/0 20.96 57C 16%   [A0+0:R0+0:F0] Time: 00:00
  m  19:00:04|main    |  Speed  20.85 Mh/s    gpu/0 20.85 58C 19%   [A0+0:R0+0:F0] Time: 00:01
  m  19:00:09|main    |  Speed  20.83 Mh/s    gpu/0 20.83 59C 21%   [A0+0:R0+0:F0] Time: 00:01
  m  19:00:14|main    |  Speed  20.92 Mh/s    gpu/0 20.92 59C 23%   [A0+0:R0+0:F0] Time: 00:01
  m  19:00:19|main    |  Speed  20.94 Mh/s    gpu/0 20.94 60C 25%   [A0+0:R0+0:F0] Time: 00:01
  X  19:00:24|stratum |  Socket read failed: The semaphore timeout period has expired
  i  19:00:24|stratum |  Disconnected from eu2.ethermine.org  [91.121.222.33:4444]
  m  19:00:24|main    |  not-connected
  i  19:00:24|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:00:24|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:00:24|stratum |  Disconnected from eu2.ethermine.org  [91.121.222.33:4444]
  m  19:00:29|main    |  not-connected
  m  19:00:34|main    |  not-connected
  m  19:00:39|main    |  not-connected
  m  19:00:44|main    |  not-connected
  m  19:00:49|main    |  not-connected
  m  19:00:54|main    |  not-connected
  m  19:00:59|main    |  not-connected
  m  19:01:04|main    |  not-connected
  m  19:01:09|main    |  not-connected
  m  19:01:14|main    |  not-connected
  m  19:01:19|main    |  not-connected
  m  19:01:24|main    |  not-connected
  m  19:01:29|main    |  not-connected
  m  19:01:34|main    |  not-connected
  m  19:01:39|main    |  not-connected
  m  19:01:44|main    |  not-connected
  i  19:01:46|cuda-0  |  Nonce 0x75a85ea55cff11b2 wasted. Waiting for connection ...
  m  19:01:49|main    |  not-connected
  m  19:01:54|main    |  not-connected
  m  19:01:59|main    |  not-connected
  m  19:02:04|main    |  not-connected
  m  19:02:09|main    |  not-connected
Collaborator

smurfy commented May 22, 2018

Does not work on windows :(

 m  18:59:03|main    |  ethminer 0.15.0.dev10-31+commit.a713f035
  m  18:59:03|main    |  Build: windows / release
 cu  18:59:03|main    |  Using grid size 8192 , block size 128
  m  18:59:04|main    |  not-connected
  i  18:59:04|<unknown>|  Selected pool eu2.ethermine.org:4444
  i  18:59:04|stratum |  Trying 91.121.222.33:4444 ...
  i  18:59:04|stratum |  Connected to eu2.ethermine.org  [91.121.222.33:4444]
  i  18:59:04|stratum |  Spinning up miners...
  i  18:59:04|cuda-0  |  No work. Pause for 3 s.
  i  18:59:04|stratum |  Subscribed to stratum server
  i  18:59:04|stratum |  Authorized worker xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  i  18:59:04|stratum |  New job #ba78aacf...   eu2.ethermine.org [91.121.222.33:4444]
  i  18:59:04|stratum |  New pool difficulty:  4.00 gigahashes
  i  18:59:07|cuda-0  |  Initialising miner 0
 cu  18:59:07|cuda-0  |  Using device: GeForce GTX 1080  (Compute 6.1)
  i  18:59:08|stratum |  New job #6e6d01bd...   eu2.ethermine.org [91.121.222.33:4444]
 cu  18:59:08|cuda-0  |  Set Device to current
 cu  18:59:08|cuda-0  |  Resetting device
 cu  18:59:08|cuda-0  |  Allocating light with size: 41418304
 cu  18:59:08|cuda-0  |  Generating mining buffers
 cu  18:59:08|cuda-0  |  Generating DAG for GPU # 0  with dagSize: 2650796416  gridSize: 8192
  m  18:59:09|main    |  Speed   0.00 Mh/s    gpu/0  0.00 43C 0%   [A0+0:R0+0:F0] Time: 00:00
  i  18:59:11|stratum |  New job #1b8b7a5e...   eu2.ethermine.org [91.121.222.33:4444]
  m  18:59:14|main    |  Speed   0.00 Mh/s    gpu/0  0.00 47C 0%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:19|main    |  Speed   0.00 Mh/s    gpu/0  0.00 48C 0%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:24|main    |  Speed  17.99 Mh/s    gpu/0 17.99 49C 0%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:29|main    |  Speed  20.92 Mh/s    gpu/0 20.92 51C 0%   [A0+0:R0+0:F0] Time: 00:00
  i  18:59:30|stratum |  New job #0967348d...   eu2.ethermine.org [91.121.222.33:4444]
  i  18:59:31|stratum |  New job #fdb95779...   eu2.ethermine.org [91.121.222.33:4444]
  i  18:59:33|stratum |  New job #b9ba2339...   eu2.ethermine.org [91.121.222.33:4444]
  m  18:59:34|main    |  Speed  21.18 Mh/s    gpu/0 21.18 52C 0%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:39|main    |  Speed  20.80 Mh/s    gpu/0 20.80 53C 2%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:44|main    |  Speed  20.92 Mh/s    gpu/0 20.92 54C 6%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:49|main    |  Speed  21.09 Mh/s    gpu/0 21.09 56C 10%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:54|main    |  Speed  20.92 Mh/s    gpu/0 20.92 56C 13%   [A0+0:R0+0:F0] Time: 00:00
  m  18:59:59|main    |  Speed  20.96 Mh/s    gpu/0 20.96 57C 16%   [A0+0:R0+0:F0] Time: 00:00
  m  19:00:04|main    |  Speed  20.85 Mh/s    gpu/0 20.85 58C 19%   [A0+0:R0+0:F0] Time: 00:01
  m  19:00:09|main    |  Speed  20.83 Mh/s    gpu/0 20.83 59C 21%   [A0+0:R0+0:F0] Time: 00:01
  m  19:00:14|main    |  Speed  20.92 Mh/s    gpu/0 20.92 59C 23%   [A0+0:R0+0:F0] Time: 00:01
  m  19:00:19|main    |  Speed  20.94 Mh/s    gpu/0 20.94 60C 25%   [A0+0:R0+0:F0] Time: 00:01
  X  19:00:24|stratum |  Socket read failed: The semaphore timeout period has expired
  i  19:00:24|stratum |  Disconnected from eu2.ethermine.org  [91.121.222.33:4444]
  m  19:00:24|main    |  not-connected
  i  19:00:24|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:00:24|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:00:24|stratum |  Disconnected from eu2.ethermine.org  [91.121.222.33:4444]
  m  19:00:29|main    |  not-connected
  m  19:00:34|main    |  not-connected
  m  19:00:39|main    |  not-connected
  m  19:00:44|main    |  not-connected
  m  19:00:49|main    |  not-connected
  m  19:00:54|main    |  not-connected
  m  19:00:59|main    |  not-connected
  m  19:01:04|main    |  not-connected
  m  19:01:09|main    |  not-connected
  m  19:01:14|main    |  not-connected
  m  19:01:19|main    |  not-connected
  m  19:01:24|main    |  not-connected
  m  19:01:29|main    |  not-connected
  m  19:01:34|main    |  not-connected
  m  19:01:39|main    |  not-connected
  m  19:01:44|main    |  not-connected
  i  19:01:46|cuda-0  |  Nonce 0x75a85ea55cff11b2 wasted. Waiting for connection ...
  m  19:01:49|main    |  not-connected
  m  19:01:54|main    |  not-connected
  m  19:01:59|main    |  not-connected
  m  19:02:04|main    |  not-connected
  m  19:02:09|main    |  not-connected
@AndreaLanfranchi

This comment has been minimized.

Show comment
Hide comment
@AndreaLanfranchi

AndreaLanfranchi May 22, 2018

Collaborator

Ok. This log makes sense to me.
Pushing correction.

Collaborator

AndreaLanfranchi commented May 22, 2018

Ok. This log makes sense to me.
Pushing correction.

@smurfy

This comment has been minimized.

Show comment
Hide comment
@smurfy

smurfy May 22, 2018

Collaborator

Works now, but consider adding some kind of delay for reconnecting:

  m  19:40:10|main    |  Speed  20.88 Mh/s    gpu/0 20.88 60C 23%   [A0+0:R0+0:F0] Time: 00:01
  m  19:40:15|main    |  Speed  20.72 Mh/s    gpu/0 20.72 60C 25%   [A0+0:R0+0:F0] Time: 00:01
  m  19:40:20|main    |  Speed  20.71 Mh/s    gpu/0 20.71 60C 27%   [A0+0:R0+0:F0] Time: 00:01
  X  19:40:24|stratum |  Socket read failed: The semaphore timeout period has expired
  i  19:40:24|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:25|main    |  not-connected
  i  19:40:25|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:25|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:25|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:26|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:26|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:26|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:27|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:27|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:27|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:28|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:28|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:28|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:29|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:29|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:29|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:30|main    |  not-connected
  i  19:40:30|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:30|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:30|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:31|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:31|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:31|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:32|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:32|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:32|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:33|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:33|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:33|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:34|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:34|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:34|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:35|main    |  not-connected
  i  19:40:35|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:35|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:35|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:36|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:36|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:36|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:37|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:37|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:37|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:38|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:38|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:38|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:39|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:39|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:39|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:40|main    |  not-connected
  i  19:40:40|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:40|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:40|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:41|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:41|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:41|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:42|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:42|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:42|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:44|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:44|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:44|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:45|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:45|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:45|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:45|main    |  not-connected
  i  19:40:46|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:46|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:46|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:47|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:47|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:47|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:48|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:48|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:48|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:49|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:49|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:49|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:50|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:50|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:50|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:50|main    |  not-connected
  i  19:40:51|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:51|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:51|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:52|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:52|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:52|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:53|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:53|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:53|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:54|cuda-0  |  Nonce 0x5565a821ee603805 wasted. Waiting for connection ...
  i  19:40:54|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:54|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:54|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:55|<unknown>|  Selected pool eu2.ethermine.org:4444
  i  19:40:55|stratum |  Trying 94.23.36.128:4444 ...
  i  19:40:55|stratum |  Connected to eu2.ethermine.org  [94.23.36.128:4444]
  i  19:40:55|stratum |  Subscribed to stratum server
  i  19:40:55|stratum |  Authorized worker xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  i  19:40:55|stratum |  New job #1e14900f...   eu2.ethermine.org [94.23.36.128:4444]
  m  19:40:55|main    |  Speed  21.04 Mh/s    gpu/0 21.04 62C 33%   [A0+0:R0+0:F0] Time: 00:01
  i  19:40:57|stratum |  New job #759d66e7...   eu2.ethermine.org [94.23.36.128:4444]
  m  19:41:00|main    |  Speed  20.88 Mh/s    gpu/0 20.88 62C 34%   [A0+0:R0+0:F0] Time: 00:01
Collaborator

smurfy commented May 22, 2018

Works now, but consider adding some kind of delay for reconnecting:

  m  19:40:10|main    |  Speed  20.88 Mh/s    gpu/0 20.88 60C 23%   [A0+0:R0+0:F0] Time: 00:01
  m  19:40:15|main    |  Speed  20.72 Mh/s    gpu/0 20.72 60C 25%   [A0+0:R0+0:F0] Time: 00:01
  m  19:40:20|main    |  Speed  20.71 Mh/s    gpu/0 20.71 60C 27%   [A0+0:R0+0:F0] Time: 00:01
  X  19:40:24|stratum |  Socket read failed: The semaphore timeout period has expired
  i  19:40:24|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:25|main    |  not-connected
  i  19:40:25|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:25|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:25|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:26|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:26|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:26|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:27|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:27|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:27|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:28|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:28|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:28|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:29|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:29|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:29|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:30|main    |  not-connected
  i  19:40:30|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:30|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:30|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:31|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:31|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:31|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:32|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:32|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:32|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:33|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:33|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:33|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:34|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:34|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:34|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:35|main    |  not-connected
  i  19:40:35|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:35|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:35|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:36|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:36|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:36|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:37|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:37|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:37|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:38|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:38|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:38|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:39|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:39|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:39|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:40|main    |  not-connected
  i  19:40:40|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:40|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:40|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:41|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:41|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:41|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:42|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:42|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:42|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:44|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:44|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:44|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:45|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:45|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:45|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:45|main    |  not-connected
  i  19:40:46|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:46|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:46|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:47|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:47|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:47|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:48|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:48|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:48|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:49|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:49|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:49|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:50|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:50|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:50|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  m  19:40:50|main    |  not-connected
  i  19:40:51|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:51|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:51|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:52|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:52|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:52|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:53|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:53|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:53|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:54|cuda-0  |  Nonce 0x5565a821ee603805 wasted. Waiting for connection ...
  i  19:40:54|<unknown>|  Selected pool eu2.ethermine.org:4444
  X  19:40:54|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  19:40:54|stratum |  Disconnected from eu2.ethermine.org  [46.105.121.53:4444]
  i  19:40:55|<unknown>|  Selected pool eu2.ethermine.org:4444
  i  19:40:55|stratum |  Trying 94.23.36.128:4444 ...
  i  19:40:55|stratum |  Connected to eu2.ethermine.org  [94.23.36.128:4444]
  i  19:40:55|stratum |  Subscribed to stratum server
  i  19:40:55|stratum |  Authorized worker xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  i  19:40:55|stratum |  New job #1e14900f...   eu2.ethermine.org [94.23.36.128:4444]
  m  19:40:55|main    |  Speed  21.04 Mh/s    gpu/0 21.04 62C 33%   [A0+0:R0+0:F0] Time: 00:01
  i  19:40:57|stratum |  New job #759d66e7...   eu2.ethermine.org [94.23.36.128:4444]
  m  19:41:00|main    |  Speed  20.88 Mh/s    gpu/0 20.88 62C 34%   [A0+0:R0+0:F0] Time: 00:01
@AndreaLanfranchi

This comment has been minimized.

Show comment
Hide comment
@AndreaLanfranchi

AndreaLanfranchi May 22, 2018

Collaborator

Ok ... need some adjustments.
Behavior to be expected is :

  • On disconnection from pool PoolManager tries as many "fast" reconnections to the same pool as are defined in --farm-retries argument. "Fast" reconnection means no stop of mining as we're supposed to reconnect to the same pool.
  • On connection switching mining is stopped and a delay of 3 seconds is addedd.
  • If the next pool in switching process is an "exit" pool then the workloop simply stops and ethminer exits
Collaborator

AndreaLanfranchi commented May 22, 2018

Ok ... need some adjustments.
Behavior to be expected is :

  • On disconnection from pool PoolManager tries as many "fast" reconnections to the same pool as are defined in --farm-retries argument. "Fast" reconnection means no stop of mining as we're supposed to reconnect to the same pool.
  • On connection switching mining is stopped and a delay of 3 seconds is addedd.
  • If the next pool in switching process is an "exit" pool then the workloop simply stops and ethminer exits
@smurfy

This comment has been minimized.

Show comment
Hide comment
@smurfy

smurfy May 22, 2018

Collaborator

TCP and SSL WORK

  m  20:02:17|main    |  Speed  20.55 Mh/s    gpu/0 20.55 62C 33%   [A0+0:R0+0:F0] Time: 00:00
  m  20:02:22|main    |  Speed  20.55 Mh/s    gpu/0 20.55 62C 34%   [A0+0:R0+0:F0] Time: 00:01
  m  20:02:27|main    |  Speed  20.55 Mh/s    gpu/0 20.55 62C 34%   [A0+0:R0+0:F0] Time: 00:01
  m  20:02:32|main    |  Speed  20.55 Mh/s    gpu/0 20.55 63C 35%   [A0+0:R0+0:F0] Time: 00:01
  m  20:02:37|main    |  Speed  20.34 Mh/s    gpu/0 20.34 63C 35%   [A0+0:R0+0:F0] Time: 00:01
  X  20:02:41|stratum |  Socket read failed: The semaphore timeout period has expired
  i  20:02:41|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  m  20:02:42|main    |  not-connected
  i  20:02:42|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:42|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:42|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:43|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:43|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:43|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:44|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:44|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:44|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:45|<unknown>|  Shutting down miners...
  i  20:02:45|<unknown>|  Retrying in 3 ...
  i  20:02:46|<unknown>|  Retrying in 2 ...
  m  20:02:47|main    |  not-connected
  i  20:02:47|<unknown>|  Retrying in 1 ...
  i  20:02:48|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:48|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:48|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:49|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:49|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:49|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:50|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:50|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:50|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:51|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:51|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:51|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  m  20:02:52|main    |  not-connected
  i  20:02:52|<unknown>|  Selected pool eu2.ethermine.org:5555
  i  20:02:52|stratum |  Trying 91.121.167.111:5555 ...
  i  20:02:52|stratum |  Connected to eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:52|stratum |  Spinning up miners...
  i  20:02:52|cuda-0  |  No work. Pause for 3 s.
  i  20:02:52|stratum |  Subscribed to stratum server
  i  20:02:52|stratum |  Authorized worker xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  i  20:02:52|stratum |  New job #38e24458...   eu2.ethermine.org [91.121.167.111:5555]
  i  20:02:55|cuda-0  |  Initialising miner 0
 cu  20:02:55|cuda-0  |  Using device: GeForce GTX 1080  (Compute 6.1)
 cu  20:02:55|cuda-0  |  Set Device to current
 cu  20:02:55|cuda-0  |  Resetting device
 cu  20:02:55|cuda-0  |  Allocating light with size: 41418304
 cu  20:02:55|cuda-0  |  Generating mining buffers
 cu  20:02:55|cuda-0  |  Generating DAG for GPU # 0  with dagSize: 2650796416  gridSize: 8192
  m  20:02:57|main    |  Speed   0.00 Mh/s    gpu/0  0.00 61C 36%   [A0+0:R0+0:F0] Time: 00:01
  m  20:03:02|main    |  Speed   0.00 Mh/s    gpu/0  0.00 62C 36%   [A0+0:R0+0:F0] Time: 00:01
Collaborator

smurfy commented May 22, 2018

TCP and SSL WORK

  m  20:02:17|main    |  Speed  20.55 Mh/s    gpu/0 20.55 62C 33%   [A0+0:R0+0:F0] Time: 00:00
  m  20:02:22|main    |  Speed  20.55 Mh/s    gpu/0 20.55 62C 34%   [A0+0:R0+0:F0] Time: 00:01
  m  20:02:27|main    |  Speed  20.55 Mh/s    gpu/0 20.55 62C 34%   [A0+0:R0+0:F0] Time: 00:01
  m  20:02:32|main    |  Speed  20.55 Mh/s    gpu/0 20.55 63C 35%   [A0+0:R0+0:F0] Time: 00:01
  m  20:02:37|main    |  Speed  20.34 Mh/s    gpu/0 20.34 63C 35%   [A0+0:R0+0:F0] Time: 00:01
  X  20:02:41|stratum |  Socket read failed: The semaphore timeout period has expired
  i  20:02:41|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  m  20:02:42|main    |  not-connected
  i  20:02:42|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:42|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:42|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:43|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:43|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:43|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:44|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:44|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:44|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:45|<unknown>|  Shutting down miners...
  i  20:02:45|<unknown>|  Retrying in 3 ...
  i  20:02:46|<unknown>|  Retrying in 2 ...
  m  20:02:47|main    |  not-connected
  i  20:02:47|<unknown>|  Retrying in 1 ...
  i  20:02:48|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:48|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:48|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:49|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:49|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:49|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:50|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:50|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:50|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:51|<unknown>|  Selected pool eu2.ethermine.org:5555
  X  20:02:51|stratum |  Could not resolve host eu2.ethermine.org , No such host is known
  i  20:02:51|stratum |  Disconnected from eu2.ethermine.org  [91.121.167.111:5555]
  m  20:02:52|main    |  not-connected
  i  20:02:52|<unknown>|  Selected pool eu2.ethermine.org:5555
  i  20:02:52|stratum |  Trying 91.121.167.111:5555 ...
  i  20:02:52|stratum |  Connected to eu2.ethermine.org  [91.121.167.111:5555]
  i  20:02:52|stratum |  Spinning up miners...
  i  20:02:52|cuda-0  |  No work. Pause for 3 s.
  i  20:02:52|stratum |  Subscribed to stratum server
  i  20:02:52|stratum |  Authorized worker xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  i  20:02:52|stratum |  New job #38e24458...   eu2.ethermine.org [91.121.167.111:5555]
  i  20:02:55|cuda-0  |  Initialising miner 0
 cu  20:02:55|cuda-0  |  Using device: GeForce GTX 1080  (Compute 6.1)
 cu  20:02:55|cuda-0  |  Set Device to current
 cu  20:02:55|cuda-0  |  Resetting device
 cu  20:02:55|cuda-0  |  Allocating light with size: 41418304
 cu  20:02:55|cuda-0  |  Generating mining buffers
 cu  20:02:55|cuda-0  |  Generating DAG for GPU # 0  with dagSize: 2650796416  gridSize: 8192
  m  20:02:57|main    |  Speed   0.00 Mh/s    gpu/0  0.00 61C 36%   [A0+0:R0+0:F0] Time: 00:01
  m  20:03:02|main    |  Speed   0.00 Mh/s    gpu/0  0.00 62C 36%   [A0+0:R0+0:F0] Time: 00:01
@AndreaLanfranchi

This comment has been minimized.

Show comment
Hide comment
@AndreaLanfranchi

AndreaLanfranchi May 22, 2018

Collaborator

Finally !!!

I think this solves a good bunch of problems.

Collaborator

AndreaLanfranchi commented May 22, 2018

Finally !!!

I think this solves a good bunch of problems.

@paddymahoney

This comment has been minimized.

Show comment
Hide comment
@paddymahoney

paddymahoney May 24, 2018

Seems to improve resiliency for me across a modem reboot. +1

paddymahoney commented May 24, 2018

Seems to improve resiliency for me across a modem reboot. +1

@paddymahoney

This comment has been minimized.

Show comment
Hide comment
@paddymahoney

paddymahoney May 24, 2018

Tested on linux and windows, resiliency of process plain better, reiterate +1

paddymahoney commented May 24, 2018

Tested on linux and windows, resiliency of process plain better, reiterate +1

{
// Post first deadline timer to give io_service
// initial work
m_io_work_timer.expires_from_now(boost::posix_time::seconds(60));

This comment has been minimized.

@chfast

chfast May 24, 2018

Contributor

Why this fake job is needed?

@chfast

chfast May 24, 2018

Contributor

Why this fake job is needed?

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Every time io_service starts allocates it's own thread_pool.
When there are no more jobs in the poll queue it destroys all it's threads and recreation is very long time consuming. Also on Windows apparently it does not restart properly.
This fake job gives the poll queue always something to do so it never stops.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Every time io_service starts allocates it's own thread_pool.
When there are no more jobs in the poll queue it destroys all it's threads and recreation is very long time consuming. Also on Windows apparently it does not restart properly.
This fake job gives the poll queue always something to do so it never stops.

@@ -542,6 +584,7 @@ class MinerCLI
if (m_minerType == MinerType::CUDA || m_minerType == MinerType::Mixed)
CUDAMiner::listDevices();
#endif
stop_io_service();

This comment has been minimized.

@chfast

chfast May 24, 2018

Contributor

Can you try return from function instead of exit().

@chfast

chfast May 24, 2018

Contributor

Can you try return from function instead of exit().

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

I did not change the logic of functions not related to the scope of this pr.
Exit was there before: I only addedd the stop_io_service before exiting.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

I did not change the logic of functions not related to the scope of this pr.
Exit was there before: I only addedd the stop_io_service before exiting.

m_noEval,
m_exit
)) {
stop_io_service();

This comment has been minimized.

@chfast

chfast May 24, 2018

Contributor

This stop_io_service() seems to be a bad pattern. Is there a way to start the service only when needed?

Long term, I have better way of handling list of devices.

@chfast

chfast May 24, 2018

Contributor

This stop_io_service() seems to be a bad pattern. Is there a way to start the service only when needed?

Long term, I have better way of handling list of devices.

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Actually I start the io_service at MinerCLI constructor thus I need to stop it whenever MinerCLI exits

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Actually I start the io_service at MinerCLI constructor thus I need to stop it whenever MinerCLI exits

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Also ... aside from list-devices asio_service is always needed.

@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

Also ... aside from list-devices asio_service is always needed.

Show outdated Hide outdated ethminer/MinerAux.h
Show outdated Hide outdated libethcore/Farm.h
Show outdated Hide outdated libethcore/Farm.h
Show outdated Hide outdated libpoolprotocols/PoolManager.cpp
unsigned m_reconnectTries = 3;
unsigned m_reconnectTry = 0;
std::vector <URI> m_connections;
std::atomic<bool> m_running = { false };

This comment has been minimized.

@chfast

chfast May 24, 2018

Contributor

There is also g_running flag. Can this be combined?

@chfast

chfast May 24, 2018

Contributor

There is also g_running flag. Can this be combined?

This comment has been minimized.

@AndreaLanfranchi

AndreaLanfranchi May 25, 2018

Collaborator

Combining global running semaphore (which is only affected by signal capturing) with m_running on PoolManager requires a sensible redesign of running pattern and, at least, remove (on PoolManager) the start and stop methods as they would make no sense.
Nevertheless actual separation of running ethminer process from PoolManager service may (or may not) be helpful to implement further features like, say for example, bind to recent added feature --tstart/--tstop where poolconnection might be suspended in case all gpu exceed temperature threshold.

Anyway I would leave this task outside the scope of this specific PR.

@AndreaLanfranchi

AndreaLanfranchi May 25, 2018

Collaborator

Combining global running semaphore (which is only affected by signal capturing) with m_running on PoolManager requires a sensible redesign of running pattern and, at least, remove (on PoolManager) the start and stop methods as they would make no sense.
Nevertheless actual separation of running ethminer process from PoolManager service may (or may not) be helpful to implement further features like, say for example, bind to recent added feature --tstart/--tstop where poolconnection might be suspended in case all gpu exceed temperature threshold.

Anyway I would leave this task outside the scope of this specific PR.

Show outdated Hide outdated libpoolprotocols/PoolManager.cpp
@AndreaLanfranchi

This comment has been minimized.

Show comment
Hide comment
@AndreaLanfranchi

AndreaLanfranchi May 24, 2018

Collaborator

The whole point of this PR is to have a io_service globally and persistently running. Otherwise reconnect would not happen.

Collaborator

AndreaLanfranchi commented May 24, 2018

The whole point of this PR is to have a io_service globally and persistently running. Otherwise reconnect would not happen.

AndreaLanfranchi added some commits May 24, 2018

@chfast

This comment has been minimized.

Show comment
Hide comment
@chfast

chfast May 24, 2018

Contributor

Please also add an entry to CHANGELOG.md.

Contributor

chfast commented May 24, 2018

Please also add an entry to CHANGELOG.md.

@chfast

This comment has been minimized.

Show comment
Hide comment
@chfast

chfast May 24, 2018

Contributor

Hey @AndreaLanfranchi, two question have not been addressed here.

Contributor

chfast commented May 24, 2018

Hey @AndreaLanfranchi, two question have not been addressed here.

AndreaLanfranchi and others added some commits May 25, 2018

@chfast

chfast approved these changes May 25, 2018

@chfast chfast merged commit 3e1aedd into master May 25, 2018

0 of 3 checks passed

ci/circleci CircleCI is running your tests
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@chfast chfast deleted the reconnect branch May 25, 2018

@AndreaLanfranchi

This comment has been minimized.

Show comment
Hide comment
@AndreaLanfranchi

AndreaLanfranchi May 25, 2018

Collaborator

Why didn't you add to this log the recent addition of --tstart and --tstop ?

Collaborator

AndreaLanfranchi commented on c667186 May 25, 2018

Why didn't you add to this log the recent addition of --tstart and --tstop ?

This comment has been minimized.

Show comment
Hide comment
@AndreaLanfranchi

AndreaLanfranchi May 25, 2018

Collaborator

Or is it something which has to be addressed only to specific people ?

Collaborator

AndreaLanfranchi replied May 25, 2018

Or is it something which has to be addressed only to specific people ?

This comment has been minimized.

Show comment
Hide comment
@chfast

chfast May 25, 2018

Contributor

Because it's not relevant to this PR.
I forgot to request it in the --tstart PR.

Contributor

chfast replied May 25, 2018

Because it's not relevant to this PR.
I forgot to request it in the --tstart PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment