icecc / icecream

Distributed compiler with a central scheduler to share build load
GNU General Public License v2.0
1.6k stars 252 forks source link

icecc-scheduler bug when retry attempt at maximum limit #604

Open hese10 opened 2 years ago

hese10 commented 2 years ago

When icecc-scheduler retries for "failed to accept an incoming connection", it sets timer value based on the time_offset_table table. But when attemp count is the maximum, there is a bug in code in CompileServer::updateInConnectivity function in icecream/scheduler/compileserver.cpp file. The limit checking shuold be before that next timeout value calculation: so from current code:

    m_nextConnTime = time(nullptr) + time_offset_table[m_inConnAttempt];
        if(m_inConnAttempt < (table_size - 1))
            m_inConnAttempt++;

to:

        if(m_inConnAttempt < (table_size - 1))
            m_inConnAttempt++;
       m_nextConnTime = time(nullptr) + time_offset_table[m_inConnAttempt];

and by the way, is there a way to scheduler to notice the icecc daemon clients appearing again and making the retry and not waiting this timer to expire?