×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4

3 months 2 days ago 3 months 2 days ago by jerry.
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51690
Note sure what the issue is,
When a profile is loaded, e.g. Simulators it crashes as shown below.
Build: 2020-04-03T19:08:19Z
Installation was originally via AstroPi3 setupUbuntuSBC.sh
odroid@odroid:~$ uname -a
Linux odroid 4.9.216-69 #1 SMP PREEMPT Mon Mar 16 14:58:58 -03 2020 aarch64 aarch64 aarch64 GNU/Linux

odroid@odroid:~$ gdb -ex run kstars
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kstars...Reading symbols from /usr/lib/debug/.build-id/34/5af8adaff394ae73e60758e5ee35def02515e0.debug...done.
done.
Starting program: /usr/bin/kstars 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fb10300a0 (LWP 25423)]
libEGL warning: DRI2: failed to authenticate
[New Thread 0x7fa74830a0 (LWP 25430)]
[New Thread 0x7fa6c820a0 (LWP 25431)]
[New Thread 0x7fa64810a0 (LWP 25432)]
[New Thread 0x7fa5c800a0 (LWP 25433)]
[New Thread 0x7fa547f0a0 (LWP 25434)]
[New Thread 0x7fa4c7e0a0 (LWP 25435)]
[New Thread 0x7f8fcf30a0 (LWP 25436)]
[New Thread 0x7f8f4f20a0 (LWP 25437)]
[New Thread 0x7f8ecf10a0 (LWP 25438)]
[New Thread 0x7f8e49e0a0 (LWP 25439)]
[New Thread 0x7f8db800a0 (LWP 25443)]
[New Thread 0x7f8ced50a0 (LWP 25447)]
[New Thread 0x7f73fff0a0 (LWP 25448)]
[New Thread 0x7f737fe0a0 (LWP 25449)]
[New Thread 0x7f725ed0a0 (LWP 25459)]
[New Thread 0x7f718000a0 (LWP 25484)]
[New Thread 0x7f70fff0a0 (LWP 25485)]
[New Thread 0x7f57a130a0 (LWP 25486)]
[New Thread 0x7f572120a0 (LWP 25487)]
[New Thread 0x7f56a110a0 (LWP 25488)]
[New Thread 0x7f562100a0 (LWP 25489)]
[New Thread 0x7f55a0f0a0 (LWP 25490)]
[Thread 0x7f55a0f0a0 (LWP 25490) exited]
[Thread 0x7f718000a0 (LWP 25484) exited]
[Thread 0x7f8e49e0a0 (LWP 25439) exited]
[New Thread 0x7f8e49e0a0 (LWP 25631)]
[New Thread 0x7f718000a0 (LWP 25633)]
[New Thread 0x7f55a0f0a0 (LWP 25634)]

Thread 1 "kstars" received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/aarch64/strlen.S:94
94	../sysdeps/aarch64/strlen.S: No such file or directory.
(gdb) bt
#0  0x0000007fb52ca450 in strlen () at ../sysdeps/aarch64/strlen.S:94
#1  0x00000055558bdb04 in QString::fromUtf8(char const*, int) (size=-1, str=0x1f00000000 <error: Cannot access memory at address 0x1f00000000>)
    at /usr/include/aarch64-linux-gnu/qt5/QtCore/qstring.h:538
#2  0x00000055558bdb04 in QDebug::operator<<(char const*) (t=0x1f00000000 <error: Cannot access memory at address 0x1f00000000>, this=0x7fffffe4e0)
    at /usr/include/aarch64-linux-gnu/qt5/QtCore/qdebug.h:153
#3  0x00000055558bdb04 in INDIListener::registerProperty(INDI::Property*) (this=0x5559c3bf90, prop=0x7f7405f1d0) at ./kstars/indi/indilistener.cpp:234
#4  0x000000555585e090 in INDIListener::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at ./obj-aarch64-linux-gnu/kstars/KStarsLib_autogen/FRI4DANIHA/moc_indilistener.cpp:185
#5  0x0000007fb5f53c9c in QObject::event(QEvent*) ()
    at /usr/lib/aarch64-linux-gnu/libQt5Core.so.5
#6  0x0000007fb68fff90 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5
#7  0x0000007fb6907ce8 in QApplication::notify(QObject*, QEvent*) ()
    at /usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5
#8  0x0000007fb5f22438 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/aarch64-linux-gnu/libQt5Core.so.5
#9  0x0000007fb5f24d70 in QCoreApplicationPrivate::sendPostedEvents(QObject*, in-----------T---------Type <ret---Type <------Type <re------Type <---Type <return> to continue, or q <return> to quit---

Under some conditions (which don't seem consistent yet) with a preloaded profile of my own (or Simulator) via the Indi Web Manager app, I can get to to load the profile, and then things proceed normally.

Any suggestions?

Thanks
Jerry

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.

Please Log in or Create an account to join the conversation.

3 months 1 day ago
TallFurryMan
Platinum Boarder
Platinum Boarder
Posts: 892
Karma: 13
More
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51735
I think local variables from frame #3 may be interesting. "f 3" to get to that backtrace frame and display code, and explore locals with "p <local name>"? You would also need to make sure your versions of indi, indi-3rdparty and KStars match.

-Eric

HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access

Please Log in or Create an account to join the conversation.

3 months 21 hours ago 3 months 21 hours ago by jerry.
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51741
Thanks Eric. I have to figure out how to use gdb.
So far I've got:
(gdb) f 3
#3 INDIListener::registerProperty (this=0x5559c43830, prop=0x7f4801acd0) at ./kstars/indi/indilistener.cpp:234
234 ./kstars/indi/indilistener.cpp: No such file or directory.

but I don't know how to get at the locals etc.

Note that if I explore 3 - 6 sorta random restarts of Kstars I can get it to work by using existing indiserver instances or killing them.

I'm also unclear how to check that I have indilib, indie-3rdparty and kstars in sync, other than do a software update.

Thanks

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.

Please Log in or Create an account to join the conversation.

3 months 5 hours ago
knro
Administrator
Administrator
Posts: 8093
Karma: 51
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51765
Anyway to reproduce this reliably? Just using simulators or something else? remote or local?

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Please Log in or Create an account to join the conversation.

3 months 29 minutes ago
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51776
I'll try to create a reproducible scenario...

In the mean time I tried compiling from source
It didn't finish.
[ 98%] Linking CXX executable testfitsdata
CMakeFiles/testfitsdata.dir/testfitsdata.cpp.o: In function `TestFitsData::testLoadFits()':
/home/odroid/Projects/kstars/Tests/fitsviewer/testfitsdata.cpp:62: undefined reference to `bool QTest::qCompare<double, int>(double const&, int const&, char const*, char const*, char const*, int)'
/home/odroid/Projects/kstars/Tests/fitsviewer/testfitsdata.cpp:63: undefined reference to `bool QTest::qCompare<double, int>(double const&, int const&, char const*, char const*, char const*, int)'
/home/odroid/Projects/kstars/Tests/fitsviewer/testfitsdata.cpp:66: undefined reference to `bool QTest::qCompare<double, int>(double const&, int const&, char const*, char const*, char const*, int)'
collect2: error: ld returned 1 exit status
Tests/fitsviewer/CMakeFiles/testfitsdata.dir/build.make:133: recipe for target 'Tests/fitsviewer/testfitsdata' failed
make[2]: *** [Tests/fitsviewer/testfitsdata] Error 1
CMakeFiles/Makefile2:1795: recipe for target 'Tests/fitsviewer/CMakeFiles/testfitsdata.dir/all' failed
make[1]: *** [Tests/fitsviewer/CMakeFiles/testfitsdata.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
odroid@odroid:~/Projects/build/kstars$ 
and I don't know enough to be able to bypass that compile step assuming 'testfitsdata' isn't critical in debugging my original problem.

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.

Please Log in or Create an account to join the conversation.

2 months 4 weeks ago 2 months 4 weeks ago by jerry.
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51781
OK, So the compile solved by fixing the code where it was complaining about type incompatibilities
[ 98%] Built target testfitsdata_autogen
[ 98%] Linking CXX executable testfitsdata
CMakeFiles/testfitsdata.dir/testfitsdata.cpp.o: In function `TestFitsData::testLoadFits()':
/home/odroid/Projects/kstars/Tests/fitsviewer/testfitsdata.cpp:62: undefined reference to `bool QTest::qCompare<double, int>(double const&, int const&, char const*, char const*, char const*, int)'
/home/odroid/Projects/kstars/Tests/fitsviewer/testfitsdata.cpp:63: undefined reference to `bool QTest::qCompare<double, int>(double const&, int const&, char const*, char const*, char const*, int)'
/home/odroid/Projects/kstars/Tests/fitsviewer/testfitsdata.cpp:66: undefined reference to `bool QTest::qCompare<double, int>(double const&, int const&, char const*, char const*, char const*, int)'
collect2: error: ld returned 1 exit status
Tests/fitsviewer/CMakeFiles/testfitsdata.dir/build.make:133: recipe for target 'Tests/fitsviewer/testfitsdata' failed
make[2]: *** [Tests/fitsviewer/testfitsdata] Error 1
CMakeFiles/Makefile2:1795: recipe for target 'Tests/fitsviewer/CMakeFiles/testfitsdata.dir/all' failed
make[1]: *** [Tests/fitsviewer/CMakeFiles/testfitsdata.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Converting the ints to double removes this compile error for lines 62, 63, 66. I'm clueless on how to get push this change back to the proper system.
void TestFitsData::testLoadFits()
{
    // Statistics computation
    QVERIFY(abs(fd->getADU() - 41.08) < 0.01);
    QVERIFY(abs(fd->getMean() - 41.08) < 0.01);
    QVERIFY(abs(fd->getStdDev() - 360.18) < 0.01);
    QVERIFY(abs(fd->getSNR() - 0.114) < 0.001);

    // Minmax
    QCOMPARE(fd->getMax(),57832.0]);
    QCOMPARE(fd->getMin(), 21.0);

    QWARN("No median calculation in the current implementation");
    QCOMPARE(fd->getMedian(), 0.0);

    // Without searching for stars, there are no stars found
    QCOMPARE(fd->getStarCenters().count(), 0);
    QCOMPARE(fd->getHFR(), -1.0);

    // Default algorithm is centroid, 80 stars with 1.495 as HFR
    QCOMPARE(fd->findStars(), 80);
    QCOMPARE(fd->getDetectedStars(), 80);
    QCOMPARE(fd->getStarCenters().count(), 80);
    QVERIFY(abs(fd->getHFR() - 1.49) < 0.01);

    // With the centroid algorithm, 80 stars with mean HFR 1.495
    QCOMPARE(fd->findStars(ALGORITHM_CENTROID), 80);
    QCOMPARE(fd->getDetectedStars(), 80);
    QCOMPARE(fd->getStarCenters().count(), 80);
    QVERIFY(abs(fd->getHFR() - 1.49) < 0.01);

    // With the gradient algorithm, one single star found with HFR 1.801
    QCOMPARE(fd->findStars(ALGORITHM_GRADIENT), 1);
    QCOMPARE(fd->getDetectedStars(), 1);
    QCOMPARE(fd->getStarCenters().count(), 1);
    QVERIFY(abs(fd->getHFR() - 1.80) < 0.01);

    // The threshold algorithm depends on a global option - skip until we know how to fiddle with that
    //QCOMPARE(fd->findStars(ALGORITHM_THRESHOLD), -1);
    //QCOMPARE(fd->getDetectedStars(), 0);
    //QCOMPARE(fd->getStarCenters().count(), 0);
    //QCOMPARE(fd->getHFR(), -1.0);

    // With the SEP algorithm, 100 stars with mean HFR 2.48
    QCOMPARE(fd->findStars(ALGORITHM_SEP), 100);
    QCOMPARE(fd->getDetectedStars(), 100);
    QCOMPARE(fd->getStarCenters().count(), 100);
    QVERIFY(abs(fd->getHFR() - 2.48) < 0.01);
}

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.

Please Log in or Create an account to join the conversation.

2 months 4 weeks ago
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51790
OK, using a just compiled version of KStars on the Oroid-N2 I get:
odroid@odroid:~/Projects/build/kstars$ gdb '/home/odroid/Projects/build/kstars/kstars/kstars' 
...
This GDB was configured as "aarch64-linux-gnu".
...
(gdb) run
Starting program: /home/odroid/Projects/build/kstars/kstars/kstars 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fb10260a0 (LWP 9578)]
libEGL warning: DRI2: failed to authenticate
[New Thread 0x7fa74830a0 (LWP 9585)]
[New Thread 0x7f9ec820a0 (LWP 9586)]
[New Thread 0x7fa6c820a0 (LWP 9587)]
[New Thread 0x7fa64810a0 (LWP 9588)]
[New Thread 0x7fa5c800a0 (LWP 9589)]
[New Thread 0x7fa547f0a0 (LWP 9590)]
[New Thread 0x7f9ffff0a0 (LWP 9591)]
[New Thread 0x7f9f7fe0a0 (LWP 9592)]
[New Thread 0x7f9e4810a0 (LWP 9593)]
[New Thread 0x7f9dc800a0 (LWP 9597)]
[New Thread 0x7f9d47f0a0 (LWP 9598)]
[New Thread 0x7f9cc7e0a0 (LWP 9602)]
[New Thread 0x7f77fff0a0 (LWP 9603)]
[New Thread 0x7f777fe0a0 (LWP 9604)]
[New Thread 0x7f765ed0a0 (LWP 9644)]
[New Thread 0x7f758000a0 (LWP 9677)]
[New Thread 0x7f74fff0a0 (LWP 9678)]
[New Thread 0x7f5ba130a0 (LWP 9679)]
[New Thread 0x7f5b2120a0 (LWP 9680)]
[New Thread 0x7f5aa110a0 (LWP 9681)]
[New Thread 0x7f5a2100a0 (LWP 9682)]
[New Thread 0x7f59a0f0a0 (LWP 9683)]
[Thread 0x7f758000a0 (LWP 9677) exited]
[Thread 0x7f59a0f0a0 (LWP 9683) exited]
[Thread 0x7f9dc800a0 (LWP 9597) exited]
[New Thread 0x7f9dc800a0 (LWP 9817)]

Thread 1 "kstars" received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/aarch64/strlen.S:94
94	../sysdeps/aarch64/strlen.S: No such file or directory.

(gdb) f 3
#3  0x0000005555a28ad8 in INDIListener::registerProperty (this=0x555a486a60, prop=0x7f7c037850) at /home/odroid/Projects/kstars/kstars/indi/indilistener.cpp:234
234	    qCDebug(KSTARS_INDI) << "<" << prop->getDeviceName() << ">: <" << prop->getName() << ">";

(gdb) p prop
$1 = (INDI::Property *) 0x7f7c037850

(gdb) l
229	    }
230	}
231	
232	void INDIListener::registerProperty(INDI::Property *prop)
233	{
234	    qCDebug(KSTARS_INDI) << "<" << prop->getDeviceName() << ">: <" << prop->getName() << ">";
235	
236	    for (auto oneDevice : devices)
237	    {
238	        if (oneDevice->getDeviceName() == prop->getDeviceName())

(gdb) p *prop
$2 = {pPtr = 0x1f00000000, dp = 0x7f7c017920, pType = INDI_SWITCH, pRegistered = false, pDynamic = true}

(gdb) bt
#0  0x0000007fb52c5450 in strlen () at ../sysdeps/aarch64/strlen.S:94
#1  0x000000555563564c in QString::fromUtf8(char const*, int) (str=0x1f00000000 <error: Cannot access memory at address 0x1f00000000>, size=-1)
    at /usr/include/aarch64-linux-gnu/qt5/QtCore/qstring.h:538
#2  0x00000055556366f4 in QDebug::operator<<(char const*) (this=0x7fffffe468, t=0x1f00000000 <error: Cannot access memory at address 0x1f00000000>)
    at /usr/include/aarch64-linux-gnu/qt5/QtCore/qdebug.h:153
#3  0x0000005555a28ad8 in INDIListener::registerProperty(INDI::Property*) (this=0x555a486a60, prop=0x7f7c037850)
    at /home/odroid/Projects/kstars/kstars/indi/indilistener.cpp:234
#4  0x000000555597a0f8 in INDIListener::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x555a486a60, _c=QMetaObject::InvokeMetaMethod, _id=11, _a=0x7f7c037470) at /home/odroid/Projects/build/kstars/kstars/KStarsLib_autogen/FRI4DANIHA/moc_indilistener.cpp:185
#5  0x0000007fb5f4ec9c in QObject::event(QEvent*) () at /usr/lib/aarch64-linux-gnu/libQt5Core.so.5
#6  0x0000007fb68faf90 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5
#7  0x0000007fb6902ce8 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/aarch64-linux-gnu/libQt5Widgets.so.5
#8  0x0000007fb5f1d438 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/aarch64-linux-gnu/libQt5Core.so.5
#9  0x0000007fb5f1fd70 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/aarch64-linux-gnu/libQt5Core.so.5
#10 0x0000007fb5f7aa60 in  () at /usr/lib/aarch64-linux-gnu/libQt5Core.so.5
#11 0x0000007fb4b5fc30 in g_main_context_dispatch () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#12 0x0000007fb4b5fe8c in  () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#13 0x0000000000000001 in  ()
(gdb) 

Beyond this I'm lost. I'm not sure why indilistener is being called and why the value of prop->pPtr is bad.

Cheers

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.

Please Log in or Create an account to join the conversation.

2 months 4 weeks ago 2 months 4 weeks ago by jerry.
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51797
Jasem, FYI my previous reply ( www.indilib.org/forum/general/6726-re-ks...tu-18-0-4.html#51790 ) the crash is using the local simulators from a cold boot .

Running a 2nd time and choosing to not shut down the previous server worked.
Running a 3rd time and choosing to shut down the previous server worked.

Disconnecting and stopping the server with KStars still running and then connecting to the simulators, again crashed.

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.

Please Log in or Create an account to join the conversation.

2 months 4 weeks ago
xsnrg
Gold Boarder
Gold Boarder
Posts: 270
Karma: 2
More
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51799
I had something similar to this happen to me. I could load kstars, select the profile, but any time I tried to connect it would crash. I was able to work around it by re-saving the profile before connecting with it. I am not sure if something was incompatible in my older profiles with the newer EKOS, or what it was, but I have not had the problem since re-saving the profile. This might not be related, but thought I would offer it up.

Jim

12" pier with HDX110 using EQMod
ASI 1600 mono/color mains with ASI290MM in off-axis
ASI filter wheel
Moonlite focusers for the sharpening
AT115EDT w/.8x for the light
Fedora Linux, 100% INDI

Please Log in or Create an account to join the conversation.

2 months 4 weeks ago
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51800
Thanks, yes I have tried re-saving my profile and in my case it doesn't seem to help. I think there is an uninitialized variable somewhere higher up in the code or at least one that gets reset or not reset.

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.

Please Log in or Create an account to join the conversation.

2 months 3 weeks ago
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #51882
So I've made some progress, but not there yet.

I have QTCreator running on the Odroid-N2 and am able to debug from the current source code. The problem for me is with the Pegasus DMFC focuser driver indi_dmfc_focus

By removing this device, everything works. Adding a test profile with just this driver and a camera crashes KStars.

I don't really know how to debug both the indiserver and kstars at the same time, so I can only trace things to the point where I get a bad property ptr into INDIListener::registerProperty(INDI::Property *prop)
void INDIListener::registerProperty(INDI::Property *prop)
{
*    qCDebug(KSTARS_INDI) << "<" << prop->getDeviceName() << ">: <" << prop->getName() << ">";

    for (auto oneDevice : devices)
    {
        if (oneDevice->getDeviceName() == prop->getDeviceName())
        {
...

Setting a break point on the 1st line of the code above lets me see each of the 11 calls in sequence as shown below giving the property names as the arrive:
1)   Locals		
		prop	@0x7f54002a60	INDI::Property
		qt_category_enabled	false	bool
		this	@0x555a14b760	INDIListener

		prop->getDeviceName()	"Pegasus DMFC"	char*
		prop->getName()	"CONNECTION"	char*

2)		prop->getName()	"DRIVER_INFO"	char*
3)		prop->getName()	"DEBUG"	char*
4)		prop->getName()	"POLLING_PERIOD"	char*
5)		prop->getName()	"CONFIG_PROCESS"	char*
6)		prop->getName()	"CONNECTION_MODE"	char*
7)		prop->getName()	"DEVICE_PORT"	char*
8)		prop->getName()	"DEVICE_BAUD_RATE"	char*
9)		prop->getName()	"DEVICE_AUTO_SEARCH"	char*
10)		prop->getName()	"DEVICE_PORT_SCAN"	char*

