×

INDI Library v1.9.6 Released (21 May 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

KStars/EKOS crashing when imaging; Astroberry, RPi 4-4GB

  • Posts: 163
  • Thank you received: 31
No free command is fine. I just wanted to make sure that your log is from that free command and something else.

But that Phonon::createPath: Cannot connect remind me that there was issue with sound notification. After a while kstars process run out of available file descriptors and crashed. I am not sure if it was fixed but go and disable all sound nofitication in Kstars Settings->Notification settings.There is play triangle next to them.
1 month 1 week ago #82971

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

  • Posts: 18
  • Thank you received: 1
"But that Phonon::createPath: Cannot connect remind me that there was issue ..."
Dang! My original post in SGL comments on this where I say
"I'm assuming that's not one to chase down (just yet)?"

So I'm changing things over in KStars to output any notifications that originally had sounds attached to text file (for my reference), and will re-run as before and we'll see what happens. Script also being changed to output ONLY percentages rather than a mix. This will make things easier to see on the whole.
Hopefully the sound issue is the cause, fingers (and lots of cables on a mount!) crossed!
BTW, thanks @Nou :D
Last edit: 1 month 1 week ago by Pete Simpson.
1 month 1 week ago #82972

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

  • Posts: 18
  • Thank you received: 1
For those interested, new scripting output is a bit cleaner:
*************************************************************************
**      New record of system info started at 2022-05-20, 13:12:51      **
**   Total RAM available is 3.7GB and total SWAP available is  99MB.   **
**   Total space on micro SD card (located @/dev/root) is 116.935GB    **
*************************************************************************
2022-05-20 13:12:56 Temp=38.9ºC. RAM 'Used': 12.9%; RAM 'Free': 73.9%; RAM in Shared:  1.9%; RAM in Buffer:  1.7%; RAM in Cache: 11.5%; RAM 'Available': 81.7%. Swap used:   0.0%. µSD has 30.188% free space.
2022-05-20 13:12:57 Temp=37.0ºC. RAM 'Used': 12.9%; RAM 'Free': 73.9%; RAM in Shared:  1.9%; RAM in Buffer:  1.7%; RAM in Cache: 11.5%; RAM 'Available': 81.7%. Swap used:   0.0%. µSD has 30.188% free space.
2022-05-20 13:12:59 Temp=37.9ºC. RAM 'Used': 12.9%; RAM 'Free': 73.9%; RAM in Shared:  1.9%; RAM in Buffer:  1.7%; RAM in Cache: 11.5%; RAM 'Available': 81.8%. Swap used:   0.0%. µSD has 30.188% free space.
I'll upload the script if anyone else wants to test.
Let's see how 'muting' notifications works...
So to clean things up, I've rebooted RPi, started my script, then just running KStars - EKOS - connect - setup 100k x 2.5sec exposures, start imaging session. Nothing else is opened at startup to ensure a fair test (anydesk connection only)
Last edit: 1 month 1 week ago by Pete Simpson.
1 month 1 week ago #82973

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

  • Posts: 18
  • Thank you received: 1
Oh dear, not worked I'm afraid @Nou
*************************************************************************
**      New record of system info started at 2022-05-20, 13:22:30      **
**   Total RAM available is 3.7GB and total SWAP available is  99MB.   **
**   Total space on micro SD card (located @/dev/root) is 116.935GB    **
*************************************************************************
2022-05-20 13:22:34 Temp=38.9ºC. RAM 'Used':  8.3%; RAM 'Free': 82.5%; RAM in Shared:  1.4%; RAM in Buffer:  1.1%; RAM in Cache:  8.1%; RAM 'Available': 86.9%. Swap used:   0.0%. µSD has 51.071% free space.
2022-05-20 13:22:36 Temp=37.4ºC. RAM 'Used':  8.5%; RAM 'Free': 81.7%; RAM in Shared:  1.4%; RAM in Buffer:  1.1%; RAM in Cache:  8.6%; RAM 'Available': 86.5%. Swap used:   0.0%. µSD has 51.071% free space.
2022-05-20 13:22:38 Temp=38.4ºC. RAM 'Used':  8.8%; RAM 'Free': 81.2%; RAM in Shared:  1.4%; RAM in Buffer:  1.1%; RAM in Cache:  8.9%; RAM 'Available': 86.5%. Swap used:   0.0%. µSD has 51.071% free space.
2022-05-20 13:22:39 Temp=37.4ºC. RAM 'Used':  8.5%; RAM 'Free': 81.3%; RAM in Shared:  1.4%; RAM in Buffer:  1.1%; RAM in Cache:  9.2%; RAM 'Available': 86.8%. Swap used:   0.0%. µSD has 51.071% free space.
 
<+ 1 hour of lines cropped out>
 
2022-05-20 14:48:47 Temp=37.9ºC. RAM 'Used': 12.5%; RAM 'Free':  2.6%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.4%; RAM 'Available': 82.5%. Swap used:   4.8%. µSD has 47.266% free space.
2022-05-20 14:48:48 Temp=37.9ºC. RAM 'Used': 12.6%; RAM 'Free':  2.5%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.5%; RAM 'Available': 82.4%. Swap used:   4.8%. µSD has 47.264% free space.
2022-05-20 14:48:50 Temp=37.4ºC. RAM 'Used': 12.5%; RAM 'Free':  2.5%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.5%; RAM 'Available': 82.4%. Swap used:   4.8%. µSD has 47.264% free space.
2022-05-20 14:48:51 Temp=37.0ºC. RAM 'Used': 12.5%; RAM 'Free':  2.3%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.5%; RAM 'Available': 82.4%. Swap used:   4.8%. µSD has 47.262% free space.
2022-05-20 14:48:53 Temp=37.4ºC. RAM 'Used': 12.5%; RAM 'Free':  2.4%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.5%; RAM 'Available': 82.4%. Swap used:   4.8%. µSD has 47.262% free space.

Swap getting used too. Interestingly, the micro SD card has 30% free before the restart, and then has 50% - I've not deleted any of the simulation *.bin files. I've done a cleanup so the next report should look a little cleaner (shorter lines, so no wrapping when displaying here, or that may just be my settings)
Nigel reported seeing the buffer/cache increasing as free decreases - this also agrees.
So some way to clean out the cache on the fly" might help get around the issue (although it would obviously be better solving it). Anyone want to throw in $0.02?!
Last edit: 1 month 1 week ago by Pete Simpson.
1 month 1 week ago #82975

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

  • Posts: 18
  • Thank you received: 1
Now I'm onto something:
2022-05-20 15:17:05 Temp=38.9ºC. RAM parameters: Used: 13.2%; Free:  3.3%; Shared:  1.9%; Buffer:  1.5%; Cache: 82.1%; Available: 81.0%. Swap used:  7.5%. µSD has 46.059% free space.
2022-05-20 15:17:06 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free:  3.3%; Shared:  1.9%; Buffer:  1.5%; Cache: 82.1%; Available: 81.0%. Swap used:  7.5%. µSD has 46.059% free space.
2022-05-20 15:17:08 Temp=37.9ºC. RAM parameters: Used: 13.2%; Free:  3.2%; Shared:  1.9%; Buffer:  1.5%; Cache: 82.2%; Available: 81.0%. Swap used:  7.5%. µSD has 46.057% free space.
2022-05-20 15:17:10 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free:  9.4%; Shared:  1.9%; Buffer:  0.0%; Cache: 75.5%; Available: 81.0%. Swap used:  7.5%. µSD has 46.057% free space.
2022-05-20 15:17:11 Temp=38.9ºC. RAM parameters: Used: 13.3%; Free: 28.8%; Shared:  1.9%; Buffer:  0.0%; Cache: 55.7%; Available: 81.2%. Swap used:  7.5%. µSD has 46.055% free space.
2022-05-20 15:17:13 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 50.8%; Shared:  1.9%; Buffer:  0.0%; Cache: 33.7%; Available: 81.3%. Swap used:  7.5%. µSD has 46.055% free space.
2022-05-20 15:17:15 Temp=38.9ºC. RAM parameters: Used: 13.2%; Free: 71.8%; Shared:  1.9%; Buffer:  0.0%; Cache: 12.5%; Available: 81.5%. Swap used:  7.5%. µSD has 46.053% free space.
2022-05-20 15:17:16 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 77.7%; Shared:  1.9%; Buffer:  0.0%; Cache:  9.1%; Available: 81.6%. Swap used:  7.5%. µSD has 46.053% free space.
2022-05-20 15:17:18 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.8%. Swap used:  7.5%. µSD has 46.051% free space.
2022-05-20 15:17:20 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.8%. Swap used:  7.5%. µSD has 46.051% free space.
2022-05-20 15:17:21 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.8%. Swap used:  7.5%. µSD has 46.049% free space.
2022-05-20 15:17:23 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.8%. Swap used:  7.5%. µSD has 46.049% free space.
2022-05-20 15:17:24 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.8%. Swap used:  7.5%. µSD has 46.047% free space.
2022-05-20 15:17:26 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.8%. Swap used:  7.5%. µSD has 46.047% free space.
2022-05-20 15:17:27 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.7%. Swap used:  7.5%. µSD has 46.044% free space.
2022-05-20 15:17:29 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.7%. Swap used:  7.5%. µSD has 46.044% free space.
2022-05-20 15:17:30 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.8%. Swap used:  7.5%. µSD has 46.042% free space.
2022-05-20 15:17:32 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.8%. Swap used:  7.5%. µSD has 46.042% free space.
2022-05-20 15:17:34 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.7%. Swap used:  7.5%. µSD has 46.040% free space.
2022-05-20 15:17:35 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.6%. Swap used:  7.5%. µSD has 46.039% free space.
2022-05-20 15:17:37 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.7%. Swap used:  7.5%. µSD has 46.038% free space.
2022-05-20 15:17:39 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.6%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.8%. Swap used:  7.5%. µSD has 46.036% free space.
2022-05-20 15:17:40 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.6%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.8%. Swap used:  7.5%. µSD has 46.036% free space.
2022-05-20 15:17:42 Temp=38.9ºC. RAM parameters: Used: 13.2%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.8%. Swap used:  7.5%. µSD has 46.034% free space.
2022-05-20 15:17:44 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.7%. Swap used:  7.5%. µSD has 46.034% free space.
2022-05-20 15:17:45 Temp=38.9ºC. RAM parameters: Used: 13.3%; Free: 78.4%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.8%. Swap used:  7.5%. µSD has 46.032% free space.
2022-05-20 15:17:47 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.8%. Swap used:  7.5%. µSD has 46.032% free space.
2022-05-20 15:17:48 Temp=37.4ºC. RAM parameters: Used: 13.3%; Free: 78.4%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.4%; Available: 81.7%. Swap used:  7.5%. µSD has 46.030% free space.
2022-05-20 15:17:50 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.4%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.4%; Available: 81.7%. Swap used:  7.5%. µSD has 46.030% free space.
2022-05-20 15:17:51 Temp=39.4ºC. RAM parameters: Used: 13.2%; Free: 78.3%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.5%; Available: 81.7%. Swap used:  7.5%. µSD has 46.028% free space.
2022-05-20 15:17:53 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.3%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.5%; Available: 81.7%. Swap used:  7.5%. µSD has 46.028% free space.
2022-05-20 15:17:54 Temp=37.9ºC. RAM parameters: Used: 13.2%; Free: 78.3%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.5%; Available: 81.7%. Swap used:  7.5%. µSD has 46.026% free space.
2022-05-20 15:17:56 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.2%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.4%; Available: 81.7%. Swap used:  7.5%. µSD has 46.026% free space.
2022-05-20 15:17:58 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.8%. Swap used:  7.5%. µSD has 46.024% free space.
2022-05-20 15:17:59 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.7%. Swap used:  7.5%. µSD has 46.024% free space.
2022-05-20 15:18:01 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.8%. Swap used:  7.5%. µSD has 46.021% free space.
2022-05-20 15:18:02 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.7%. Swap used:  7.5%. µSD has 46.021% free space.
2022-05-20 15:18:04 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.7%. Swap used:  7.5%. µSD has 46.019% free space.
2022-05-20 15:18:05 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.7%. Swap used:  7.5%. µSD has 46.019% free space.
2022-05-20 15:18:07 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.8%. Swap used:  7.5%. µSD has 46.017% free space.
2022-05-20 15:18:08 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.7%. Swap used:  7.5%. µSD has 46.017% free space.
2022-05-20 15:18:10 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.8%. Swap used:  7.5%. µSD has 46.015% free space.
2022-05-20 15:18:12 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.8%. Swap used:  7.5%. µSD has 46.015% free space.
2022-05-20 15:18:13 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.7%. Swap used:  7.5%. µSD has 46.013% free space.
2022-05-20 15:18:15 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.7%. Swap used:  7.5%. µSD has 46.013% free space.
2022-05-20 15:18:16 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.7%. Swap used:  7.5%. µSD has 46.011% free space.
2022-05-20 15:18:18 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.7%. Swap used:  7.5%. µSD has 46.011% free space.
2022-05-20 15:18:19 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.7%. Swap used:  7.5%. µSD has 46.009% free space.
2022-05-20 15:18:21 Temp=37.4ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.7%. Swap used:  7.5%. µSD has 46.009% free space.
2022-05-20 15:18:22 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.6%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.7%. Swap used:  7.5%. µSD has 46.007% free space.
2022-05-20 15:18:24 Temp=37.4ºC. RAM parameters: Used: 13.1%; Free: 78.6%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.7%. Swap used:  7.5%. µSD has 46.007% free space.
2022-05-20 15:18:25 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.8%. Swap used:  7.5%. µSD has 46.005% free space.
2022-05-20 15:18:26 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.8%. Swap used:  7.5%. µSD has 46.005% free space.
2022-05-20 15:18:28 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 78.4%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.7%. Swap used:  7.5%. µSD has 46.003% free space.
Pretty obvious that I've done something major in the middle!
After multple tries with "sync" and errors, googled the error and found this site .
Pasting
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
into terminal, mass amount of cache freed up.

It's still increasing whilst watching, but I figure that if I can add this into my memory script to repeat every minute or something like that, then I should get around the issue. Again, I'm trying to get around it - can someone suggest what the issue is or how to fix long-term?
I have been also debating trying with Stellarmate OS, but could someone confirm I won't have the same issue for this OS if the issue is coming from KStars/EKOS/INDI?
Again, comments etc welcome!
1 month 1 week ago #82976

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

  • Posts: 18
  • Thank you received: 1
Aha! So written it into script and ran in terminal:
for i in `seq 1 $SECONDS`; do
	***Line here outputs the string to text file. It's long, so removing it from forum for now ***
	sleep 1
	if ! ((i % 5)) || ((i == 1)); then
		echo "$i, would execute clean script here"
		sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
	fi
done

The purpose of the echo is for debugging whilst writing, and the i==1 so that on first purge that a sudo password is required. Therefore my thinking is this: run the purge on first time output, enter the SU password which will then be remembered and redo the purge every Nth second. Set as the MODULO , obviously not to be purged eveery 5 seconds - I figure every 10min to do this. Alternatively if the cache gets above 50%, I could do it then...
1 month 1 week ago #82978
Attachments:

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

  • Posts: 18
  • Thank you received: 1
Right!
I've solved (or it appears I have solved) the issue for my setup.
All the pre-mentioned memory issues still appear to occur, but I have a solution that will "fix" the issue for me at this time.
Whilst I know the fix isn't solving the issue, I'm hoping that it makes it known that I've found an issue and able to get around the problem.
As previous, I note the usage in specific elements of RAM going up (mainly cache) when imaging with KStars/EKOS/Indi on RPi4 (4GB). It might be those with 8GB models don't see the issue as there's more resource to 'lose', but there are then later times when the software crashes with no obvious issue at the front end.
Through reading about different memory allocations, etc on Linux and my limited scripting abilities, I've written a script that outputs the memory usage every second or so for reference. This script was also updated several times and eventually finalised with one that will force a memory purge by the system, should the resources available become too little.
Prior to the memory purge, I could run the EKOS simulators and cause the software to crash, similar to the real-life imaging that I was experiencing earlier in the year (before the clocks changed and imaging conditions became a bit too short!).
I'm more familiar with Matlab coding and wrote a script that will take the text file and output the data in a numerical format to plot it and have the following after a 12hour simulation session (15k images obtained). Sure enough, one can see that the memory is purged sevaral times throughout the simulation, but I do not suffer from any crash - I ran this prior and ended up filling the 128GB µSD card with simulation images in one go, so very happy that at least I've something that will work.


Can an admin look into this for me and see is there a memory leak or something similar?
I'm prepared to try a new µSD or whatever, but there appears to be at least a few of us with similar issues.
Script file attached, hoping it comments enough to allow other/better coders to let them know my thought process.
Regards to all

File Attachment:

File Name: SampleShel...5-24.txt
File Size:5 KB
1 month 5 days ago #83085
Attachments:

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

  • Posts: 247
  • Thank you received: 29
I thought a swap size at least the size of physical memory was needed.
root@:~# free
total used free shared buff/cache available
Mem: 8024804 1759520 230596 690028 6034688 5265496
Swap: 8191996 227072 7964924
root@:~#
/Tom
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
1 month 5 days ago #83087

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

  • Posts: 817
  • Thank you received: 394
Pete,

Can you please annotate your graph: when does drop_caches run? Is it every time the yellow line moves back up? When would KStars crash if drop_caches didn't run? At the bottom of the first downward yellow line?

Also, how much swap space do you have? Is that your issue?

Thanks,
Hy

PS Off topic, but instead of µSD, you should definitely consider using an SSD with your RPi4.
AP1100 & Orion Atlas Pro, WO/ZS105 w/Moonlight V2 focus, GSO RC10 w/RSF focus
ZWO ASI1600, Astronomik Filters, ST80, QHY 5L-IIm.
KStars/Ekos/Indi on NUC10 & RPi4 w/SSD -- Ubuntu
Projects: Greedy Scheduler, Terrain, Polar Align, Analyze, Linear Focuser, SEP MultiStar & GPG Guide, FITS autostretch.
1 month 5 days ago #83089

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

  • Posts: 18
  • Thank you received: 1
Thanks Hy,
So plot is the reported stats from the linux FREE command as can be seen in the script (assuing you've looked at it as you mention "drop_caches"
I also attach here the output from the text file, which shows all the data that is plotted:

File Attachment:

File Name: Z_PTS_Log.txt
File Size:5,433 KB

Total number of lines in the file (approx 1 line per second or so) is around 30k.
So the first drop_caches occurs at line ~1930, and how I've recorded this is by outputting string "Iteration %d; Cache memory greater than 75% threshold ( 76.0%). Cleaning memory in system." (search for "iteration" in the text file and we can see 15 occurrances of this - each time we get to a drop_cache, there is a drop in the CACHE memory and rise is the FREE memory - the command in the script does what I needed.
Prior to this addition, Swap would eventually get used until no resources were left and KStars/EKOS would crash, stopping imaging session - the original topic of this discussion.
With the plot, sure enough, we see 15 'jumps' where the cache used is cleared up (cache shown by purple line) - it rises continuously, until cleared.
The yellow FREE plot (again these terms seen in the legend) are the % returned from the "free -w" command in bash) drops until a "drop_caches" when the FREE available jumps up again.

Available swap (unchanged from the OS install) noted at top of the attached file as 99MB. Again, throughout previous tests, swap was used (which from my understanding and eg searching isn't 'ideal', but not disasterous). This latest test requires 0% swap used throughout.
Unfortunately, I've not done any real editing of the graph colours - "SWAP usage" and "FREE memory" are both yellow, but the SWAP stays at 0% usage throughout (look along the Y=0% line).

The HDD is the available space on the µSD which (no surprise) drops constantly from about 82% free to 50% free as the simulation files are written at regular intervals ("exposures" of 2.5 sec)
Not sure what else to comment here - the astroberry OS is a clean install, add on Conky and Anydesk, then running KStars for many imaging sessions etc. When I became adventurous and left the rig overnight and went to bed, I'd get up and things had crashed so I've gone down this debug route.

Prior to the addition of the "drop_caches" syntax, the cache would get used up (see previous posts), I would expect the yellow line would continue to decrease, swap would rise, and things would appear to 'stabilise' here for a period, before yes, KStars would crash.
I'm going to run another test to prove this as I'd updated several times throughout this testing. Essentially it'll be the same output. I'll just comment the "drop_caches" line in the script... Watch this space then!

RE SSD - certainly not against the idea! I did look at SSD, although just at the moment, I've done 3D prints which hold all the RPi, cables, etc, on the mount, so just at this point would rather keep things tidier. But yes, I would still consider SSD! I've also considered moving from astroberry OS to stellarmate OS (stellarmate running on the RPi), and thought that the latter would be the best way to get around this issue, although having discovered the memory issue, feel I can run at least for now with my 'hack'.

Does this help?
I guess I don't want to get bogged down with terms and techy stuff, just that I think I've found an issue that causes my system to crash if not kept in check - are others seeing this? Is this a hardware issue (RPi defective? µSD causing this issue? Older DSLR with latest software? Power instability in the cold? etc!) or software (KStars clashing with Conky/Anydesk? ETC ETC?) What's the root cause is where I'm aiming!

On a last note about the plot - the USED memory (bottom red/pink plot) starts low, then jumps up as KStars/EKOS/Indi is started and the imaging session is started, then stays fairly constant throughout the process, before jumping up a bit more at the end as I start looking at the files and thinking about getting data off for analysis.
1 month 5 days ago #83095
Attachments:

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

  • Posts: 18
  • Thank you received: 1
Colours on graph changed to order in the rainbow scheme. New test still running (crash point never certain, but shows same effect - cache increases as free decreases, and eventually swap gets used.
At this point, I've no idea how long the simulation will continue, other than at some point a crash and stop of acquisition WILL occur.
Also redone the previous text file to show the plots on the same colour scheme.
Without drop_cache:


With drop_cache:
1 month 4 days ago #83113
Attachments:

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

  • Posts: 247
  • Thank you received: 29
Pete,
These are small systems and there is just a 100k swap file which is next to nothing. Just try creating a 4GB swap partition for the OS to use and see if it helps.
/Tom
Mach1, TS86SDQ, ASI071, ASI174, OAG, focusPro
1 month 4 days ago #83124

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

Moderators: Radek Kaczorek
Time to create page: 1.024 seconds