IncentivesPro Forum Index IncentivesPro
Leading USB solutions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Memory Leak with camera

 
Post new topic   Reply to topic    IncentivesPro Forum Index -> USB Redirector for Linux
View previous topic :: View next topic  
Author Message
roms



Joined: 11 Jan 2012
Posts: 22

PostPosted: Tue Sep 08, 2020 10:45 am    Post subject: Memory Leak with camera Reply with quote

We're getting memory leak with USB webcam.
xfreerdp is taking high mem usage : from 6% to 65%+ on Raspberry Pi 3

command line used : xfreerdp /f /sec:rdp /d:DOMAINE /u:"" /p:"" /sound:sys:alsa,format:1,quality:high /rfx /gfx /gfx-h264 /multitransport -bitmap-cache -glyph-cache /gdi:hw +fonts /v:WWW.XXX.YYY.ZZZ /vc:usbrdr /video +gfx-small-cache

If used with freerdp /usb, we dont get high mem usage :
xfreerdp /f /sec:rdp /d:DOMAINE /u:"" /p:"" /sound:sys:alsa,format:1,quality:high /rfx /gfx /gfx-h264 /multitransport -bitmap-cache -glyph-cache /gdi:hw +fonts /v:WWW.XXX.YYY.ZZZ /usb:id:046d:081b /video +gfx-small-cache


