Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#18039 closed bug (fixed)

ramfs: kernel heap (slab) memory leak when creating and deleting mmap'ed files

Reported by: X512 Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: File Systems/RAMFS Version: R1/Development
Keywords: Cc: waddlesplash
Blocked By: Blocking:
Platform: All

Description

This is hrev56567.

"slab area" memory constantly increase when repeating this cycle

  1. create file and set size
  2. mmap
  3. memset(ptr, 0xcc, size)
  4. munmap
  5. delete file and close fd

Leaked memory is not freed after unmount.

It can be also some VFS or VM memory leak.

Change History (5)

comment:1 by X512, 2 years ago

No leak if mmap is not used (use write instead for example). Problem is also reproduced in my shmfs. It always use VMAnonumousCache for storage, so leak seems to be in VM kernel code, not in ramfs/shmfs.

comment:2 by X512, 2 years ago

It seems that VMCache objects are leaking (including physical pages) if mmap is called at least once.

comment:3 by waddlesplash, 2 years ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: newclosed

Merged in hrev56581

comment:4 by bipolar, 2 years ago

For anyone wondering... I assume waddlesplash meant: hrev56582.

comment:5 by waddlesplash, 2 years ago

Yeah, copy/paste error.

Note: See TracTickets for help on using tickets.