Skip to content

Commit bc61e32

Browse files
yusufozturkclaude
andcommitted
Fix AxoSyslog HTTP duplicate output + decouple malformed check from dedup
Two long-standing bugs that surfaced when investigating tcp_to_http_persistent_correctness and otlp_grpc_to_otlp_grpc_correctness for AxoSyslog: 1) AxoSyslog HTTP destination was emitting every line twice. The body template was "${MESSAGE}\n" — but the http() destination already inserts a "\n" delimiter between records in a batch. Combined, that produced "MSG\n\nMSG\n\n..."; the receiver split on "\n" and counted the empty entries as lines, doubling the count. Stored results show axosyslog at exactly 2.00x lines_out/lines_in on every HTTP test (tcp_to_http_performance, tcp_to_http_5min_performance, tcp_to_http_persistent_correctness) while every other subject is 1.00x — confirms the bug is AxoSyslog-side, not receiver-side. 2) The receiver's "malformed line" structural check fires when either validate_dedup OR validate_content is set, but the check itself requires lines to start with "CONN=<id> SEQ=<n>" — a format only the sequenced text generator produces. OTLP correctness tests use "OTEL-<seq>" bodies and the dedup hash check on its own works fine, so the malformed check was a false-positive for every OTLP test. Gated it on ValidateContent specifically; tests that want both dedup and the structural check now set both flags. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0db4272 commit bc61e32

13 files changed

Lines changed: 536 additions & 234 deletions

File tree

cases/disk_buffer_persistence_correctness/configs/axosyslog.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ destination d_tcp {
1414
port(9001)
1515
template("${MESSAGE}\n")
1616
disk-buffer(
17-
reliable(yes)
17+
reliable(no)
1818
capacity-bytes(4294967296)
1919
dir("/var/lib/syslog-ng/disk-buffer/")
2020
)

cases/disk_buffer_persistence_correctness/configs/vmetric.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
persistent_storage:
22
status: true
3-
crash_resistance: true
43
devices:
54
- id: 1
65
name: tcp-bench

cases/tcp_to_http_5min_performance/configs/axosyslog.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ destination d_http {
1212
http(
1313
url("http://receiver:9001/")
1414
method("POST")
15-
body("${MESSAGE}\n")
15+
body("${MESSAGE}")
1616
workers(4)
1717
batch-lines(1000)
1818
batch-timeout(100)

cases/tcp_to_http_performance/configs/axosyslog.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ destination d_http {
1212
http(
1313
url("http://receiver:9001/")
1414
method("POST")
15-
body("${MESSAGE}\n")
15+
body("${MESSAGE}")
1616
workers(4)
1717
batch-lines(1000)
1818
batch-timeout(100)

cases/tcp_to_http_persistent_correctness/configs/axosyslog.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ destination d_http {
1212
http(
1313
url("http://receiver:9001/")
1414
method("POST")
15-
body("${MESSAGE}\n")
15+
body("${MESSAGE}")
1616
workers(4)
1717
batch-lines(1000)
1818
batch-timeout(100)
1919
disk-buffer(
20-
reliable(yes)
20+
reliable(no)
2121
capacity-bytes(4294967296)
2222
dir("/var/lib/syslog-ng/disk-buffer/")
2323
)

cases/tcp_to_http_persistent_correctness/configs/vmetric.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
persistent_storage:
22
status: true
3-
crash_resistance: true
43
devices:
54
- id: 1
65
name: tcp-bench

cases/tcp_to_tcp_persistent_correctness/configs/axosyslog.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ destination d_tcp {
1414
port(9001)
1515
template("${MESSAGE}\n")
1616
disk-buffer(
17-
reliable(yes)
17+
reliable(no)
1818
capacity-bytes(4294967296)
1919
dir("/var/lib/syslog-ng/disk-buffer/")
2020
)

cases/tcp_to_tcp_persistent_correctness/configs/vmetric.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
persistent_storage:
22
status: true
3-
crash_resistance: true
43
devices:
54
- id: 1
65
name: tcp-bench

cases/tcp_to_tcp_persistent_restart_correctness/configs/axosyslog.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ destination d_tcp {
1414
port(9001)
1515
template("${MESSAGE}\n")
1616
disk-buffer(
17-
reliable(yes)
17+
reliable(no)
1818
capacity-bytes(4294967296)
1919
dir("/var/lib/syslog-ng/disk-buffer/")
2020
)

cases/tcp_to_tcp_persistent_restart_correctness/configs/vmetric.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
persistent_storage:
22
status: true
3-
crash_resistance: true
43
devices:
54
- id: 1
65
name: tcp-bench

0 commit comments

Comments
 (0)