Skip to content

Buyer times out processing piece #35

@bedeho

Description

@bedeho

This happens very frequently, and it leads to the connection being broken.

Its unclear why it is happening, but my leading hypothesis is that something is bad with the state management inside the extension, or that libtorrent is dropping the alert due to alert congestion.

screen shot 2017-10-19 at 23 41 10

Notes from Slack

this may be a good place to either add some debug prints, or to run in debug mode to see if any asserts fail

template <class ConnectionIdType> 
void Buying<ConnectionIdType>::receivedFullPiece(const ConnectionIdType & id, const protocol_wire::PieceData & p)

also adding logs to

void TorrentPlugin::on_piece_pass(int index)
void TorrentPlugin::on_piece_failed(int index)

where we see indexcan indication on whether libtorrent actually ever gets back to us about piece
thats a key question I think one thing which is different about the downloading we are doing now, is that it mixes paying and free pieces perhaps libtorrent is ignoring telling us about a piece it has already validated and stored here is the call we make to tell libtorrent about hte piece

here is the call we make to tell libtorrent about hte piece

        // Tell libtorrent to validate piece
        // last argument is a flag which presently seems to only test
        // flags & torrent::overwrite_existing, which seems to be whether
        // the piece should be overwritten if it is already present
        //
        // libtorrent::torrent_plugin::on_piece_pass()
        // libtorrent::torrent_plugin::on_piece_failed()
        // processes result of checking

        torrent()->add_piece(index, pieceData.piece().get(), 0);

perhaps logging before that line is also worth while

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions