AnsweredAssumed Answered

kmemleak during linux boot up

Question asked by Xiaoqiang Yang on Aug 17, 2014
Latest reply on Aug 18, 2014 by igorpadykov

Hi all,

Now I am playing on my own designed i.MX6Q custom board and have been running u-boot2009.08 successfully.But I have trouble on starting linux.

Booting the linux kernel take a long time and after login,it's response is too slow.In addition,kmemleak appeared.This is the log:

bootargs:

ipaddr=192.168.2.66

serverip=192.168.2.130

netmask=255.255.255.0

loadaddr=0x10800000

rd_loadaddr=(0x1300000)

netdev=eth0

ethprime=FEC0

uboot=u-boot.bin

kernel=uImage

nfsroot=/srv/rootfs

bootargs_base=setenv bootargs console=ttymxc0,115200

bootargs_nfs=setenv bootargs $ root=/dev/nfs ip=dhcp nfsroot=${serveri p}:$,v3,tcp bootcmd_net=run bootargs_base bootargs_nfs; tftp uImage; bootm bootargs_mmc=setenv bootargs $ ip=dhcp root=/dev/mmcblk0p1 rootwait

bootcmd=run bootcmd_net

 

    1. Booting kernel from Legacy Image at 10800000 ...

Image Name: Linux-3.0.35-2666-gbdde708

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 3904476 Bytes = 3.7 MB

Load Address: 10008000

Entry Point: 10008000

Verifying Checksum ... OK

Loading Kernel Image ... OK

OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Linux version 3.0.35-2666-gbdde708 (root@lab-linux) (gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) ) #44 SMP PREEMPT Mon Aug 18 12:31:36 CST 2014

CPU: ARMv7 Processor  revision 10 (ARMv7), cr=10c53c7d

CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: Freescale i.MX 6Quad/DualLite/Solo Sabre-SD Board

Ignoring unrecognised tag 0x54410008

Memory policy: ECC disabled, Data cache writealloc

CPU identified as i.MX6Q, silicon rev 1.2

PERCPU: Embedded 7 pages/cpu @8c80e000 s5440 r8192 d15040 u32768

Built 1 zonelists in Zone order, mobility grouping on. Total pages: 454656

Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=192.168.2.130:/srv/rootfs,v3,tcp

PID hash table entries: 4096 (order: 2, 16384 bytes)

Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)

Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)

Memory: 512MB 1280MB = 1792MB total

Memory: 1805240k/1805240k available, 291912k reserved, 360448K highmem

Virtual kernel memory layout:

vector : 0xffff0000 - 0xffff1000 ( 4 kB)

fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)

DMA : 0xf4600000 - 0xffe00000 ( 184 MB)

vmalloc : 0xea800000 - 0xf2000000 ( 120 MB)

lowmem : 0x80000000 - 0xea000000 (1696 MB)

pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)

modules : 0x7f000000 - 0x7fe00000 ( 14 MB)

.init : 0x80008000 - 0x80045000 ( 244 kB)

.text : 0x80045000 - 0x80aaa0cc (10645 kB)

.data : 0x80aac000 - 0x80b10300 ( 401 kB)

.bss : 0x80b10324 - 0x80b5e70c ( 313 kB)

SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1

Preemptible hierarchical RCU implementation.

NR_IRQS:624

MXC GPIO hardware

sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms

arm_max_freq=800MHz

MXC_Early serial console at MMIO 0x2020000 (options '115200')

bootconsole  enabled

Console: colour dummy device 80x30

Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available

CPU1: Booted secondary processor

CPU2: Booted secondary processor

CPU3: Booted secondary processor

Brought up 4 CPUs

SMP: Total of 4 processors activated (6324.22 BogoMIPS).

print_constraints: dummy:

NET: Registered protocol family 16

print_constraints: vddpu: 725  at 0

mxs-dma mxs-dma-apbh: initialized

print_constraints: SPKVDD: 4200 mV

print_constraints: vmmc: 3300 mV

vgaarb: loaded

SCSI subsystem initialized

spi_imx imx6q-ecspi.0: probed

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

Freescale USB OTG Driver loaded, $Revision: 1.55 $

mc_pfuze 1-0008: recv failed!:-5,80

mc_pfuze: probe of 1-0008 failed with error -1

imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

imx-ipuv3 imx-ipuv3.1: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 driver probed

mxc_mipi_csi2 mxc_mipi_csi2: i.MX MIPI CSI2 dphy version is 0x3130302a

MIPI CSI2 driver module loaded

Advanced Linux Sound Architecture Driver Version 1.0.24.

Bluetooth: Core ver 2.16

NET: Registered protocol family 31

Bluetooth: HCI device and connection manager initialized

Bluetooth: HCI socket layer initialized

Bluetooth: L2CAP socket layer initialized

Bluetooth: SCO socket layer initialized

cfg80211: Calling CRDA to update world regulatory domain

max17135 2-0048: PMIC MAX17135 for eInk display

i2c-core: driver  using legacy suspend method

i2c-core: driver  using legacy resume method

Switching to clocksource mxc_timer1

NET: Registered protocol family 2

IP route cache hash table entries: 65536 (order: 6, 262144 bytes)

TCP established hash table entries: 262144 (order: 9, 2097152 bytes)

TCP bind hash table entries: 65536 (order: 7, 786432 bytes)

TCP: Hash tables configured (established 262144 bind 65536)

TCP reno registered

UDP hash table entries: 1024 (order: 3, 32768 bytes)

UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)

NET: Registered protocol family 1

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

PMU: registered new PMU device of type 0

Static Power Management for Freescale i.MX6

wait mode is enabled for i.MX6

cpaddr = ea880000 suspend_iram_base=ea8f0000

PM driver module loaded

iMX6 PCIe PCIe RC mode imx_pcie_pltfm_probe entering.

PCIE: imx_pcie_pltfm_probe start link up.

IMX PCIe port: link up.

PCI: bus0: Fast back to back transfers disabled

PCI: bus1: Fast back to back transfers disabled

PCI: bus2: Fast back to back transfers disabled

PCI: bus3: Fast back to back transfers disabled

PCI: bus4: Fast back to back transfers enabled

PCI: bus5: Fast back to back transfers enabled

PCI: bus6: Fast back to back transfers enabled

PCI: bus7: Fast back to back transfers enabled

PCI: bus8: Fast back to back transfers enabled

pci 0000:00:00.0: BAR 0: assigned 

pci 0000:00:00.0: BAR 0: set to  (PCI address )

pci 0000:00:00.0: BAR 8: assigned 

pci 0000:00:00.0: BAR 6: assigned 

pci 0000:01:00.0: BAR 0: assigned 

pci 0000:01:00.0: BAR 0: set to  (PCI address )

pci 0000:03:00.0: PCI bridge to 

pci 0000:03:00.0: bridge window 

pci 0000:03:00.0: bridge window 

pci 0000:03:00.0: bridge window 

pci 0000:02:01.0: PCI bridge to 

pci 0000:02:01.0: bridge window 

pci 0000:02:01.0: bridge window 

pci 0000:02:01.0: bridge window 

pci 0000:02:04.0: PCI bridge to 

pci 0000:02:04.0: bridge window 

pci 0000:02:04.0: bridge window 

pci 0000:02:04.0: bridge window 

pci 0000:02:05.0: PCI bridge to 

pci 0000:02:05.0: bridge window 

pci 0000:02:05.0: bridge window 

pci 0000:02:05.0: bridge window 

pci 0000:02:07.0: PCI bridge to 

pci 0000:02:07.0: bridge window 

pci 0000:02:07.0: bridge window 

pci 0000:02:07.0: bridge window 

pci 0000:02:09.0: PCI bridge to 

pci 0000:02:09.0: bridge window 

pci 0000:02:09.0: bridge window 

pci 0000:02:09.0: bridge window 

pci 0000:01:00.0: PCI bridge to 

pci 0000:01:00.0: bridge window 

pci 0000:01:00.0: bridge window 

pci 0000:01:00.0: bridge window 

pci 0000:00:00.0: PCI bridge to 

pci 0000:00:00.0: bridge window 

pci 0000:00:00.0: bridge window 

pci 0000:00:00.0: bridge window 

PCI: enabling device 0000:01:00.0 (0140 -> 0143)

PCI: enabling device 0000:02:01.0 (0140 -> 0143)

PCI: enabling device 0000:03:00.0 (0140 -> 0143)

PCI: enabling device 0000:02:04.0 (0140 -> 0143)

PCI: enabling device 0000:02:05.0 (0140 -> 0143)

PCI: enabling device 0000:02:07.0 (0140 -> 0143)

PCI: enabling device 0000:02:09.0 (0140 -> 0143)

IMX usb wakeup probe

add wake up source irq 75

IMX usb wakeup probe

cpu regulator mode:ldo_enable

i.MXC CPU frequency driver

highmem bounce pool size: 64 pages

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

msgmni has been set to 2821

alg: No test for stdrng (krng)

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

mxc_mipi_dsi mxc_mipi_dsi: i.MX MIPI DSI driver probed

MIPI DSI driver module loaded

mxc_sdc_fb mxc_sdc_fb.0: register mxc display driver ldb

regulatorget: get() with no identifier

imx-ipuv3 imx-ipuv3.1: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)

Console: switching to colour frame buffer device 128x48

mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver ldb

mxc_sdc_fb mxc_sdc_fb.2: register mxc display driver lcd

mxc_sdc_fb mxc_sdc_fb.3: register mxc display driver ldb

mxc_sdc_fb mxc_sdc_fb.3: ipu1-di0 already in use

mxc_sdc_fb: probe of mxc_sdc_fb.3 failed with error -16

imx-sdma imx-sdma: loaded firmware 1.1

imx-sdma imx-sdma: initialized

Serial: IMX driver

imx-uart.2: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX

imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX

console  enabled, bootconsole disabled

console  enabled, bootconsole disabled

loop: module loaded

No sata disk.

m25p80 spi0.0: found m25p32, expected sst25vf016b

m25p80 spi0.0: m25p32 (4096 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x000000000000-0x000000100000 : "bootloader"

0x000000100000-0x000000400000 : "kernel"

GPMI NAND driver registered. (IMX)

vcan: Virtual CAN interface driver

CAN device driver interface

flexcan netdevice driver

FEC Ethernet Driver

fec_enet_mii_bus: probed

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1

fsl-ehci fsl-ehci.0: irq 75, io base 0x02184000

fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

add wake up source irq 72

fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2

fsl-ehci fsl-ehci.1: irq 72, io base 0x02184200

fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 1 port detected

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

ARC USBOTG Device Controller driver (1 August 2005)

mousedev: PS/2 mouse device common for all mice

input: gpio-keys as /devices/platform/gpio-keys/input/input0

input: max11801_ts as /devices/platform/imx-i2c.1/i2c-1/1-0048/input/input1

egalax_ts 1-0004: egalax_ts: failed to read firmware version

egalax_ts: probe of 1-0004 failed with error -5

egalax_ts 2-0004: egalax_ts: failed to read firmware version

egalax_ts: probe of 2-0004 failed with error -5

usb 2-1: new full speed USB device number 2 using fsl-ehci

elan - Read Hello Packet Failed

elan-touch: probe of 2-0010 failed with error -22

i2c-core: driver  using legacy suspend method

i2c-core: driver  using legacy resume method

snvs_rtc snvs_rtc.0: rtc core: registered snvs_rtc as rtc0

i2c /dev entries driver

Linux video capture interface: v2.00

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video16

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video17

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video18

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video19

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video20

usb 2-1: device descriptor read/64, error -71

mag3110 2-000e: check mag3110 chip ID

mag3110 2-000e: read chip ID 0xfffffffb is not equal to 0xc4!

mag3110: probe of 2-000e failed with error -22

i2c-core: driver  using legacy suspend method

i2c-core: driver  using legacy resume method

mma8451 0-001c: read chip ID 0x1 is not equal to 0x1a or 0x2a!

mma8451: probe of 0-001c failed with error -22

imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)

Bluetooth: Virtual HCI driver ver 1.3

Bluetooth: HCI UART driver ver 2.2

Bluetooth: HCIATH3K protocol initialized

Bluetooth: Generic Bluetooth USB driver ver 0.6

usbcore: registered new interface driver btusb

mxc_vdoa mxc_vdoa: i.MX Video Data Order Adapter(VDOA) driver probed

VPU initialized

mxc_asrc registered

Galcore version 4.6.9.6622

Thermal calibration data is 0x5544d069

Thermal sensor with ratio = 175

Anatop Thermal registered as thermal_zone0

anatop_thermal_probe: default cooling device is cpufreq!

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

usbcore: registered new interface driver snd-usb-audio

mxc_hdmi_soc mxc_hdmi_soc.0: MXC HDMI Audio

Cirrus Logic CS42888 ALSA SoC Codec Driver

i2c-core: driver  using legacy suspend method

i2c-core: driver  using legacy resume method

imx-hdmi-soc-dai imx-hdmi-soc-dai.0: Failed: Load HDMI-video first.

wm8962 0-001a: Failed to get supply 'DCVDD': -19

wm8962 0-001a: Failed to request supplies: -19

wm8962 0-001a: asoc: failed to probe CODEC wm8962.0-001a: -19

asoc: failed to instantiate card wm8962-audio: -19

imx_3stack asoc driver

Initialize HDMI-audio failed. Load HDMI-video first!

ALSA device list:

No soundcards found.

NET: Registered protocol family 26

TCP cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

can: broadcast manager protocol (rev 20090105 t)

Bluetooth: RFCOMM TTY layer initialized

Bluetooth: RFCOMM socket layer initialized

Bluetooth: RFCOMM ver 1.11

Bluetooth: BNEP (Ethernet Emulation) ver 1.3

Bluetooth: BNEP filters: protocol multicast

Bluetooth: HIDP (Human Interface Emulation) ver 1.2

lib80211: common routines for IEEE802.11 drivers

VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

Bus freq driver module loaded

Bus freq driver Enabled

mxc_dvfs_core_probe

DVFS driver module loaded

usb 2-1: device descriptor read/64, error -71

kmemleak: Kernel memory leak detector initialized

kmemleak: Automatic memory scanning thread started

regulator_init_complete: vmmc: incomplete constraints, leaving on

regulator_init_complete: SPKVDD: incomplete constraints, leaving on

snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:00:00 UTC (0)

eth0: Freescale FEC PHY driver  (mii_bus:phy_addr=1:00, irq=-1)

usb 2-1: new full speed USB device number 3 using fsl-ehci

usb 2-1: device descriptor read/64, error -71

usb 2-1: device descriptor read/64, error -71

usb 2-1: new full speed USB device number 4 using fsl-ehci

usb 2-1: device not accepting address 4, error -71

usb 2-1: new full speed USB device number 5 using fsl-ehci

usb 2-1: device not accepting address 5, error -71

hub 2-0:1.0: unable to enumerate USB device on port 1

PHY: 1:00 - Link is Up - 100/Full

Sending DHCP requests .,

. OK

IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.2.117

IP-Config: Complete:

device=eth0, addr=192.168.2.117, mask=255.255.255.0, gw=192.168.2.10,

host=192.168.2.117, domain=, nis-domain=(none),

bootserver=0.0.0.0, rootserver=192.168.2.130, rootpath=, mtu=576

VFS: Mounted root (nfs filesystem) on device 0:12.

Freeing init memory: 244K

kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

note: it stopped here for a long time

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 not responding, still trying

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

nfs: server 192.168.2.130 OK

starting pid 1413, tty '': '/etc/rc.d/rcS'

Mounting /proc and /sys

Starting the hotplug events dispatcher udevd

udevd (1460): /proc/1460/oom_adj is deprecated, please use /proc/1460/oom_score_adj instead.

Synthesizing initial hotplug events

Setting the hostname to freescale

Mounting filesystems

Booted NFS, not relocating: /tmp /var

mount: mounting usbfs on /proc/bus/usb failed: No such file or directory

starting pid 2729, tty '': '/etc/rc.d/rc_gpu.S'

starting pid 2736, tty '': '/etc/rc.d/rc_mxc.S'

 

arm-none-linux-gnueabi-gcc (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) 4.6.2 20110630 (prerelease)

root filesystem built on Mon, 11 Aug 2014 14:22:50 +0800

Freescale Semiconductor, Inc.

 

freescale login: kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

 

arm-none-linux-gnueabi-gcc (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) 4.6.2 20110630 (prerelease)

root filesystem built on Mon, 11 Aug 2014 14:22:50 +0800

Freescale Semiconductor, Inc.

 

freescale login: root

login[2738]: root login on 'ttymxc0'

root@freescale ~$ mount -t debugfs nodev /sys/kernel/debug/

root@freescale ~$ echo scan /sys/kernel/debug/kmemleak

scan /sys/kernel/debug/kmemleak

root@freescale ~$ cat /sys/kernel/debug/kmemleak

unreferenced object 0xe412e3c0 (size 64):

comm "swapper", pid 1, jiffies 4294937508 (age 859.550s)

hex dump (first 32 bytes):

2c a2 9d e9 2c a2 9d e9 fc 49 a1 80 3c 00 00 00 ,...,....I..] 0xffffffff

 

I don't know why there is memory leaks and how to find the key by the file '/sys/kernel/debug/kmemleak'.

Any reply will be appreciated!

 

 

Best Regargs

Xiaoqiang

 

Outcomes