Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-journal-gatewayd crashes if request has follow and unmatched KEY=match parameter #3873

Closed
1 of 2 tasks
eungjun-yi opened this issue Aug 3, 2016 · 0 comments · Fixed by #3893
Closed
1 of 2 tasks

Comments

@eungjun-yi
Copy link
Contributor

Submission type

  • Bug report
  • Request for enhancement (RFE)

NOTE: Do not submit anything other than bug reports or RFEs via the issue tracker!

systemd version the issue has been seen with

systemd 231

Used distribution

Arch Linux

In case of bug report: Expected behaviour you didn't see

systemd-journal-gatewayd doesn't crash

In case of bug report: Unexpected behaviour you saw

systemd-journal-gatewayd crashes as follows:

$ curl http://localhost:19531/entries\?follow\&FOO\=bar
curl: (18) transfer closed with outstanding read data remaining
$ sudo systemctl status systemd-journal-gatewayd
● systemd-journal-gatewayd.service - Journal Gateway Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-journal-gatewayd.service; indirect; vendor preset: disabled)
   Active: failed (Result: signal) since 수 2016-08-03 16:47:03 KST; 3s ago
     Docs: man:systemd-journal-gatewayd(8)
  Process: 6790 ExecStart=/usr/lib/systemd/systemd-journal-gatewayd (code=killed, signal=SEGV)
 Main PID: 6790 (code=killed, signal=SEGV)

 8월 03 13:03:41 naomint systemd[1]: Started Journal Gateway Service.
 8월 03 16:47:03 naomint systemd[1]: systemd-journal-gatewayd.service: Main process exited, code=killed, status=11/SEGV
 8월 03 16:47:03 naomint systemd[1]: systemd-journal-gatewayd.service: Unit entered failed state.
 8월 03 16:47:03 naomint systemd[1]: systemd-journal-gatewayd.service: Failed with result 'signal'.

In case of bug report: Steps to reproduce the problem

  1. Start systemd-journald-gatewayd

    sudo systemctl start systemd-journal-gatewayd

  2. Request logs with follow and KEY=match parameter that doesn't match any log entry.

    curl http://localhost:19531/entries?follow&FOO=bar

@eungjun-yi eungjun-yi changed the title systemd-journal-gatewayd crahses if request has follow and unmatched KEY=match parameter systemd-journal-gatewayd crashes if request has follow and unmatched KEY=match parameter Aug 3, 2016
eungjun-yi pushed a commit to eungjun-yi/systemd that referenced this issue Aug 6, 2016
When client requests to get logs with `follow` and `KEY=match` that
doesn't match any log entry, journal-gatewayd segfaulted.

Make request_reader_entries to return zero in such case to wait for
matching entries.

This fixes systemd#3873.
eungjun-yi pushed a commit to eungjun-yi/systemd that referenced this issue Aug 6, 2016
When client requests to get logs with `follow` and `KEY=match` that
doesn't match any log entry, journal-gatewayd segfaulted.

Make request_reader_entries to return zero in such case to wait for
matching entries.

This fixes systemd#3873.
keszybz pushed a commit that referenced this issue Aug 6, 2016
When client requests to get logs with `follow` and `KEY=match` that
doesn't match any log entry, journal-gatewayd segfaulted.

Make request_reader_entries to return zero in such case to wait for
matching entries.

This fixes #3873.
edolstra pushed a commit to NixOS/systemd that referenced this issue Sep 30, 2016
When client requests to get logs with `follow` and `KEY=match` that
doesn't match any log entry, journal-gatewayd segfaulted.

Make request_reader_entries to return zero in such case to wait for
matching entries.

This fixes systemd#3873.
(cherry picked from commit 3475fc5)
AnchorCat pushed a commit to AnchorCat/systemd that referenced this issue May 9, 2017
When client requests to get logs with `follow` and `KEY=match` that
doesn't match any log entry, journal-gatewayd segfaulted.

Make request_reader_entries to return zero in such case to wait for
matching entries.

This fixes systemd#3873.
(cherry picked from commit 3475fc5)
keszybz pushed a commit to systemd/systemd-stable that referenced this issue May 30, 2017
When client requests to get logs with `follow` and `KEY=match` that
doesn't match any log entry, journal-gatewayd segfaulted.

Make request_reader_entries to return zero in such case to wait for
matching entries.

This fixes systemd/systemd#3873.

(cherry picked from commit 3475fc5)
keszybz pushed a commit to systemd/systemd-stable that referenced this issue May 30, 2017
When client requests to get logs with `follow` and `KEY=match` that
doesn't match any log entry, journal-gatewayd segfaulted.

Make request_reader_entries to return zero in such case to wait for
matching entries.

This fixes systemd/systemd#3873.

(cherry picked from commit 3475fc5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants