An update has now been committed which resolves most of the currently reported issues and significantly improves the ability of Ultibo applications to handle sustained transactions via HTTP or other protocols.
This update contains the following fixes:
- Change the thread termination process to use a timer instead of being called from SchedulerReschedule() in order to prevent a deadlock scenario with the heap manager.
- Make the termination of threads release the stack almost immediately (100ms by default) in order to improve memory utilization and allow greater transaction volumes without running out of memory, the timeout can be adjusted by the SCHEDULER_TERMINATION_INITIAL variable in GlobalConfig.
- Increase the default starting value of the PAGE_TABLES_FREE variable which is used to determine the number of second level page tables to be allocated during startup, the new default of 1024 allows the entire physical memory to be mapped into second level pages.
- Fix the QueueDequeue() function in the Threads unit which was failing to update the delta value of the following key, this could result in incorrect delays being calculated when dequeing multiple threads.
- Add error logging to indicate if the ThreadAllocateStack() function failed to allocate a stack which would in turn cause a failure to create a new thread.
For details of how to apply the latest source to your Ultibo core installation and rebuild your run time library see the wiki page Building from Source or watch the Building the RTL video on YouTube.