Stops forwarding after "Failed to get cursor" with a large journal backlog

Abierto
#154 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c, linux

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

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

  1. Write about 100,000 entries to the journal, e.g. seq 100000 | systemd-cat -t loadtest.
  2. Remove /var/lib/systemd/journal-netlogd/state and run a TCP listener on 127.0.0.1:5140 that counts the lines it receives.
  3. Start systemd-netlogd.
  4. 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.
Lenguaje dominante
C
Estrellas
99
Forks
35
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de systemd/systemd-netlogd

Todos los issues de systemd/systemd-netlogd

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.