Releases: GregUtas/robust-services-core
20220920a
- Make the configuration file an optional command line parameter (
c=
<path>). - Change the
Module
constructor so that an optional module can define a symbol that allows it to be enabled. - Define an
OptionalModules
configuration parameter (a string) that specifies the optional modules to enable. - Enable optional modules at the bottom of
NbModule::Startup
. - Change
CreateModules
in main.cpp and rscapp.cpp to use the optional modules capability.
Warning
A module that is not required by another one must define a symbol when it invokes the base
Module
constructor, and that symbol must appear in theOptionalModules
parameter in the configuration file. Each module must also override theEnable
function to enable the modules that it requires, plus itself (Module::Enable
). Instantiating a module is no longer sufficient to make its capabilities available; it must also be enabled for itsStartup
function to be invoked during initialization and restarts. See the comments in Module.h.
- Convert each
fn_name
function in a template header to aninline fn_name
(a C++17 capability). - Enhance the static analysis tool to support
inline
data. - Change how Diplomacy bot events and reconnect attempts are implemented.
- Rename
RscLauncher
toLauncher
.
20220726a
CodeTools
- Add a
WarningAttrs.disabled_
bool so that all occurrences of a warning can be disabled. - Don't automatically replace tabs with spaces after editing a file.
- Remove line counts from the file produced by
>check
and add a>linecounts
command to export them.
20220721a
NodeBase
- Create src/exe directory for launching executables.
- Move
RecoveryThread
to its own files.
CodeTools
- Checks removed from
Editor
and made before loggingFunctionCouldBeFree
were forgotten forDataCouldBeFree
. - Fix bugs when deleting C++ items.
- Automatically preserve warnings generated during compilation if
>check
is re-executed.
Other
- Update documents and add an installation guide.
20220714a
NodeBase
- Fix bug: exit the program instead of getting into an infinite restart loop if a trap occurs during initialization.
- Remove Lock.h:
Mutex
is almost as efficient and much better for robustness and debugging. - Reduce object pool alarm thresholds to less than 1/16th, 1/32nd, and 1/64th of the pool's blocks being available.
- Fix bug:
SlabPriv::Validate
should only validate the block ataddr
, instead of the entire heap, whenaddr != nullptr
. - Increase the restart timeout to 20 seconds.
- Change element.config so that each object pool starts at the default size of 1K blocks.
CodeTools
- Add a warning for a trailing comment that is not vertically aligned with one above it.
- Add a warning for an
auto
variable that should be taggedconst
. - Don't log
FunctionCouldBeFree
when checks inEditor
prevented>fix
from actually changing the function. - Fix bug: when a class has a function with the same name as one made
static
in a .cpp, the class must qualify thestatic
function with its namespace to invoke it. - Fix bug: an item changed to
static
in a .cpp was relocated to within a class definition.
20220702a
NodeBase
- Create a src/app directory as an alternative to modifying main.cpp when building an application with RSC.
- Move some main.cpp code to
Log
andMainArgs
to share code with rscapp.cpp. - Look for the input and help directories in the directory immediately above the src directory on the path to the executable.
- Use
EXIT_SUCCESS
andEXIT_FAILURE
for exit codes.
CodeTools
- Add an option to
>export
to dump all code comments to a file. - Use the new
>export
option to extract comments, and then use MS Word to find and fix typos. - Don't log "could be const" on data or an argument whose type has two pointers/arrays or more.
20220629a
NodeBase
- Implement
SIGWRITE
on Linux. - Change
Thread.Interrupt
to require a reason for the interrupt. - Count the number of times a
Mutex
causes blocking. - Fix bug: spurious wakeups occur in
Gate.WaitFor
. - Fix bug: divide by zero safety net test fails on clang.
- Fix bug: flood of stack trace requests during restarts causes heap corruption.
CodeTools
- Support elaborated type specifiers.
- Check that a subsequent invocation of
>parse
is specifying the same target.
20220619a
NodeBase
- Support logging early during booting, before the log system has initialized.
- If initialization is being traced, stop tracing soon after the system has booted.
CodeTools
- Don't import the launcher directory in the script lib.create:
RscLauncher
also has amain()
, which causes spurious warnings about removing#includes
fromrsc/main.cpp
. - Log a warning when an
auto
variable could be inadvertently copying an object, which would be avoided by declaring it asauto&
. - Fix some warnings where an
auto
variable was copying an object. - Fix bug: when
>fix
adds a special member function to a template,FindTemplateAnalog
causes an "invalid vector subscript" exception because template instances don't have that member.
Other
- Get
RscLauncher
working on Linux. This uncovered a VS2022 bug: hitting the enter key in the Linux Console Window, without any other input, does not causestd::getline
to return with an empty string. A space must be entered first. - Fix some gcc and clang compiler warnings.
20220613a
- Add a document that provides the status of trap recovery tests.
- Rename
SysFile
→FileSystem
,SysLock
→Lock
, andSysMutex
→Mutex
. - Track whether a conflict has occurred on a
Mutex
. - Implement
SysThread::SetPriorityAllowed
to indicate whether scheduler priorities can be changed. If they can't, increase the timeslice for a locked thread if a preemptable thread is also running. - Add the virtual function
Base::Summarize
for displaying items in a tabular format. - Modify the following CLI commands and the classes that they display to support
Summarize
:NbIncrement
:>alarms list
>buffers
>daemons list
>deferred
>heaps list
>modules
>mutexes
>pools
>psignals
>threads
>tools
NwIncrement
:>ipports
>ipservices
SbIncrement
:>contexts
>events
>factories
>handlers
>initiators
>invpools
>messages
>msgports
>parameters
>protocols
>psms
>services
>signals
>ssms
>states
>timers
>triggers
20220607a
The focus was on testing the Linux target, which now seems stable.
NodeBase
- Implement
SysFile.GetLine
for erasing the\r
from endlines in files created on Windows but read on Linux. - Rename
SysThreadStack
toSysStackTrace
. - Implement
SysStackTrace.Demangle
targets for Linux and Windows. - Implement
SysThread.Pause
so a thread can sleep while waiting for itsThread
to finish construction. - Implement
InitThread.RunningTicks
as a rough monotonic clock that doesn't advance during restarts and breakpoints. - Exit a thread if it has run for ~1 second and its
Thread
still isn't finished construction. - Implement
SlabHeap.Validate
. - If
RootThread
will not initiate a restart on a scheduling timeout, limit it to one log every 3 seconds. - Fix bug: create
ThreadRegistry
beforeRootThread
and add some missing mutexes when accessing itsthreads_
member. - Fix bug: if the platform quickly reused a native thread identifier, the new thread with that identifier failed to start because its identifier was still registered as deleted in
ThreadRegistry.threads_
. - Fix bug: don't invoke
Destroy
on aThread
that is markeddeleting_
.
NetworkBase
- Deleting a socket does not unblock
recvfrom
on Linux, so have aUdpIoThread
send itself a message to unblock when it wants to exit during a restart.
CodeTools
- Remove the
SourcePath
directory from the file paths in>check
output and change\
separators to/
: this eliminates noise in diffs when a>check
obtained on Windows is compared with one obtained on Linux. - Fix bug: when a name refers to a function, its interim referent wasn't updated after argument matching selected the correct function.
- Fix bug: when setting an interim referent, prefer a non-static function to a static one: this adds an implicit
this
argument to the function call, which is needed to match with a non-static function, but which is ignored when matching with a static function.
Known deficiencies
-
The following recovery tests fail on Linux:
- invoking
std::terminate
(currently a problem in Windows release builds as well) - trapping while handling an exception
- trapping in a destructor
- Ctrl-C to interrupt a thread
The first three are because of the gcc compiler. The last one appears to be because WSL doesn't pass a Ctrl-C to the Linux console.
- invoking
-
There are minor differences between
>check
and>export
results obtained on Windows as opposed to Linux. -
RscLauncher
still hasn't been tested on Linux.
20220601a
NodeBase
- Implement Linux target for
RscLauncher
. Closes #20. - Fix bug:
>restart reboot
and>restart exit
failed becauseexit()
invokes destructors, which eventually caused problems whenDebug::ft
was invoked.
CodeTools
- Fix bug: the keyword
virtual
should always be removed on an override. - Fix bug: the
override
tag could only be added after thevirtual
keyword was present so that it could be deleted. - Fix bug: warnings about
virtual
andoverride
are detected during the compilation phase and were not preserved when the file was checked.
Known deficiencies
- Linux targets have not yet been tested.
- Windows bug that causes a stack overflow when trying to recover from
std::terminate
in a release build has been reported.