×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Virtual Address Space AsiCam

  • Posts: 20
  • Thank you received: 12
Hi,

I wanted to use a ASI120MC-S as GuidingCam with ekos and indiserver. The indiserver (+3rdparty) should run on a Banana Pi with Arch Linux and is build from the latest svn sources. Guiding and everything else runs quite well for the first few minutes, but then the Asi cam hangs on Exposure done, Downloading Image. I monitored the virtual memory used by indi_asi_ccd and running a few times it always hang a little bit over 3GB virt memory used, which I think is the maximum the 32bit Arm architecture can address.
At the moment the Asi cam runs directly on my Sony Vaio (64bit Ubuntu 15.04, Ekos and server installed from PPA) and with now 3,5k continuous Frames in the focus tab the indi_asi_ccd uses 29GB virtual memory adding 8MB for each new picture.
As I'm new to indi I'm not quite sure where I have to look in the source code to free the used memory and make continuous exposures and guiding possible.

cs

Markus
8 years 9 months ago #4440

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

  • Posts: 20
  • Thank you received: 12

Replied by Markus on topic Virtual Address Space AsiCam

Hi again,

I did some further tests using valgrind and it's massif function to monitor the allocated memory pages of the indi_asi_ccd driver. Using the option "--pages-as-heap=yes" I can see the rising requirements with each new picture. As pages-as-heap is only needed to monitor mmap, mremap and brk and I could not find any of this calls in the asi_ccd.cpp I assume it's a bug in the ASICamera2 SDK provided by ZWO (exactly in the function ASIGetDataAfterExp()). Using the Stream interface with the function ASIGetVideoData and oacapture with the old SDK and without increased memory usage proves this assumption.
Unfortunatly I'm not sure which system calls are hidden behind some of the functions used, so I cannot say any more to narrow down this bug. But I already sent a email to ZWO and will hopefully get a response soon.

If you need me to make further tests or need any log files, I will happily provide everything.

In the meantime I found a way to avoid the problems with this bug using a second indiserver on the 64bit Ubuntu machine and connecting the ASI120MC-S directly to the Notebook. (There are different address space implementations used in 64bit systems but they all provide at least 500GB virtual memory, which should be sufficient for some hours of guiding)

PS: Thanks for the great work you did developing KStars Ekos and indi.

cs
Markus
The following user(s) said Thank You: Jasem Mutlaq
8 years 9 months ago #4455

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

  • Posts: 171
  • Thank you received: 41
Tested and confirmed with ASI120MM on Banana Pi using Fedora 22.
8 years 9 months ago #4456

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

Thanks a lot for the bug report and excellent analysis. I will check the driver again just to make sure there are no memory leaks I might have missed. I will also contact ZWO and see what's going on.
8 years 9 months ago #4469

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

ASI sent me a new library and I made a few updates. Please check the PPA tomorrow and test again.
The following user(s) said Thank You: Christian
8 years 8 months ago #4504

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

  • Posts: 171
  • Thank you received: 41
Issue seems to be fixed :) Tested with Fedora 22 an x86_64 and ARMv7 and Arch Linux ARM on Raspi.
8 years 8 months ago #4508

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

  • Posts: 20
  • Thank you received: 12

Replied by Markus on topic Virtual Address Space AsiCam

Hi,

I only tested the svn version using my x64 machine and it looks like the memory leak is fixed now. :)

But I ran into another error, trying to use exposure times longer than 1 second. Doing so every second capture fails (ASI_EXP_FAILED in the status variable in the TimerHit function.
I allready tested a few things in the TimerHit function:
The status variable says ASI_EXP_WORKING (as expected) the whole time and only changes to FAILED when the exposure should be finished. (If I read the ASICam2.h file and the indi driver correctly you have to pass the exposure time to the ASI SDK. I think status is set to failed when the SDK is done with the exposure).
Restarting the exposure (like in the case ASIGetExpStatus returns a error) works but you'll need twice as long to get your exposures done.

cs Markus

PS: Looks like we are early alpha tester for the SDK2 at the moment...
Thanks a lot for your help and fast responses.
8 years 8 months ago #4509

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

I just tested this on x64bit and RPi2 and it works fine, I took 10x 3-seconds exposures and never had a failure.
8 years 8 months ago #4510

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

  • Posts: 20
  • Thank you received: 12

Replied by Markus on topic Virtual Address Space AsiCam

I just did another test using a usb 2.0 extension. As soon as I could get the camera to start (looks like it runs into some over current protections using usb 2.0 sometimes) it worked flawless with long exposures, so I think the issue arises only using usb 3.0 parts as I tried it on my x64 machine. If you did your test with a full usb 3.0 environment I'll have to test it with another usb 3.0 host (I think I read something about incompatibilities between the cams and some usb3 hosts in the ZWO forum).
I'll test the new driver on my banana pro later today, but I do not expect any complications there ;)

Once again thanks for your help.

cs Markus

PS: As it looks to little of a bug to open another Topic: If I add a focuser in the focuser field of the Ekos Configuration (KStars configuration) tab it appears in the dropdown menu of the filter wheels in the Ekos setup. Otherwise if I add the focuser in the filter wheel field in the Configuration it correctly appears in the focuser dropdown, but another filter wheel is automatically selected.
8 years 8 months ago #4511

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

  • Posts: 171
  • Thank you received: 41
Hmm, works on ARM only when I start driver from build directory :( Reason: The new ZWO libs are shared libs, not static ones like the previous.
8 years 8 months ago #4520

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

They are all static libraries now, svn up and check.
The following user(s) said Thank You: Christian
8 years 8 months ago #4521

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

should I assume this is resolved?
8 years 8 months ago #4578

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

Time to create page: 0.886 seconds