This problem was caused by grep-2.13; downgrading to grep-2.12 solved this problem on ZFSonLinux as rootfs.
grep-2.13 has a bug in certain situations involving sparse files. It can affect ZFSonLinux, NFS, BtrFS and filesystems that make usage of sparse files in certain ways.
When the bug happens, slackpkg fails to list packages properly, compiling kernel modules will fail, and other malfunctions can happen in scripts that call grep.
I've e-mailed Pat about this, so have to wait to see what happens. According to some mail list threads on grep development, they want to release a new grep version very soon to fix this bug; it looks like the grep development version has the bug fix already.
Last edited by foobarz; 08-15-2012 at 01:25 AM.
Reason: solved: problem was grep-2.13, downgrade or upgrade