2016-03-29, 20:03
Hi!
I've been doing some experimenting today, and I believe I've found a memory leak. I'm using a Pi 3 with the OSMC distribution but I'm happy to try other combinations to rule things out. Here's what I've observed so far, and apologies for the lengthy post, just wanted to try and cover as much as I could.
I've really done the bare minimum to produce this leak after writing the OSMC image to the card. This is essentially a step-by-step list of what I've done to create this leak, with some memory observations from bcmstat.sh
1) install OSMC_TGT_rbp2_20160306.img to SD, insert into Pi3. (Kodi 16.0)
2) connected ethernet, hdmi, usb keyboard, power - nothing else
3) boot Pi and let it settle until OSMC config appears
4) config as:
English
Europe/London
test17 hostname
leave SSH enabled
keep OSMC skin
decline newsletter
5) Settings -> Add-ons -> My Add-ons -> All -> DVBLink
configure:
set IP
enable
6) Settings -> System -> Video output -> 50Hz
7) Settings -> TV -> Enabled
8) ssh in as osmc user to get bcmstat.sh setup. I generally keep an ssh session or two always open from this point on, for watching memory usage etc.
9) enter Live TV Guide. After leaving it to settle (without starting a channel) I have 633,000 free memory approx (from bcmstat's Memory Free column)
10) start BBC ONE HD. Immediately after starting I'm at 600,000 free memory approx.
after 1 min: 585,000 free
after 5 min: 582,000 free
after 15 min: 582,000 free
after 30 min: 582,000 free
pretty happy this isn't leaking.
11) Stopped Live TV. Back up to 627,000 free sat at the TV Guide.
12) Time to try Kodi 17. Added the development apt line, as per the OSMC Forum thread, deb http://download.osmc.tv/dev/gmc ./
13) apt-get update, apt-get dist-upgrade: I now have rbp2-mediacenter-osmc 16.8-048.
14) rebooted for good measure, since kodi seems to have quit itself anyway when it got upgraded.
15) letting kodi settle entirely until there's no CPU usage and no iowait after reboot. Note that the skin has changed itself to Estuary. I changed no settings at all.
16) back at TV Guide but not playing yet: settles at 640,000 free.
17) start BBC ONE HD: Immediately after starting: 610,000 free
after 1 min: 587,000 free
after 5 min: 573,000 free
after 15 min: 528,000 free
after 30 min: 468,000 free
this is clearly leaking and from previous testing I know it will keep going down until the kernel OOM killer comes along.
18) For this test, I stopped TV playback after 30 min and then back at TV Guide it settles at 500,000 free.
So 140,000 memory approx has been permanently lost.
18) Disabled DVBLink client and enabled NextPVR client as a comparison. (Still about 500,000 free)
19) rebooted to get a clean slate for NextPVR testing. Left it alone until cpu and disk access settled.
20) Into TV Guide again: 633,000 free.
21) start BBC ONE HD: Immediately after starting: 602,000 free
after 1 min: 600,000 free
after 5 min: 542,000 free
after 15 min: 285,000 free
leak seems even worse this time than the previous test. But this shows the leak isn't isolated to one PVR client?
Finally, I ran it again with debug logging enabled, which is here (caution, 6MB!)
https://raw.githubusercontent.com/celswo...di.old.log
Also bcmstat output while that debug log was generating:
https://raw.githubusercontent.com/celswo...cmstat.log
Would appreciate any pointers on what to do next, whether I can debug this further, am I the only one seeing this, etc?
I've been doing some experimenting today, and I believe I've found a memory leak. I'm using a Pi 3 with the OSMC distribution but I'm happy to try other combinations to rule things out. Here's what I've observed so far, and apologies for the lengthy post, just wanted to try and cover as much as I could.
I've really done the bare minimum to produce this leak after writing the OSMC image to the card. This is essentially a step-by-step list of what I've done to create this leak, with some memory observations from bcmstat.sh
1) install OSMC_TGT_rbp2_20160306.img to SD, insert into Pi3. (Kodi 16.0)
2) connected ethernet, hdmi, usb keyboard, power - nothing else
3) boot Pi and let it settle until OSMC config appears
4) config as:
English
Europe/London
test17 hostname
leave SSH enabled
keep OSMC skin
decline newsletter
5) Settings -> Add-ons -> My Add-ons -> All -> DVBLink
configure:
set IP
enable
6) Settings -> System -> Video output -> 50Hz
7) Settings -> TV -> Enabled
8) ssh in as osmc user to get bcmstat.sh setup. I generally keep an ssh session or two always open from this point on, for watching memory usage etc.
9) enter Live TV Guide. After leaving it to settle (without starting a channel) I have 633,000 free memory approx (from bcmstat's Memory Free column)
10) start BBC ONE HD. Immediately after starting I'm at 600,000 free memory approx.
after 1 min: 585,000 free
after 5 min: 582,000 free
after 15 min: 582,000 free
after 30 min: 582,000 free
pretty happy this isn't leaking.
11) Stopped Live TV. Back up to 627,000 free sat at the TV Guide.
12) Time to try Kodi 17. Added the development apt line, as per the OSMC Forum thread, deb http://download.osmc.tv/dev/gmc ./
13) apt-get update, apt-get dist-upgrade: I now have rbp2-mediacenter-osmc 16.8-048.
14) rebooted for good measure, since kodi seems to have quit itself anyway when it got upgraded.
15) letting kodi settle entirely until there's no CPU usage and no iowait after reboot. Note that the skin has changed itself to Estuary. I changed no settings at all.
16) back at TV Guide but not playing yet: settles at 640,000 free.
17) start BBC ONE HD: Immediately after starting: 610,000 free
after 1 min: 587,000 free
after 5 min: 573,000 free
after 15 min: 528,000 free
after 30 min: 468,000 free
this is clearly leaking and from previous testing I know it will keep going down until the kernel OOM killer comes along.
18) For this test, I stopped TV playback after 30 min and then back at TV Guide it settles at 500,000 free.
So 140,000 memory approx has been permanently lost.
18) Disabled DVBLink client and enabled NextPVR client as a comparison. (Still about 500,000 free)
19) rebooted to get a clean slate for NextPVR testing. Left it alone until cpu and disk access settled.
20) Into TV Guide again: 633,000 free.
21) start BBC ONE HD: Immediately after starting: 602,000 free
after 1 min: 600,000 free
after 5 min: 542,000 free
after 15 min: 285,000 free
leak seems even worse this time than the previous test. But this shows the leak isn't isolated to one PVR client?
Finally, I ran it again with debug logging enabled, which is here (caution, 6MB!)
https://raw.githubusercontent.com/celswo...di.old.log
Also bcmstat output while that debug log was generating:
https://raw.githubusercontent.com/celswo...cmstat.log
Would appreciate any pointers on what to do next, whether I can debug this further, am I the only one seeing this, etc?