Ticket #841 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

Handshake::event_write() m_writeDone != false

Reported by: luis_velasquez00@yahoo.com Owned by: rakshasa
Priority: high Component: libtorrent
Version: Severity: blocker
Keywords: Cc:

Description

I tryed and installed libtorrent 0.11.1 and 0.11.2; rtorrent 0.7.1 and 0.7.2 in my NSLU2 runing debian. When I start the download and i get the error: "Handshake::event_write() m_writeDone != false" and it kills the program. When I restart the torrent; rtorrent makes the hash check then the same error Each version gave me the same problem How can I fix this problem? any code to change? My kernel is 2.6.18-3-ixp4xx

Attachments

rearrange_handshake.diff Download (501 bytes) - added by rakshasa 6 years ago.
Rearranged bools in Handshake, see if this changes anything.

Change History

Changed 6 years ago by rakshasa

Rearranged bools in Handshake, see if this changes anything.

comment:1 Changed 6 years ago by vanilla.source@gmail.com

Same problem here... NSLU2/Debian. After applying the patch, rtorrent now dutifully does the hash check, and connects to the tracker. No "Handshake::event_write() m_writeDone != false" crash, but it will absolutely never connect to any peers. I tried it on a torrent that has hundreds of seeders/leechers, for 45 minutes, without ever connecting to a peer.

But it will cleanly connect and disconnect from the tracker with no crash.

comment:2 Changed 6 years ago by rakshasa

Well, at least it confirms that something is being corrupted. Though I can't really debug it without more information.

Might be an idea to try compiling with different compiler versions, or with different optimization levels. That has been known to help when the compiler has been producing bad code.

comment:3 Changed 6 years ago by luis_velasquez00@yahoo.com

Here you can download my compilation. I compiled it with my nslu2/Debian. This is the link:  http://www.elgaleno.com/download/rtorrentcompnslu2.zip

Please check what's wrong with it.

comment:4 Changed 6 years ago by rakshasa

That's not of any help as i can't debug it.

comment:5 Changed 6 years ago by luis_velasquez00@yahoo.com

Can you tell me what do you need? And i will try to give you all the information

comment:6 follow-up: ↓ 7 Changed 6 years ago by rakshasa

Sorry, this is the kind of bug I'd need to experiment to figure out what is wrong. And doing so indirectly takes more time that I have atm.

comment:7 in reply to: ↑ 6 Changed 6 years ago by anonymous

Replying to rakshasa:

Sorry, this is the kind of bug I'd need to experiment to figure out what is wrong. And doing so indirectly takes more time that I have atm.

I got the same error using Freelink/Debian?(ARM) on a Linkstation Pro. would an ssh account to that box help you?

comment:8 follow-up: ↓ 9 Changed 6 years ago by rakshasa

Sorry, I'm not able to take the time to debug that in the near future.

comment:9 in reply to: ↑ 8 Changed 6 years ago by rebelbrethren (at) gmail [dot] com

I tryed and installed libtorrent 0.11.1 and 0.11.2; rtorrent 0.7.1 and 0.7.2 in my NSLU2 runing debian. When I start the download and i get the error: "Handshake::event_write() m_writeDone != false" and it kills the program.

Replying to rakshasa:

Sorry, I'm not able to take the time to debug that in the near future.

Looks fixed :)

I was having the same error as above (Handshake::event_write() m_writeDone != false) when compiling from the latest unstable source (0.11.2/0.7.2) on debianslug on the Linksys NSLU2 (armv5tel/xscale).

However - I'm happy to report that the problem seems to be fixed when building from the latest subversion trunk (svn 868). It's probably worth noting that I did the SVN build was done using the CFLAGS and CXXFLAGS environment variables set with:

"-mcpu=xscale -mtune=xscale"

So it may have been a compiler flags issue here after all. Code seemed to compile much faster than normal, probably due to the -mtune flag.

Haven't yet been able to verify whether encryption is actually happening, but torrents download cleanly and no bugs noticed yet.

Cheers again rakshasa, for a stunning piece of software. Pay Pal Donation is on it's way to you shortly for all your hard work creating such a useful client, especially for us NSLU2 users!

comment:10 Changed 6 years ago by rakshasa

Could you please try without the flags. The rearranged bools in Handshake caused the exception to stop being thrown, but it caused other problems like not connecting to any peers.

So I really need to know if i need to add a note about required flags for this arch.

comment:11 Changed 6 years ago by vanilla.source@gmail.com

I compiled on two different NSLU2s, one with svn 870, the other with svn 871 using "-O2 -mcpu=xscale -mtune=xscale" They both work fine, picking up peers quickly. I previously compiled svn 868 without the "-mcpu=xscale -mtune=xscale" flags, and it will not pick up any peers.

I do still get the damn "/usr/local/lib/libtorrent.so: invalid string offset 16613888 >= 22627 for section `.dynstr'" at the end of the rtorrent compile, but maybe that can be ignored?

If there is any reason to try svn 868 with the "-mcpu=xscale -mtune=xscale" flags, let me know and I can try that, but it looks to me like rebelbrethren has solved the problem.

And you can expect yet another PayPal? donation from a satsified NSLU2/rtorrent user!

comment:12 Changed 6 years ago by rakshasa

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

Thanks, I'll add this to the known issues page.

comment:13 Changed 6 years ago by majority

Just thought I'd follow up on this. I own a Thecus n2100 that also has an intel xscale processor and was experiencing the same problems as vanilla.source has described (and now fixed with the mentioned solution, except for the offset error, but everything seems to work), so it is apparently a problem with xscale based devices in general and not just the NSLU2, and was thinking you could make this clearer on the known issues page.

comment:14 Changed 6 years ago by vernicht

  • Status changed from closed to reopened
  • Resolution fixed deleted

Please, could anyone post a link to a compiled version of the rtorrent 0.7 for NSLU2?

comment:15 Changed 6 years ago by rakshasa

  • Status changed from reopened to closed
  • Resolution set to invalid

comment:16 Changed 6 years ago by vernicht

 http://www.coutts.plus.com/rtorrent_nslu2/ Someone has provided me the previous link for the rtorrent packages compiled with 'CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale"' set in debian/rule as suggested here http://libtorrent.rakshasa.no/wiki/LibTorrentKnownIssues.

Note: See TracTickets for help on using tickets.