{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/9272e386e7094e50d3e3837236786448?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"9272e386e7094e50d3e3837236786448","url":"https://api.github.com/users/samnazarko","login":"samnazarko","id":932652},"milestone":{"state":"open","open_issues":7,"url":"https://api.github.com/repos/opdenkamp/xbmc/milestones/1","due_on":null,"creator":{"avatar_url":"https://secure.gravatar.com/avatar/22406e04308bf466506668498f4af080?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"22406e04308bf466506668498f4af080","url":"https://api.github.com/users/opdenkamp","login":"opdenkamp","id":441806},"title":"eden-pvr","description":"","number":1,"closed_issues":10,"created_at":"2011-10-23T15:48:20Z"},"assignee":null,"updated_at":"2011-11-07T18:03:54Z","labels":[],"comments":1,"closed_at":null,"url":"https://api.github.com/repos/opdenkamp/xbmc/issues/305","body":"This issue is similar to Issue #283.\r\n\r\nThe following is appearing in xbmc.log, and the IO is very high causing the system to lock in some cases:\r\n\r\n```bash\r\ncat /root/.xbmc/temp/xbmc.log | grep Epg\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg4.db\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg3.db\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg2.db\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg1.db\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg.db\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n18:56:53 T:3011705744    INFO: EpgDB - CreateTables - creating tables\r\n18:56:53 T:3011705744   DEBUG: EpgDB - CreateTables - creating table 'epg'\r\n18:56:53 T:3011705744   DEBUG: EpgDB - CreateTables - creating table 'epgtags'\r\n18:56:53 T:3011705744   DEBUG: EpgDB - CreateTables - creating table 'lastepgscan'\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n18:56:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n18:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:01:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:11:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:11:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n19:11:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:21:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:26:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n19:26:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:31:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:41:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:41:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n19:41:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:51:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n19:56:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n19:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:01:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:11:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:11:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n20:11:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:21:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:26:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n20:26:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:31:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:41:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:41:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n20:41:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:51:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n20:56:53 T:3011705744    INFO: EpgContainer - RemoveOldEntries - removing old EPG entries\r\n20:56:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n21:01:53 T:3011705744   DEBUG: Connecting to sqlite:/root/.xbmc/userdata/Database/:Epg5.db\r\n```\r\n\r\nThis has been occurring since October 21st commit to EpgContainer.cpp. Reverting to Sep19 (80278a98c6) version of the file, does not cause the issue.\r\n\r\nInterestingly, marking the file as immutable and erasing its contents:\r\n\r\n```bash\r\necho \"\">Epg5.db\r\ntouch Epg5.db\r\nchattr +i Epg5.db\r\n```\r\n\r\nStops this loop from occurring and bings back sane performance.\r\n\r\nIn Oct21 commit I notice introduction of:\r\n\r\n`bool bLoaded(false);` the use of a boolean variable that might be causing this loop. Use of UTC time instead of local time.\r\n\r\nNot sure if this is of use, but nonetheless. Temporary workaround is this patch:\r\n\r\n```\r\n166d165\r\n<   bool bLoaded(false);\r\n177c176\r\n<     CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(iNow);\r\n---\r\n>     CDateTime::GetCurrentDateTime().GetAsTime(iNow);\r\n179c178\r\n<     bUpdateEpg = (iNow >= m_iNextEpgUpdate || !bLoaded);\r\n---\r\n>     bUpdateEpg = (iNow >= m_iNextEpgUpdate);\r\n194,195d192\r\n<     bLoaded = true;\r\n<\r\n463c460\r\n<     CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(m_iNextEpgUpdate);\r\n---\r\n>     CDateTime::GetCurrentDateTime().GetAsTime(m_iNextEpgUpdate);\r\n477c474\r\n<     CDateTime::GetCurrentDateTime().GetAsUTCDateTime().GetAsTime(iNow);\r\n---\r\n>     CDateTime::GetCurrentDateTime().GetAsTime(iNow);\r\n\r\n```","html_url":"https://github.com/opdenkamp/xbmc/issues/305","title":"Debug log shows XBMC attempting to remove EPG entries constantly.","number":305,"id":2148756,"created_at":"2011-11-04T21:38:14Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/22406e04308bf466506668498f4af080?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"22406e04308bf466506668498f4af080","url":"https://api.github.com/users/opdenkamp","login":"opdenkamp","id":441806},"updated_at":"2011-11-07T18:03:54Z","url":"https://api.github.com/repos/opdenkamp/xbmc/issues/comments/2656971","body":"yeah something is still wrong with the timestamps. I wanted to check all of them for eden-pvr anyway.","id":2656971,"created_at":"2011-11-07T18:03:54Z"}}