Tracking a fatal kernel bug

written by Tomas M. 6 years ago

Slax uses ZRAM to compress RAM memory on the fly. Lately, I was noticing fatal errors (kernel oopses) if lots of RAM was filled very quickly. So I spent almost a day tracking down the issue, recompiling 6 different kernel versions, applying various patches and such.

Finally I was able to track down which particular patch made the problem. Everything is just fine for kernel 3.6.4 and older, but there is a patch for zram in 3.6.5 which makes it unstable in certain situations. After reverting this particular patch, there are no longer any problems.

If you're interested, the incriminated change in kernel is here. I've already notified all the guys who signed that change, hopefully they can fix it. Maybe their code is even correct and it just exposed some other hidden bug in kernel ... who knows. In the mean time, I'll simply revert this particular change for Slax kernels, to bring better stability with no oopses.

Tomas M.

(c) 2019, Tomas M; rss