Wind River Support Network

HomeDefectsLIN7-3191
Fixed

LIN7-3191 : pidstat -t fails with out of memory, fsl-imx6 preempt-rt

Created: Mar 19, 2015    Updated: Sep 8, 2018
Resolved Date: Jun 3, 2015
Found In Version: 7.0
Fix Version: 7.0.0.4
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: Userspace

Description

pidstat -t fails with out of memory on fsl-imx6 with preempt-rt.
I run tests with 'pidstat -t' in an endless loop on my QEMU target (standard kernel) and it did not yield any error, even though it had even less free memory than on actual target:
root@qemu3:~# cat /proc/meminfo
MemTotal: 121192 kB
MemFree: 105104 kB 
...

Steps to Reproduce

Linux fsl-imx6 3.4.88-rt56-WR5.0.1.20_preempt-rt #1 SMP PREEMPT RT Sun Feb 15 13:26:22 CST 2015 armv7l GNU/Linux

root@fsl-imx6:~# rpm -Uhv sysstat-10.0.3-r4.armv7a_vfp_neon.rpm --nodeps
Preparing...                ########################################### [100%]
   1:sysstat                ########################################### [100%]
root@fsl-imx6:~# pidstat -t
malloc: Cannot allocate memory

root@fsl-imx6:~# cat /proc/meminfo
MemTotal:         884428 kB
MemFree:          777244 kB
...
root@fsl-imx6:~# strace pidstat -t
...
close(3)                                = 0
mmap2(NULL, 622325760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x51d7e000
mmap2(NULL, 622325760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
brk(0x251b9000)                         = 0x3b000
mmap2(NULL, 622456832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x51b7e000
munmap(0x51b7e000, 532480)              = 0
munmap(0x51d00000, 516096)              = 0
mprotect(0x51c00000, 135168, PROT_READ|PROT_WRITE) = 0
mmap2(NULL, 622325760, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x20002 (flags O_RDWR|O_LARGEFILE)
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76f02000
_llseek(3, 0, 0x7eb1c978, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(3, "malloc: Cannot allocate memory\n", 31malloc: Cannot allocate memory
) = 31
close(3)                                = 0
munmap(0x76f02000, 4096)                = 0
exit_group(4)                           = ?
+++ exited with 4 +++

Other Downloads


Live chat
Online