Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
907c1f9
Removing Windows compatibility for signal handling; Adapting to use o…
nsoblath Dec 8, 2025
9f6ce0f
Swap the sigwait version of signal handling for a custom signal-watch…
nsoblath Dec 11, 2025
b6b0119
Removed the local versions of loggers to see if it avoids the logging…
nsoblath Dec 11, 2025
57c0d01
Removed deprecated actions runner
nsoblath Dec 11, 2025
0f708ff
Bumped version
nsoblath Dec 11, 2025
73179e1
Missing include
nsoblath Dec 11, 2025
89f6e8c
[no ci] Added missing space
nsoblath Dec 11, 2025
3f42a01
Preparing for logger debugging
nsoblath Dec 12, 2025
a96bddb
Adding debug printing
nsoblath Dec 12, 2025
bc1472a
Switch to using a tag for the spdlog dependency
nsoblath Dec 13, 2025
dd727ec
Revert "Adding debug printing"
nsoblath Dec 13, 2025
4ceecb3
Revert "Preparing for logger debugging"
nsoblath Dec 13, 2025
79a32f7
Removing macos-26 GHA runner as it's in beta and was failing mysterio…
nsoblath Dec 15, 2025
08b7a9c
[no ci] Updated changelog
nsoblath Dec 15, 2025
0a58704
Adding thread management and an easier API for the waiting thread
nsoblath Dec 15, 2025
5a13e57
Cherry picking some updates from hf3.13.5
nsoblath Dec 15, 2025
8a74cb4
Python-bind the waiting_thread functions
nsoblath Dec 15, 2025
0bf29be
Python-bind the waiting_thread functions
nsoblath Dec 15, 2025
c01770f
Adding more debug tracing
nsoblath Dec 19, 2025
b84f497
Fixing counter for debug tracing
nsoblath Dec 19, 2025
bb54d99
Fixing the fix in my last commit
nsoblath Dec 19, 2025
eea7745
:facepalm:
nsoblath Dec 19, 2025
224364d
Don't create a thread pool if one exists already
nsoblath Dec 22, 2025
77f1fc1
Cleaning up debugging output
nsoblath Dec 22, 2025
1bba1cc
Merge branch 'hotfix/3.13.5' into hotfix/logging
nsoblath Dec 22, 2025
e924d49
Merge pull request #136 from project8/hotfix/logging
nsoblath Dec 22, 2025
75fbe75
[no ci] Updating the changelog
nsoblath Dec 22, 2025
2dfdb00
Switch SIGTERM to a RETURN_SUCCESS response
nsoblath Dec 22, 2025
19c3c1d
Fix is_error for SIGTERM
nsoblath Dec 22, 2025
845f954
Added default running of the waiting thread in signal_handler
nsoblath Dec 22, 2025
713f0d6
Modified add_cancelable pybind signature
nsoblath Dec 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04, macos-15, macos-14, macos-13]
os: [ubuntu-24.04, ubuntu-22.04, macos-15-intel, macos-15, macos-14]

steps:

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ set( SPDLOG_BUILD_SHARED TRUE )
set( SPDLOG_INSTALL TRUE )
FetchContent_Declare( spdlog
GIT_REPOSITORY https://github.com/project8/spdlog.git
GIT_TAG v1.x_p8
GIT_TAG v1.x_p8_r1
)
FetchContent_MakeAvailable( spdlog )
# if Scarab is being built as a submodule, the parent might need to know where to find spdlog
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3 13 4
3 13 5
16 changes: 16 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ Types of changes: Added, Changed, Deprecated, Removed, Fixed, Security

## [Unreleased]

## [3.13.5] - 2025-12-22

### Changed

- Signal handling now requires a dedicated thread
- Updated GHA runners
- Removed local loggers

### Fixed

- Tied spdlog to a tag and not a branch
- Updated spdlog fork from upstream
- signal_handler signal handling functions use only approved function calls
- Check if spdlog thread pool exists before making a new one


## [3.13.4] - 2025-11-04

