Kip icon indicating copy to clipboard operation
Kip copied to clipboard

KIP crashes from time to time

Open Techstyleuk opened this issue 1 year ago • 68 comments

I have been running KIP on a new RPi 5 running Openplotter 4 Starting (12-29-2023), up to date. Signal K is version 2.5.0, Kip is 2.7. It is running in Chromium, and connected to the Signal K demo server.

I am running it 24/7 and each time I come back to it, perhaps every 6 hrs, Kip looks like this:

image

Techstyleuk avatar Feb 25 '24 20:02 Techstyleuk

Hi,

Thanks for the report. Could you share the browser console log? That might help troubleshooting.

Also can you share a screenshot of the scream you lean it on. It could be a memory leak issue with a specific widget.

I'll see if I can find a problem.

godind avatar Feb 25 '24 21:02 godind

I think this is the console log entry associated: image

I have not changed anything yet, so KIP is as per the demo: image this is page zero and was the one I was on

Techstyleuk avatar Feb 25 '24 22:02 Techstyleuk

This warning image is just a meta key for Apple devices so you can save KIP as an App. It's needed even if Google complains about it!

I suggest leaving the console log open so you'll see what's logged if the browser runs out of memory. I'll test on my end and see if I can reproduce the problem but it could be related to your setup.

No one has reported a similar issue, yet!

godind avatar Feb 25 '24 23:02 godind

Next Time it crashes can you check in the Signalk logs if you see any errors please. I ran for several hours with memory profiling but nothing unusual so far.

godind avatar Feb 27 '24 05:02 godind

Can you also update Chromium and share the version please?

godind avatar Feb 28 '24 23:02 godind

David,

Sorry for the lack of feedback, I am currently traveling in Italy and will be back to home on Sunday

I will update you then

Jason Sent from my iPhone

On Feb 29, 2024, at 12:09 AM, David G @.***> wrote:

 ********** WARNING! MESSAGE CAME FROM OUTSIDE HUSCO **********

Can you also update Chromium and share the version please?

— Reply to this email directly, view it on GitHubhttps://github.com/mxtommy/Kip/issues/311#issuecomment-1970070664, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AS4DOE6SCFNJS6IUYQK37KDYV62LPAVCNFSM6AAAAABDZEGEX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZQGA3TANRWGQ. You are receiving this because you authored the thread.Message ID: @.***>

This e-mail and any attachments are confidential and protected by law, and any unauthorized use is strictly prohibited.

Techstyleuk avatar Feb 29 '24 05:02 Techstyleuk

Is the issue still present? If so leave KIP running with the console log open and share the latest errors.

Thanks!

godind avatar Mar 21 '24 22:03 godind

Sorry for my lack of feedback, I had a few other issues so last weekend I did a new install and I have been watching it, but not closely. I did just see it crash but did not have the console open, I am now continuing to run with the console open. I am also monitoring the memory usage, and it looks a little strange - this is all after the crash: image I was not doing anything that would cause the system to just increase memory, or to drop like that.

Techstyleuk avatar Mar 24 '24 20:03 Techstyleuk

I did reload KIP browser window when my memory was around 90%, as it wasn't responding and the Memory and CPU usage dropped dramatically: image

Techstyleuk avatar Mar 25 '24 01:03 Techstyleuk

Looks like there is a potential memory leak. I've ran KIP over night and not seen any leaks, yet!

Can you share the KIP versions of your last upgrade.

Also upgrade Chromium to the latest version.

In Chromium when it crashes, do you have other browser tabs or browser window open?

godind avatar Mar 25 '24 12:03 godind

KIP is at 2.9.0, I upgraded yesterday afternoon.

Today I came home from work and it looks like this: image Chromium has crashed but is still on the taskbar, and there is still a black window there, but no tabs or anything. I cannot get the log without restarting it. when restarted it comes up normally. I am running 4 tabs - KIP, Gmail, Signalk, Pandora Music. judging by the graph below, I'd say it crashed at about 8:00am this morning: image Chromium version is: Version 120.0.6099.102 (Official Build) Built on Debian , running on Debian 12 (64-bit).

I am monitor the memory curves for a couple of hours then kill KIP and see if the curve flattens out

Techstyleuk avatar Mar 25 '24 23:03 Techstyleuk

This will be difficult to find but with some patience and collaboration I'll fix it.

