System freeze and crash when using kernel 5.8

A few weeks ago, I realized that kernel 5.8 caused my xps 13 to crash frequently. Therefore, I downgraded it to use kernel 5.7. From yesterday, I gave kernel 5.8 another try and it looks stable. However, after several hours of normal usage, it crashed again while I was compiling a Kotlin project. Seems like there is no strange error in journalctl. Can anyone suggest me on how to identify the problem?

What exactly “crashed” means?

“freeze” means desktop is not responsive except the mouse, and after a while the mouse also becomes unresponsive. I can’t even switch to other tty to login. “crash” means that the system completely shutdown after it “freezes” for a while.

By the way, the reason causing me to switch back to kernel 5.7 few weeks ago was that it “freeze” and “crash” while I did a “git show” in one of my project, and it caused some files in the “.git” folder to become corrupted.

Can you ping or ssh into the system over LAN when this happens?

This I am not sure, I can try that when I encounter the freezing next time

After a few days of testing, I think the problem is related to baloo indexing. “top” shows that baloo was using some weird amount of memory, and it hasn’t crashed since I disabled baloo.

Wait, the problem appears again, some error mesages “read error on swap device” are printed on tty.

This sounds like bad driver. To say anything more actual dmesg output is needed.