Jump to content

multible crashes at initial import


CvH

Recommended Posts

Hi,

I have encountered multible crashes as I tried to sync my existing emby server (latest version) db to some Kodi clients.

 

As base I use LibreELEC with Kodi 17.3 and latest plugin.video.emby

 

It happens for me at RPi3, WeTekHub and some different AMLogic S905 based boxes. It never happend at my Intel based HTPC but happens at my x86 based VM too.

All use the same emby db. I also saw it at different dbs.

After the initial sync (~20 tries + reboots to get it working) it never happens again. If I disable "Emby.Kodi Sync Queue" then it happens every time it adds new Items at initial boot. It also happens if I click at manual sync.

I can easily reproduce it with movies and tv-shows.

 

So I guess the problem is somewhere at the initial sync process.

 

I see a rapid increase of memory usage and then the boxes drop out and Kodi restarts - the AML S905 Boxes tend to freeze completely. Log shows no error even in debug mode.

 

here a video how it behaves with a demo lib (click to see full size)

post-222439-0-23894900-1498221045_thumb.gif

 

observations I had made:

- all boxes have 1gb RAM (besides my Intel HTPC)

- dmesg outputs "MHD-connection invoked oom-killer" -> system runs out of memory

- setting up a swap partition (1gb) doesn't help

- this is nothing "new" it happens at least since Kodi 17

- Kodi log is useless even in full debug

last line (emby plugin debug of last lines https://pastebin.com/xHetnmSS )

NOTICE: EMBY.objects.movies -> ADD movie itemid: 9686a5b3bf65ab754ac3afc33cf8503e - Title: Avatar

the memory consumption is more or less stable till the point comes from the video -> 400-500mb free RAM gets instantly filled -> kodi crashs

 

maybe someone could look into it because the current way is a bit useless ;)

Edited by CvH
Link to comment
Share on other sites

Angelblue05

Try disabling force artwork cache in the emby for kodi add-on settings. Does this help with your situation?

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Angelblue05

Can you tell me your addon settings under sync options? Thanks.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

basically pure defaults (music disabled)

tried both, same situation

594d414ede4e4_1.png 594d41c0f1d1b_2.png

 

-edit- tried to disable the "fast startup" but also no change

Edited by CvH
Link to comment
Share on other sites

Angelblue05

Let's try the bare minimum. Set the force artwork caching to disable, change download threads to 1, change maximum items requested to 1. Does it crash? Let me know, thanks.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

didn't helped, exactly the same problem

 

-edit-

Looks like this a general problem (got some similar reports from the german kodi board), it looks like mostly depending at db size.

1500 movies and 50 tv shows are enough to trigger the problem (maybe less).

Edited by CvH
Link to comment
Share on other sites

Angelblue05

I really have nothing to go on. If the bare minimum is not working, then it might be something else outside the control of emby for kodi. Could you provide your kodi log with the settings I asked? Enable Kodi debug as well. Leave emby for kodi logging set to info. Let it run till it crashes, thanks.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

SkyBehind

I'm running two RPI3 with OSMC on it.  I can sync my library which has 556 movies and 533 TV Shows (10,452 episodes).  Don't think the library size is the problem.

Link to comment
Share on other sites

Don't think the library size is the problem.

 

I have no evidence that this is the problem - just that it often happen at rather big dbs.

 

Debuglog (last few lines) https://pastebin.com/DFntKN66

Full debug log (58mb -> tar.xz 4mb) http://cvh.libreelec.tv/bugs/kodi.old.tar.xz

 

 

then it might be something else outside the control of emby for kodi

 

At least I can see at the mem consumption that it happens inside of Kodi - idk what the addon actually does - but it looks like that some step allocate a huge amount of memory for a short time -> if the device runs out of memory it crashs.

Idk if this is a addon thing or maybe it is due Linux or some other problem.

 

It looks like it is not depending at my setup - I had the same problem at 2 of my friends setups.

Link to comment
Share on other sites

Angelblue05

Looks like your server became unresponsive. Is that right? I don't see what could cause it to become unresponsive, when you set the server to return one item at a time in the addon settings... can you provide your server logs from the same timeframe?

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

