Kodi freezes 1-3 seconds after playing any video
#16
Please continue operation after the bt. gdb command "continue"
Reply
#17
Thanks FernetMenta

I ran several bt, then a continue (looked like 5 threads exited). Then another few bt before another continue (with no further action).

bt+continue: https://paste.kodi.tv/ixiwomimuq
Reply
#18
According to the backstrace it can only hang in this while loop: https://github.com/xbmc/xbmc/blob/master...L.cpp#L518

If it hangs there, CPU should be at 100%. Can you confirm this? run top -H -p <pid>
Reply
#19
Since he's on 32-bit, are you getting wraparound in the calculation of now? time_t and long are 32-bit on the architecture, so all the intermediates are 32-bit.
Reply
#20
You can make a gdb breakpoint here, when it hangs and print out the values. That would at least explain why it stops hanging after "some seconds".

But as nothing throttles the CPU, e.g. no sleep, it should not hang that long to be honest.

We will see. https://ftp.gnu.org/old-gnu/Manuals/gdb/...db_28.html
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#21
(2019-03-03, 17:16)fritsch Wrote: You can make a gdb breakpoint here, when it hangs and print out the values. 
 I doubt that you can do this on a release build with no debug symbols.
Reply
#22
(2019-03-03, 17:28)FernetMenta Wrote:
(2019-03-03, 17:16)fritsch Wrote: You can make a gdb breakpoint here, when it hangs and print out the values. 
 I doubt that you can do this on a release build with no debug symbols. 
Yeah - there are -dbg version for all addons in the ppa, but not for kodi itself. Thought that was different.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#23
There're checkboxes in the PPA configuration to "Build debug symbols" and "Publish debug symbols".
Reply
#24
(2019-03-03, 15:48)FernetMenta Wrote: If it hangs there, CPU should be at 100%. Can you confirm this? run top -H -p <pid>
Yes, %CPU is 99.9, %MEM is 7.4 for process kodi-x11 (full output of top -H -p <pid> below)

yasij - can I request a build with debug symbols? Not sure where I can access the checkboxes for ppa.

Please note that I'm travelling for work for the next four days, so whilst I'll be across this thread, I won't have access to my system to do any further tests until Friday night.

Thanks all for the input so far!

Output from top -H -p <kodi-x11 pid>

Threads:  20 total,   1 running,  19 sleeping,   0 stopped,   0 zombie
%Cpu(s): 27.1 us,  2.0 sy,  0.3 ni, 70.5 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  4033648 total,   264376 free,  1480700 used,  2288572 buff/cache
KiB Swap:  4089852 total,  4088828 free,     1024 used.  1781492 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
25916 rnilsson  20   0  872792 297720 126448 R 99.9  7.4   4:44.98 kodi-x11
25933 rnilsson  21   1  872792 297720 126448 S  2.7  7.4   0:05.53 PeripBusCEC
25921 rnilsson  20   0  872792 297720 126448 S  0.3  7.4   0:00.23 AESink
25948 rnilsson  20   0  872792 297720 126448 S  0.3  7.4   0:00.38 VideoPlayer
25952 rnilsson  20   0  872792 297720 126448 S  0.3  7.4   0:00.25 threaded-ml
25917 rnilsson  21   1  872792 297720 126448 S  0.0  7.4   0:00.00 Announce
25919 rnilsson  21   1  872792 297720 126448 S  0.0  7.4   0:00.01 Lirc
25920 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.04 ActiveAE
25926 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.00 kodi-x1:disk$0
25931 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.00 kodi-x11
25932 rnilsson  21   1  872792 297720 126448 S  0.0  7.4   0:00.22 PeripBusUSBUdev
25934 rnilsson  21   1  872792 297720 126448 S  0.0  7.4   0:00.00 PeripBusAddon
25935 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.23 kodi-x11
25936 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.00 Timer
25938 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.00 kodi-x11
25939 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.00 EventServer
25940 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.00 TCPServer
25949 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.00 VideoPlayer
25950 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.00 VideoPlayer
25951 rnilsson  20   0  872792 297720 126448 S  0.0  7.4   0:00.03 Vaapi-Output
Reply
#25
(2019-03-04, 10:03)scronkey Wrote: yasij - can I request a build with debug symbols? Not sure where I can access the checkboxes for ppa
Not for the team-xbmc PPAs. The checkboxes are only available for PPA administrators. You can create your own PPA, and turn those flags on for it. Set the team-xbmc PPA as a dependency. Then copy the package to your PPA from the web interface and tell it to rebuild.

In any case, there is definitely a wraparound bug on 32-bit systems in the code here. C/C++ will not promote the type when all of the intermediates in the r-value are 32-bit. It's also being added in a way which would push overflow by multiplying and storing to get nanoseconds, and then dividing by 1000 to get microseconds. If you can build yourself, the patch to fix the numerics is pretty simple.
Reply
#26
(2019-03-04, 19:08)yasij Wrote:
(2019-03-04, 10:03)scronkey Wrote: yasij - can I request a build with debug symbols? Not sure where I can access the checkboxes for ppa
Not for the team-xbmc PPAs. The checkboxes are only available for PPA administrators. You can create your own PPA, and turn those flags on for it. Set the team-xbmc PPA as a dependency. Then copy the package to your PPA from the web interface and tell it to rebuild.

In any case, there is definitely a wraparound bug on 32-bit systems in the code here. C/C++ will not promote the type when all of the intermediates in the r-value are 32-bit. It's also being added in a way which would push overflow by multiplying and storing to get nanoseconds, and then dividing by 1000 to get microseconds. If you can build yourself, the patch to fix the numerics is pretty simple.   
Sounds reasonable on first glance but does not explain why 18.0 did work and 18.1 doesn't. The code you blame did not change. The only change in this area between 18.0 and 18.1 is:
https://github.com/xbmc/xbmc/commit/79d9...cd6c98dcc3
Reply
#27
@scronkey could you try to compile Kodi yourself? https://github.com/xbmc/xbmc/blob/master....Ubuntu.md
Reply
#28
Hi,

I just wanted to chime in and mention that I have the same problem since upgrading to Kodi 18.1. Downgrading (to repository ppa:team-xbmc/kodi-old) solves the issue. A difference is that I'm running Ubuntu 18.10. I've also made a clean installation (by uninstalling, purging and removing ~/.kodi/ ) and re-tried with out any plugins but this made no difference. I've been running Kodi (or xbmc) for years without any issues up to this point. I've also tried disabling hardware acceleration in Kodi 18.1 but this did not help, I also tried updating to unstable and nightly however this also made 0 difference.
Reply
#29
(2019-03-06, 11:49)SSlim Wrote: Hi,

I just wanted to chime in and mention that I have the same problem since upgrading to Kodi 18.1. Downgrading (to repository ppa:team-xbmc/kodi-old) solves the issue. A difference is that I'm running Ubuntu 18.10. I've also made a clean installation (by uninstalling, purging and removing ~/.kodi/ ) and re-tried with out any plugins but this made no difference. I've been running Kodi (or xbmc) for years without any issues up to this point. I've also tried disabling hardware acceleration in Kodi 18.1 but this did not help, I also tried updating to unstable and nightly however this also made 0 difference.
 Do you run 32 or 64bit OS?
Reply
#30
32-bit as well.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi freezes 1-3 seconds after playing any video0