datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
576 stars 122 forks source link

dlad: page allocation failure: order:9, mode:0xd0 #113

Closed DA-SEQ closed 7 years ago

DA-SEQ commented 7 years ago

datto-oops.txt Hi,

We are getting a "dlad: page allocation failure" on one of our production systems.

I understand that this is the result of an unsuccessful attempt at allocating memory by __kmalloc(), called by dattobd.ko. But why?

We certainly don't have a memory shortage on that system. Please have a look at the logs attached.

Any help appreciated.

Thanks and regards, DA

tcaputi commented 7 years ago

Are you sure that the system actually experienced a kernel oops? Dattobd has one rather large memory allocation that it performs once per snapshot. For efficiency during operation, we attempt to allocate using kmalloc() which attempts to allocate it as one giant chunk of contiguous memory. The system doesn't always have that much contiguous memory available, however, and in that case it falls back to vmalloc() which allows the system to use non-contiguous memory.

Unfortunately, the kernel's kmalloc code automatically prints that warning whenever it fails to allocate memory. Now that I'm looking at the kernel code though, it seems that we should be able to suppress this warning. I'll make sure we do that for the next release.

DA-SEQ commented 7 years ago

Thanks for the explanation. We do experience backup failures and I thought this was the cause, but if you fallback to vmalloc() then this is probably a red herring. Do you have any procedure to recompile the module to enable debugging?

Thanks, DA.

tcaputi commented 7 years ago

you can enable debugging by setting the module parameter dattobd_debug=1 at insertion time or after the fact via echo 1 > /sys/module/dattobd/parameters/dattobd_debug

crawfxrd commented 7 years ago

Resolved in 63c2b6f.