100% CPU and frozen picture

Hi,

As mentioned in a previous thread I have a strange problem where video will freeze and 1 CPU will hit 100%. After a period of time the picture will freeze and then speed up eventually catching up with the sound and the sound and picture will resync. This happens on several different files and never in the same place twice so it is difficult to reproduce. A link to the logs are below. I also have a video of the behaviour but I can’t upload it to the forums.

http://paste.osmc.io/icufosulup

There should be a newer version of Kodi, can you upgrade to that as that will improve performance

Sam

Hi Sam, same issue after the upgrade.

Provide logs demonstrating the issue that have been created after updating to latest version please.

Took a while for me to get these but they have been uploaded just after the issue occurred. I was logging for a long time. Issue occurred at about 16:28 onwards today.

http://paste.osmc.io/epohapares

It looks like you have a problem with your USB drive, as the logs show frequent USB resets: (This is just a small sample from the log)

Sep 30 22:57:09 osmc kernel: usb 2-1: reset high-speed USB device number 2 using ci_hdrc
Sep 30 22:57:10 osmc kernel: scsi host0: uas_eh_bus_reset_handler success
Sep 30 23:07:30 osmc kernel: sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD 
Sep 30 23:07:30 osmc kernel: sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 08 4a 8e 80 00 01 00 00
Sep 30 23:07:30 osmc kernel: scsi host0: uas_eh_bus_reset_handler start
Sep 30 23:07:30 osmc kernel: usb 2-1: reset high-speed USB device number 2 using ci_hdrc
Sep 30 23:07:31 osmc kernel: scsi host0: uas_eh_bus_reset_handler success
Sep 30 23:08:30 osmc kernel: sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD 
Sep 30 23:08:30 osmc kernel: sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 08 4a d0 80 00 01 00 00
Sep 30 23:08:30 osmc kernel: sd 0:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD 
Sep 30 23:08:30 osmc kernel: sd 0:0:0:0: [sda] tag#1 CDB: opcode=0x28 28 00 08 4a d1 80 00 01 00 00
Sep 30 23:08:30 osmc kernel: scsi host0: uas_eh_bus_reset_handler start
Sep 30 23:08:30 osmc kernel: usb 2-1: reset high-speed USB device number 2 using ci_hdrc
Sep 30 23:08:31 osmc kernel: scsi host0: uas_eh_bus_reset_handler success
Sep 30 23:14:23 osmc kernel: sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD 
Sep 30 23:14:23 osmc kernel: sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 08 4c 96 80 00 01 00 00
Sep 30 23:14:23 osmc kernel: scsi host0: uas_eh_bus_reset_handler start
Sep 30 23:14:23 osmc kernel: usb 2-1: reset high-speed USB device number 2 using ci_hdrc
Sep 30 23:14:23 osmc kernel: scsi host0: uas_eh_bus_reset_handler success
Sep 30 23:16:33 osmc kernel: sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD 
Sep 30 23:16:33 osmc kernel: sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 08 4d 1a 80 00 01 00 00
Sep 30 23:16:33 osmc kernel: scsi host0: uas_eh_bus_reset_handler start

How is this drive powered, and are there any USB hubs involved ?

If the drive stops responding and cannot be read for a few seconds until it has been reset, this would explain a pause in the video.

It’s powered from the Vero. Can you see any of those resets just prior to me uploading yesterday? I immediately uploaded the logs just after the issue occurred. 30th Sept was some time ago.

Yes I see the same issue in your original log too.

Is it a spinning drive, like an external 2.5" drive ? If so, it is unlikely to power reliably directly from the vero as most spinning drives exceed the 500mA “official” current limit of USB 2.0, particularly during spin up or heavy activity.

They exceed this limit knowing that the vast majority of Desktop PC’s and laptops can provide a lot more current over USB than the USB standard allows for, but the Vero will not do this. (I have two external 2.5" USB drives and neither will power off my Vero alone)

I would try powering the drive from another power source to confirm whether this is your issue. There are a number of possible ways to do this: a) connect the drive via a powered USB hub, b) connect a suitable power adaptor directly to the drive (many 2.5" “self powered” drives do also provide a socket for a 5v DC adaptor even if they don’t come with one - one of my drives is like this) or try one of those split USB cables that has two USB plugs wired together with a short loop of cable - the thick cable (which includes data) would go to the Vero, the thin cable would go to any other USB socket that can provide a decent amount of power.

I think you’ll find marginal power to the drive is your issue.

Thanks for the info. Yes it’s a western digital 2.5 sub drive. I have an official raspberry pi powered hub I can use for this but one of the benefits of the vero was that I didn’t need to use this so it’s disappointing to hear that the vero can’t power the drive. Also it should be noted that I have had this setup since buying the vero and it was working perfectly up until the August update. Only since the. Have I experienced the issue. Any reason why that might be the case?

Well until you try one of the tests that I suggested we don’t know for certain that it is power related, so I would try running it off the hub first to see if the problem goes away. If not we know it is something else other than power.

No problem. I’ll report back once I’ve wired it up and tested. Thanks.

I wired up the hub and watched a couple of episodes that were previously causing the issue and they played through fine without a problem. I’ll monitor it going forward but I guess a hub is the best way to power a usb drive?

Hi Guys!!

I Have the same problem.
I upgraded to the last version of OSMC, but nothing chaged.

in the log (jounalctl) I see:

Oct 27 12:39:11 PabloOsmc kernel: Free swap  = 0kB
Oct 27 12:39:11 PabloOsmc kernel: Total swap = 0kB
Oct 27 12:39:11 PabloOsmc kernel: 192512 pages RAM
Oct 27 12:39:11 PabloOsmc kernel: 0 pages HighMem/MovableOnly
Oct 27 12:39:11 PabloOsmc kernel: 2648 pages reserved
Oct 27 12:39:11 PabloOsmc kernel: 2048 pages cma reserved
Oct 27 12:39:11 PabloOsmc kernel: [ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name
Oct 27 12:39:11 PabloOsmc kernel: [  108]     0   108     2012       65       7       0        0             0 systemd-journal
Oct 27 12:39:11 PabloOsmc kernel: [  134]     0   134     2678      135       6       0        0         -1000 systemd-udevd
Oct 27 12:39:11 PabloOsmc kernel: [  187]     0   187      688       51       6       0        0             0 systemd-logind
Oct 27 12:39:11 PabloOsmc kernel: [  188]   105   188      840       71       5       0        0             0 avahi-daemon
Oct 27 12:39:11 PabloOsmc kernel: [  189]   104   189     1194      119       7       0        0          -900 dbus-daemon
Oct 27 12:39:11 PabloOsmc kernel: [  190]     0   190      823       35       5       0        0             0 irqbalance
Oct 27 12:39:11 PabloOsmc kernel: [  192]   105   192      808       55       5       0        0             0 avahi-daemon
Oct 27 12:39:11 PabloOsmc kernel: [  193]     0   193     1622      115       7       0        0             0 connmand
Oct 27 12:39:11 PabloOsmc kernel: [  195]     0   195      470       38       4       0        0             0 eventlircd
Oct 27 12:39:11 PabloOsmc kernel: [  210]     0   210     1651      116       8       0        0         -1000 sshd
Oct 27 12:39:11 PabloOsmc kernel: [  215]     0   215      716       58       6       0        0             0 mediacenter
Oct 27 12:39:11 PabloOsmc kernel: [  250]     0   250     1457      107       6       0        0             0 sudo
Oct 27 12:39:11 PabloOsmc kernel: [  252]     0   252      459       33       4       0        0             0 lircd
Oct 27 12:39:11 PabloOsmc kernel: [  254]     0   254      935       75       5       0        0             0 rpcbind
Oct 27 12:39:11 PabloOsmc kernel: [  258]  1000   258   301186   173302     495       0        0             0 kodi.bin
Oct 27 12:39:11 PabloOsmc kernel: [  262]  1000   262     1350       68       6       0        0             0 udisks-glue
Oct 27 12:39:11 PabloOsmc kernel: [  265]     0   265     1353       75       7       0        0             0 wpa_supplicant
Oct 27 12:39:11 PabloOsmc kernel: [  267]     0   267     4083      135       9       0        0             0 udisks-daemon
Oct 27 12:39:11 PabloOsmc kernel: [  268]     0   268     1735       80       7       0        0             0 udisks-daemon
Oct 27 12:39:11 PabloOsmc kernel: [  270]     0   270     8702      182      12       0        0             0 polkitd
Oct 27 12:39:11 PabloOsmc kernel: [  375]   106   375     1202      105       7       0        0             0 ntpd
Oct 27 12:39:11 PabloOsmc kernel: Out of memory: Kill process 258 (kodi.bin) score 925 or sacrifice child
Oct 27 12:39:11 PabloOsmc kernel: Killed process 258 (kodi.bin) total-vm:1204744kB, anon-rss:693208kB, file-rss:0kB

What Can I do??

I have the same problem in 2 Raspberry pi, Raspberry pi 1 and other is raspberry pi 2.

Thanks

Provide complete debug logs demonstrating the issue please.

Hi another time!

This evening I reboot both raspberrys and until now, there are not the message Out of memory. However the use of CPU is very high, 100%

You can download the log file from:

[Log.zip]

Thanks for your help

regards

I believe when @ActionA wrote “complete debug logs” he was expecting that you “enable debugging” in Kodi and sent a “complete set of logs” via the OSMC log uploader.

Hi!!

Could you help me? Where is the OSMC Log uploader??

I have just enabled in advancedsettings.xml logging with all verbose components like this:
<advancedsettings> <loglevel>2</loglevel> <!-- Change this to "1" to hide the on-screen debug log text --> <debug> <extralogging>true</extralogging> <setextraloglevel>32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536</setextraloglevel> <showloginfo>true</showloginfo> </debug> </advancedsettings>

Thanks for your help!

Basically you go to “MyOSMC” and there is one of the submenus being Log Uploader.
Alternative if you have access via SSH you can do grab-logs -A

Thanks!!

But I think that work wrong:

grab-logs -A Logs successfully uploaded. Logs available at http://paste.osmc.io/{"message":"Documentexceedsmaximumlength.

What Can i do? Where are the logs??

regards

Seems one of your log files was too big. Try a subset with grab-logs -IJpKmD