rtai-3.1's rtai_shm.o detects memory leaks on exit

stefano vicini dr_falken at misterweb.it
Fri Oct 8 12:34:57 CEST 2004


Hello everybody,

I'm porting a (working) application from rtai-3.0 to rtai-3.1 and I have the
following problem:
Even if I take care to free the shared memory before to exit, during the rmmod
of rtai_shm.o module I receive the following krn messages:
>>
SHM_CLEANUP_MODULE releases: '00Q4':0xf1ca:61898 (33554432).
Unable to handle kernel paging request at virtual address c48182d0
 printing eip:
c0116ec6
*pde = 011dd067
*pte = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c0116ec6>]    Not tainted
EFLAGS: 00010282
eax: c48182d0   ebx: c370c920   ecx: 0000f166   edx: c3880440
esi: 00000000   edi: c3880440   ebp: c370c9e0   esp: c371bf3c
ds: 0018   es: 0018   ss: 0018
Process sbox-manager (pid: 28, stackpage=c371b000)
Stack: c371a000 c370c92c c388031c c3880300 c3880440 c3634000 c0116040 c3880440

       fffffff4 c10b7bb8 c10b7c90 fffffff4 c3634000 c0116788 00000011 c3634000

       40041658 00000000 fffffff2 00000000 00000000 c0120461 bffff75c c371bfa0

Call Trace:    [<c0116040>] [<c0116788>] [<c0120461>] [<c01075a3>] [<c0108c84>]


Code: 8b 00 85 c0 75 0d 85 f6 0f 84 17 ff ff ff e9 26 ff ff ff 53 
 <1>Unable to handle kernel paging request at virtual address c48182d4
 printing eip:
c01272a5
*pde = 011dd067
*pte = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c01272a5>]    Not tainted
EFLAGS: 00010282
eax: c48182d0   ebx: c370c9e0   ecx: 00000000   edx: 00000001
esi: 02000000   edi: c3880300   ebp: 4014c000   esp: c371be04
ds: 0018   es: 0018   ss: 0018
Process sbox-manager (pid: 28, stackpage=c371b000)
Stack: c370c440 c3880300 c02406c7 c371a000 0000000b c0115ed4 c3880300 c3880300

       c011a3e2 c3880300 c371bf08 c02406c7 00000000 00000000 c01092eb 0000000b

       00000000 c01139c0 c02406c2 c371bf08 00000000 00000000 c11da000 c01857e0

Call Trace:    [<c0115ed4>] [<c011a3e2>] [<c01092eb>] [<c01139c0>] [<c01857e0>]

  [<c0114aad>] [<c018731b>] [<c01877b6>] [<c0123d25>] [<c48050f4>] [<c0113730>]

  [<c0108db4>] [<c0116ec6>] [<c0116040>] [<c0116788>] [<c0120461>] [<c01075a3>]

  [<c0108c84>]

Code: 8b 40 04 85 c0 0f 85 b0 00 00 00 8b 47 18 48 89 47 18 53 e8 
<<

it happens for linux-2.4.25, linux-2.4.27 but not on linux-2.6.8.1.

I'm still using rtai_malloc and rtai_free, but I've seen they are just macros
for the right functions.

I tried to simplify the code, just allocation and deallocation in user mode
(simple user program no realtime), 
but it still happens. 
I'm sure to give back to rtai_free the same address and block name I've received
and used for rtai_malloc.
The block is about 30MBytes (I tried also with 4096K... but nothing to do).

I've tried also many configurations (Xenomai Y/N LXRT Y/N) but nothig to do.

It seems a conseguence for a dynamic memory leak...

Does someone have a similar experience?

thanks
Stefano Vicini




More information about the Rtai mailing list