Win 6 minutes deadlock at the end of every episode
#1
Almost every time I play back an episode of a series there is a 4 to 6 minutes deadlock at the end of the episode.
Episodes and the DB are on the same Server connected via Gb to the HTPC

here are the requested info:
1. XBMC 12.2, vanilla with default skin, PVR disabled, all art scrapers disabled. Only change is the use of MySQL on the NAS
2. Windows Version: 8.1 fully updated to latest patches
3. CPU/Architecture: 3rd Generation Intel Core i3-3217U Processor (1.80GHz 1600MHz 3MB) 64bit
4. RAM amount (1 GB, 512MB etc.): 4.0GB PC3-10600 DDR3 SDRAM 1333 MHz
5. Video Card and Driver version (Intel/Nvidia/etc. version 15.7.8): Intel Integrated HD Graphics, Driver Intel 9.17.10.2932
6. Sound Card and Driver version (Sound Blaster/Intel/etc. version 7.8): Realtek High Definition audio, Driver Realtek 6.0.1.6695, SPDI/F direct output
7. Other devices related to issue (tv, receiver, remote, etc - make/model): none
8. XBMC Revision (eg. 8.10 Atlantis or SVN 16733); [/b ]12.2 Frodo
[b] 9. Detailed Instructions to Reproduce the Problem (The more specific the better.)

The issue is very simple and happens without any special pattern.
I just reboot the PC, log on as master user, select a series, playback episode.
It is not 100% deterministic but almost Always there is a 6 min deadlock, with this I mean that even the clock does not update, no remote command works.
10. FULL Debug Log (Please use your favorite paste site! See below.) :
here the paste: http://pastebin.com/9fmTTxat
I think the episode ended near here:
Code:
22:30:00 T:796   DEBUG: CDVDSubtitlesLibass: [ass] fontconfig: Selected font is not the requested one: 'FolkPro-En-Bold' != 'Buzzwaktype'
       22:33:07 T:3884    INFO: MYSQL server has gone. Will try 4 more attempt(s) to reconnect.

But I do no understand how is possible the 22:33:07 T:3884 INFO: MYSQL server has gone. Will try 4 more attempt(s) to reconnect. as it is on the same NAS I was reading the episode from and the DB should Always be available.
11. MediaInfo output ( goggle mediainfo for where to obtain it for your platform)
It happens with all kind of files, AVI, MP4, MKV etc..

In this case:
Code:
General
Unique ID                                : 224002411774712902093783610203469575248 (0xA8854B95304A8EB393121FFC3B40F450)
Complete name                            : Z:\pch-video\Video\Serie\Blood Lad\Season 01\Blood Lad S01E01 - She's a Skeleton Now.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 306 MiB
Duration                                 : 25mn 50s
Overall bit rate                         : 1 657 Kbps
Encoded date                             : UTC 2013-10-11 19:59:20
Writing application                      : mkvmerge v6.3.0 ('You can't stop me!') built on Jun 28 2013 20:09:41
Writing library                          : libebml v1.3.0 + libmatroska v1.4.0
Attachment                               : Yes / Yes / Yes / Yes / Yes / Yes

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 25mn 50s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Default                                  : No
Forced                                   : Yes

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : A_AAC
Duration                                 : 25mn 50s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Default                                  : No
Forced                                   : Yes

Text
ID                                       : 3
Format                                   : ASS
Codec ID                                 : S_TEXT/ASS
Codec ID/Info                            : Advanced Sub Station Alpha
Compression mode                         : Lossless
Default                                  : Yes
Forced                                   : No


Can you please help me understand where is the issue?
If you think I'm useful please use the +/- button to raise my reputation
Reply
#2
In the new log I found this:

Code:
19:30:23 T:2988   DEBUG: CVideoDatabase::RunQuery took 458817 ms for 13 items query: SELECT * FROM tvshowview  WHERE (tvshowview.idShow IN (select tvshowview.idShow from tvshowview where (watchedcount > 0 AND watchedcount < totalCount) OR (watchedcount = 0 AND tvshowview.idShow IN (select episodeview.idShow from episodeview WHERE episodeview.idShow = tvshowview.idShow AND episodeview.resumeTimeInSeconds > 0))))

458817 ms = 7 min 45 secs

HARG!

how is that possible ?

and on the NAS I have: Mem 21M CPU 99.9%
daemon mysqld
If you think I'm useful please use the +/- button to raise my reputation
Reply
#3
still have the issue. Added a lot of indexes on MySQL but no good result.

any suggestion help?
If you think I'm useful please use the +/- button to raise my reputation
Reply
#4
The issues is the mysql disconnect further up.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
(2013-12-14, 22:45)jmarshall Wrote: The issues is the mysql disconnect further up.

NO,
the issue is the query. I did a lot of tracing and the same query with all MySQL tools, PHP interface etc... does require 7 minutes in any case.
The disconnects is a false error as the retry mechanism works well.

I opened a bug http://trac.xbmc.org/ticket/14759#comment:5 as this is very critical.

Look at my second post:
19:30:23 T:2988 DEBUG: CVideoDatabase::RunQuery took 458817 ms for 13 items query: SELECT * FROM tvshowview WHERE (tvshowview.idShow IN (select tvshowview.idShow from tvshowview where (watchedcount > 0 AND watchedcount < totalCount) OR (watchedcount = 0 AND tvshowview.idShow IN (select episodeview.idShow from episodeview WHERE episodeview.idShow = tvshowview.idShow AND episodeview.resumeTimeInSeconds > 0))))

458817 ms = 458.817 sec = 7.64659 min = 7 min 38 sec



The correct query should be:

SELECT * FROM tvshowview
WHERE
(watchedcount > 0
AND watchedcount < totalCount) OR (watchedcount = 0 AND tvshowview.idShow IN (select
episodeview.idShow
FROM
episodeview
WHERE
episodeview.idShow = tvshowview.idShow
AND episodeview.resumeTimeInSeconds > 0))))

This query provides EXACTLY the same rows of the wrong one but executes in 1 sec instead of 7 minutes.

Something is wrong in how the query is built.


M
If you think I'm useful please use the +/- button to raise my reputation
Reply

Logout Mark Read Team Forum Stats Members Help
6 minutes deadlock at the end of every episode1