debugging instructions

Hy Murveit murveit at gmail.com
Tue Apr 5 09:59:35 BST 2022


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>
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> 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
>> (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
>> 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/b25470b6/attachment-0001.htm>


More information about the Kstars-devel mailing list