v15 reading epg in existing db crashes - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167) +---- Forum: Tvheadend (https://forum.kodi.tv/forumdisplay.php?fid=168) +---- Thread: v15 reading epg in existing db crashes (/showthread.php?tid=229401) Pages:
1
2
|
reading epg in existing db crashes - peak3d - 2015-06-12 I have the problem, that reading EPG information on startup or when enabling LiveTV leads to a crash, if an EPG* database file exists in ~/.kodi/userdata/Database/ Reading EPG information after deleting the database files before works fine. - I use a self compiled version of kodi based on the release 15.0b1-Isengard. - The pvr.hts plugin was compiled regarding chapter4 in Readme.linux (make command). Unfortunately I don't have the version number of the addon here - I'll look later and add this information. - Linux 15.04 running on Odroid-XU3 Yesterday I already debugged the crash and it happens while trying to insert EPG Information into the sqlite DB. Somehow it lookes like an stack problem, Local variables looks first destroyed but after up/down in gdb they look fine. Before I go deeper into this topic: Is this a known issue and already solved in later releases? Should I better upgrade to the latest commit in the master branch? Pls. let me know if you need more information, RE: reading epg in existing db crashes - wrxtasy - 2015-06-13 No sure if this is related but, I have the similar issue with the EPG and TvHeadend clients running on Isengard across 4 different OS platforms. No crash on startup, but if I try and look at the EPG it will crash Kodi Isengard immediately. I've just compiled latest master Isengard with TvHeadend client v2.1.8. on iOS for the iPad. The good news is no more EPG crashing issues. Isengard nightly with TvHeadend Client v2.1.9 on the RPi2 = EPG / Kodi crash I don't know what to make of it. No issues with Helix. RE: reading epg in existing db crashes - negge - 2015-06-13 Can you guys post your crash logs? RE: reading epg in existing db crashes - peak3d - 2015-06-13 I'll need some time for it cause I have messed up my system completely and reimaged it - this evening is possible RE: reading epg in existing db crashes - wrxtasy - 2015-06-13 Typical, - enabled Debug Logging and rebooted the RPi2 Then what do you know OpenElec Build #612 and TvHeadend v2.19 and the EPG is working. First time in quite a while. RE: reading epg in existing db crashes - peak3d - 2015-06-13 crashlog is: https://www.dropbox.com/s/vnphkyq6bl72gl6/kodi_crashlog-20150613_161629.log?dl=0 Interesting is that it doesn't happen always, -O3 more often then -O0. Always the same channels are loaded into EPG DB If I select "dont use DB for EPG" in settings, everything is fine. Once the database is corruptes it normally segfaults on every start. I'll push the Epg10.db and Epg10.db-journal also into my dropbox folder https://www.dropbox.com/sh/wc2dgpuzcd3n6fm/AAAIjGteK2DWLG7tQwB9F_GYa?dl=0. I'll now make one crash with debugger attached and can provide the backrace after that. Versions: -The last kodi commit was d1a2c33b6c477badb8b9664e8897523a78da91b4 -Sources are: https://github.com/mapfau/xbmc, there are some changes rearding MFC for exynos devices, but no changes in LiveTV -PVR Addon version is HTS_VERSION=2.1.7 Code: Program received signal SIGSEGV, Segmentation fault. Last but not least: I tried to get the crash with enabling / disabling LiveTV inside settings, without luck. It seems that either on shutdown or startup something happens with the database. [Edit] Regarding the sqlite3 documentation: Code: To avoid memory leaks, the application should invoke sqlite3_free() on error message strings returned through the 5th parameter of of sqlite3_exec() after the error message string is no longer needed [Edit2] Pls.let me check my git merge before you do anything [Edit3] Merge is OK - so the issue is really an issue, I'll update to latest master today RE: reading epg in existing db crashes - negge - 2015-06-14 Can you reproduce with an official build? RE: reading epg in existing db crashes - peak3d - 2015-06-14 I git diffed the official branch with "my" branch, there are only 7 files different and they are all Codec specific. Pls. let me first verify the problem with the latest master release RE: reading epg in existing db crashes - peak3d - 2015-06-14 its the same with master, i'll check now with official build. In valgrind are printed some places with unnitialized vars - I'll check them before [Edit] The uninitialized vars don't change the behaviour /but valgrind log looks better :-) I'll make an push request later to your repo. I have uploaded a new log file with EPG_DEUGGING enabled (https://www.dropbox.com/s/s0ygogeah1zf24w/kodi_crashlog-20150615_002558.log?dl=0) It ends with: Code: 00:25:55 T:2723148784 DEBUG: EPG - Load - no database entries found for table 'Welt der Wunder'. Question: Is it correct, that the last line is already processed 9 lines above? For me it seems that multiple threads access the same list of EPG Infos.... RE: reading epg in existing db crashes - peak3d - 2015-06-15 OK, got the official build compiled now (there were some GLES Init problems). But the problem is still present with the official build. Same place where it crashes. From debugging side: It happens always at xbmc/dbwrappers/sqlitedataset.cpp:495 Code: void SqliteDataset::make_query(StringList &_sql) { Iterator i is invalid (sometimes 0x04 sometimes 0x08 in my tests) _sql seems to be ok, the debugger shows a vald line, so something happens with i in the loop. In valgrind I have seen some invalid read / writes regarding the libpython lib, do you see them also? [Edit2] Just analized the flow of the stack trace. There is processed a std::map wich holds EPG's (in Persists()). It seems that another thread writes into this map (PVR Addon??) while it is accessed from the sqlite DB. I think there is a locking mechanism missing between writing EBG from client and reading EPG for DP insertion. RE: reading epg in existing db crashes - peak3d - 2015-06-15 @negge: Can anybody of you reproduce it? If so I can stop searching..... RE: reading epg in existing db crashes - negge - 2015-06-15 I haven't had time to look into it yet. RE: reading epg in existing db crashes - peak3d - 2015-06-15 OK, then I'll continue [Edit] Hard stuff without really knowing what should happen... I did some log output in xbmc/dbwrapper/dataset.cpp, this is the place where the EPG Infos are pushed into the DB. These new log entries are prefixed with DBI and include the this pointer of the dataset: Code: 23:09:51 T:2724197360 DEBUG: EPG - Load - no database entries found for table 'EinsPlus HD'. Good to see: Thread 2554360816 starts post(), but before it ends thread 2724197360 starts also a post on the same dataset. Here are the interesting lines: 23:09:51 T:2554360816 DEBUG: DBI - post - -1581147728 begin ... 23:09:51 T:2724197360 DEBUG: DBI - post - -1581147728 begin 23:09:51 T:2554360816 DEBUG: DBI - post - -1581147728 end Thread 16 must finalize this dataset before another thread can use it...... It would be great if somebody who has more knowledge about what should happen loks over this. Let me know if you need more information. Following the 2 backtraces fo the 2 threads both attaching the same dataset: Code: #0 dbiplus::Dataset::post (this=0xa1f1fe98) at dataset.cpp:304 I'll provide an push request for this soon... [Edit] Can you pls provide me someone to talk about pvr / epg? I need advice if these two threads should be running parallel or if they should run completely one after the other. RE: reading epg in existing db crashes - peak3d - 2015-06-17 OK, I have fixed both issues, one was only EPG dependent (sync, see above) and one was reading Channels (PVR Section). I'll git push them tonight - I have to cleanup all the debug output first.... [Edit] https://github.com/xbmc/xbmc/pull/7300 https://github.com/xbmc/xbmc/pull/7367 RE: reading epg in existing db crashes - belliash - 2015-07-31 Patch from 1 st link fails to apply on top of Kodi 15.0. The second one does not resolve this issue. Could you please provide a working solution for official Kodi 15? |