qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.1k stars 3.84k forks source link

Crash report. Deleting seeding torrent #12584

Closed JensKDK closed 4 years ago

JensKDK commented 4 years ago

qBittorrent has crashed Please file a bug report at http://bugs.qbittorrent.org and provide the following information:

qBittorrent version: v4.2.4 (64-bit) Libtorrent version: 1.2.6.0 Qt version: 5.13.2 Boost version: 1.72.0 OpenSSL version: 1.1.1g zlib version: 1.2.11 OS version: Windows 10 (10.0) 10.0.18363 x86_64

Caught signal: SIGSEGV

#  0 qbittorrent.exe      0x00007ff7f51c7940 straceWin::getBacktrace()[ app\stacktrace_win.h : 213 ]
#  1 qbittorrent.exe      0x00007ff7f51c87ad sigAbnormalHandler(signum)[ app\main.cpp : 344 ]
#  2 qbittorrent.exe      0x00007ff7f5e294b6 _seh_filter_exe(xcptnum, pxcptinfoptrs)[ minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp : 215 ]
#  3 qbittorrent.exe      0x00007ff7f5e95a47 `__scrt_common_main_seh'::`1'::filt$0()[ d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl : 304 ]
#  4 qbittorrent.exe      0x00007ff7f5e09298 __C_specific_handler(ExceptionRecord, EstablisherFrame, ContextRecord, DispatcherContext)[ d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\riscchandler.cpp : 277 ]
#  5 ntdll.dll            0x00007ffbf8fe11cf _chkstk()
#  6 ntdll.dll            0x00007ffbf8faa209 RtlRaiseException()
#  7 ntdll.dll            0x00007ffbf8fdfe3e KiUserExceptionDispatcher()
#  8 qbittorrent.exe      0x00007ff7f5323a4b `anonymous namespace'::removeTorrents(torrents, isDeleteFileSelected)[ gui\transferlistwidget.cpp : 118 ]
#  9 qbittorrent.exe      0x00007ff7f5c23865 QMetaObject::activate()
# 10 qbittorrent.exe      0x00007ff7f578bea3 QDialog::done()
# 11 qbittorrent.exe      0x00007ff7f5c2393d QMetaObject::activate()
# 12 qbittorrent.exe      0x00007ff7f5803ae9 QDialogButtonBoxPrivate::_q_handleButtonClicked()
# 13 qbittorrent.exe      0x00007ff7f5803e97 QDialogButtonBox::qt_static_metacall()
# 14 qbittorrent.exe      0x00007ff7f5c2393d QMetaObject::activate()
# 15 qbittorrent.exe      0x00007ff7f581e8b3 QAbstractButton::clicked()
# 16 qbittorrent.exe      0x00007ff7f581ce50 QAbstractButtonPrivate::emitClicked()
# 17 qbittorrent.exe      0x00007ff7f581cde7 QAbstractButtonPrivate::click()
# 18 qbittorrent.exe      0x00007ff7f581db4b QAbstractButton::mouseReleaseEvent()
# 19 qbittorrent.exe      0x00007ff7f57aa2e1 QWidget::event()
# 20 qbittorrent.exe      0x00007ff7f5795ccb QApplicationPrivate::notify_helper()
# 21 qbittorrent.exe      0x00007ff7f5794ca8 QApplication::notify()
# 22 qbittorrent.exe      0x00007ff7f5c2ae9c QCoreApplication::notifyInternal2()
# 23 qbittorrent.exe      0x00007ff7f5793978 QApplicationPrivate::sendMouseEvent()
# 24 qbittorrent.exe      0x00007ff7f5912fb4 QWidgetWindow::handleMouseEvent()
# 25 qbittorrent.exe      0x00007ff7f5911d65 QWidgetWindow::event()
# 26 qbittorrent.exe      0x00007ff7f5795ccb QApplicationPrivate::notify_helper()
# 27 qbittorrent.exe      0x00007ff7f57957d9 QApplication::notify()
# 28 qbittorrent.exe      0x00007ff7f5c2ae9c QCoreApplication::notifyInternal2()
# 29 qbittorrent.exe      0x00007ff7f59bac70 QGuiApplicationPrivate::processMouseEvent()
# 30 qbittorrent.exe      0x00007ff7f59ba34c QGuiApplicationPrivate::processWindowSystemEvent()
# 31 qbittorrent.exe      0x00007ff7f5a2ad53 QWindowSystemInterface::sendWindowSystemEvents()
# 32 qbittorrent.exe      0x00007ff7f5d2bff7 qt_internal_proc()
# 33 USER32.dll           0x00007ffbf76c5c0d CallWindowProcW()
# 34 USER32.dll           0x00007ffbf76c5602 DispatchMessageW()
# 35 qbittorrent.exe      0x00007ff7f5d2d1f8 QEventDispatcherWin32::processEvents()
# 36 qbittorrent.exe      0x00007ff7f56cb331 QWindowsGuiEventDispatcher::processEvents()
# 37 qbittorrent.exe      0x00007ff7f5d30a41 QEventLoop::exec()
# 38 qbittorrent.exe      0x00007ff7f5c2b3e7 QCoreApplication::exec()
# 39 qbittorrent.exe      0x00007ff7f51be757 Application::exec(params, params)[ app\application.cpp : 624 ]
# 40 qbittorrent.exe      0x00007ff7f51c858c main(argc, argv)[ app\main.cpp : 290 ]
# 41 qbittorrent.exe      0x00007ff7f5de6323 WinMain()
# 42 qbittorrent.exe      0x00007ff7f5deaa32 __scrt_common_main_seh()[ d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl : 288 ]
# 43 KERNEL32.DLL         0x00007ffbf86a7bd4 BaseThreadInitThunk()
# 44 ntdll.dll            0x00007ffbf8face51 RtlUserThreadStart()