Here are the dmesg output
[sept. 8 12:37] usbsrvd: page allocation failure: order:7, mode:0x40cc0(GFP_KERNEL|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0
[ +0,000045] CPU: 0 PID: 25026 Comm: usbsrvd Tainted: G WC O 5.4.51-v7+ #1333
[ +0,000005] Hardware name: BCM2835
[ +0,000004] Backtrace:
[ +0,000027] [<8010d480>] (dump_backtrace) from [<8010d778>] (show_stack+0x20/0x24)
[ +0,000012] r6:965be000 r5:00000000 r4:80d95cb8 r3:325f1318
[ +0,000015] [<8010d758>] (show_stack) from [<808cdbe4>] (dump_stack+0xe0/0x124)
[ +0,000016] [<808cdb04>] (dump_stack) from [<802c7324>] (warn_alloc+0xd4/0x15c)
[ +0,000012] r8:80d05684 r7:00040cc0 r6:80ab60e4 r5:00000000 r4:80d04f48 r3:325f1318
[ +0,000014] [<802c7250>] (warn_alloc) from [<802c84f4>] (__alloc_pages_nodemask+0x1090/0x123c)
[ +0,000007] r3:00000007 r2:80ab60e4
[ +0,000007] r6:00000240 r5:00000000 r4:00000030
[ +0,000018] [<802c7464>] (__alloc_pages_nodemask) from [<802a0664>] (kmalloc_order+0x2c/0x94)
[ +0,000011] r10:00000036 r9:00000007 r8:802de088 r7:00000cc0 r6:000600ae r5:00000007
[ +0,000005] r4:00000000
[ +0,000014] [<802a0638>] (kmalloc_order) from [<802a06f8>] (kmalloc_order_trace+0x2c/0xd0)
[ +0,000006] r5:6f5d0010 r4:00000000
[ +0,000016] [<802a06cc>] (kmalloc_order_trace) from [<802de088>] (__kmalloc+0x260/0x31c)
[ +0,000012] r9:a4677000 r8:7f275920 r7:00000cc0 r6:000600ae r5:6f5d0010 r4:00000000
[ +0,000045] [<802dde28>] (__kmalloc) from [<7f275920>] (IlIIllIll+0xec/0x35c [tusbd])
[ +0,000012] r10:00000036 r9:a4677000 r8:0000062e r7:000600ae r6:80d04f48 r5:6f5d0010
[ +0,000004] r4:00000000
[ +0,000050] [<7f275834>] (IlIIllIll [tusbd]) from [<7f273a0c>] (IIlIIlIll+0xd8/0x16c [tusbd])
[ +0,000012] r10:00000036 r9:00000000 r8:80d04f48 r7:a4677000 r6:6f5d0010 r5:6f5d0010
[ +0,000005] r4:0000062e
[ +0,000049] [<7f273934>] (IIlIIlIll [tusbd]) from [<7f273b08>] (lIllIIIlI+0x68/0xa0 [tusbd])
[ +0,000012] r10:00000036 r9:965be000 r8:00000009 r7:a0e3e9c0 r6:a4589598 r5:6f5d0010
[ +0,000005] r4:80d04f48
[ +0,000049] [<7f273aa0>] (lIllIIIlI [tusbd]) from [<7f273b58>] (IllllIlII+0x18/0x1c [tusbd])
[ +0,000050] [<7f273b40>] (IllllIlII [tusbd]) from [<7f26e114>] (llllIIIIl+0x34/0x48 [tusbd])
[ +0,000031] [<7f26e0e0>] (llllIIIIl [tusbd]) from [<8030a2a4>] (do_vfs_ioctl+0xbc/0x804)
[ +0,000012] [<8030a1e8>] (do_vfs_ioctl) from [<8030aa30>] (ksys_ioctl+0x44/0x6c)
[ +0,000011] r10:00000036 r9:965be000 r8:00000009 r7:000040a1 r6:a0e3e9c0 r5:6f5d0010
[ +0,000005] r4:a0e3e9c1
[ +0,000010] [<8030a9ec>] (ksys_ioctl) from [<8030aa70>] (sys_ioctl+0x18/0x1c)
[ +0,000012] r8:801011c4 r7:00000036 r6:0000081b r5:737025cc r4:014b71c8 r3:6f5d0010
[ +0,000012] [<8030aa58>] (sys_ioctl) from [<80101000>] (ret_fast_syscall+0x0/0x28)
[ +0,000006] Exception stack(0x965bffa8 to 0x965bfff0)
[ +0,000011] ffa0: 014b71c8 737025cc 00000009 000040a1 6f5d0010 6f5d0010
[ +0,000012] ffc0: 014b71c8 737025cc 0000081b 00000036 736fed94 014beabc 00000000 736feb5c
[ +0,000007] ffe0: 000af22c 736feb44 0006c4cc 76c1351c
[ +0,000006] Mem-Info:
[ +0,000023] active_anon:116855 inactive_anon:44781 isolated_anon:0
active_file:19128 inactive_file:19005 isolated_file:0
unevictable:450 dirty:0 writeback:0 unstable:0
slab_reclaimable:5248 slab_unreclaimable:5996
mapped:13623 shmem:531 pagetables:1407 bounce:0
free:7555 free_pcp:102 free_cma:375
[ +0,000018] Node 0 active_anon:467420kB inactive_anon:179124kB active_file:76512kB inactive_file:76020kB unevictable:1800kB isolated(anon):0kB isolated(file):0kB mapped:54492kB dirty:0kB writeback:0kB shmem:2124kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[ +0,000025] Normal free:30220kB min:20480kB low:24576kB high:28672kB active_anon:467804kB inactive_anon:178552kB active_file:76656kB inactive_file:76724kB unevictable:1800kB writepending:0kB present:917504kB managed:895292kB mlocked:1800kB kernel_stack:1944kB pagetables:5628kB bounce:0kB free_pcp:428kB local_pcp:0kB free_cma:1500kB
[ +0,000007] lowmem_reserve[]: 0 0
[ +0,000017] Normal: 1928*4kB (UMEC) 1078*8kB (UMEC) 432*16kB (UMEC) 137*32kB (UMEC) 19*64kB (UMC) 13*128kB (UM) 2*256kB (U) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 31024kB
[ +0,000073] 39562 total pagecache pages
[ +0,000011] 564 pages in swap cache
[ +0,000010] Swap cache stats: add 8831, delete 8267, find 1717/1971
[ +0,000008] Free swap = 69372kB
[ +0,000008] Total swap = 102396kB
[ +0,000008] 229376 pages RAM
[ +0,000008] 0 pages HighMem/MovableOnly
[ +0,000007] 5553 pages reserved
[ +0,000008] 16384 pages cma reserved
[ +0,496062] tusbd: usbd_stub_reset: trying to reset device vid 046d pid 081b
[ +0,099587] usb 1-1.3: reset high-speed USB device number 10 using dwc_otg
[ +0,338407] tusbd: usbd_stub_reset: usb_reset_device returned 0
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 617

PostPosted: Tue Sep 08, 2020 10:47 am    Post subject: Reply with quote

Hi roms,

Could you please confirm the version number of USB Redirector you are using?
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 22

PostPosted: Tue Sep 08, 2020 11:43 am    Post subject: Reply with quote

Hi Peter,

Here are versions :
USB Redirector for Linux v.3.9.1 (arm-gnueabihf)
USB Redirector TS Edition 2.9 & 2.12
FreeRDP 2.1.2 or GIT with the patch FreeRDP-2.0.0-rc3-patch.
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 617

PostPosted: Tue Sep 08, 2020 1:41 pm    Post subject: Reply with quote

Thank you, roms.

Does the memory usage return to normal when you disconnect the webcam?

Would you be able to try it without FreeRDP (i.e. by using the generic USB Redirector on Windows)? Is the memory leak still there in that case?
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 22

PostPosted: Wed Sep 23, 2020 8:35 pm    Post subject: Reply with quote

Sorry for late reply.

Memory used by FreeRDP stay the same if I disconnect the camera.

For testing, I did run a Jitsi conf with Chrome : mem usage is rising fast.
If I run a Jitsi conf with Firefox, memory usage is rising a little less fast.

I did not try the USB redirector variant, but I'll try next week. (I'm not in the good location)

The high mem usage is probably cause by a mixture between xfreerdp and the usbrdr channel/plugin.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IncentivesPro Forum Index -> USB Redirector for Linux All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group