11)	Locals		
		prop	@0x7f5400aac0	INDI::Property
		qt_category_enabled	false	bool
		this	@0x555a14b760	INDIListener

		prop->getDeviceName()	0x1f00000000	char*
		prop->getName()	0x1f00000040	char*

After this last call the Kstars crashes.

I don't yet see where those calls are originating from, and hence where there might be an uninitialized variable.

I did run the KStars under QTCreator / valgrind. It noted a number (150) issues although I guess many of those were likely duplicates as I let it run too long.

I have indilib set as a dependency of the kstars project but I can't step into the library code, which I presume is normal.

Any suggestions on how to further debug this?

Thanks
Jerry

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.
The following user(s) said Thank You knro

Please Log in or Create an account to join the conversation.

2 months 3 weeks ago
jerry
Gold Boarder
Gold Boarder
Posts: 180
Karma: 1
More
Topic Author
[SOLVED} Kstars v3.4.2 bombing while drivers loading on Ubuntu 18.0.4 #52002
So an update.
This hardware works fine on Stellarmate on the RPI4,
but it appears the peagsus-dmfc_focus driver has problems on the Odroid-N2 with Ubuntumate 18.04

I'm too much of a unix newbie to be able to figure out what's going on? Could the driver be attempting to read from the wrong device? Strangely the problem seems to have worsened so that what used to work occasionally now doesn't at all.

