[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kstars-devel
Subject:    Re: debugging instructions
From:       Jasem Mutlaq <mutlaqja () ikarustech ! com>
Date:       2022-04-05 6:53:45
Message-ID: CAE0bU5msx6OQARraQoVJvO_zMJcdfJ5qPWy+U5erKFDcc3nWTw () mail ! gmail ! com
[Download RAW message or body]

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@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)
>

[Attachment #3 (text/html)]

<div dir="ltr">Thank you Hy for the tests. I haven&#39;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?<div><br \
clear="all"><div><div dir="ltr" class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div><div \
dir="ltr"><div>--</div><div>Best Regards,<br>Jasem \
Mutlaq<br></div><div><br></div></div></div></div></div></div><br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 5:55 AM \
Hy Murveit &lt;<a href="mailto:murveit@gmail.com">murveit@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr"><div>Folks,</div><div><br></div><div>I believe there are rare but \
often-enough memory issues when running stellarsolver.</div><div>I can&#39;t track it \
down, so I created this test to help us debug it.</div><div><br></div><div>If you \
have time, could you take a look?</div><div><br></div><div>I&#39;ve create a branch \
with a test which runs stellarsolver star detection in 3 parallel \
threads<br></div><div><a \
href="https://invent.kde.org/murveit/kstars/-/tree/solver-test1" \
target="_blank">https://invent.kde.org/murveit/kstars/-/tree/solver-test1</a><br></div><div>(if \
you uncomment some code, a 4th thread with a solver will run \
too).</div><div><br></div><div>To run this, you need to also download some data that \
it points to:</div><div>See the google drive folder:  </div><div><a \
href="https://drive.google.com/drive/folders/1eUrcJd1IENvcRUtnwsaUNWKwKuj5G077?usp=sharing" \
target="_blank">https://drive.google.com/drive/folders/1eUrcJd1IENvcRUtnwsaUNWKwKuj5G077?usp=sharing</a><br></div><div>Download \
those files into some directory on your machine.</div><div><br></div><div>You&#39;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&#39;ve put the \
files from my drive folder.</div><div><br></div><div>Then you can compile \
testfitsdata and run it as:</div><div>bin/testfitsdata \
testParallelSolvers</div><div><br></div><div>It will detect stars for 3 sets of data. \
</div><div><ul><li>200 guider files in thread 1</li><li>200 more guider files in \
thread 2</li><li>30 subs in thread3</li><li>(commented out) 30 guider files using the \
solver</li></ul></div><div>It takes a minute or two.</div><div><br></div><div>If I \
run this a few times, I usually get some kind of memory corruption error. Can&#39;t \
seem to figure it out yet, though. I&#39;ve compiled with the latest KStars, \
stellarsolver and indi-core.</div><div><br></div><div>Here&#39;s an example of one \
run that failed:</div><div><br></div><div>&gt; bin/testfitsdata \
testParallelSolvers<br>********* Start testing of TestFitsData *********<br>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)<br>PASS    : TestFitsData::initTestCase()<br>QINFO   : \
TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file   \
&quot;/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-08.fits&quot;<br>QINFO \
: TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file   \
&quot;/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits&quot;<br>QINFO \
: TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file   \
&quot;/home/hy/Desktop/SharedFolder/DEBUG-solver/m5_Light_LPR_120_secs_2022-03-12T04-44-56_201.fits&quot;<br>Found \
one coordinate representation.<br>Found one coordinate representation.<br>QINFO   : \
TestFitsData::testParallelSolvers() &quot;#0: \
/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-08.fits HFR \
1.98326&quot;<br>QINFO   : TestFitsData::testParallelSolvers() org.kde.kstars.fits: \
Loading file   &quot;/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-12.fits&quot;<br>QINFO \
: TestFitsData::testParallelSolvers() &quot;#0: \
/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits HFR \
2.0226&quot;<br>QINFO   : TestFitsData::testParallelSolvers() org.kde.kstars.fits: \
Loading file   &quot;/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-34.fits&quot;<br></div><div>...</div><div>QINFO \
: TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file   \
&quot;/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-46.fits&quot;<br>Found \
one coordinate representation.<br>Found one coordinate representation.<br>QINFO   : \
TestFitsData::testParallelSolvers() &quot;#102: \
/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-21.fits HFR \
1.9854&quot;<br>QINFO   : TestFitsData::testParallelSolvers() org.kde.kstars.fits: \
Loading file   &quot;/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-24.fits&quot;<br>QINFO \
: TestFitsData::testParallelSolvers() &quot;#101: \
/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-46.fits HFR \
2.04488&quot;<br>QINFO   : TestFitsData::testParallelSolvers() org.kde.kstars.fits: \
Loading file   &quot;/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits&quot;<br>Found \
one coordinate representation.<br>corrupted size vs. prev_size<br>Found 0 coordinate \
representations.<br>Aborted (core dumped)<br></div></div> </blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic