Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:40 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : WebMite stability

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 09:17am 01 Oct 2023
Copy link to clipboard 
Print this post

The stability of the WebMite code is a continuing concern. Your reports of issues are of course welcome but make little sense in terms of the code itself. For example RC4 may be reported as more or less stable than RC3 when from my perspective the web code hasn't changed at all. The only difference is a re-compile or the addition of totally unrelated code.

The PicoW sdk makes extensive use of the C heap (malloc/free) whereas MMBasic has its own heap mechanism written by Geoff which is simple and completely robust. It also has the advantage that it is initialised each time a program is run so any memory leaks will never have an effect outside of the run of the single current program and are therefore easy to diagnose and fix.

In order to support TLS on the Webmite I have had to allocate 36Kbytes of our precious RAM to the heap and yet (as evidenced by a recent user post) even that can be exceeded. Moreover, every Web activity in the sdk also uses the C heap and there is no way to clean that up other than a reboot so any ongoing fragmentation of the heap may eventually lead to a crash.

In order to simplify things going forward I propose to remove TLS functionality. This was always of limited use as many sites require SSL over TLS (not practical to implement give the resource requirements) or use an unsupported TLS coding.

This will free up a lot of RAM some of which I can return to MMbasic use as well as ensuring the C heap is plenty big enough for the less demanding web requirements.

My suspicion is that many of the faults seen may be a result of the huge amount of detritus that floats around on our networks that the pico code either cannot handle or that cause resource usage that exceeds availability. Browsers can also be too clever, preemptively making requests before an actual user transaction. Historically, I've tested with Edge, Chrome and Firefox and they all do different things in terms of timing and requests made - not helpful

Thoughts and comments on removing TLS and anything else welcome
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 10:40am 01 Oct 2023
Copy link to clipboard 
Print this post

I very much agree with removing TLS.  I have tried using it and the problem is that most websites also want SSL... so, no go.

The basic functionality of the WebMite is fantastic and I cannot see the benefits of hindering it with something with limited functionality.  This is a microcontroller and you cannot have everything.

BTW commiserations with being forced to use malloc() - it is fine for big systems with lots of RAM, not so good for small microcontrollers.

Geoff
Geoff Graham - http://geoffg.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 11:02am 01 Oct 2023
Copy link to clipboard 
Print this post

I agree with making things simpler by removing TLS.

I keep trying different ideas to try and track down the issues but when things can run perfectly for 3 days then a couple of lockups it is slow work.

My latest effort is to shift the test system into my inner lan which is a lot quieter and uses a different router/accesses point.

Thanks for all the effort which must take you away from more interesting challenges.

Jim
VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9122
Posted: 03:31pm 01 Oct 2023
Copy link to clipboard 
Print this post

Here is a version with TLS CLIENT functionality removed and the memory re-allocated. Loading it will kill your A: drive as well as resetting all options. Please give it a go and let me know if you see any issues. I've had it running Geoff's watering controller for a few hours now with no issues. The one area that has changed is MQTT as it allowed port 8883 and TLS and now doesn't so that will need properly testing which I haven't had time to do thus far.


PicoMiteWeb.zip
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 02:33am 02 Oct 2023
Copy link to clipboard 
Print this post

I have two systems running in parallel with the same BASIC program.  One is B10 which seems to fall over roughly every two days while the other (RC4) has been running fine for a week.  So you seem to be on track to fix the issue.

I will leave these untouched for another week just to evaluate the RC4 version.

Geoff
Geoff Graham - http://geoffg.net
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 292
Posted: 01:28pm 02 Oct 2023
Copy link to clipboard 
Print this post

Well, my experience with TLS was not great and I fell back to using a non-Tls API again, so losing it makes sense to me.

I personally can't justify the "pain" of using TLS in a home network and if there remain to be non-TLS APIs, all is well in my world.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 02:58pm 02 Oct 2023
Copy link to clipboard 
Print this post

I see Microsoft are due to discontinue TLS 1.0 and 1.1 in Windows before long. Perhaps there's something they aren't telling people?  :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 172
Posted: 04:17pm 03 Oct 2023
Copy link to clipboard 
Print this post

Peter,

thanks for your efforts to track down the WebMite stability issues.
I uploaded your TLS-free firmware and will test it in the coming days. I am using MQTT and so far, my application has not complained ... I report back.

Best
Thomas
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024