[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 281471] ASLR: jemalloc RES memory keeps on increasing until process cores"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Sep 2024 05:37:24 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281471 Bug ID: 281471 Summary: ASLR: jemalloc RES memory keeps on increasing until process cores Product: Base System Version: Unspecified Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: rupeshpilania@gmail.com Hi Team, I noticed Jemalloc doesn't bring down RES memory to original one even after calling free and setting these flags. MALLOC_CONF="xmalloc:true,dirty_decay_ms:0,retain:false" The only way to make it work is to disable aslr at kernel level along with MALLOC_CONF="xmalloc:true,dirty_decay_ms:0,retain:false" Test Results: ASLR Enabled: cat /etc/sysctl.conf | grep aslr kern.elf32.aslr.enable=1 kern.elf32.aslr.pie_enable=1 kern.elf64.aslr.enable=1 kern.elf64.aslr.pie_enable=1 13.2-RELEASE-p12 FreeBSD 13.2-RELEASE-p12 MESSAGING_GATEWAY amd64 C600V-DUT018:rtestuser 16] ./mem-fragment Hello! This program will fragment its process heap. Run top -p 5364 to follow along! Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 5364 root 1 20 0 10M 2280K ttyin 6 0:00 0.00% mem-frag 500k 5KB chunks were just provisioned Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 5364 root 1 52 0 4898M 3034M ttyin 6 0:02 0.00% mem-frag 500k 5KB chunks were just provisioned Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 5364 root 1 48 0 9816M 6064M ttyin 6 0:04 0.00% mem-frag The first allocations were just free()'d. Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 5364 root 1 27 0 7266M 3541M ttyin 6 0:05 0.00% mem-frag The 2nd allocations were just free()'d. Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 5364 root 1 28 0 4716M 1018M ttyin 6 0:05 0.00% mem-frag ASLR Disabled: cat /etc/sysctl.conf | grep aslr kern.elf32.aslr.enable=0 kern.elf32.aslr.pie_enable=0 kern.elf64.aslr.enable=0 kern.elf64.aslr.pie_enable=0 C600V-DUT018:rtestuser 8] setenv MALLOC_CONF "xmalloc:true,dirty_decay_ms:0,retain:false" C600V-DUT018:rtestuser 10] ./mem-fragment Hello! This program will fragment its process heap. Run top -p 3884 to follow along! Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 3884 root 1 20 0 16M 2152K ttyin 5 0:00 0.00% mem-frag 500k 5KB chunks were just provisioned Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COM 3884 root 1 44 0 2592M 2072M ttyin 5 0:02 0.00% mem 500k 5KB chunks were just provisioned Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COM 3884 root 1 45 0 5168M 4142M ttyin 5 0:03 0.00% mem The first allocations were just free()'d. Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COM 3884 root 1 25 0 2618M 2097M ttyin 5 0:04 0.00% mem The 2nd allocations were just free()'d. Press Enter to continue... PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COM 3884 root 1 26 0 68M 52M ttyin 5 0:04 0.00% mem -- You are receiving this mail because: You are the assignee for the bug.