icinga2/lib/perfdata
Johannes Schmidt 1b568ac50e Fix PerfdataWriterConnection segfaults on non-X86 architectures
The issue is that std::promise internally also used thread local
storage, in a call to `std::call_once` in `std::promise::set_value()`.
The theory is that since all paths in `Send()` run this `std::call_once`
routine and from then on, then Coroutine function looks like a normal
function, the compiler inlined `set_value()` and moved the common parts
of it to a common location for all paths before the suspension point in
WriteMessage(yc).

When finally the coroutine is resumes, it is likely that that happens
under a different thread, which still has `__once_callable` in
`std::call_once` set as `nullptr`, leading to the segmentation fault.

The fix is to not use std::promise across coroutine suspension points
and instead reimplement the functionality we required from it in a small
helper class `SyncResult` that does not require any thread local storag.
2026-04-29 13:29:36 +02:00
..
CMakeLists.txt Add OTLPMetricsWriter 2026-04-01 12:18:21 +02:00
elasticsearchwriter.cpp Add warnings to deprecated features indicating removal in v2.18 2026-03-27 14:20:55 +01:00
elasticsearchwriter.hpp Add warnings to deprecated features indicating removal in v2.18 2026-03-27 14:20:55 +01:00
elasticsearchwriter.ti Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
gelfwriter.cpp Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
gelfwriter.hpp Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
gelfwriter.ti Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
graphitewriter.cpp Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
graphitewriter.hpp Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
graphitewriter.ti Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
influxdb2writer.cpp Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
influxdb2writer.hpp Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
influxdb2writer.ti Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
influxdbcommonwriter.cpp Merge pull request #10668 from Icinga/perfdata-writers-connection-handling 2026-03-17 15:10:57 +01:00
influxdbcommonwriter.hpp Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
influxdbcommonwriter.ti Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
influxdbwriter.cpp Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
influxdbwriter.hpp Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
influxdbwriter.ti Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
opentsdbwriter.cpp Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
opentsdbwriter.hpp Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
opentsdbwriter.ti Use PerfdataWriterConnection in perfdata writers 2026-03-17 12:11:26 +01:00
otlpmetricswriter.cpp OTLPMetricsWriter: don't add queue stats as counter 2026-04-20 09:15:53 +02:00
otlpmetricswriter.hpp Allow users to provide additional resource attributes 2026-04-01 12:18:21 +02:00
otlpmetricswriter.ti OTLP: Set enable_ha to true by default 2026-04-01 12:18:21 +02:00
perfdatawriter.cpp Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
perfdatawriter.hpp Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
perfdatawriter.ti Replace all existing copyright headers with SPDX headers 2026-02-04 14:00:05 +01:00
perfdatawriterconnection.cpp Fix PerfdataWriterConnection segfaults on non-X86 architectures 2026-04-29 13:29:36 +02:00
perfdatawriterconnection.hpp Fix PerfdataWriterConnection segfaults on non-X86 architectures 2026-04-29 13:29:36 +02:00