ethereum-mining / ethminer

Ethereum miner with OpenCL, CUDA and stratum support
GNU General Public License v3.0
5.96k stars 2.28k forks source link

Spurious Teminating message on startup #1438

Closed jean-m-cyr closed 6 years ago

jean-m-cyr commented 6 years ago

It doesn't happen every time but...

m 20:00:12 ethminer ethminer 0.16.0.dev2-30+commit.251689f7.dirty m 20:00:12 ethminer Build: linux/release cu 20:00:12 ethminer Using grid size: 8,192, block size: 64 i 20:00:13 ethminer Configured pool us1-etc.ethermine.org:5555 i 20:00:13 main Selected pool us1-etc.ethermine.org:5555 i 20:00:13 stratum Stratum mode detected : ETHPROXY Compatible i 20:00:13 stratum Logged in ! i 20:00:13 stratum Established connection with us1-etc.ethermine.org:5555 at [54.177.207.188:5555] i 20:00:13 stratum Spinning up miners... i 20:00:13 cuda-0 No work. Pause for 3 s. i 20:00:13 cuda-1 No work. Pause for 3 s. i 20:00:13 cuda-2 No work. Pause for 3 s. i 20:00:13 cuda-3 No work. Pause for 3 s. i 20:00:14 stratum Job: #6dcc7896… us1-etc.ethermine.org [54.177.207.188:5555] i 20:00:14 stratum Pool difficulty: 4.00K megahash i 20:00:14 stratum New epoch 211 i 20:00:14 ethminer Terminated ! i 20:00:16 cuda-0 Initialising miner 0

Miner runs normally...

AndreaLanfranchi commented 6 years ago

Hmmm ... something very bad here.

"Terminated !" is only written by doMiner() in main.cpp after exiting the workloop.

        // Start PoolManager
        mgr.start();

        // Run CLI in loop
        while (g_running && mgr.isRunning()) {

            // Wait at the beginning of the loop to give some time
            // services to start properly. Otherwise we get a "not-connected"
            // message immediately
            this_thread::sleep_for(chrono::seconds(m_displayInterval));

            if (mgr.isConnected()) {
                auto mp = f.miningProgress(m_show_hwmonitors, m_show_power);
                minelog << mp << ' ' << f.getSolutionStats() << ' ' << f.farmLaunchedFormatted();

#if ETH_DBUS
                dbusint.send(toString(mp).c_str());
#endif
            }
            else {
                minelog << "not-connected";
            }

        }

#if API_CORE

        // Stop Api server
        api.stop();

#endif

        mgr.stop();
        stop_io_service();

        cnote << "Terminated !";
        exit(0);

That message should occur only after mgr has done his job. And should also exit. Why it continues to grind ?

AndreaLanfranchi commented 6 years ago

Does not happen on

ethminer 0.16.0.dev2-27+commit.919c8e08
Build: linux/release/gnu
jean-m-cyr commented 6 years ago

Haven't seen this one lately... hmm worrisome!

We've had a couple of inexplicable incidents lately:

My guess would be trampled memory of some kind, and I don't trust the cpp-netlib/uri component since I've demonstrated it has a broken assignment operator (report #1445) in the version we are using. Wonder what else it's doing wrong?

AndreaLanfranchi commented 6 years ago

Did you find a relationship with cpp-uri ?

Sent from mobile. Apologies for brevity and typos.

In data 18 agosto 2018 12:53:15 Jean Cyr notifications@github.com ha scritto:

Closed #1438. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jean-m-cyr commented 6 years ago

No, but I haven't seen this in quite a while and I've been doing a LOT of shutdowns and restarts.