Can you upload your config file here so I can reproduce a similar layout? You will find the file named 9.json under ~/.signalk/applicationData/users/"signed in user"/kip

godind avatar Mar 25 '24 23:03 godind

my KIP layout is just the demo and using the demo server for data. I am running Openplotter 4, so Bookworm. The only Kip directory was at: ~/.signalk/node_modules/@mxtommy/kip and the only json file is packages.json

Techstyleuk avatar Mar 26 '24 00:03 Techstyleuk

Ok. So you are using local browser storage and not signed in to the server.

Running some tests on my end.

godind avatar Mar 26 '24 02:03 godind

I was signed into the server but am I signed into KIP? not sure: image I killed the KIP window just after 8pm and the memory no longer escalates, so it looks like it is definitely KIP.
image

Techstyleuk avatar Mar 26 '24 02:03 Techstyleuk

I noticed that when I went to KIP's Setting screen, the CPU usage and memory escalation stops: image I have since gone back to the earlier screen (page0) and the CPU and memory increase. I navigated to page 1 (a big dial with COGS) and the CPU drops off and the Memory flattens

Techstyleuk avatar Mar 26 '24 03:03 Techstyleuk

Nice find! So could be related to a specific widget.

Charts take up cpu and memory but should stay flat.

godind avatar Mar 26 '24 05:03 godind

I just got home and it had crashed. I had already deleted the Wind display and the historic True wind graph. After waiting to see if the memory continued to rise, I deleted the "Apparent wind speed" widget (ref: the first picture on this thread). after this was deleted, the memory stayed low, then I added back in the steering widget, and the memory continued to be flat: image Therefore it appears to be associated with the Apparent wind speed widget

Techstyleuk avatar Mar 27 '24 01:03 Techstyleuk

Great find! I'll try it myself. I've tested a few core services (everything disabled, no Datasets and only one Blank widget) that worst does not appear to leak.

I'll try with only the linear gauge widget.

godind avatar Mar 27 '24 12:03 godind

Sorry, reading again I'm not sure about one point:

In the picture, per yellow line sections, I'm not sure what widget was present or removed? You talk about Wind Steering, Data Chart (historical data) and linear gauge (Apparent Wind), right?

godind avatar Mar 27 '24 12:03 godind

I started removing stuff and the Historic data chart was removed first, then the Wind Steering dial and neither stopped the condition. I then removed the Linear Gauge (Apparent wind) and this flattened the memory usage: image after that, I started adding gauges back to make sure the issue didn't come back.

Techstyleuk avatar Mar 27 '24 13:03 Techstyleuk

Ok. So you did not add back Apparent Wind Speed widget and you did not confirm the leak comes back when it is present ?

I will test.

godind avatar Mar 27 '24 16:03 godind

I ran out of time last night, I will try that tonight.

Techstyleuk avatar Mar 27 '24 17:03 Techstyleuk

Just got home and I am not sure it is fixed. My Kip screen is frozen, and I had to reload it. The graphs looked like this: image so it looks like it crashed, perhaps, at 8am.

Techstyleuk avatar Mar 27 '24 22:03 Techstyleuk

Are you running in KIP fulll screen mode using the KIP fullscreen menu option?

godind avatar Mar 28 '24 00:03 godind

No, I run KIP in a browser window, occupying the right half of the screen, with OCPN on the left half of the screen

Techstyleuk avatar Mar 28 '24 01:03 Techstyleuk

Just checking! I made a version with a few clean up for you to test. I am still not able to put a finger right on the problem. But I still have a few leads to investigate.

Can you install a beta version on your system to test please? To install using a command shell: cd ~/.signalk npm install @mxtommy/kip@beta

Once completed, hit the Restart link in the Signal K Admin site. Once restarted, in the Signal K Admin site's Appstore / Installed menu, you should see KIP 2.9.1-beta1 listed.

Run KIP and see if it's any better.

Thank you!

godind avatar Mar 28 '24 03:03 godind

it is running the Beta version as of now, I can run it overnight and then check it. is there a quick way to reload to the default set of widgets if we want to use that?

Techstyleuk avatar Mar 28 '24 03:03 Techstyleuk

Yes. Go in Configuration / Settings, then Storage tab. At the bottom you will see a button labeled Load Demo

godind avatar Mar 28 '24 03:03 godind

OK, it is reset to demo and this is how the screen is set up: image

Techstyleuk avatar Mar 28 '24 04:03 Techstyleuk