The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now.
If the bug has already been fixed in the latest upstream version of QEMU, then please close this ticket as "Fix released". If it is not fixed yet and you think that this bug report here is still valid, then you have two options: 1) If you already have an account on gitlab.com, please open a new ticket for this problem in our new tracker here: https://gitlab.com/qemu-project/qemu/-/issues and then close this ticket here on Launchpad (or let it expire auto- matically after 60 days). Please mention the URL of this bug ticket on Launchpad in the new ticket on GitLab. 2) If you don't have an account on gitlab.com and don't intend to get one, but still would like to keep this ticket opened, then please switch the state back to "New" or "Confirmed" within the next 60 days (other- wise it will get closed as "Expired"). We will then eventually migrate the ticket automatically to the new system (but you won't be the reporter of the bug in the new system and thus you won't get notified on changes anymore). Thank you and sorry for the inconvenience. ** Changed in: qemu Status: Confirmed => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1898011 Title: mmap MAP_NORESERVE of 2^42 bytes consumes 16Gb of actual RAM Status in QEMU: Incomplete Bug description: Run this program: #include <sys/mman.h> #include <stdio.h> int main() { for (int i = 30; i <= 44; i++) { fprintf(stderr, "trying 2**%d\n", i); mmap((void*)0x600000000000,1ULL << i, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED|MAP_NORESERVE,-1,0); } } (tried qemu-x86_64 and qemu-aarch64, 4.2.1 and trunk/5.1.50) On each iteration qemu will consume 2x more physical RAM, e.g. when mapping 2^42 it will have RSS of 16Gb. On normal linux it works w/o consuming much RAM, due to MAP_NORESERVE. Also: qemu -strace prints 0 instead of the correct size starting from size=2^32 and prints -2147483648 for size=2^31. mmap(0x0000600000000000,1073741824,PROT_NONE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED|MAP_NORESERVE,-1,0) = 0x0000600000000000 mmap(0x0000600000000000,-2147483648,PROT_NONE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED|MAP_NORESERVE,-1,0) = 0x0000600000000000 mmap(0x0000600000000000,0,PROT_NONE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED|MAP_NORESERVE,-1,0) = 0x0000600000000000 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1898011/+subscriptions