debugging instructions

Wolfgang Reissenberger wolfgang at openfuture.de
Tue Apr 5 14:38:41 BST 2022


I can confirm the crashes, both when running inside of QtCreator and from outside. I get a SIGABRT and it stops here:

InternalExtractorSolver::~InternalExtractorSolver()

Here are the last log entries:


QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-30.fits"
Found one coordinate representation.
Found one coordinate representation.
QINFO  : TestFitsData::testParallelSolvers() "#160: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-27.fits HFR 2.08551"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-08.fits"
QINFO  : TestFitsData::testParallelSolvers() "#162: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-30.fits HFR 2.09013"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-34.fits"
Found one coordinate representation.
Found one coordinate representation.
QINFO  : TestFitsData::testParallelSolvers() "#21: /media/psf/Home/Downloads/ssolver-debug/m5_Light_LPR_120_secs_2022-03-12T04-47-02_202.fits HFR 3.9253"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/m5_Light_LPR_120_secs_2022-03-12T04-49-04_203.fits"
QINFO  : TestFitsData::testParallelSolvers() "#161: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-08.fits HFR 1.97429"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-12.fits"
QINFO  : TestFitsData::testParallelSolvers() "#163: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-34.fits HFR 2.31188"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-37.fits"
Found one coordinate representation.
QINFO  : TestFitsData::testParallelSolvers() "#162: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-12.fits HFR 2.02392"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-15.fits"
QINFO  : TestFitsData::testParallelSolvers() "#164: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-37.fits HFR 2.09801"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-40.fits"
Found one coordinate representation.
Found one coordinate representation.
QINFO  : TestFitsData::testParallelSolvers() "#163: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-15.fits HFR 1.83649"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-18.fits"
QINFO  : TestFitsData::testParallelSolvers() "#165: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-40.fits HFR 2.12449"
QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-43.fits"
Found one coordinate representation.
Found one coordinate representation.
Found one coordinate representation.
QFATAL : TestFitsData::testParallelSolvers() QThread: Destroyed while thread is still running
FAIL!  : TestFitsData::testParallelSolvers() Received a fatal error.


> Am 05.04.2022 um 10:59 schrieb Hy Murveit <murveit at gmail.com>:
> 
> Jasem,
> 
> I not even solving. I'm just star-detecting, and getting faults.
> Faults are likely double free-ing memory, or the like.
> I think I've improved things by zero'ing when memory is freed--it runs longer--but it still crashes.
> I've been setting my test to run 3000, 3000, 400 iterations. Now I'm getting to 1200 or so before crashes.
> 
> Hy
> 
> On Mon, Apr 4, 2022 at 11:54 PM Jasem Mutlaq <mutlaqja at ikarustech.com <mailto:mutlaqja at ikarustech.com>> wrote:
> Thank you Hy for the tests. I haven't run it yet, but I wonder if perhaps there is an issue with wcs library... is that thread safe? Can you try disabling all wcs related code and see if that makes any difference?
> 
> --
> Best Regards,
> Jasem Mutlaq
> 
> 
> 
> On Tue, Apr 5, 2022 at 5:55 AM Hy Murveit <murveit at gmail.com <mailto:murveit at gmail.com>> wrote:
> Folks,
> 
> I believe there are rare but often-enough memory issues when running stellarsolver.
> I can't track it down, so I created this test to help us debug it.
> 
> If you have time, could you take a look?
> 
> I've create a branch with a test which runs stellarsolver star detection in 3 parallel threads
> https://invent.kde.org/murveit/kstars/-/tree/solver-test1 <https://invent.kde.org/murveit/kstars/-/tree/solver-test1>
> (if you uncomment some code, a 4th thread with a solver will run too).
> 
> To run this, you need to also download some data that it points to:
> See the google drive folder: 
> https://drive.google.com/drive/folders/1eUrcJd1IENvcRUtnwsaUNWKwKuj5G077?usp=sharing <https://drive.google.com/drive/folders/1eUrcJd1IENvcRUtnwsaUNWKwKuj5G077?usp=sharing>
> Download those files into some directory on your machine.
> 
> You'd then edit near the end of kstars/Tests/fitsviewer/testfitsdata.cpp at the start of the test testParallelSolvers and change the directory there where you've put the files from my drive folder.
> 
> Then you can compile testfitsdata and run it as:
> bin/testfitsdata testParallelSolvers
> 
> It will detect stars for 3 sets of data. 
> 200 guider files in thread 1
> 200 more guider files in thread 2
> 30 subs in thread3
> (commented out) 30 guider files using the solver
> It takes a minute or two.
> 
> If I run this a few times, I usually get some kind of memory corruption error. Can't seem to figure it out yet, though. I've compiled with the latest KStars, stellarsolver and indi-core.
> 
> Here's an example of one run that failed:
> 
> > bin/testfitsdata testParallelSolvers
> ********* Start testing of TestFitsData *********
> Config: Using QtTest library 5.12.8, Qt 5.12.8 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.3.0)
> PASS   : TestFitsData::initTestCase()
> QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-08.fits"
> QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits"
> QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/m5_Light_LPR_120_secs_2022-03-12T04-44-56_201.fits"
> Found one coordinate representation.
> Found one coordinate representation.
> QINFO  : TestFitsData::testParallelSolvers() "#0: /home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-08.fits HFR 1.98326"
> QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-12.fits"
> QINFO  : TestFitsData::testParallelSolvers() "#0: /home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits HFR 2.0226"
> QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-34.fits"
> ...
> QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-46.fits"
> Found one coordinate representation.
> Found one coordinate representation.
> QINFO  : TestFitsData::testParallelSolvers() "#102: /home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-21.fits HFR 1.9854"
> QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-24.fits"
> QINFO  : TestFitsData::testParallelSolvers() "#101: /home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-46.fits HFR 2.04488"
> QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits"
> Found one coordinate representation.
> corrupted size vs. prev_size
> Found 0 coordinate representations.
> Aborted (core dumped)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20220405/4e4b1549/attachment.htm>


More information about the Kstars-devel mailing list