Looks like your server became unresponsive.

https://pastebin.com/M48e5T2r <- server log from this time frame (time is running in sync between client and server)

btw client and server are at the same network

 

Strangely a sync is running perfect from my other LE machine with 4gb RAM and also at Windows.

 

I can recreate it with setting to 1 (this takes 3-4h) if needed.

Link to comment
Share on other sites

mjs0162

Exact same problem here, fresh LibreElec Kodi on odroid c2 - once I load up Emby the syncing continuously crashes LibreElec.

Link to comment
Share on other sites

@@Luke

 

Could I get your input on that server log? Is this caused by the add-on or something else?

 

Looks OK to me. That error is just coming from the port mapping feature, which is unrelated.

Link to comment
Share on other sites

Angelblue05

Looks OK to me. That error is just coming from the port mapping feature, which is unrelated.

Ok so then, why:..

13:10:48.817 T:546735911136  NOTICE: EMBY.downloadutils -> DEBUG:: {'url': 'http://some.url.org:8096/emby/Users/Public?format=json', 'json': None, 'params': None, 'timeout': 30}
13:11:27.850 T:545360179424  NOTICE: EMBY.objects._common -> ERROR:: HTTPConnectionPool(host='some.url.org', port=8096): Max retries exceeded with url: /emby/Users/2326e8d4a79e47bc80772388cfbe9406/Items/a58446a8a45333d2e2a32dc3d1f75140?format=json (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7ed2333390>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Link to comment
Share on other sites

He only posted a log snippet so i can't see what happened with Emby server during that time.

Link to comment
Share on other sites

Angelblue05

He only posted a log snippet so i can't see what happened with Emby server during that time.

Ok, but the error is timed with the one in the logs. This was the second attempt at reconnecting (so a total of 1min trying to reconnect). It seems that error causes the server to be unreachable.

 

I will try to see what we can do about the crash in the addon, but I think it's simply caused by kodi waiting for the timeout and not releasing the connection fast enough (or something... I'll have to check). But the server error is causing this intermittence when syncing.

Edited by Angelblue05
Link to comment
Share on other sites

It could be that the syncing process is hitting the server really hard and causing timeouts.

Link to comment
Share on other sites

Angelblue05

It could be that the syncing process is hitting the server really hard and causing timeouts.

 

I asked the user to set the settings to the bare minimum. 1 item request at a time/1 connection. So that cannot be the reason. It still happens.

Edited by Angelblue05
Link to comment
Share on other sites

What are your server specs?

not sure if you asked me or both of us

 

Debian 8 (latest)

Emby server at i5 2500k + 8gb RAM - next to zero load <- where the logs come from

same happens for

 

Ubuntu 16.04 (latest)

Emby server at Odroid_C2

 

He only posted a log snippet so i can't see what happened with Emby server during that time.

http://cvh.libreelec.tv/bugs/emby-server-log.tar.xz <- full log

 

 

It could be that the syncing process is hitting the server really hard and causing timeouts.

Windows and LibreELEC at x86 works perfect (besides at the VM)- also I don't believe a i5 should have performance problems here - exactly at the same spot every time Edited by CvH
Link to comment
Share on other sites

probably wont help, but my pi3 overheated and crashed while doing the initial import, took the case off and pointed a fan at it and the sync completed.

Link to comment
Share on other sites

my pi3 overheated and crashed while doing the initial import

I have already ruled out that case :)
Link to comment
Share on other sites

@@Angelblue05 Found something "new" after trying to recreate a testcase.

Fresh Windows Emby server with just a filled movies db (pure default just added files).
VM + LE with 1gb RAM -> crashes reproduceable like seen.
VM + LE with 4gb RAM -> works reproduceable perfect.

I worked with snapshots (saved snapshot directly before the install of the addon) to have a 100% clean and comparable base. The only difference is the ram size.
So I guess it is save to assume that the addon allocate something > 1gb. Any idea how to debug this ? Would a valgrind debug help (I can't read + understand it)?
 

Edited by CvH
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...