-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Labels
Milestone
Description
Describe the bug
Use poco/Util/samples/SampleApp/SampleApp with AsyncChannel configured in the properties file, the SampleApp will hang upon app termination.
To Reproduce
- build Util/samples/SampleApp
- run the SampleApp with its original SampleApp.properties file. It prints the environment and quit.
- replace the SampleApp.properties file with the content listed below. Run the SampleApp it will hang after output the environment logs.
# # This is a sample configuration file.
# logging.loggers.root.channel.class = ConsoleChannel
# logging.loggers.app.name = Application
# logging.loggers.app.channel = c1
# logging.formatters.f1.class = PatternFormatter
# logging.formatters.f1.pattern = [%p] %t
# logging.channels.c1.class = ConsoleChannel
# logging.channels.c1.formatter = f1
############################################
# logging
############################################
logging.loggers.root.channel = topChannel
logging.loggers.root.level = debug
logging.loggers.Application.name = Application
logging.loggers.Application.level = information
logging.channels.topChannel.class = AsyncChannel
logging.channels.topChannel.channel = c1
logging.channels.topChannel.priority = normal
logging.channels.c1.class = FileChannel
logging.channels.c1.formatter = f1
logging.channels.c1.path = /tmp/PocoSampleApp.log
logging.channels.c1.times = local
logging.channels.c1.rotation = 5M
logging.channels.c1.archive = timestamp
logging.channels.c1.purgeAge = 3 months
logging.formatters.f1.class = PatternFormatter
logging.formatters.f1.pattern = %Y-%m-%d %H:%M:%S.%i %Z [%P] [%s] [%p] %t
logging.formatters.f1.times = localExpected behavior
The app should log the contents into the log file and the app should be exit normally.
Logs
In FreeBSD environment, with poco debug build, the following message is observed:
[fai@ale ~/Lab/C++/VSCode_playground/out/build/Clang19 Debug]$ LD_LIBRARY_PATH=~/Library/usr/local/lib ./PocoSampleApp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mutex lock failed: Invalid argument [in file "/home/fai/Opensource/poco/git/poco/Foundation/src/ErrorHandler.cpp", line 43]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Please add relevant environment information:
- macOS Tahoe 26.3, Homebrew, Poco 1.15.0
- FreeBSD 14.3-RELEASE amd64, Poco 1.15.0 clone from git.
Reactions are currently unavailable