Skip to content

logread kernel crash - general protection fault in lib.so #4346

Open

Description

@ioogithub

Expected Behavior

Logging should work.

Current Behavior

Logging is crashing the kernel.

Possible Solution

No idea how to find this.

Steps to Reproduce the Problem

  1. Unknown

Context (Environment)

regular running.

Specifications

OpenMPTCProuter version: v0.64-snapshot-6.18 r0+34836-1ac7a562ef (build date July 29, 2026)
OpenMPTCProuter VPS version: 0.1065-rolling-test (Debian 13, kernel 6.18.41-omr)
OpenMPTCProuter VPS provider: Custom (Skylake/x64v3)
OpenMPTCProuter platform: x86_64 (4GB RAM, NVMe)
Country: US

Activity

  1. ioogithub commented on Aug 9, 2026

    @ioogithub
    Author

    Lot's of these still showing up in the console and logread:

    Sun Aug 9 13:47:00 2026 kern.info kernel: [509378.242848] traps: logread[5580] general protection fault ip:74833773 sp:7ffcf5fa6332 error:0 in libc.so[69846,5f8321ecb000+54000]

    Does this mean that logging is broken in this version?

  2. pylaterreur commented on Oct 7, 2026

    @pylaterreur
    Contributor

    @ioogithub The kernel isn't crashing, logread is, and the bad data comes from logd.

    The trap is musl's asctime_r() stopping on purpose (a hlt, at offset 0x69846 of your build's libc.so) because logread asked it to format a garbage timestamp. Once logd's ring buffer has wrapped around, the pointer to its oldest message can run into stale data, and logd then hands out entries with random sizes and timestamps. That's OpenWrt's FS#4118 (openwrt/openwrt#9100), "logread crashes sometimes", open since 2021. OMR runs logread -l 2 every minute, so it shows up here a lot. Logging itself keeps working: it's that one logread call that dies.

    I reproduced it in QEMU with 20 minutes of logread loops plus a logger flood. It happened on the May 6.18 snapshot, on v0.64.2 and on a current develop build. With the fix, a 30-minute run had none: 26,583 logread -l 2 and no trap. The develop build without the fix had 3 in 20 minutes.

    The fix for logd is proposed upstream in openwrt/ubox#9, and carried in the build repo in #4391.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions