Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
Lustre 2.5.1
-
None
-
Kernel version: 3.4.93 (also 3.2.58)
Lustre version: 2.5.1 (patchless client)
-
3
-
14741
Description
We're seeing kernel a memory leak when a userspace process uses mmap'd files on lustre. It looks like memory is leaked for each unique file that is mmap'd. The code does not need to run as root. The same code on local disk does not cause a leak. The leak will eventually consume all system memory and take the machine down.
To reproduce the bug, compile the below code and run something similar to: find /lustre/ -type f -print0 | xargs -0 -I{} ./mmap_bug "{}"
Kernel version: 3.4.93 (also 3.2.58)
Lustre version: 2.5.1 (patchless client)
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
int main(int argc, char **argv) {
int f = open(argv[1], O_RDONLY);
void *m = mmap(NULL, 8192, PROT_READ, MAP_SHARED, f, 0);
munmap(m, 8192);
close(f);
return 0;
}