diff options
Diffstat (limited to 'results/classifier/118/review/1898011')
| -rw-r--r-- | results/classifier/118/review/1898011 | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/results/classifier/118/review/1898011 b/results/classifier/118/review/1898011 new file mode 100644 index 00000000..06ae6c16 --- /dev/null +++ b/results/classifier/118/review/1898011 @@ -0,0 +1,142 @@ +semantic: 0.835 +graphic: 0.785 +peripherals: 0.745 +virtual: 0.722 +performance: 0.688 +hypervisor: 0.682 +debug: 0.678 +mistranslation: 0.669 +user-level: 0.662 +arm: 0.658 +permissions: 0.638 +risc-v: 0.623 +network: 0.609 +architecture: 0.608 +TCG: 0.576 +files: 0.573 +register: 0.568 +ppc: 0.567 +kernel: 0.554 +socket: 0.553 +PID: 0.546 +assembly: 0.538 +vnc: 0.532 +VMM: 0.487 +device: 0.485 +x86: 0.468 +KVM: 0.466 +boot: 0.447 +i386: 0.253 +-------------------- +performance: 0.776 +hypervisor: 0.649 +x86: 0.229 +debug: 0.055 +virtual: 0.042 +kernel: 0.038 +TCG: 0.015 +user-level: 0.014 +VMM: 0.010 +architecture: 0.006 +register: 0.006 +assembly: 0.006 +files: 0.005 +PID: 0.005 +KVM: 0.005 +boot: 0.004 +device: 0.003 +semantic: 0.003 +arm: 0.002 +permissions: 0.002 +risc-v: 0.002 +ppc: 0.002 +vnc: 0.001 +network: 0.001 +graphic: 0.001 +socket: 0.001 +peripherals: 0.001 +mistranslation: 0.001 +i386: 0.000 + +mmap MAP_NORESERVE of 2^42 bytes consumes 16Gb of actual RAM + +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 + +Without actually looking, an allocation of 2**42 (4PB) requires +2**30 (1G) pages, and thus 1G page table entries, so 16GB memory +allocation sounds about right for qemu's internal page table allocation. + +We need to change data structures for representing guest memory, +probably akin to the kernel's VMAs. + +The problem occurs for example with any program which was compiled with the address sanitizer. + +A simple hello program compiled with "gcc -fsanitize=address hello.c" is sufficient to show the problem. Just run it with "qemu-x86_64 a.out". It will be killed by the Linux kernel OOM handler even on a server with 64 GB RAM. + +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. + + +Still an issue, yes. + + +This is an automated cleanup. This bug report has been moved to QEMU's +new bug tracker on gitlab.com and thus gets marked as 'expired' now. +Please continue with the discussion here: + + https://gitlab.com/qemu-project/qemu/-/issues/290 + + |
