Kodi Community Forum

Full Version: RaspBMC Kodi/XBMC test builds
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2014-01-04, 15:28)fernandovg Wrote: [ -> ]UPDATE: I closed video player and still GPU= 938k

When I killed XBMC and restarted GPU_MEM went to 62MB
https://www.dropbox.com/s/g12jefyllt2e09....35.52.png

Try running and quitting xbmc a few times. Measure gpu_mem and see what sort of value it normally has when xbmc is not running.
After the "blocks" problem, quit xbmc and see if gpu_mem is at it's normal level, or is it lower.

If it's lower than normal, then the problem is on gpu, as (vritually) all gpu memory allocated by xbmc should be released when xbmc exits. (1)
If it returns to normal, then it's an xbmc bug of not releasing memory. (2)

Code:
vcgencmd cache_flush && sudo vcdbg reloc
can show you the memory allocated on gpu. Note this is a debug feature that parses memory structures without stopping the gpu,
so it can get out of sync when allocations occur when reading. Run it a couple of times if results are suspicious.

In case (1), then post result of vcdbg after xbmc is quit. The missing memory should be visible (with allocation names) and should give some clues.
In case (2), it's a bit trickier. You'll have to look for the "extra" allocations when it's in the "blocks" state (perhaps by running diff on a sequence of vcdbg logs).
Thanks. Will try
@popcornmix

I noticed that in the last 3 times this happened it was in the end of the video (42min video, happened around 40-41min)
I was monitoring GPU from my phone and it jumped from 10MB to 16MB when the "blocks" appeared.


Here are three files:
mem_with_blocks_player_on.txt - I paused videoplayer when blocks appeared
https://www.dropbox.com/s/l517arqdycb6pz...yer_on.txt

mem_player_closed.txt - after "blocks" I closed video player
https://www.dropbox.com/s/7758c62hda3kj9...closed.txt

mem_xbmc_closed.txt - stopped XBMC
https://www.dropbox.com/s/yb1safq2k1ihyz...closed.txt


I noticed 3 large allocations in mem_with_blocks_player_on.txt
[ 454] 0x181d3800: used 7.9M (refcount 3 lock count 16, size 8294400, align 4096, data 0x181d4000, d1Rual) 'KHRN_IMAGE_T.storage'
[ 164] 0x189bd800: used 7.9M (refcount 2 lock count 8, size 8294400, align 4096, data 0x189be000, d1Rual) 'KHRN_IMAGE_T.storage'
[ 358] 0x191ab400: used 7.9M (refcount 2 lock count 8, size 8294400, align 4096, data 0x191ac000, d1Rual) 'KHRN_IMAGE_T.storage'


