Skip to content

lnav crashes when reading log though pipe #1526

@erikced

Description

@erikced

lnav version
v0.13.0
v0.13.1-beta3
On Fedora 42 and Debian 12, both in WSL

Describe the bug
A clear and concise description of what the bug is.
lnav crashes on a specific log file and only when read through a pipe, input redirection and reading the log directly works fine. I have reduced the log file to a minimal failing example, see below.

Slight variations of this will crash lnav 0.12.3 as well and although this specific example does not crash it appears to cause lnav to misbehave claiming to have captured several KB of data from stdin which does not sound quite right.

crash-2025-08-18-10-54-06.57709.log

To Reproduce
Steps to reproduce the behavior:

echo -e '00:00 a\n\n\n\n\n\n\n\n\n\n' | lnav

Or in an F42 container:

docker run --rm -ti fedora:42 sh -c "dnf -y install unzip && curl -LO https://github.com/tstack/lnav/releases/download/v0.13.1-beta3/lnav-0.13.1-beta3-linux-musl-x86_64.zip && unzip lnav-0.13.1-beta3-linux-musl-x86_64.zip && echo -e '00:00 a\n\n\n\n\n\n\n\n\n\n' | ./lnav-0.13.1-beta3/lnav"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions