snowyu / libtorrent

Automatically exported from code.google.com/p/libtorrent
Other
1 stars 0 forks source link

segmentation fault in cut_receive_buffer for web_peer_connection #591

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. start qbittorent
2. download any torrent from www.EX.UA
examples - 
https://drive.google.com/file/d/0B5pPnrjVicSTM2I4bnQ4OWZDbDQ/edit?usp=sharing
3. wait about 1 min
4. qbittorrent crash

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
libtorrent-rasterbar7
0.6.11 from kubuntu ropository
and 0.6.14 from https://launchpad.net/~surfernsk/+archive/internet-software
both cause bug.
qbittorrent 3.1.9

Please provide any additional information below.
original qbittorent bugtracker theme - 
https://github.com/qbittorrent/qBittorrent/issues/1502#issuecomment-37474529

After I gave to user sledgehammer999 this output http://justpaste.it/emk4
 he said "This seems like a libtorrent bug"

Repeat. You can see all our discussoin and output of program on qbittorent 
bugtracker - 
https://github.com/qbittorrent/qBittorrent/issues/1502#issuecomment-37474529

Original issue reported on code.google.com by pet.pl...@gmail.com on 14 Mar 2014 at 3:42

GoogleCodeExporter commented 9 years ago

Original comment by arvid.no...@gmail.com on 14 Mar 2014 at 4:38

GoogleCodeExporter commented 9 years ago
Thanks for the report.

I've having a hard time reproducing this. Does this happen consistently for you?

My guess is that this crash is not directly related to the .torrents or the web 
server, but the combination of the web server and some property of your 
internet connection.

Would it be possible for you to build qbittorrent and libtorrent in debug mode 
and try to reproduce it? Chances are that the error is caught at an earlier 
time which may be easier to determine what's going wrong. I'll keep inspecting 
the code  and try to reproduce it.

Original comment by arvid.no...@gmail.com on 16 Mar 2014 at 5:00

GoogleCodeExporter commented 9 years ago
here's a patch that may fix or mitigate the crash, (pulled from trunk):

  http://dpaste.com/hold/1733947/

Would anyone mind testing it?

Original comment by arvid.no...@gmail.com on 16 Mar 2014 at 5:08

GoogleCodeExporter commented 9 years ago
Here is a build with that patch: 
http://builds.shiki.hu/temp/qbittorrent_3.1.9_20140316_patched_libtorrent_websee
d_setup.exe

Original comment by hammered...@gmail.com on 16 Mar 2014 at 10:12

GoogleCodeExporter commented 9 years ago
@pet.pluta: would you mind trying out that build and let us know if it helped?

Original comment by arvid.no...@gmail.com on 20 Mar 2014 at 6:33

GoogleCodeExporter commented 9 years ago
I'm sorry. I'm late. :)

>Does this happen consistently for you?
It happens ALWAYS (after ~1min) when I download in qbt (qbittorrent) any 
torrent from www.EX.UA with web-seed.

>Would it be possible for you to build qbittorrent and libtorrent in debug mode 
and...
Yes. Please say me how to build (Kubuntu 13.10 64bit)

>here's a patch...
I don't know what to do with it. Please explain in more detail.

>Here is a build...
.EXE?
I use kubuntu 13.10 64bit.

Original comment by pet.pl...@gmail.com on 20 Mar 2014 at 9:38

GoogleCodeExporter commented 9 years ago
>I use kubuntu 13.10 64bit.

Sorry I didn't see that. I don't provide builds for linux atm.

Original comment by hammered...@gmail.com on 20 Mar 2014 at 12:43

GoogleCodeExporter commented 9 years ago
if you have the libtorrent sources, you apply the patch by CDing into the root 
of the libtorrent directory, and invoke:

patch -p0 <patch.diff

(where patch.diff is the patch as copied from the paste). You can also just do: 
patch -p0
paste the diff and hit ^D (which means end-of-file).

Once patched, use the normal: ./autotool.sh; ./configure; make; sudo make 
install
make sure your currently installed version is overwritten, you may have to 
specify a prefix path to install the new build to the same directory.

If you don't have the source, get it from subversion:

svn co https://svn.code.sf.net/p/libtorrent/code/branches/RC_0_16 libtorrent

Original comment by arvid.no...@gmail.com on 21 Mar 2014 at 5:39

GoogleCodeExporter commented 9 years ago
I can't patch sources.
Hunk #1 FAILED at 4083.

all output:
http://justpaste.it/eyca

Original comment by pet.pl...@gmail.com on 2 Apr 2014 at 7:49

GoogleCodeExporter commented 9 years ago
I already applied this patch to RC_0_16

Original comment by arvid.no...@gmail.com on 2 Apr 2014 at 10:17

GoogleCodeExporter commented 9 years ago
I'm still curious, though, whether or not it fixed the bug you were seeing.

Original comment by arvid.no...@gmail.com on 4 Apr 2014 at 7:03

GoogleCodeExporter commented 9 years ago
./autotool.sh; ./configure; make;
OK. OK. OK.

sudo make install
OK. But after that I 
sudo cp /usr/local/lib/libtorrent-rasterbar.so.7.0.0 
/usr/lib/libtorrent-rasterbar.so.7.0.0 

Now qBittorrent is NOT crashing.
(sometimes web seeds disappears, but I think this is qbt)
Great work.

PS: I change my home router. Later I will try reproduce crashing with old 
libtorrent.

Original comment by pet.pl...@gmail.com on 4 Apr 2014 at 8:46

GoogleCodeExporter commented 9 years ago
CONFIRMED. :-)
On the same machine:
* (kubuntu 13.10) qbt 3.1.9 with libtorrent-rasterbar maked from sources 
(RC_0_16?) DO NOT crashes.
* (openSuse 13.1 in VirtualBox) qbt 3.0.11 with libtorrent-rasterbar 
0.16.11-2.1.3 CRASH after few seconds.

And other question. When your version will be in distributives? 
(kubuntu/opensuse)

Original comment by pet.pl...@gmail.com on 4 Apr 2014 at 6:07

GoogleCodeExporter commented 9 years ago
can't ./configure in opensuse 13.1
it needs libbost::system. is installed, but ./configure doesn't see it.

Original comment by pet.pl...@gmail.com on 4 Apr 2014 at 6:46

GoogleCodeExporter commented 9 years ago
I'm not really in control over packaging libtorrent for any linux distribution, 
so I don't know how long that may take.

as for configure, you may have to say: --with-boost-system=<name of your 
library>

Original comment by arvid.no...@gmail.com on 4 Apr 2014 at 8:31

GoogleCodeExporter commented 9 years ago
btw. this fix should be in the 0.16.16 release.

Original comment by arvid.no...@gmail.com on 4 Apr 2014 at 8:32

GoogleCodeExporter commented 9 years ago
--with-boost-system=<name of your library> not working in opensuse 13.1
Do we need new issue? "can't ./configure source code"

output:
http://justpaste.it/ezki

I tried with 64bit library and then with 32bit library.

Original comment by pet.pl...@gmail.com on 5 Apr 2014 at 5:28

GoogleCodeExporter commented 9 years ago
SORRY.
Installing few packets (and their dependencies) resolve problem.
libtorrent17
libtorrent-rasterbar-devel
libtorrent-devel
libtorrent-debugsource

Original comment by pet.pl...@gmail.com on 5 Apr 2014 at 5:44

GoogleCodeExporter commented 9 years ago
I just checked in opensuse 13.1 (64bit) and it works (qbt 3.0.11)

confirmed again.
Great work.

Original comment by pet.pl...@gmail.com on 5 Apr 2014 at 6:34