and 3 large allocations in mem_player_closed.txt (Isn't supposed to release the memory in KHRN_IMAGE_T.storage as video player is closed?
[ 454] 0x181d3800: used 7.9M (refcount 1 lock count 0, size 8294400, align 4096, data 0x181d4000, d1Rual) 'KHRN_IMAGE_T.storage'
[ 164] 0x189bd800: used 7.9M (refcount 1 lock count 0, size 8294400, align 4096, data 0x189be000, d1Rual) 'KHRN_IMAGE_T.storage'
[ 358] 0x191ab400: used 7.9M (refcount 2 lock count 8, size 8294400, align 4096, data 0x191ac000, d1Rual) 'KHRN_IMAGE_T.storage'

no large allocation when XBMC is closed.

is it related to https://github.com/huceke/omxplayer/pull/53 (old) ?

what about this ?
http://www.raspberrypi.org/phpBB3/viewto...70&t=48177
Another time. "Blocks" with 828k free:
https://www.dropbox.com/s/mqkj2l3dexlb79...r_on_2.txt

Memory after started XBMC - 67MB (leave it alone without moving moving mouse or type anything)
https://www.dropbox.com/s/m3jy7th4bw4l99..._start.txt

Playing the same file after stop/start XBMC - 26MB (didn't boot):
https://www.dropbox.com/s/yeiis42i3j0ia5..._movie.txt


Why there's 32M free in this line and in 0x1e8f0f00 only 828K?
If I sum all values of all lines that begans with 0x.... isn't supposed to be 828K?
Shouldn't the line "0x1c7dff00: free 32M" be part of the free mem "math" ?

First file from this post:
0x1c7dff00: free 32M
[ 136] 0x1e7eff00: used 1.0M (refcount 3 lock count 0, size 1048576, align 4096, data 0x1e7f0000, d1rual) 'Texture blob'
0x1e8f0f00: free 828K
0x1e9c0000: legacy block 2.3M
small allocs not requested

Media info:
Code:
General
Unique ID                        : 180037043381068291518820071816512380191 (0x8771DF903D0C16099B52F23871BF9D1F)
Complete name                    : 1.mkv
Format                           : Matroska
File size                        : 1.58 GiB
Duration                         : 41mn 25s
Overall bit rate                 : 5 458 Kbps
Encoded date                     : UTC 2013-10-15 10:29:08
Writing application              : mkvmerge v5.8.0 ('No Sleep / Pillow') built on Sep  2 2012 15:37:04
Writing library                  : libebml v1.2.3 + libmatroska v1.3.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : [email protected]
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 41mn 25s
Bit rate                         : 4 965 Kbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate                       : 23.976 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.100
Stream size                      : 1.44 GiB (91%)
Language                         : English
Color primaries                  : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics         : BT.709-5, BT.1361
Matrix coefficients              : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

Audio
ID                               : 2
Format                           : AC-3
Format/Info                      : Audio Coding 3
Mode extension                   : CM (complete main)
Codec ID                         : A_AC3
Duration                         : 41mn 25s
Bit rate mode                    : Constant
Bit rate                         : 384 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Bit depth                        : 16 bits
Compression mode                 : Lossy
Stream size                      : 114 MiB (7%)
Language                         : English



Are all this mem files helpful or not?
Do you have any clue of what's going on?
Sorry If I'm troubling you with this.
(2014-01-04, 17:35)fernandovg Wrote: [ -> ]mem_with_blocks_player_on.txt - I paused videoplayer when blocks appeared
https://www.dropbox.com/s/l517arqdycb6pz...yer_on.txt
Still seems to be 35M free here, so surprised there's a failure (unless the failure was only temporary).

Quote:and 3 large allocations in mem_player_closed.txt (Isn't supposed to release the memory in KHRN_IMAGE_T.storage as video player is closed?
[ 454] 0x181d3800: used 7.9M (refcount 1 lock count 0, size 8294400, align 4096, data 0x181d4000, d1Rual) 'KHRN_IMAGE_T.storage'
[ 164] 0x189bd800: used 7.9M (refcount 1 lock count 0, size 8294400, align 4096, data 0x189be000, d1Rual) 'KHRN_IMAGE_T.storage'
[ 358] 0x191ab400: used 7.9M (refcount 2 lock count 8, size 8294400, align 4096, data 0x191ac000, d1Rual) 'KHRN_IMAGE_T.storage'
~8M is probably a 1920x1080x32bpp texture. They are likely to be fanart textures from before launching the video (unfortunately xbmc doesn't free GUI texture when playing videos),
so nothing clearly suspicious there.

If it's a leak, you may expect every play of the video to add one (or more) more alocation of something.
i.e. after N plays of video, there will be N allocations of a certain size. Anything like that visible?

Quote:is it related to https://github.com/huceke/omxplayer/pull/53 (old) ?
No, that's command line omxplayer - it does subs quite differently from xbmc.

Quote:what about this ? http://www.raspberrypi.org/phpBB3/viewto...70&t=48177
I don't think so. Feels like a subs-related leak.
If the leak was not cause by subtitles, then you should get a failure even with subs disabled - do you see that?
You'll either see blocks in the GUI, or video will fail to start after a number of attempts.
Thanks. What about the "math" to get the free mem (last post)?

I dont thinks its temporary because in my cellphone screenshot you can see that there is low memory each 1 seconds (the script reads free gpu mem after 1 second)
(2014-01-04, 19:58)fernandovg Wrote: [ -> ]Thanks. What about the "math" to get the free mem (last post)?

I dont thinks its temporary because in my cellphone screenshot you can see that there is low memory each 1 seconds (the script reads free gpu mem after 1 second)

I think you are misinterpreting the numbers. At the top it days:
Code:
36M free memory in 21 free block(s)

That's the total free memory.

Then there a number of lines like:
Code:
0x1819fee0: free 1.7K
...
0x19fb7e00: free 2.0M
..
0x1c7dff00: free 32M
They are the individual "holes" in the memory, and they sum to the total earlier.

But it's the initial "XXM free memory in YY free blocks" that is the important number. If that reaches zero then we're in trouble.
Thanks! So there is no visible problems with those files and no clue of whats going on?
Updated Gotham build from, based on XBMC master Jan 05 with newclock3 commits.
I still revert XSLT commits as I have no fix for dependencies yet.

See XBMC master and here for extra PR´s (and what´s reverted).
New since last build:
• Many things in XBMC master
• Revert commit 1da0cee, fixes resuming xvid videos
• Revert commit a80d75e due to conflicts with newclock3 commits
• Fix for fanart, do not resize images which can cause additional blurring
• Re-added commit b774702 (additional Airplay fix from Sam, missed in last builds)

If you don´t have libdvdcss already you will have to compile this as explained in post #1.
Nov/Dec update or latest firmware from master tree recommended, also explained in post #1.

To install, SSH to Pi and (note the ” .” (space + dot) in the end of the cp command!):
Code:
cd .upgrade
wget -O xbmc-13-20140105-nc3-aae-dvd.tar.gz http://goo.gl/vNPLkx --no-check-certificate
mkdir -p xbmc-13-20140105-nc3-aae-dvd
tar -xzf xbmc-13-20140105-nc3-aae-dvd.tar.gz -C xbmc-13-20140105-nc3-aae-dvd
cd xbmc-13-20140105-nc3-aae-dvd/xbmc-bcm/xbmc-bin/lib/xbmc/system
cp /usr/local/lib/libdvdcss.so.2.1.0 .
ln -sf libdvdcss.so.2.1.0 libdvdcss.so.2
ln -sf libdvdcss.so.2 libdvdcss.so
Then in Raspbmc, go into "Raspbmc Settings/Nightly Build Configuration/Switch Between Versions of XBMC", and choose new build + restart XBMC.

If you come from an old build or from Frodo, deleting guisettings.xml is recommended.
Also, re-check all settings as some things can change and/or revert to default.
(2014-01-04, 22:07)fernandovg Wrote: [ -> ]Thanks! So there is no visible problems with those files and no clue of whats going on?

If there's always >30M free even when the blocks appear, then it doesn't sound like a memory leak.

You could try setting gpu_mem higher and see if it takes longer for blocks to appear which would be expected if it were w memory leak.
Thats what I did in the past. I started with 128 then I kept increasing until 160 (multiple of 16).
Can you try to reproduce decreasing your gpu_mem?
Updated Gotham build from, based on XBMC master Jan 07 with newclock3 commits + one PR from tamland.

• Many things in XBMC master
• Fix for resuming xvid videos (without reverting the original PR)
• Fix for hls streams that use https passed directly to ffmpeg when they shouldn´t (test)

If you don´t have libdvdcss already you will have to compile this as explained in post #1.
Nov/Dec update or latest firmware from master tree recommended, also explained in post #1.

To install, SSH to Pi and (note the ” .” (space + dot) in the end of the cp command!):
Code:
cd .upgrade
wget -O xbmc-13-20140107-nc3.tar.gz http://goo.gl/QsUgc2 --no-check-certificate
mkdir -p xbmc-13-20140107-nc3
tar -xzf xbmc-13-20140107-nc3.tar.gz -C xbmc-13-20140107-nc3
cd xbmc-13-20140107-nc3/xbmc-bcm/xbmc-bin/lib/xbmc/system
cp /usr/local/lib/libdvdcss.so.2.1.0 .
ln -sf libdvdcss.so.2.1.0 libdvdcss.so.2
ln -sf libdvdcss.so.2 libdvdcss.so
Then in Raspbmc, go into "Raspbmc Settings/Nightly Build Configuration/Switch Between Versions of XBMC", and choose new build + restart XBMC.

If you come from an old build or from Frodo, deleting guisettings.xml is recommended.
Also, re-check all settings as some things can change and/or revert to default.
Just registered to the forum to tell you how awesome you are. Thanks for the fool proof step-by-step update guide. Tested the Jan, 7 build on my newly bought raspberry pi and works like a charm. Much faster and airplay working. Happy.
(2014-01-05, 14:06)miappa Wrote: [ -> ]Updated Gotham build from, based on XBMC master Jan 05 with newclock3 commits.
I still revert XSLT commits as I have no fix for dependencies yet.

See XBMC master and here for extra PR´s (and what´s reverted).
New since last build:
• Many things in XBMC master
• Revert commit 1da0cee, fixes resuming xvid videos
• Revert commit a80d75e due to conflicts with newclock3 commits
• Fix for fanart, do not resize images which can cause additional blurring
• Re-added commit b774702 (additional Airplay fix from Sam, missed in last builds)

If you don´t have libdvdcss already you will have to compile this as explained in post #1.
Nov/Dec update or latest firmware from master tree recommended, also explained in post #1.

To install, SSH to Pi and (note the ” .” (space + dot) in the end of the cp command!):
Code:
cd .upgrade
wget -O xbmc-13-20140105-nc3-aae-dvd.tar.gz http://goo.gl/vNPLkx --no-check-certificate
mkdir -p xbmc-13-20140105-nc3-aae-dvd
tar -xzf xbmc-13-20140105-nc3-aae-dvd.tar.gz -C xbmc-13-20140105-nc3-aae-dvd
cd xbmc-13-20140105-nc3-aae-dvd/xbmc-bcm/xbmc-bin/lib/xbmc/system
cp /usr/local/lib/libdvdcss.so.2.1.0 .
ln -sf libdvdcss.so.2.1.0 libdvdcss.so.2
ln -sf libdvdcss.so.2 libdvdcss.so
Then in Raspbmc, go into "Raspbmc Settings/Nightly Build Configuration/Switch Between Versions of XBMC", and choose new build + restart XBMC.

If you come from an old build or from Frodo, deleting guisettings.xml is recommended.
Also, re-check all settings as some things can change and/or revert to default.
Thanks for that new build. Will test it tonight.
As for the current one 20131230. I must it works great, for now everything is working just fine for me. From playback to airplay.
One side note about airplay:
- I had hickups using airplay. It always happened after something like 3 min. I then disabled visualisation, and everything is back to normal. I dont know how it is in the very last builds. But i would recommend everyone to disable visualisation.

As for the download of the nightlies, i made a simple script to automate it.
Code:
#!/bin/bash
# Initialize our own variables:
nightly_id=""
verbose=0

function show_help(){
    echo "use id argument to define nightly build id you want to install"
}

function on_error(){
    echo "ERROR"
    exit 1
}

optspec=":h-:"

while getopts "$optspec" optchar
do
    case "${optchar}" in
        -)
            case "${OPTARG}" in
              id)
                  nightly_id=${OPTIND}
                  ;;
              id=*)
                  nightly_id=${OPTARG#*=}
                  opt=${OPTARG%=$val}
            esac
            ;;
        h)
            echo "usage: $0 [--id[=]<value>]" >&2
            exit 2
            ;;
    esac
done

echo "verbose=$verbose, id='$nightly_id'"

if [ "$nightly_id" == "" ]
    then
    show_help
    on_error
fi

CWD=$(pwd)

cd ~/.upgrade || on_error
wget -O $nightly_id.tar.gz http://goo.gl/vNPLkx --no-check-certificate || on_error
mkdir -p $nightly_id || on_error
tar -vxzf $nightly_id.tar.gz -C $nightly_id || on_error
cd $nightly_id/xbmc-bcm/xbmc-bin/lib/xbmc/system || on_error
cp /usr/local/lib/libdvdcss.so.2.1.0 . || on_error
ln -sf libdvdcss.so.2.1.0 libdvdcss.so.2 || on_error
ln -sf libdvdcss.so.2 libdvdcss.so || on_error
cd ~/.upgrade || on_error
rm -f $nightly_id.tar.gz
cd $CWD

Thanks!
the problem is that "http://goo.gl/....." link will change for every new build.
When miappa adds the file to dropbox, it will generate a custom url. And when he short it with goo.gl it will generate another custom url.

miappa, change the link name in the first post. There's two "20140105"
Updated Gotham build 20140105 in post #279 (Active AE, newclock3 rebased on master Jan 05 + some fixes)
Updated Gotham build 20140105 in post #282 (newclock3 rebased on master Jan 07 + some fixes and tests)