rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.05k stars 412 forks source link

rTorrent Crash - Non-existent physical address #790

Open DRIVASS opened 5 years ago

DRIVASS commented 5 years ago

Crashing occurs when hash checking torrents. Crash occurred when checking the hash of 51561884AB75B4AA in this case. It's random, verified by successfully checking the hash of 51561884AB75B4AA after the crash.

1538465979 I 51561884AB75B4AA->download_list: Opening download.
1538465979 I 51561884AB75B4AA->download: Opening torrent: flags:ffffffff.
1538465979 I 51561884AB75B4AA->file_list: Opening.
1538465979 I 51561884AB75B4AA>chunk_list: Resizing: from:0 to:8094.
1538465979 I 51561884AB75B4AA->download: Checking hash: allocated:0 try_quick:0.
1538465979 I 51561884AB75B4A->hash_torrent: Start: position:0 size:8094 try_quick:0.
1538465983 I 5472AE60893F6C->tracker_list: failed to connect to tracker (url:https://tracker.jj.net/85/announce msg:Failure reason "Unregistered torrent")
1538465983 I 0B0CA79214DA4->tracker_list: failed to connect to tracker (url:https://tracker.jj.net/85/announce msg:Failure reason "Unregistered torrent")

1538466000 C Caught signal: 'Non-existent physical address.'.
---DUMP---
Caught SIGBUS, dumping stack:
rtorrent(+0x1fbac) [0x556b8a2fdbac]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11630) [0x7f5959750630]
/lib/x86_64-linux-gnu/libcrypto.so.1.0.0(+0x6d96d) [0x7f5957e3d96d]

Error: Success
Signal code '2': Non-existent physical address.
Fault address: 0x7f5949693000
The fault address is not part of any chunk.
1538465984 D 51561884AB75B4AA->hash_torrent: Queue: position:541 outstanding:64 try_quick:0.
1538465984 D 51561884AB75B4AA->chunk_list: Get: index:541 flags:0x4.
1538465984 D 51561884AB75B4AA->chunk_list: Get: index:541 flags:0x2.
1538465984 D 51561884AB75B4AA->chunk_list: Release: index:541 flags:0.
1538465984 D 51561884AB75B4AA->hash_queue: Adding index:541 to queue.
1538465984 D 51561884AB75B4AA->chunk_list: Release: index:464 flags:0x4.
1538465985 D 51561884AB75B4AA->hash_queue: Passing index:477 to owner: C2264B3FD3034.
1538465985 D 51561884AB75B4AAC->file_list: Done chunk: index:477.
1538465985 D 51561884AB75B4AA->hash_torrent: Received chunk done: index:477.
1538465985 D 51561884AB75B4AA->hash_torrent: Queue: position:542 outstanding:64 try_quick:0.
1538465985 D 51561884AB75B4AA->chunk_list: Get: index:542 flags:0x4.
1538465985 D 51561884AB75B4AA->chunk_list: Get: index:542 flags:0x2.
1538465985 D 51561884AB75B4AA->chunk_list: Release: index:542 flags:0.
1538465985 D 51561884AB75B4AA->hash_queue: Adding index:542 to queue.
1538465985 D 51561884AB75B4AA->chunk_list: Release: index:477 flags:0x4.
1538464596 I 51561884AB75B4AA->download_list: Checking hash.
1538464596 I 51561884AB75B4AA->download_list: Hash queue.

1538465979 I 51561884AB75B4AA->download_list: Opening download.
1538465979 I 51561884AB75B4AA->download: Opening torrent: flags:ffffffff.
1538465979 I 51561884AB75B4AA->download: Checking hash: allocated:0 try_quick:0.
DRIVASS commented 5 years ago

Anyone, lol? The issue has worsened, now crashing 10 seconds after starting rtorrent.

Have the following log files:

connection.log.14698 rpc.log.14698 rtorrent.log.14698 socket.log.14698 storage.log.14698 torrent.log.14698 tracker.log.14698

drgreatscott commented 5 years ago

This is due to either hard disk failure, or some strange .torrent file.

If it's the latter, enable the logs. Upon crash, check the last line of storage.log. Search for the hash or keyword in session/ folder. Remove sessions related to that strange .torrent file, as well as the strange .torrent file in the watch/ folder.

drgreatscott commented 5 years ago

But of course if would be better if rtorrent wouldn't crash upon such .torrent files. uTorrent, qBittorrent, and Deluge didn't crash on those .torrent files. I guess perhaps some foreign characters in those strange torrent files caused rtorrent to crash.

ghost commented 5 years ago

Not sure why but rtorrent tends to crash when it can't access files. Especially if they are behind a softlink.

While other clients will just error out. If you use another client you'll be able to see what these files are, and possible access why the are failing.

2600box commented 5 years ago

just to echo @forsomefun2 and @drgreatscott rtorrent does not handle symlinks well and will crash if there is a delay in finding the file. wish this could be resolved.