Hi, I was deleting a finnished torrent, while it was seeding. Hope you find it.

thalieht commented 4 years ago

Probably related to #12587 (if not duplicate in case the underlying cause is the same).

glassez commented 4 years ago

@JensKDK, have you "seeding limits" enabled?

glassez commented 4 years ago

@Chocobo1, @thalieht, seems I found potentially dangerous place in the code. removeTorrents() is called in dialog signal handler so "torrents" array that is captured before you show dialog can contain pointers to deleted torrents (if some of them are deleted while dialog is showing, e.g., on seeding limit reached). It's a generally bad idea to store torrent pointers unless you handle "torrent deleted" event.

JensKDK commented 4 years ago

If this is what you mean, then yes.

Fra: Vladimir Golovnev [mailto:notifications@github.com] Sendt: 24. april 2020 13:20 Til: qbittorrent/qBittorrent Cc: Jens Kristensen; Mention Emne: Re: [qbittorrent/qBittorrent] Crash report. Deleting seeding torrent (#12584)

@JensKDK https://github.com/JensKDK , have you "seeding limits" enabled?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qbittorrent/qBittorrent/issues/12584#issuecomment-618952370 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOF5GBK6XWQCT4WWVKTOT3ROFYUJANCNFSM4MOTUNUA . https://github.com/notifications/beacon/AIOF5GAALERHWMFWUE6UAPDROFYUJA5CNFSM4MOTUNUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOETSHNMQ.gif

glassez commented 4 years ago

If this is what you mean, then yes.

Apparently, you tried to attach a screenshot... Unfortunately, there is nothing here.

JensKDK commented 4 years ago

Hmm, strange. Hope this is better.

Fra: Vladimir Golovnev [mailto:notifications@github.com] Sendt: 24. april 2020 19:25 Til: qbittorrent/qBittorrent Cc: Jens Kristensen; Mention Emne: Re: [qbittorrent/qBittorrent] Crash report. Deleting seeding torrent (#12584)

If this is what you mean, then yes.

Apparently, you tried to attach a screenshot... Unfortunately, there is nothing here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qbittorrent/qBittorrent/issues/12584#issuecomment-619145190 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOF5GAJZRJ75Q3YOKJSQNDROHDO5ANCNFSM4MOTUNUA . https://github.com/notifications/beacon/AIOF5GBNOUFK2JUJ2WGLAUTROHDO5A5CNFSM4MOTUNUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOETTWPZQ.gif

glassez commented 4 years ago

Hmm, strange. Hope this is better.

Nope. You should use GitHub to attach screenshot. Seems email won't do it.

JensKDK commented 4 years ago

Guess Outlook is dumb. How about this?

Screenshot

prismQcat commented 4 years ago

Hi, I woke up to this crash report... I do have seeding limits enabled by ratio...

When I restarted Qbit it showed torrents being restored and immediately afterward removed the one for reaching ratio. Will add those log entries below crash report.


qBittorrent version: v4.2.4 (64-bit) Libtorrent version: 1.2.6.0 Qt version: 5.13.2 Boost version: 1.72.0 OpenSSL version: 1.1.1g zlib version: 1.2.11 OS version: Windows 10 (10.0) 10.0.18363 x86_64

Caught signal: SIGSEGV



#  0 qbittorrent.exe      0x00007ff6ae0c7940 straceWin::getBacktrace()[ app\stacktrace_win.h : 213 ]

#  1 qbittorrent.exe      0x00007ff6ae0c87ad sigAbnormalHandler(signum)[ app\main.cpp : 344 ]

#  2 qbittorrent.exe      0x00007ff6aed294b6 _seh_filter_exe(xcptnum, pxcptinfoptrs)[ minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp : 215 ]

#  3 qbittorrent.exe      0x00007ff6aed95a47 `__scrt_common_main_seh'::`1'::filt$0()[ d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl : 304 ]

#  4 qbittorrent.exe      0x00007ff6aed09298 __C_specific_handler(ExceptionRecord, EstablisherFrame, ContextRecord, DispatcherContext)[ d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\riscchandler.cpp : 277 ]

#  5 ntdll.dll            0x00007ffca8ae121f _chkstk()

#  6 ntdll.dll            0x00007ffca8aaa289 RtlRaiseException()

#  7 ntdll.dll            0x00007ffca8adfe8e KiUserExceptionDispatcher()

#  8 qbittorrent.exe      0x00007ff6ae0e25d2 BitTorrent::Session::processShareLimits()[ base\bittorrent\session.cpp : 1696 ]

#  9 qbittorrent.exe      0x00007ff6aeb23865 QMetaObject::activate()

# 10 qbittorrent.exe      0x00007ff6aeb2fdc5 QTimer::timeout()

# 11 qbittorrent.exe      0x00007ff6aeb2f321 QTimer::timerEvent()

# 12 qbittorrent.exe      0x00007ff6aeb1f220 QObject::event()

# 13 qbittorrent.exe      0x00007ff6ae695ccb QApplicationPrivate::notify_helper()

# 14 qbittorrent.exe      0x00007ff6ae6957d9 QApplication::notify()

# 15 qbittorrent.exe      0x00007ff6aeb2ae9c QCoreApplication::notifyInternal2()

# 16 qbittorrent.exe      0x00007ff6aec2ca77 QEventDispatcherWin32Private::sendTimerEvent()

# 17 qbittorrent.exe      0x00007ff6aec2c003 qt_internal_proc()

# 18 USER32.dll           0x00007ffca6b35c0d CallWindowProcW()

# 19 USER32.dll           0x00007ffca6b35602 DispatchMessageW()

# 20 qbittorrent.exe      0x00007ff6aec2d1f8 QEventDispatcherWin32::processEvents()

# 21 qbittorrent.exe      0x00007ff6ae5cb331 QWindowsGuiEventDispatcher::processEvents()

# 22 qbittorrent.exe      0x00007ff6aec30a41 QEventLoop::exec()

# 23 qbittorrent.exe      0x00007ff6aeb2b3e7 QCoreApplication::exec()

# 24 qbittorrent.exe      0x00007ff6ae0be757 Application::exec(params, params)[ app\application.cpp : 624 ]

# 25 qbittorrent.exe      0x00007ff6ae0c858c main(argc, argv)[ app\main.cpp : 290 ]

# 26 qbittorrent.exe      0x00007ff6aece6323 WinMain()

# 27 qbittorrent.exe      0x00007ff6aeceaa32 __scrt_common_main_seh()[ d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl : 288 ]

# 28 KERNEL32.DLL         0x00007ffca7f27bd4 BaseThreadInitThunk()

# 29 ntdll.dll            0x00007ffca8aaced1 RtlUserThreadStart()
---
Log:
4/24/2020 12:30 PM - 'x' restored.
4/24/2020 12:30 PM - 'x' was removed from the transfer list.
4/24/2020 12:30 PM - 'x' reached the maximum ratio you set. Removed.
4/24/2020 12:30 PM - Python detected, executable name: 'C:/Users/x/AppData/Local/Programs/Python/Python36-32/python.exe', version: 3.6.6
4/24/2020 12:30 PM - 'x' restored. <--- Torrent restored then removed above 
glassez commented 4 years ago

If this is what you mean, then yes... How about this?

No, that's not what I meant.

JensKDK commented 4 years ago

If you mean right-clicking a torrent and "limit share ratio" then probably yes. I do use that quite often.

glassez commented 4 years ago

@prismQcat, you has another issue. See #12618.

If you mean right-clicking a torrent and "limit share ratio" then probably yes. I do use that quite often.

Yes. And you probably have chosen "delete torrent" when ratio is reached.

prismQcat commented 4 years ago

@prismQcat, you has another issue. See #12618.

DoH! I would pick the wrong one... Sorry about that and thanks for pointing me in the right direction! Nice to see it is fixed already.

JensKDK commented 4 years ago

If you mean right-clicking a torrent and "limit share ratio" then probably yes. I do use that quite often.

Yes. And you probably have chosen "delete torrent" when ratio is reached.

Yes, "Remove torrent" when ratio reached.

ttshivers commented 4 years ago

I am having the exact same issue with qBittorrent v4.2.4 (64-bit). I have the "Remove torrent" when ratio reached enabled and it segfaults and crashes very reliably whenever it tries to remove a torrent when it has reached the ratio. Here is a backtrace of my most recent crash/coredump:

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/bin/qbittorrent-nox -d --profile=/var/lib/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  BitTorrent::TorrentHandleImpl::isSeed (this=this@entry=0x4b004f0020) at ../../src/base/bittorrent/torrenthandleimpl.cpp:802
802     ../../src/base/bittorrent/torrenthandleimpl.cpp: No such file or directory.
[Current thread is 1 (Thread 0x7f0b30a91b40 (LWP 16834))]
(gdb) bt
#0  BitTorrent::TorrentHandleImpl::isSeed (this=this@entry=0x4b004f0020) at ../../src/base/bittorrent/torrenthandleimpl.cpp:802
#1  0x00005604e3434bbc in BitTorrent::Session::processShareLimits (this=0x5604e529f9b0) at ../../src/base/bittorrent/session.cpp:1697
#2  0x00007f0b2f04f66f in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f0b2f05bfc7 in QTimer::timeout(QTimer::QPrivateSignal) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f0b2f05c328 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f0b2f05007b in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f0b2f0208c1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f0b2f078d2e in QTimerInfoList::activateTimers() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f0b2f0794f1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f0b2cc81417 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f0b2cc81650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f0b2cc816dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f0b2f07988f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f0b2f01e90a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f0b2f0279b4 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00005604e3405755 in Application::exec (this=0x5604e52790f0, params=...) at ../../src/app/application.cpp:624
#16 0x00005604e33fe7c3 in main (argc=<optimized out>, argv=0x7ffca77a9428) at ../../src/app/main.cpp:290
(gdb)

Here is another:

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".                                                                                                                                                                                            Core was generated by `/usr/bin/qbittorrent-nox -d --profile=/var/lib/'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fbbbc669993 in QHashData::nextNode(QHashData::Node*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
[Current thread is 1 (Thread 0x7fbbbe268b40 (LWP 18896))]
(gdb) bt
#0  0x00007fbbbc669993 in QHashData::nextNode(QHashData::Node*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x0000557ef09ebba8 in QHash<BitTorrent::InfoHash, BitTorrent::TorrentHandleImpl*>::const_iterator::operator++ (this=<synthetic pointer>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:394
#2  BitTorrent::Session::processShareLimits (this=0x557ef1ef17f0) at ../../src/base/bittorrent/session.cpp:1696
#3  0x00007fbbbc82666f in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007fbbbc832fc7 in QTimer::timeout(QTimer::QPrivateSignal) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007fbbbc833328 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fbbbc82707b in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fbbbc7f78c1 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fbbbc84fd2e in QTimerInfoList::activateTimers() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007fbbbc8504f1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fbbba458417 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007fbbba458650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007fbbba4586dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007fbbbc85088f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007fbbbc7f590a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fbbbc7fe9b4 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x0000557ef09bc755 in Application::exec (this=0x557ef1ecb0f0, params=...) at ../../src/app/application.cpp:624
#17 0x0000557ef09b57c3 in main (argc=<optimized out>, argv=0x7ffdaf3abf18) at ../../src/app/main.cpp:290
JensKDK commented 4 years ago

@glassez Thanks for the quick fix and update !! :-)

glassez commented 4 years ago

Thanks for the quick fix and update !! :-)

Sorry, this one isn't fixed yet.

JensKDK commented 4 years ago

@glassez The 4.2.5 release notes says: BUGFIX: Fix crash when torrent is deleted on limit reached (glassez) Thought that was it. I'll shut up now.