Stops forwarding after "Failed to get cursor" with a large journal backlog
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c, linux
- Ambito
- backend, networking
Direzione di ricerca
Start by reproducing the failure with a large journal backlog and the supplied systemd-netlogd configuration, then trace journal iteration and cursor persistence, especially the state file at /var/lib/systemd/journal-netlogd/state. Compare the behavior with issues #14 and #17. Done means the backlog is forwarded once, forwarding continues for new entries, and the cursor errors no longer occur.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
systemd-netlogd version
Output of systemd-netlogd --version:
1.4.4 (Debian package 1.4.4-1)
OS and systemd version
- Distribution: Debian 13 (trixie)
- systemd version (
systemctl --version): systemd 257 (257.13-1~deb13u1)
Configuration
[Network]
Address=127.0.0.1:5140
Protocol=tcp
LogFormat=rfc5424
Describe the bug
When netlogd starts with a large backlog in the journal, it stops forwarding after a few seconds, with "Failed to get cursor: Cannot assign requested address". Before it stops, it sends many entries more than once.
Steps to reproduce
- Write about 100,000 entries to the journal, e.g.
seq 100000 | systemd-cat -t loadtest. - Remove
/var/lib/systemd/journal-netlogd/stateand run a TCP listener on 127.0.0.1:5140 that counts the lines it receives. - Start systemd-netlogd.
- After it stops, write a few more entries with
logger.
Expected behavior
All journal entries are forwarded once, and forwarding continues with new entries.
Actual behavior
- Forwarding stops about 10 seconds after start.
- About 340,000 lines are received, while the journal has about 100,000 entries.
- When new entries are written, netlogd sends the whole journal again from the beginning and stops again.
- With a small journal (about 3,000 entries written at a steady rate), all entries arrive once and no errors are logged.
Logs
Failed to get cursor: Cannot assign requested address
Failed to get cursor: Cannot assign requested address
...
Failed to iterate through journal: Invalid argument
Failed to get cursor: Invalid argument
Additional context
- Same behavior with netlogd 1.4.4 on IncusOS 202611080229, sending to a remote host over TCP.
- Looks similar to #14 and #17.
- Lingua principale
- C
- Stelle
- 99
- Fork
- 35
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di systemd/systemd-netlogd
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 77/100
systemd/systemd-netlogd#150 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
systemd/systemd-netlogd#149 · 1 commento ·
Tutte le issue di systemd/systemd-netlogd
Issue simili
-
polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ChupathingyCE/chupathingyce#1366 ·
I maintainer di solito rispondono entro 1 giorno
-
slice track:dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
Life-Framework/Life-Framework#1831 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
bug intrinsic low priority wrong result
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno