Skip to contentSkip to conversation

Memory leak in 3.4.x-rt ?

DISCUSSION Ralf Rösch 3 participants 3 messages Aug 24, 2012 – Sep 25, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

we work on our TX4938 (Toshiba Mips, little endian mode) based embedded system (motion control) running successfully a 3.2 RT patched kernel for month now.

I just give a try to a 3.4 RT patched kernel and detected a memory problem as you can see from the logs below:

3.2 with RT FULL PREEMPT is o.k
3.4 without RT FULL PREEMPT is .ok.
3.4 with RT FULL PREEMPT is not o.k.

Can anyone give me hint in which direction I could go to detect the problem or has anyone else the same problem?

Thanks and regards
Ralf

Linux MCU 3.2.27-rt40-00027-g8fd8396 #36 PREEMPT RT Mon Aug 20 16:21:04 CEST 2012 mips GNU/Linux

[root@MCU:/opt]# watch -n 1 cat /proc/meminfo  | grep MemFree
MemFree:          216992 kB
MemFree:          216992 kB
MemFree:          216944 kB
MemFree:          216992 kB
MemFree:          216992 kB
MemFree:          216992 kB
MemFree:          216992 kB

uname -a
Linux MCU 3.4.9-rt17-11244-gb12622a #23 PREEMPT RT Fri Aug 24 12:15:49 CEST 2012 mips GNU/Linux

[root@MCU:/opt]# watch -n 1 cat /proc/meminfo  | grep MemFree
MemFree:          204304 kB
MemFree:          204208 kB
MemFree:          204112 kB
MemFree:          204064 kB
MemFree:          203968 kB
MemFree:          203920 kB
MemFree:          203824 kB
MemFree:          203776 kB

uname -a
Linux MCU 3.4.9-rt17-11244-gb12622a #24 PREEMPT Fri Aug 24 14:15:04 CEST 2012 mips GNU/Linux

[root@MCU:/opt]# watch -n 1 cat /proc/meminfo  | grep MemFree
MemFree:          222240 kB
MemFree:          222192 kB
MemFree:          222192 kB
MemFree:          222192 kB
MemFree:          222144 kB
MemFree:          222144 kB
MemFree:          222192 kB
MemFree:          222144 kB
MemFree:          222192 kB
MemFree:          222144 kB
#1 lore raw

2012/8/24 Ralf Rösch <[email protected]>:

Quoted 47 lines

Hi,

we work on our TX4938 (Toshiba Mips, little endian mode) based embedded system (motion control)
running successfully a 3.2 RT patched kernel for month now.

I just give a try to a 3.4 RT patched kernel and detected a memory problem as you can see from the logs below:

3.2 with RT FULL PREEMPT is o.k
3.4 without RT FULL PREEMPT is .ok.
3.4 with RT FULL PREEMPT is not o.k.

Can anyone give me hint in which direction I could go to detect the problem or has anyone else the same problem?

Thanks and regards
Ralf

Linux MCU 3.2.27-rt40-00027-g8fd8396 #36 PREEMPT RT Mon Aug 20 16:21:04 CEST 2012 mips GNU/Linux

[root@MCU:/opt]# watch -n 1 cat /proc/meminfo  | grep MemFree
MemFree:          216992 kB
MemFree:          216992 kB
MemFree:          216944 kB
MemFree:          216992 kB
MemFree:          216992 kB
MemFree:          216992 kB
MemFree:          216992 kB

uname -a
Linux MCU 3.4.9-rt17-11244-gb12622a #23 PREEMPT RT Fri Aug 24 12:15:49 CEST 2012 mips GNU/Linux

[root@MCU:/opt]# watch -n 1 cat /proc/meminfo  | grep MemFree
MemFree:          204304 kB
MemFree:          204208 kB
MemFree:          204112 kB
MemFree:          204064 kB
MemFree:          203968 kB
MemFree:          203920 kB
MemFree:          203824 kB
MemFree:          203776 kB

uname -a
Linux MCU 3.4.9-rt17-11244-gb12622a #24 PREEMPT Fri Aug 24 14:15:04 CEST 2012 mips GNU/Linux

Quoted 11 lines
[root@MCU:/opt]# watch -n 1 cat /proc/meminfo  | grep MemFree
MemFree:          222240 kB
MemFree:          222192 kB
MemFree:          222192 kB
MemFree:          222192 kB
MemFree:          222144 kB
MemFree:          222144 kB
MemFree:          222192 kB
MemFree:          222144 kB
MemFree:          222192 kB
MemFree:          222144 kB

You have a big leak (around 100kB/sec), yes, but can you give us more details ? What kind of application ? Network ? video encoder ?
Which drivers are you using ?
Did you try using some advanced tools in order to check that your application cannot have a memory leak in a specific use case (race condition ?) ?
You will need to be more precise on the memory leak detection, because with what you gave, I (maybe others can) cannot help you more...

Regards,
JM
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 26 lines · Jean-Michel Hautbois

2012/8/24 Ralf Rösch<[email protected]>:

Quoted 16 lines

Hi,

we work on our TX4938 (Toshiba Mips, little endian mode) based embedded system (motion control)
running successfully a 3.2 RT patched kernel for month now.

I just give a try to a 3.4 RT patched kernel and detected a memory problem as you can see from the logs below:

3.2 with RT FULL PREEMPT is o.k
3.4 without RT FULL PREEMPT is .ok.
3.4 with RT FULL PREEMPT is not o.k.
[..]
uname -a
Linux MCU 3.4.9-rt17-11244-gb12622a #23 PREEMPT RT Fri Aug 24 12:15:49 CEST 2012 mips GNU/Linux

Quoted 9 lines
[root@MCU:/opt]# watch -n 1 cat /proc/meminfo  | grep MemFree
MemFree:          204304 kB
MemFree:          204208 kB
MemFree:          204112 kB
MemFree:          204064 kB
MemFree:          203968 kB
MemFree:          203920 kB
MemFree:          203824 kB
MemFree:          203776 kB
Quoted 9 lines

[..]
You have a big leak (around 100kB/sec), yes, but can you give us more details ? What kind of application ? Network ? video encoder ?
Which drivers are you using ?
Did you try using some advanced tools in order to check that your application cannot have a memory leak in a specific use case (race condition ?) ?
You will need to be more precise on the memory leak detection, because with what you gave, I (maybe others can) cannot help you more...

In a first step, I would propose to run "cat /proc/meminfo" repeatedly and no longer only check MemFree but check all other variables. One of them will increase in the same amount as MemFree decreases. Which one is it? Slab? This information will then lead us where to search further.

-Carsten.
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html