frostalf / libtorrent

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

Crashing in libtorrent::inflate_gzip #592

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A use of qbittorrent is reporting continuous crashes. Through my instruction he 
managed to run qbt through WinDbg and get a stacktrace.
That version of qbt uses 0.16.15+svn9745.
OS: Win7 x64

He said that his torrents don't have any web seeds. So maybe this related to an 
http tracker? (what else uses http_connection?)
The stacktrace is here: http://paste.ubuntu.com/7096652/
The forum thread with some more info is here: 
http://qbforums.shiki.hu/index.php/topic,2471.0.html

Original issue reported on code.google.com by hammered...@gmail.com on 15 Mar 2014 at 5:40

GoogleCodeExporter commented 9 years ago
from the stack trace, it looks like you ran out of memory (and libtorrent 
failed to handle that case). Please try this patch.

   http://dpaste.com/hold/1732415/

Original comment by arvid.no...@gmail.com on 15 Mar 2014 at 7:52

GoogleCodeExporter commented 9 years ago
found typo in patch. test this one instead: http://dpaste.com/hold/1733463/

Original comment by arvid.no...@gmail.com on 16 Mar 2014 at 2:06

GoogleCodeExporter commented 9 years ago
I have made 2 builds with mingw. One with vanilla source and one with the 
patch. The official release is made with MSVC so I wanted him to reproduce 
under mingw first before trying the patch. Anyway, the user is probably in a 
different timezone so we'll have to wait a while for a response.

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

GoogleCodeExporter commented 9 years ago
The user reported that he got the "I/O error out of memory" error a few times 
without crashing. Then it crashed.
In the forum thread we suspect that this is actually a limitation of the 32bit 
binary used. The crash happens when the program's memory usage approaches 2GB.

I have asked the user to run it again through WinDbg but I haven't had a reply 
from him yet.

PS: He was using a cache setting of 2GB. As an alternative I told him to lower 
that.

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

GoogleCodeExporter commented 9 years ago
right. a 32bit process only has 2 GB of address space. if the cache uses up all 
2GB, there's nothing left for everything else, and one would run into issues 
like these. It certainly explains the crash, and this patch should fix that one 
place it could crash.

However, there are plenty of other places where out-of-memory conditions are 
not handled correctly.

Original comment by arvid.no...@gmail.com on 16 Mar 2014 at 10:53

GoogleCodeExporter commented 9 years ago
I've checked in this patch. I'd be happy to patch up more out-of-memory errors 
that aren't handled.

Original comment by arvid.no...@gmail.com on 17 Mar 2014 at 3:21