GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixes from the 2026-11 audit, part 5: BackgroundSender and syslog by FreeAndNil · Pull Request #373 · apache/logging-log4net

Conversation

@FreeAndNil

@FreeAndNil FreeAndNil commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

#370, #371, #372 Fixes from the 2026-11 audit, part 5: BackgroundSender and syslog

  • Closes Background senders wait per event when the queue is full and report the close summary twice #370
  • Closes RemoteSyslogAppender loses the record after an ICMP error #371
  • Closes LocalSyslogAppender lets an undefined NewLineHandling and other line breaks through raw #372

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
FreeAndNil added 2 commits November 22, 2026 19:00
@FreeAndNil
#370 Report the close summary of a background sender once per count
37d246a
- Dispose after Close no longer repeats it, a grown total is reported again
- RecordingSink replaces the shared recordings in BackgroundSenderTest
- AGENTS.md allows one fixture instance per test
@FreeAndNil
#370 Let a full send queue wait once until a send succeeds
ed950ef
- ANT-2026-M13HDM0A
- shared partial for the background sending of the three appenders
- sender reports name a message instead of a logging event
@FreeAndNil
FreeAndNil force-pushed the Feature/2026-11-audit-chain-d branch from 8704839 to ed950ef Compare November 22, 2026 18:03
FreeAndNil added 4 commits November 22, 2026 19:15
@FreeAndNil
#371 Send a syslog record once more after a socket error
58291fc
- ANT-2026-C2Q2AQZL
- the error may belong to the datagram before, on Linux
- docs on maxDatagramSize behind a router with a smaller MTU
@FreeAndNil
#372 Reject an undefined NewLineHandling in LocalSyslogAppender
1ebe600
- ANT-2026-6O92ZO65
- a value set after ActivateOptions escapes instead of keeping the line breaks
@FreeAndNil
#372 Escape the other line breaks in LocalSyslogAppender
8547418
- ANT-2026-1YRNCBP9
- VT, FF, FS, GS, RS, NEL, U+2028 and U+2029 as \uXXXX in Escape and Split
@FreeAndNil
#372 Name the parameter of CreateArgumentOutOfRangeException from the…
0075273
… caller

- CallerArgumentExpression, hidden from IntelliSense, signature breaks on purpose
- all 32 call sites drop the name
- ValidateIndex reports "index" instead of "i"
@FreeAndNil
FreeAndNil marked this pull request as ready for review November 22, 2026 19:01
@FreeAndNil
FreeAndNil requested review from fluffynuts and gdziadkiewicz November 22, 2026 19:02
@FreeAndNil FreeAndNil added this to the 3.6.1 milestone Nov 22, 2026
gdziadkiewicz
gdziadkiewicz approved these changes Nov 22, 2026
View reviewed changes

@gdziadkiewicz gdziadkiewicz left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@FreeAndNil
FreeAndNil merged commit de8e20b into master Nov 22, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@FreeAndNil
FreeAndNil deleted the Feature/2026-11-audit-chain-d branch November 22, 2026 20:11
@FreeAndNil

FreeAndNil commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Implementation plan for #373, kept here for the record. Written up to describe the change as it stands on the branch.

Plan

Fixes from the 2026-11 audit, part 5: BackgroundSender and syslog

Context

The same scan as #355 reported, among the lows, problems in the background senders and the syslog
appenders: a full send queue makes every logging call wait the full timeout, RemoteSyslogAppender
loses a record after an ICMP error, and LocalSyslogAppender lets an undefined NewLineHandling
and line breaks other than CR and LF through raw. The close summary reported twice turned up while
fixing them. Three issues: #370 (the background sender), #371 (the ICMP error), #372 (newline
handling).

Constraints that shape the design

  • BackgroundSender<T> is shared by TelnetAppender, RemoteSyslogAppender and the
    SmtpAppender of log4net.Ext.Mail; a fix there applies to all three.
  • With a dead sink each event waits EnqueueTimeoutMillis before it is dropped, so the logging
    thread stalls for the timeout times the number of events.
  • On Linux a connected UDP socket reports the ICMP error of one datagram on the next send, so the
    record that fails is not the one that caused it.
  • RemoteSyslogAppender already rejects an undefined NewLineHandling on activation;
    LocalSyslogAppender did not.
  • No new public API in a patch release; a hidden helper may break its signature on purpose.

Changes

  1. Background senders wait per event when the queue is full and report the close summary twice #370 The close summary is reported once per count: the sender keeps the count it last reported.
  2. Background senders wait per event when the queue is full and report the close summary twice #370 After an enqueue timed out, later events drop at once until a send succeeds; the pump
    clears the flag. Reports say "message", as for all three appenders.
  3. RemoteSyslogAppender loses the record after an ICMP error #371 RemoteSyslogAppender.Send sends once more after a SocketException; the error is
    reported.
  4. LocalSyslogAppender lets an undefined NewLineHandling and other line breaks through raw #372 LocalSyslogAppender.ActivateOptions rejects an undefined NewLineHandling; a value set
    later is escaped.
  5. LocalSyslogAppender lets an undefined NewLineHandling and other line breaks through raw #372 Escape and Split write VT, FF, FS, GS, RS, NEL, U+2028 and U+2029 as \uXXXX; Keep
    stays raw.
  6. LocalSyslogAppender lets an undefined NewLineHandling and other line breaks through raw #372 SystemInfo.CreateArgumentOutOfRangeException takes the parameter name from
    CallerArgumentExpression and is hidden from IntelliSense; all call sites drop the name.

Docs: a shared partial background-sender.adoc for the Telnet, RemoteSyslog and Smtp pages, the
remotesyslog size limits on the MTU case, the localsyslog newline handling, XML doc comments of the
changed members. One changelog entry per change in src/changelog/3.6.1.

Sequencing

  1. The close summary first; the later tests expect it once.
  2. The congested flag on top, same file.
  3. The syslog retry.
  4. The NewLineHandling range check, then the other line breaks in the same switch.
  5. The parameter name last; it adds a call site from step 4.
  6. Each commit: test against the unfixed code first, fix, mutate each changed line, review loop.

Verification

  • dotnet build of all targets with 0 warnings, tests on net10 and, on Windows, net462.
  • A recording sink pins sends, reports and the close summary of BackgroundSender.
  • A full queue: the first event waits, the next ones drop at once, a successful send restores the
    wait.
  • A UDP mock throws a SocketException once: the record is sent on the second try and the error
    reported.
  • LocalSyslogAppender: an undefined value fails activation; each of the eight line breaks is
    escaped in Escape and Split and kept in Keep.
  • ParamName checked for a range error from SystemInfo, LevelMap, an appender collection index
    and the Ext.Mail queue size.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gdziadkiewicz gdziadkiewicz gdziadkiewicz approved these changes
@fluffynuts fluffynuts Awaiting requested review from fluffynuts

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.6.1

Development

Successfully merging this pull request may close these issues.

LocalSyslogAppender lets an undefined NewLineHandling and other line breaks through raw RemoteSyslogAppender loses the record after an ICMP error Background senders wait per event when the queue is full and report the close summary twice

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@FreeAndNil @gdziadkiewicz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.