arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation

Home Page:http://libtorrent.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion fail on download

XITRIX opened this issue · comments

Please provide the following information

libtorrent version (or branch): RC_2_0

platform/architecture: iOS/visionOS arm64

compiler and compiler version: xCode 15.1 beta (15C5028h)

please describe what symptom you see, what you would expect to see instead and
how to reproduce it.

Just trying to download torrent file, I don't think I'm doing something special, it downloads for a bit (from several seconds to several minutes).
If auto_managed flag is disabled, torrent goes in isPaused state, if flag is enabled in Release speed just drops to 0, in debug it raises the SIGABRT with this stacktrace:

log.txt
image

Also looks like different asserts raises from time to time but symptoms all the same.

Thanks in advance for any help, cause right now I just have no idea where I should take a look

UP.
One more assert
log2.txt

Also my phone has 700+ gb of free space, and ram usage was not higher than 60mb

UP2.
It fails with this message from error alert:
image

Pausing for a second and resuming restores download process. Empty space is more then enough

Looks related #7517 (comment)

Are you sure you are not using a memory card?

@ValeZAA, no, it's an iPhone, it has no memory cards :D

Have the same problem on my iPhone 15 pro max on last ios17.3.

@ValeZAA, no, it's an iPhone, it has no memory cards :D

Neither does my Galaxy S22 U.

I believe there's some issue when a write to disk fails, because the disk is full. Is that the case for you?

Thanks for reply, but no, I have 1TB phone with only around +-200 GB occupied, so I have plenty of free space. Also libtorrent v1.2.x do not has such issue, so for now I decided to use this version instead of v2

Seems like forcing TORRENT_HAVE_MMAP=0 solved my issue, but now app started to feel a bit unresponsive (I could see 50Mbps download speed but nothing progress for several seconds), I'll test a bit more comparing with v1.2, maybe it's my imagination and it was the same.

Decided to give it a try after reading this #7551

UP.
Unresponsiveness comes from debugging tools, without them app works more than good

Seems like forcing TORRENT_HAVE_MMAP=0 solved my issue

so the bug is in Google's fork of linux kernel.

so the bug is in Google's fork of linux kernel.

What does Google and the Linux kernel have to do with it? I'm running libtorrent not on Android but on iOS