mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Compare commits
3 commits
3abc1116a1
...
6af1459f5e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6af1459f5e | ||
![]() |
3c16ee9667 | ||
![]() |
31d7df915e |
5 changed files with 23 additions and 4 deletions
18
CHANGES
18
CHANGES
|
@ -1,3 +1,21 @@
|
||||||
|
8.1.0-dev.612 | 2025-09-29 18:04:24 +0200
|
||||||
|
|
||||||
|
* Supervisor: Make last_signal atomic to squelch data race (Arne Welzel, Corelight)
|
||||||
|
|
||||||
|
When the stem process terminates and SIGCHLD is sent to the supervisor,
|
||||||
|
the signal might be handled by the main thread or any other threads that
|
||||||
|
aren't blocking SIGCHLD explicitly. Convert last_signal to a std::atomic<int>
|
||||||
|
such that non-main threads can safely set last_signal without triggering
|
||||||
|
data race as reported by TSAN. This doesn't make it less racy to work
|
||||||
|
last_signal, but it appears we only use it for debug printing anyhow and
|
||||||
|
another option might have been to just remove last_signal altogether.
|
||||||
|
|
||||||
|
Follow-up for #4849
|
||||||
|
|
||||||
|
8.1.0-dev.610 | 2025-09-29 08:21:01 -0700
|
||||||
|
|
||||||
|
* Update docs submodule [nomail] (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
8.1.0-dev.609 | 2025-09-29 13:08:15 +0200
|
8.1.0-dev.609 | 2025-09-29 13:08:15 +0200
|
||||||
|
|
||||||
* cluster/zeromq: Fix Cluster::subscribe() block if not initialized (Arne Welzel, Corelight)
|
* cluster/zeromq: Fix Cluster::subscribe() block if not initialized (Arne Welzel, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
8.1.0-dev.609
|
8.1.0-dev.612
|
||||||
|
|
2
doc
2
doc
|
@ -1 +1 @@
|
||||||
Subproject commit 2731def9159247e6da8a3191783c89683363689c
|
Subproject commit 8f38ae2fd563314393eb1ca58c827d26e9966520
|
|
@ -415,7 +415,7 @@ static ForkResult fork_with_stdio_redirect(const char* where) {
|
||||||
|
|
||||||
void Supervisor::HandleChildSignal() {
|
void Supervisor::HandleChildSignal() {
|
||||||
if ( last_signal >= 0 ) {
|
if ( last_signal >= 0 ) {
|
||||||
DBG_LOG(DBG_SUPERVISOR, "Supervisor received signal %d", last_signal);
|
DBG_LOG(DBG_SUPERVISOR, "Supervisor received signal %d", last_signal.load());
|
||||||
last_signal = -1;
|
last_signal = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <atomic>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -323,7 +324,7 @@ private:
|
||||||
|
|
||||||
Config config;
|
Config config;
|
||||||
pid_t stem_pid;
|
pid_t stem_pid;
|
||||||
int last_signal = -1;
|
std::atomic<int> last_signal = -1;
|
||||||
std::unique_ptr<detail::PipePair> stem_pipe;
|
std::unique_ptr<detail::PipePair> stem_pipe;
|
||||||
detail::LineBufferedPipe stem_stdout;
|
detail::LineBufferedPipe stem_stdout;
|
||||||
detail::LineBufferedPipe stem_stderr;
|
detail::LineBufferedPipe stem_stderr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue