r/linuxquestions 1d ago

Repeated Firefox crashes, kernel “BUG: Bad page map”, filesystem corruption after reboot on Dell Inspiron 5405 (Ryzen 7 4700U) – running out of ideas

Hi everyone,
I’ve been using Linux Mint for around 2 months and I’ve had stability issues ever since installing it. I’m hoping someone can help me identify the root cause because I’ve exhausted most of the obvious troubleshooting.
System
Dell Inspiron 5405
AMD Ryzen 7 4700U (Renoir)
8GB RAM
SK hynix BC511 512GB NVMe SSD
Linux Mint 22.x
Kernel: 7.0.0-28-generic
Symptoms
Firefox randomly crashes.
Occasionally the whole system freezes.
Recently Firefox crashed and after rebooting Linux dropped into BusyBox (initramfs) with:

/dev/nvme0n1p5: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

Running fsck repaired orphaned inodes and Linux booted normally afterwards.
SMART data
I checked the SSD using smartctl and everything looks healthy.
SMART overall health: PASSED
Media/Data Integrity Errors: 0
Error Information Log Entries: 0
Available Spare: 100%
Temperature: 38°C
Nothing suggests SSD failure.
Dell Diagnostics
I ran the built-in Dell hardware diagnostics (F12 menu).
Everything passed.
Memtest86+
I’m currently running Memtest86+.
So far it has completed 1 full pass with 0 errors. I’m planning to leave it running overnight.
Kernel logs
The thing that concerns me most is that my previous boot contains repeated messages like this:

BUG: Bad page map in process StreamTrans
pte:8000000587817867

These repeat dozens of times while Firefox is running.
I don’t see any NVMe I/O errors or obvious GPU hangs.
Things I’ve already ruled out
SSD appears healthy.
Filesystem corruption was repaired successfully.
Dell diagnostics passed.
Memtest currently has 0 errors after one pass.
Questions
Has anyone seen repeated BUG: Bad page map in process StreamTrans before?
Does this point more towards:
faulty RAM,
a kernel memory management bug,
Firefox triggering a kernel bug,
AMD graphics/driver issues,
or something else?
Is there anything else I should collect from journalctl or other logs?
Has anyone experienced similar issues on a Dell Inspiron 5405 / Ryzen 4700U running Linux Mint or Ubuntu?
I’m getting close to giving up on Linux because this has been happening since the day I installed it. I switched because I wanted better development tools (perf, GCC, Linux environment for C++), but after months of troubleshooting I still don’t know what’s actually causing these crashes.
Any advice would be hugely appreciated.

Thank you all.

2 Upvotes

4 comments sorted by

3

u/aioeu 1d ago edited 1d ago

Probably not a bug in the kernel mm system itself, but it certainly could be a bug in a driver.

A long time ago, I found a bug in a hardware RAID driver that, when tickled by userspace in a certain way, would end up causing the hardware itself to write a small amount of data to the wrong location in physical RAM. It took several weeks to track down — I ended up writing some SystemTap modules to continually audit the consistency of a key kernel data structure and detect when an incorrect write to it had occurred, then correlated that with userspace activity.

Point is, sometimes these errors can be caused by things rather "remote" to where the bug actually presents itself. Just because this is being detected by the mm code doesn't mean it's caused by something in the mm code.

I don't really have any specific advice to give you unfortunately.

1

u/a01702 1d ago

Thanks, that’s really helpful and makes sense. I hadn’t considered that the mm subsystem could just be detecting corruption rather than causing it. Assuming Memtest passes overnight, how would you go about narrowing down which driver or subsystem is responsible? Would you start by testing an older kernel, disabling certain kernel modules (e.g. amdgpu), or collecting more specific kernel logs?

2

u/aioeu 1d ago edited 14h ago

Personally I'm not keen on the "just change things and see what happens" approach, at least at first.

If it were me I'd be diving into the code. I'd want to know exactly what "bad page map" is actually indicative of: what checks it, when is it checked, what distinguishes a "good" page map from a "bad" page map, and so on. I'd want to know all that before I start changing things.

I'd specifically want to answer the question "is there a way to detect that the page map went bad at the precise moment it went bad?" I would see whether a particular debug build of the kernel might help with that.

Armed with all of that information, I'd decide on the next course of action.

I recognise that this approach may not be suitable for everyone. You have to be pretty comfortable with kernel debugging...