icinga2/lib/perfdata
Julian Brost e6300aacf9 InfluxdbCommonWriter: only flush from work queue
There is no explicit synchronization of access to m_DataBuffer which is fine if
it is only accessed from the single-threaded work queue. However, Stop() also
called Flush() in another thread, leading to concurrent write access to
m_DataBuffer which can result in a crash due to use after free/double free.

Changes in this commit:
* Flush() is renamed to FlushWQ() to show that it should only be called from
  the work queue. Additionally, it now asserts that it is running on the work
  queue.
* Visibility of some data members is changed from protected to private. No
  other classes have to access these at the moment. By this change, accidental
  concurrent access from derived classes in the future is prevented.
* Stop() now flushes by posting FlushWQ() to the work queue and joining it.
2022-01-03 12:24:26 +01:00
..
CMakeLists.txt Introduce Influxdb2Writer 2021-07-20 16:21:36 +02:00
elasticsearchwriter.cpp ElasticsearchWriter: actually verify TLS server certificates 2021-08-13 17:24:24 +02:00
elasticsearchwriter.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
elasticsearchwriter.ti ElasticsearchWriter: actually verify TLS server certificates 2021-08-13 17:24:24 +02:00
gelfwriter.cpp GelfWriter: show error message of exceptions 2021-08-13 17:24:24 +02:00
gelfwriter.hpp Revert "Make NotificationResult available for events: Cluster and Features" 2020-01-07 14:20:59 +01:00
gelfwriter.ti GelfWriter: actually verify TLS server certificates 2021-08-13 17:24:24 +02:00
graphitewriter.cpp Merge pull request #8601 from Icinga/feature/replace-std-boost-bind-with-lambdas-7006 2021-03-18 17:56:13 +01:00
graphitewriter.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
graphitewriter.ti Disable feature HA by default (InfluxDB, Graphite, Gelf, Elasticsearch, OpenTSDB, Perfdata) 2019-03-27 15:29:47 +01:00
influxdb2writer.cpp Introduce Influxdb2Writer 2021-07-20 16:21:36 +02:00
influxdb2writer.hpp Introduce Influxdb2Writer 2021-07-20 16:21:36 +02:00
influxdb2writer.ti Introduce Influxdb2Writer 2021-07-20 16:21:36 +02:00
influxdbcommonwriter.cpp InfluxdbCommonWriter: only flush from work queue 2022-01-03 12:24:26 +01:00
influxdbcommonwriter.hpp InfluxdbCommonWriter: only flush from work queue 2022-01-03 12:24:26 +01:00
influxdbcommonwriter.ti InfluxdbCommonWriter: actually verify TLS server certificates 2021-08-13 17:24:24 +02:00
influxdbwriter.cpp InfluxdbCommonWriter: abstract InfluxdbWriter 2021-07-20 16:21:36 +02:00
influxdbwriter.hpp InfluxdbCommonWriter: abstract InfluxdbWriter 2021-07-20 16:21:36 +02:00
influxdbwriter.ti InfluxdbCommonWriter: abstract InfluxdbWriter 2021-07-20 16:21:36 +02:00
opentsdbwriter.cpp Replace std/boost::bind() function with lambda expression 2021-03-10 16:29:40 +01:00
opentsdbwriter.hpp Removed dictionary cloning behaviour. 2019-10-24 00:04:12 +11:00
opentsdbwriter.ti Added OpenTSDB Metric prefix naming support 2019-10-24 00:04:12 +11:00
perfdatawriter.cpp Merge pull request #8601 from Icinga/feature/replace-std-boost-bind-with-lambdas-7006 2021-03-18 17:56:13 +01:00
perfdatawriter.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
perfdatawriter.ti Disable feature HA by default (InfluxDB, Graphite, Gelf, Elasticsearch, OpenTSDB, Perfdata) 2019-03-27 15:29:47 +01:00