Using QtCreator and valgrind with gdb I get
gdb /home/odroid/Projects/build-indi-Desktop-Debug/indi_dmfc_focus
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/odroid/Projects/build-indi-Desktop-Debug/indi_dmfc_focus...done.

(gdb) target remote | /usr/lib/valgrind/../../bin/vgdb --pid=23038
Remote debugging using | /usr/lib/valgrind/../../bin/vgdb --pid=23038
relaying data between gdb and process 23038
warning: remote target does not support file transfer, attempting to access files from local filesystem.
Reading symbols from /usr/lib/valgrind/vgpreload_core-arm64-linux.so...Reading symbols from /usr/lib/debug//usr/lib/valgrind/vgpreload_core-arm64-linux.so...done.
done.
Reading symbols from /usr/lib/valgrind/vgpreload_memcheck-arm64-linux.so...Reading symbols from /usr/lib/debug//usr/lib/valgrind/vgpreload_memcheck-arm64-linux.so...done.
done.
Reading symbols from /home/odroid/Projects/build-indi-Desktop-Debug/libindidriver.so.1...done.
Reading symbols from /usr/lib/aarch64-linux-gnu/libstdc++.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/aarch64-linux-gnu/libgcc_s.so.1...(no debugging symbols found)...done.
Reading symbols from /lib/aarch64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug//lib/aarch64-linux-gnu/libc-2.27.so...done.
done.
Reading symbols from /lib/ld-linux-aarch64.so.1...Reading symbols from /usr/lib/debug//lib/aarch64-linux-gnu/ld-2.27.so...done.
done.
Reading symbols from /lib/aarch64-linux-gnu/libusb-1.0.so.0...(no debugging symbols found)...done.
Reading symbols from /usr/lib/aarch64-linux-gnu/libnova-0.16.so.0...(no debugging symbols found)...done.
Reading symbols from /lib/aarch64-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug/.build-id/94/47f37309461cc15fb1915bc198d718017a1f87.debug...done.
done.
Reading symbols from /usr/lib/aarch64-linux-gnu/libcfitsio.so.5...(no debugging symbols found)...done.
Reading symbols from /lib/aarch64-linux-gnu/libz.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/aarch64-linux-gnu/libjpeg.so.8...(no debugging symbols found)...done.
Reading symbols from /usr/lib/aarch64-linux-gnu/libfftw3.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/lib/aarch64-linux-gnu/libtheoraenc.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/aarch64-linux-gnu/libtheoradec.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/aarch64-linux-gnu/libogg.so.0...(no debugging symbols found)...done.
Reading symbols from /lib/aarch64-linux-gnu/libm.so.6...Reading symbols from /usr/lib/debug//lib/aarch64-linux-gnu/libm-2.27.so...done.
done.
Reading symbols from /lib/aarch64-linux-gnu/libudev.so.1...(no debugging symbols found)...done.
...
Reading symbols from /lib/aarch64-linux-gnu/libcrypt.so.1...Reading symbols from /usr/lib/debug//lib/aarch64-linux-gnu/libcrypt-2.27.so...done.
done.
0x0000000004de070c in __GI___select (nfds=1, readfds=0x1fff000238, writefds=0x0, exceptfds=0x0, timeout=0x0) at ../sysdeps/unix/sysv/linux/select.c:53
53	../sysdeps/unix/sysv/linux/select.c: No such file or directory.
(gdb) bt
#0  0x0000000004de070c in __GI___select (nfds=1, readfds=0x1fff000238, writefds=0x0, exceptfds=0x0, timeout=0x0) at ../sysdeps/unix/sysv/linux/select.c:53
#1  0x000000000492f9e8 in oneLoop () at /home/odroid/Projects/indi/eventloop.c:427
#2  0x000000000492e85c in eventLoop () at /home/odroid/Projects/indi/eventloop.c:106
#3  0x000000000492e71c in main (ac=0, av=0x1fff000458) at /home/odroid/Projects/indi/indidrivermain.c:98
#4  0x0000000004d376e0 in __libc_start_main (main=0x0, argc=0, argv=0x0, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>)
    at ../csu/libc-start.c:310
#5  0x000000000010c5d4 in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) quit
A debugging session is active.

	Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) y

looking at the driver invocation I also see it reporting a read error of some sort
odroid@odroid:~$ sudo indiserver -v indi_dfmc_focus indi_nikon_ccd                                
2020-04-16T12:12:21: startup: indiserver -v indi_dfmc_focus indi_nikon_ccd 
2020-04-16T12:12:21: Driver indi_dfmc_focus: pid=30083 rfd=3 wfd=6 efd=7
2020-04-16T12:12:21: Driver indi_nikon_ccd: pid=30084 rfd=4 wfd=9 efd=10
2020-04-16T12:12:21: listening to port 7624 on fd 5
2020-04-16T12:12:21: Driver indi_dfmc_focus: 2020-04-16T12:12:21: Driver indi_dfmc_focus: execlp: No such file or directory
Child process 30083 died
2020-04-16T12:12:21: Driver indi_dfmc_focus: stderr EOF
2020-04-16T12:12:21: Driver indi_dfmc_focus: restart #1
2020-04-16T12:12:21: Driver indi_dfmc_focus: pid=30085 rfd=0 wfd=7 efd=8
2020-04-16T12:12:21: Driver indi_dfmc_focus: 2020-04-16T12:12:21: Driver indi_dfmc_focus: execlp: No such file or directory
2020-04-16T12:12:21: Driver indi_dfmc_focus: stderr EOF
Child process 30085 died
2020-04-16T12:12:21: Driver indi_dfmc_focus: restart #2
2020-04-16T12:12:21: Driver indi_dfmc_focus: pid=30086 rfd=0 wfd=7 efd=8
Child process 30086 died
2020-04-16T12:12:21: Driver indi_dfmc_focus: 2020-04-16T12:12:21: Driver indi_dfmc_focus: execlp: No such file or directory
2020-04-16T12:12:21: Driver indi_dfmc_focus: stdin EOF
2020-04-16T12:12:21: Driver indi_dfmc_focus: restart #3
2020-04-16T12:12:21: Driver indi_dfmc_focus: pid=30087 rfd=0 wfd=7 efd=8
Child process 30087 died
etc...

the devices are:
odroid@odroid:~$ lsusb
Bus 002 Device 006: ID 04b0:0442 Nikon Corp. 
Bus 002 Device 005: ID 03c3:224a  
Bus 002 Device 003: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 004: ID 04e8:61f5 Samsung Electronics Co., Ltd 
Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 1546:01a7 U-Blox AG 
Bus 001 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 006: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Are there any other paths I can take to resolve this?

Thanks

120 MM Skywatcher Esprit on Celestron CGX
ZWO ASI 224MC or QHY-5L-II-M for guiding
Nikon Z7 8256 x 5504, 35.9 x 23.9mm 4.34 um pixel size
Triad Ultra Quad Band Narrow Filter
1) Kstars --> Odroid-N2 Ubuntu-mate 20.04
2) StellarMate on RPI4 8G
3) KStars on Astroberry RPI3.

Please Log in or Create an account to join the conversation.

Time to create page: 0.430 seconds