Opened 14 years ago

Closed 14 years ago

#613 closed Bug (fixed)

'Message length exceeds max" error when contacting official bittorrent peer

Reported by: brad-x Owned by: charles
Priority: High Milestone: 1.03
Component: libtransmission Version: 1.02
Severity: Normal Keywords:
Cc:

Description

When contacting official bittorrent clients, Transmission fails to initiate a transfer with the official client reporting "ERROR : Message parsing failed" and "INFO : message length exceeds max".

A screenshot is attached. The error timestamped 20:38:26 is unrelated but everything preceding it is the log of communication with the Transmission client.

Attachments (2)

bt-transmission.png (164.3 KB) - added by brad-x 14 years ago.
log.txt (480 bytes) - added by brad-x 14 years ago.
Log from 1.02

Download all attachments as: .zip

Change History (8)

Changed 14 years ago by brad-x

comment:1 Changed 14 years ago by charles

  • Component changed from Transmission to libtransmission
  • Owner set to charles

comment:2 Changed 14 years ago by charles

just a small note... in irc Brad says that's BitTorrent? 5.0.8 in the screenshot

comment:3 Changed 14 years ago by brad-x

  • Summary changed from 'Message length exceeds max" error when contacting libtorrent peer to 'Message length exceeds max" error when contacting official bittorrent peer

comment:4 Changed 14 years ago by charles

        message_count = 0
        while True:
            yield 4   # message length
            l = toint(self._message)
            if l > self.max_message_length:
                d = '%s%s' % (self._message, self._rest)
                d = d[:10]
                self.protocol_violation("message length exceeds max "
                                        "(%s > %s): %r, count:%d" %
                                        (l, self.max_message_length, d,
                                         message_count))
                return
            if l > 0:
                yield l
                self._got_message(self._message)
                message_count += 1

comment:5 Changed 14 years ago by charles

  • Milestone changed from None Set to 1.03
  • Priority changed from Normal to High
  • Status changed from new to assigned
  • Version changed from 1.02+ to 1.02

Changed 14 years ago by brad-x

Log from 1.02

comment:6 Changed 14 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

Lacrocivious helped me track this down. It was two errors acting in concert:

(1) Mainline 5.0.8 had a bug in parsing LTEP ut-pex messages. This is fixed in 5.0.9 and isn't Transmission's fault.

(2) Transmission had a protocol bug in sending `interested' messages before the bitfield. The protocol explicitly states that the bitfield, if sent, must preceed other messages. This is fixed in (1.0x r4838) (trunk r4839)

Note: See TracTickets for help on using tickets.