Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13461 closed Patch - Bug Fix (fixed)

Playback of Blu-Ray ISO file with mythfrontend encounters SEEK_SET failure at the file position of 2GB preventing further playback

Reported by: Robert Watson Owned by: Klaas de Waal
Priority: minor Milestone: 31.0
Component: MythTV - Blu-ray Playback Version: v29-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The problem I am reporting does *not* affect playing Blu-Ray optical disks as done by mythfrontend main menu “Optical Disks” -> “Play Optical Disc”. Nor does it seem to effect large DVD ISO’s (i.e. larger than 2GB). The only time I have seen this bug is when using the ISO file.

I recently created an ISO of Blu-Ray disk (dd if=/dev/sr0 of=MyDisc?.iso) and put the resulting ISO in the /var/lib/mythtv/videos/ directory. I was pleased to see that mythfrontend would happily play this ISO (after sorting out libaacs0 and KEYDB.cfg) but every time the playback got to 11m19s, playback abruptly halted and mythfrontend went back to the ‘Videos’ menu. At that time the mythfrontend process had logged several messages like this:

mythfrontend.real: mythfrontend[29854]: E Decoder fileringbuffer.cpp:892 (SeekInternal?) FileRingBuf?(myth://Videos@<backendName>/<MyDisc?>.iso): Seek(-2147483648, SEEK_SET) Failed eno: Invalid argument (22)

Please note the message above is the first of 10 or so in a burst. -2147483648 is suspicious because it is 0x8000000 in hexadecimal which smells like 32 bit integer overflow. The other seeks are in sequence and further into integer overflow.

A similar message occurs if you try to ‘jump’ past the 2GB point during playback. For example if you are at the 8 minute point in playback and attempt to skip forward using the right arrow key. The same message is issued, but to state the obvious, the seek position is different.

Investigation of this message revealed that the fault is in fact one of signed 32-bit integer overflow resulting in a bad seek address. I have tested a proposed fix and found it to work fine. No side effects observed. A patch is attached to this bug. I propose this patch as a fix for this bug.

This bug was observed in ‘fixes/0.29’. Looking at master, this bug is still present.

Attachments (1)

ProposedPatch.txt (608 bytes) - added by Robert Watson 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by Robert Watson

Attachment: ProposedPatch.txt added

comment:1 Changed 5 years ago by jpilk

The error message quoted above is similar to the one I quoted yesterday on the users list for DVD .iso playback in a 32-bit Android system:

FileRingBuf(myth://Videos@hp_fed1/dvd_isos/100Days/mythburn.iso): Seek(256, SEEK_END) Failed eno: Invalid argument (22)
DVDInfo: Failed to open device at myth://Videos@hp_fed1/dvd_isos/100Days/mythburn.iso

http://lists.mythtv.org/pipermail/mythtv-users/2019-June/400727.html

That report was with a 4.3 GiB file, but I see the same pattern with a 310 MiB file - so perhaps not similar enough.

comment:2 Changed 5 years ago by Klaas de Waal

Milestone: needs_triage31.0
Owner: changed from JYA to Klaas de Waal
Status: newassigned

The problem can be reproduced on today's master. It happens only when the file is played from a storage group via the myth protocol. The proposed fix does solve the problem.

comment:3 Changed 5 years ago by Klaas de Waal

Fix committed to master, fixes/30 and fixes/29.

comment:4 Changed 5 years ago by Robert Watson <robertabcdefgwatson@…>

Resolution: fixed
Status: assignedclosed

In f0ed96407e/mythtv:

Compute seek offset 64 bits in playback of Blu-Ray iso.

Fixes #13461

Signed-off-by: Klaas de Waal <kdewaal@…>

comment:5 Changed 5 years ago by Robert Watson <robertabcdefgwatson@…>

In ef55cb239/mythtv:

Compute seek offset 64 bits in playback of Blu-Ray iso.

Fixes #13461

Signed-off-by: Klaas de Waal <kdewaal@…>
(cherry picked from commit f0ed96407e6a20db3c6b6ca1a59cb8498736a5cc)
Signed-off-by: Klaas de Waal <kdewaal@…>

comment:6 Changed 5 years ago by Robert Watson <robertabcdefgwatson@…>

In c3f7e46e2/mythtv:

Compute seek offset 64 bits in playback of Blu-Ray iso.

Fixes #13461

Signed-off-by: Klaas de Waal <kdewaal@…>
(cherry picked from commit f0ed96407e6a20db3c6b6ca1a59cb8498736a5cc)
Signed-off-by: Klaas de Waal <klaas@…>

Note: See TracTickets for help on using tickets.