### Fixed
Expand Down
9 changes: 7 additions & 2 deletions library/logger/logger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ namespace scarab
spd_initializer( a_pattern ),
f_sink()
{
spdlog::init_thread_pool(8192, 1);
// We check before creating the new thread pool because we've had problems in some situations (e.g. when started from Python)
// with a new thread pool being created and the old one being killed, resulting in strange errors during execution
if( ! spdlog::thread_pool() )
{
spdlog::init_thread_pool(8192, 1);
}
f_sink = std::make_shared< spdlog::sinks::stdout_color_sink_mt >();
f_sink->set_pattern( f_pattern );
auto at_exit_fcn = [](){ logger::stop_using_spd_async(); };
Expand Down Expand Up @@ -201,7 +206,7 @@ namespace scarab
void logger::reset_using_spd_async()
{
#ifdef SCARAB_LOGGER_DEBUG
std::cerr << "Resetting use of spd async" << std::endl;
std::cerr << "[logger::reset_using_spd_async()] Resetting use of spd async" << std::endl;
#endif
logger::using_spd_async().store(true);
std::set< logger* >& t_all_loggers = logger::all_loggers();
Expand Down
10 changes: 5 additions & 5 deletions library/logger/logger.hh
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ namespace scarab
f_initializer_ptr( nullptr )
{
#ifdef SCARAB_LOGGER_DEBUG
std::cout << "Logger <" << a_name << "> was initialized from <" << a_file << ":" << a_line << ">; type: " << ::scarab::type( *this ) << std::endl;
std::cerr << "[logger_type constructor] Logger <" << a_name << "> was initialized from <" << a_file << ":" << a_line << ">; type: " << ::scarab::type( *this ) << std::endl;
#endif
// Start the backend, but only once
static initializer_x s_init;
Expand Down Expand Up @@ -223,13 +223,13 @@ namespace scarab

/// Creates a local scarab::logger object with variable name a_logger
/// Uses spdlog's asynchronous logger; spdlog logger name will be a_name.
#define LOCAL_LOGGER( a_logger, a_name ) \
::scarab::logger_type< ::scarab::spd_initializer_async_stdout_color_mt > a_logger( a_name, __FILE_NAME__, __LINE__ );
//#define LOCAL_LOGGER( a_logger, a_name ) \
// ::scarab::logger_type< ::scarab::spd_initializer_async_stdout_color_mt > a_logger( a_name, __FILE_NAME__, __LINE__ );

/// Creates a local single-threaded (non-asynchronous) scarab::logger object with variable name a_logger
/// Uses spdlog's basic logger; spdlog logger name will be a_name.
#define LOCAL_LOGGER_ST( a_logger, a_name ) \
::scarab::logger_type< ::scarab::spd_initializer_stdout_color > a_logger( a_name, __FILE_NAME__, __LINE__ );
//#define LOCAL_LOGGER_ST( a_logger, a_name ) \
// ::scarab::logger_type< ::scarab::spd_initializer_stdout_color > a_logger( a_name, __FILE_NAME__, __LINE__ );

// Logging functions
#ifdef NDEBUG
Expand Down
8 changes: 4 additions & 4 deletions library/utility/indexed_factory.hh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ namespace scarab
void indexed_factory< XIndexType, XBaseType, XArgs... >::register_class( const XIndexType& a_index, const base_registrar< XBaseType, XArgs... >* a_registrar )
{
// A local (non-static) logger is created inside this function to avoid static initialization order problems
LOCAL_LOGGER( slog_ind_factory_reg, "indexed_factory_register");
LOGGER( slog_ind_factory_reg, "indexed_factory_register");

std::unique_lock< std::mutex > t_lock( this->f_factory_mutex );
FactoryCIt it = fMap->find(a_index);
Expand All @@ -235,7 +235,7 @@ namespace scarab
void indexed_factory< XIndexType, XBaseType, XArgs... >::remove_class(const XIndexType& a_index )
{
// A local (non-static) logger is created inside this function to avoid static destruction problems
LOCAL_LOGGER( slog_ind_factory_rem, "indexed_factory_remove");
LOGGER( slog_ind_factory_rem, "indexed_factory_remove");
LTRACE( slog_ind_factory_rem, "Removing indexed_factory for class " << a_index << " from " << this );
/*
#ifndef NDEBUG
Expand Down Expand Up @@ -353,7 +353,7 @@ namespace scarab
void indexed_factory< XIndexType, XBaseType, void >::register_class( const XIndexType& a_index, const base_registrar< XBaseType >* a_registrar )
{
// A local (non-static) logger is created inside this function to avoid static initialization order problems
LOCAL_LOGGER( slog_ind_factory_reg, "indexed_factory_register");
LOGGER( slog_ind_factory_reg, "indexed_factory_register");

std::unique_lock< std::mutex > t_lock( this->f_factory_mutex );
FactoryCIt it = fMap->find(a_index);
Expand All @@ -377,7 +377,7 @@ namespace scarab
void indexed_factory< XIndexType, XBaseType, void >::remove_class(const XIndexType& a_index )
{
// A local (non-static) logger is created inside this function to avoid static destruction problems
LOCAL_LOGGER( slog_ind_factory_rem, "indexed_factory_remove");
LOGGER( slog_ind_factory_rem, "indexed_factory_remove");
LTRACE( slog_ind_factory_rem, "Removing indexed_factory for class " << a_index << " from " << this );
//#ifndef NDEBUG
// if( ELevel::eTrace >= f_global_threshold )
Expand Down
Loading
Loading