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

Use line reader timeout #835

Merged
merged 8 commits into from Apr 23, 2020
Merged

Use line reader timeout #835

merged 8 commits into from Apr 23, 2020

Conversation

dominiklohmann
Copy link
Member

This fixes a bug that caused continuous Suricata imports to possibly hang.

@dominiklohmann dominiklohmann added the bug Incorrect behavior label Apr 22, 2020
@dominiklohmann dominiklohmann requested a review from a team April 22, 2020 12:33
libvast/vast/defaults.hpp Outdated Show resolved Hide resolved
libvast/vast/format/json.hpp Outdated Show resolved Hide resolved
lava
lava previously approved these changes Apr 22, 2020
Copy link
Member

@lava lava left a comment

Choose a reason for hiding this comment

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

Looks good modulo the change requested by @tobim .

Should we maybe do the same change for all readers now, to avoid users running into them one-by-one?

@dominiklohmann dominiklohmann changed the title Use line reader timeout for JSON Use line reader timeout Apr 22, 2020
@dominiklohmann
Copy link
Member Author

@tenzir/backend I've adapted this PR to fix the issue for CSV and Syslog as well. Please re-review. Still running some tests locally to verify the issue is fixed for the other formats as well.

libvast/src/format/syslog.cpp Outdated Show resolved Hide resolved
libvast/src/format/csv.cpp Outdated Show resolved Hide resolved
libvast/src/format/csv.cpp Outdated Show resolved Hide resolved
libvast/src/format/csv.cpp Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@lava lava left a comment

Choose a reason for hiding this comment

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

Looks good to me, although I still think we should have a warning about the "Thou shalt not return 0" bug in a comment somewhere.

@dominiklohmann
Copy link
Member Author

Looks good to me, although I still think we should have a warning about the "Thou shalt not return 0" bug in a comment somewhere.

@lava see also:
https://github.com/tenzir/vast/blob/9882c2f950fa66f31f79bb791419b9bc7170c638/libvast/vast/system/source.hpp#L185-L188

@dominiklohmann dominiklohmann merged commit 31049fb into master Apr 23, 2020
@dominiklohmann dominiklohmann deleted the story/ch15638 branch April 23, 2020 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior
Projects
None yet
4 participants