[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #15 from Jasem Mutlaq --- Everything passed, except this: XFAIL : KStarsUiTests::initialConditionsTest() Initial KStars clock is set from system local time, not geolocation, and is untestable for now. Loc: [/home/jasem/Projects/kstars/Tests/kstars_ui/kstars_ui_tests.cpp(96)] XFAIL : KStarsUiTests::initialConditionsTest() Precision of KStars local time conversion to local time does not allow strict millisecond comparison. Loc: [/home/jasem/Projects/kstars/Tests/kstars_ui/kstars_ui_tests.cpp(99)] Btw, I couldn't get it to crash even before. -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #14 from TallFurryMan --- Jasem, could you confirm you adjusted the relevant test to verify your change? Tests/kstars_ui/test_ekos.cpp, in TestEkos::testSimulatorProfile, line 134. I don't see this in your changelog. -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 Jasem Mutlaq changed: What|Removed |Added Version Fixed In||3.4.2 Resolution|--- |FIXED Status|CONFIRMED |RESOLVED Latest Commit||https://commits.kde.org/kst ||ars/f8c3d1359ac456449f2a7dc ||507ca8f4f73a8d406 --- Comment #13 from Jasem Mutlaq --- Git commit f8c3d1359ac456449f2a7dc507ca8f4f73a8d406 by Jasem Mutlaq. Committed on 25/03/2020 at 15:45. Pushed by mutlaqja into branch 'master'. Change remoteProperty connection to the default queued connection. Related: bug 416173 FIXED-IN:3.4.2 M +15 -16 kstars/ekos/capture/capture.cpp M +2-1kstars/ekos/capture/capture.h M +21 -21 kstars/ekos/guide/guide.cpp M +2-1kstars/ekos/guide/guide.h M +1-2kstars/indi/drivermanager.cpp M +6-2kstars/indi/guimanager.cpp M +41 -31 kstars/indi/indidevice.cpp M +51 -43 kstars/indi/indidevice.h https://commits.kde.org/kstars/f8c3d1359ac456449f2a7dc507ca8f4f73a8d406 -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 TallFurryMan changed: What|Removed |Added Version|2.9.8 |3.4.0 --- Comment #12 from TallFurryMan --- Updated version affected to 3.4.0. -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #11 from TallFurryMan --- Reproduced on my live (not current) system, confirming test is OK: ^C[Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". 0xb7f5bd09 in __kernel_vsyscall () (gdb) bt #0 0xb7f5bd09 in __kernel_vsyscall () #1 0xb522a7fe in __GI___pthread_timedjoin_ex (threadid=2750102336, thread_return=0x0, abstime=0x0, block=true) at pthread_join_common.c:89 #2 0xb522a604 in __pthread_join (threadid=2750102336, thread_return=0x0) at pthread_join.c:24 #3 0xb4f0e7b5 in std::thread::join() () at /usr/lib/i386-linux-gnu/libstdc++.so.6 #4 0x00c6d1bf in INDI::BaseClient::disconnectServer() (this=0x5de1f68) at /home/tallfurryman/dev/indinew/libs/indibase/baseclient.cpp:291 #5 0x0072121b in DriverManager::stopDevices(QList const&) (this=0x5679ba0, dList=...) at /home/tallfurryman/dev/kstars/kstars/indi/drivermanager.cpp:464 #6 0x007b51ab in Ekos::Manager::cleanDevices(bool) (this=0x2e879b0, stopDrivers=true) at /home/tallfurryman/dev/kstars/kstars/ekos/manager.cpp:1017 #7 0x007b525a in Ekos::Manager::stop() (this=0x2e879b0) at /home/tallfurryman/dev/kstars/kstars/ekos/manager.cpp:498 #8 0x00c19160 in EkosAdaptor::stop() (this=0x55b9530) at /home/tallfurryman/dev/kstars_build/kstars/ekosadaptor.cpp:111 #9 0x00c19160 in EkosAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55b9530, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0xbfb29484) at /home/tallfurryman/dev/kstars_build/kstars/ekosadaptor.moc:210 #10 0x00c19614 in EkosAdaptor::qt_metacall(QMetaObject::Call, int, void**) (this=0x55b9530, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0xbfb29484) at /home/tallfurryman/dev/kstars_build/kstars/ekosadaptor.moc:314 #11 0xb5ca850c in () at /usr/lib/i386-linux-gnu/libQt5DBus.so.5 #12 0xb5cad87a in () at /usr/lib/i386-linux-gnu/libQt5DBus.so.5 #13 0xb5caddd8 in () at /usr/lib/i386-linux-gnu/libQt5DBus.so.5 #14 0xb5caea06 in () at /usr/lib/i386-linux-gnu/libQt5DBus.so.5 -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #10 from TallFurryMan --- When the issue is reproduced, this is the stack from the event clicking the "stop" button: 1 __GI___pthread_timedjoin_ex pthread_join_common.c 142 0x751e3cd7 2 std::thread::join() 0x74e721d7 3 INDI::BaseClient::disconnectServer baseclient.cpp291 0x5611fe0c 4 DriverManager::stopDevices drivermanager.cpp 464 0x55e08b07 5 Ekos::Manager::cleanDevices manager.cpp 1087 0x55657e19 6 Ekos::Manager::stop manager.cpp 532 0x55653d89 7 Ekos::Manager::processINDI manager.cpp 527 0x55653d41 8 QtPrivate::FunctorCall, QtPrivate::List<>, void, void (Ekos::Manager:: *)()>::call(void (Ekos::Manager:: *)(), Ekos::Manager *, void * *) qobjectdefs_impl.h152 0x556934b6 9 QtPrivate::FunctionPointer::call, void>(void (Ekos::Manager:: *)(), Ekos::Manager *, void * *) qobjectdefs_impl.h185 0x5568e89f 10 QtPrivate::QSlotObject, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h414 0x55686354 11 QMetaObject::activate(QObject *, int, int, void * *) 0x757295c8 12 QAbstractButton::clicked(bool) 0x7632e236 13 ?? 0x7632e45e 14 ?? 0x7632f8a3 15 QAbstractButton::mouseReleaseEvent(QMouseEvent *) 0x7632fa65 16 QWidget::event(QEvent *) 0x7627c04e 17 QApplicationPrivate::notify_helper(QObject *, QEvent *) 0x76239a86 18 QApplication::notify(QObject *, QEvent *) 0x76243053 19 QTest::mouseEvent qtestmouse.h 242 0x5562bd74 20 QTest::mouseEvent qtestmouse.h 206 0x5562b87c ... This is the stack from the INDI client thread: 1 syscall syscall.S 38 0x74b5a94d 2 QSemaphore::acquire(int) 0x755390b1 3 QMetaObject::activate(QObject *, int, int, void * *) 0x757298e5 4 ClientManager::removeINDIProperty moc_clientmanager.cpp 353 0x55db8598
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #9 from TallFurryMan --- Refining the test, it appears the issue may source from the intrication of signals between gadgets. The code is re-entring the event loop at various places, and if the INDI server is still busy deleting properties, the code locks up in QMetaObject::Activate. Originally I thought it was the way QTest is implemented, which requires lots of deferred calls to manipulate the UI, but it seems I got the test right in the end. Jasem, I pushed D27593 with the test showing the issue. Remove the delay as specified in the differential to reproduce. -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #8 from Jasem Mutlaq --- I've seen this before but couldn't figure out the root cause :( -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #7 from TallFurryMan --- In my test, INDI client is still creating properties after 20 seconds, so I'll investigate further before calling the test proper: 1 syscall syscall.S 38 0x74b5a94d 2 QSemaphore::acquire(int) 0x755390b1 3 QMetaObject::activate(QObject *, int, int, void * *) 0x757298e5 4 ClientManager::newINDIProperty moc_clientmanager.cpp 346 0x55db7dc0 5 ClientManager::newProperty clientmanager.cpp 92 0x55e18d20 6 INDI::BaseDevice::buildProp basedevice.cpp682 0x5611822d 7 INDI::BaseClient::dispatchCommand baseclient.cpp584 0x56120c0c 8 INDI::BaseClient::listenINDI baseclient.cpp505 0x561203a1 9 INDI::BaseClient::listenHelper baseclient.cpp374 0x5611fa9d 10 std::__invoke_impl invoke.h 60 0x5612d55a 11 std::__invoke invoke.h 95 0x5612d3fd 12 std::thread::_Invoker>::_M_invoke<0ul, 1ul> thread244 0x5612d2cd 13 std::thread::_Invoker>::operator() thread251 0x5612d259 14 std::thread::_State_impl>>::_M_run thread195 0x5612d217 15 ?? 0x74e71f74 16 start_thread pthread_create.c 479 0x751e2669 17 clone clone.S 95 0x74b61323 -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #6 from TallFurryMan --- I need to make very sure the test is spotting the right problem. I'll then push a differential with said test for reference. -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #5 from TallFurryMan --- Reproduced using indi 1.7.9, and indi git tip. Call is stuck with the following stack: 1 __GI___pthread_timedjoin_ex pthread_join_common.c 142 0x751e3cd7 2 std::thread::join() 0x74e721d7 3 INDI::BaseClient::disconnectServer baseclient.cpp291 0x5611f6a6 4 DriverManager::stopDevices drivermanager.cpp 464 0x55e083a1 5 Ekos::Manager::cleanDevices manager.cpp 1087 0x5565716b 6 Ekos::Manager::stop manager.cpp 532 0x556530db 7 Ekos::Manager::processINDI manager.cpp 527 0x55653093 8 QtPrivate::FunctorCall, QtPrivate::List<>, void, void (Ekos::Manager:: *)()>::call(void (Ekos::Manager:: *)(), Ekos::Manager *, void * *) qobjectdefs_impl.h152 0x55692808 9 QtPrivate::FunctionPointer::call, void>(void (Ekos::Manager:: *)(), Ekos::Manager *, void * *) qobjectdefs_impl.h185 0x5568dbf1 10 QtPrivate::QSlotObject, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h414 0x556856a6 11 QMetaObject::activate(QObject *, int, int, void * *) 0x757295c8 12 QAbstractButton::clicked(bool) 0x7632e236 13 ?? 0x7632e45e 14 ?? 0x7632f8a3 15 QAbstractButton::mouseReleaseEvent(QMouseEvent *) 0x7632fa65 16 QWidget::event(QEvent *) 0x7627c04e 17 QApplicationPrivate::notify_helper(QObject *, QEvent *) 0x76239a86 18 QApplication::notify(QObject *, QEvent *) 0x76243053 19 QTest::mouseEvent qtestmouse.h 242 0x5562bd4a 20 QTest::mouseEvent qtestmouse.h 206 0x5562b852 ... -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 Jasem Mutlaq changed: What|Removed |Added CC||mutla...@ikarustech.com --- Comment #4 from Jasem Mutlaq --- is this about client manager join thread? I rarely see this but it happens. What's the test to run? I cannot reproduce it on my machine and also in a Windows VM. -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #3 from TallFurryMan --- Yes, confirmed again. I just wrote a test to validate this and can reliably reproduce the issue. -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 TallFurryMan changed: What|Removed |Added Assignee|mutla...@ikarustech.com |eric.dejouha...@gmail.com -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 mountainai...@outlook.com changed: What|Removed |Added Ever confirmed|0 |1 Status|REPORTED|CONFIRMED --- Comment #2 from mountainai...@outlook.com --- This still happens in KStars 3.4.0, and on the Mac as well. If you wait (sometimes 20-30 seconds after the last log file entry), then you can stop Indi Server. If you don't wait long enough (and it varies substantially), the application will hang with a spinning beachball cursor and you ultimately need to Force Quit it. Because of how many difficulties I have with Indi, this often results in 2-3 crashes per night. Unfortunately it is not rare; it literally happens to me every observing session at least once. -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 mountainai...@outlook.com changed: What|Removed |Added CC||mountainai...@outlook.com -- You are receiving this mail because: You are watching all bug changes.
[kstars] [Bug 398192] In Ekos, stopping INDI immediately after disconnecting devices hangs KStars
https://bugs.kde.org/show_bug.cgi?id=398192 --- Comment #1 from Jasem Mutlaq --- I believe this issue is due to a problem shutting down the thread in BaseClient at times. Seen this issue before, but it is rare. Does it get stuck on pthread_join? -- You are receiving this mail because: You are watching all bug changes.