Julian Brost
01d8c768a0
Test code for feature/improve-crashlog branch
2020-10-28 11:33:15 +01:00
Julian Brost
16c6a5a652
Add comments to stack trace formatter and test case
2020-10-28 11:33:15 +01:00
Julian Brost
b4b3ecd65b
Compile with -D_GNU_SOURCE
...
Needed by `boost::stacktrace` for `_Unwind_Backtrace()`.
2020-10-28 11:33:15 +01:00
Julian Brost
6fefa3e61a
CMakeLists: use HAVE_LIBEXECINFO only after actually checking for it
...
So far, the check that actually sets HAVE_LIBEXECINFO was executed after
it was already used to add dependencies.
2020-10-27 17:30:08 +01:00
Julian Brost
d340da1c63
Add a test case for the stack trace formatter
2020-10-27 17:27:59 +01:00
Julian Brost
7fac6cae82
Use backtrace_symbols() when printing stack traces on FreeBSD
...
Unfortunately, the symbol resolution of boost::stacktrace is broken on
FreeBSD, therefore fall back to using backtrace_symbols() to print the
stack trace saved by Boost.
Additionally, -D_GNU_SOURCE is required on FreeBSD for the
_Unwind_Backtrace function used by boost::stacktrace.
2020-10-27 14:56:08 +01:00
Julian Brost
6eb1c8c9c2
Crash handlers: use more compact string representation
2020-10-27 14:56:08 +01:00
Julian Brost
e0a253a599
Begin crash log for SIGABRT with error message and timestamp
...
This makes the format more similar to what the uncaught C++ and SEH
exception handlers write. Previously there was no indication in the
crash log that a SIGABRT happened.
2020-10-27 14:56:08 +01:00
Julian Brost
cc5a70d40e
Windows: require at least MSVC 19.20 to build
...
Older versions of MSVC fail to rethrow an unhandled C++ exception (using
`throw;`) in the termination handler (`std::set_terminate`), however
Icinga relies on this behavior in its crash handler
(`Application::ExceptionHandler`).
2020-10-27 14:56:08 +01:00
Julian Brost
7637f5bc0f
docs: mention use of boost::stacktrace
2020-10-27 14:56:08 +01:00
Julian Brost
f9227e03a5
Add some comments to __cxa_throw
...
Maybe this will save the next person who has to look at this code some
time. Please don't blame me for the implementation, I'm just trying to
reconstruct what it does.
2020-10-27 14:56:08 +01:00
Julian Brost
3001aef715
Restructure stack and context trace selection in DiagnosticInformation and document behavior
...
The logic for selecting the traces to print stays the same, but there
are fewer nested ifs now. This changes the format of the returned string
a bit by adding a heading for both traces.
2020-10-27 14:56:08 +01:00
Julian Brost
0d57b0e470
Add documentation for cast_exception function
2020-10-27 14:56:08 +01:00
Julian Brost
5096ba643f
Pass fallback stacktrace to DiagnosticInformation in terminate handler
...
By default, DiagnosticInformation uses the stack trace saved when the
exception was thrown, but this mechanism is not in use on Windows.
Gathering a stacktrace in the terminate handler serves as a fallback.
2020-10-27 14:56:08 +01:00
Julian Brost
125fa9e955
Replace icinga::StackTrace with boost::stacktrace::stacktrace
...
Provides roughly the same functionality but works better on certain
platforms (especially Windows) and is less code to maintain.
2020-10-27 14:56:08 +01:00
Julian Brost
47726d6bc6
Print details in uncaught SEH exception handler
2020-10-27 14:56:08 +01:00
Julian Brost
2b4f0b4a62
Move error message and time to the beginning of the SEH crash log
...
This is more similar to the normal exception crashlog which also states
the problem and time at the beginning of the file.
2020-10-27 14:56:08 +01:00
Julian Brost
9a725dae77
Use boost::stacktrace instead of custom implementation in Windows SEH filter
2020-10-27 14:56:08 +01:00
Julian Brost
c258462a38
Run termination handler for uncaught C++ exceptions on Windows
...
On Windows, the termination handler is executed for uncaught C++
exceptions unless a SEH unhandled exception filter is also set. In this
case, this filter has to explicitly chain the default filter to keep
this behavior.
2020-10-27 14:56:08 +01:00
Alexander Aleksandrovič Klimov
0540fc25e2
Merge pull request #8394 from Icinga/docs/release-branch-workflow
...
RELEASE.md: update branch workflow for packaging repos
2020-10-23 10:34:48 +02:00
Julian Brost
ef2da99104
RELEASE.md: update branch workflow for packaging repos
2020-10-22 15:38:54 +02:00
Alexander Aleksandrovič Klimov
ff5385bbb5
Merge pull request #8393 from Icinga/docs/remove-vs2017
...
docs: remove references to Visual Studio 2017
2020-10-21 16:10:04 +02:00
Julian Brost
f3b72351a4
docs: remove references to Visual Studio 2017
...
PR #8390 changed the default version of Visual Studio to 2019 because
PR #8373 introduces behavior that is incompatible with MSVC versions
shipped with older versions of Visual Studio.
2020-10-21 15:59:13 +02:00
Alexander Aleksandrovič Klimov
327377a7c2
Merge pull request #8390 from Icinga/feature/vs2019-jbrost
...
Prepare Windows build scripts for builds with Visual Studio 2019
2020-10-21 12:09:09 +02:00
Julian Brost
025d38bb76
Update AppVeyor Config to use Visual Studio 2019
2020-10-21 11:14:34 +02:00
Julian Brost
4ede8e484b
Update Windows build scripts for Visual Studio 2019
...
$env:CMAKE_GENERATOR_PLATFORM is only used in configure-dev.ps1 but now
is also required in configure.ps1 to allow the build pipeline to be
upgraded to Visual Studio 2019.
Additionally bump the versions in paths for Boost and OpenSSL.
2020-10-21 11:14:22 +02:00
Noah Hilverling
87705a5811
Merge pull request #8388 from Icinga/bugfix/remove-utility-getenv
...
Remove Utility::GetEnv from header
2020-10-21 09:43:52 +02:00
Julian Brost
c30d8ff373
Remove Utility::GetEnv from header
...
It is never used and not even implemented anywhere, probably a leftover.
2020-10-20 12:19:15 +02:00
Alexander Aleksandrovič Klimov
a32c1bf910
Merge pull request #7864 from Icinga/bugfix/icinga2-doesn-t-close-connections-7203
...
Add timeout for boost::asio::ssl::stream#async_shutdown()
2020-10-19 15:25:12 +02:00
Alexander Aleksandrovič Klimov
f60ae93717
Merge pull request #7870 from Icinga/bugfix/last-zone-sync-stage-validation-failed-7642
...
Clear ApiListener#last_failed_zones_stage_validation on config::Update if config not changed
2020-10-19 12:31:01 +02:00
Alexander Aleksandrovič Klimov
4926353269
Merge pull request #8277 from Icinga/bugfix/latency-8196
...
Call Process::InitializeSpawnHelper() ASAP
2020-10-16 16:49:06 +02:00
Alexander Aleksandrovič Klimov
b98c590d9f
Merge pull request #8331 from Icinga/bugfix/program-status-not-inserted-2.13
...
IDO: Make sure to insert program status
2020-10-16 14:02:21 +02:00
Noah Hilverling
03af068302
IDO: Make sure to insert program status during reconnect()
2020-10-16 12:30:57 +02:00
Alexander Aleksandrovič Klimov
9dd197d0af
Merge pull request #8165 from Icinga/bugfix/service-get-severity-deadlock-8160
...
ProcessCheckResult(): Make sure hosts aren't locked during Service::GetSeverity()
2020-10-16 10:41:23 +02:00
Alexander Aleksandrovič Klimov
be8dd201eb
Merge pull request #8229 from Icinga/bugfix/downtime-checkable-getname
...
Check !!downtime->GetCheckable() before downtime->GetCheckable()->GetName()
2020-10-16 10:39:57 +02:00
Alexander Aleksandrovič Klimov
d6a4db935f
Merge pull request #8374 from Icinga/bugfix/docker-memory-leak
...
icinga2 daemon: reap remaining child processes after reload
2020-10-16 10:33:49 +02:00
Alexander Aleksandrovič Klimov
9969090976
Merge pull request #8380 from Icinga/bugfix/ido-do-not-log-if-paused-2.13
...
IDO: Do not log stats, if paused
2020-10-16 10:33:16 +02:00
Noah Hilverling
8db82ff87d
IDO: Do not log stats, if paused
2020-10-15 10:48:41 +02:00
Alexander Aleksandrovič Klimov
1f55338cbd
Merge pull request #8166 from Icinga/bugfix/logrotate-crash-8050
...
Ensure the daemon doesn't get killed by logrotate
2020-10-15 10:39:47 +02:00
Alexander Aleksandrovič Klimov
a54bd52d5c
Merge pull request #8371 from Icinga/bugfix/7567
...
Revert "MacroProcessor::ResolveArguments(): skip null argument values"
2020-10-15 10:39:12 +02:00
Alexander A. Klimov
91265a5b0e
icinga2 daemon: reap remaining child processes after reload
...
... as we may be PID 1.
2020-10-15 10:25:14 +02:00
Alexander Aleksandrovič Klimov
72c67fc065
Merge pull request #8370 from Icinga/bugfix/reload-hang-8173
...
Application#RunEventLoop(): don't wait for the thread pool to stop on shutdown
2020-10-14 18:11:23 +02:00
Alexander Aleksandrovič Klimov
79210a5542
Merge pull request #8367 from Icinga/bugfix/ido-hash-groups
...
*DbObject#CalculateConfigHash(): sort groups to be hashed
2020-10-14 16:23:24 +02:00
Alexander Aleksandrovič Klimov
4bb6f4c910
Merge pull request #8364 from Icinga/bugfix/configsyncstagelock-unlock-owner-213
...
Make ApiListener::m_ConfigSyncStageLock a SpinLock
2020-10-14 16:01:00 +02:00
Alexander Aleksandrovič Klimov
e8316952f8
Merge pull request #8363 from Icinga/bugfix/ido-commit-25000-213
...
IDO MySQL: actually COMMIT after 25000 async queries
2020-10-14 16:00:39 +02:00
Alexander A. Klimov
d3f6a97a7e
Ensure the daemon doesn't get killed by logrotate
...
refs #8050
2020-10-14 14:02:44 +02:00
Alexander Aleksandrovič Klimov
11b0972d33
Merge pull request #8372 from Icinga/probot/update-authors/master/a120a45fbfe6dc7a60d0926373cc81179028481b
...
Update AUTHORS
2020-10-14 13:42:21 +02:00
icinga-probot[bot]
88dc5fea98
Update AUTHORS
2020-10-14 11:40:19 +00:00
Alexander Aleksandrovič Klimov
a120a45fbf
Merge pull request #8369 from Icinga/bugfix/-mailmap
...
Update .mailmap
2020-10-14 13:40:10 +02:00
Alexander A. Klimov
fbfa931b31
Clear ApiListener#last_failed_zones_stage_validation on config::Update if config not changed
...
refs #7642
2020-10-14 12:17:14 +02:00