[mythtv-commits] Ticket #12602: lossless transcode that fills the disk loses the tail of the recording

MythTV noreply at mythtv.org
Sun Jan 24 19:45:17 UTC 2016


#12602: lossless transcode that fills the disk loses the tail of the recording
------------------------------------------+---------------------------
 Reporter:  Timothy D Witham <twitham@…>  |          Owner:  jyavenard
     Type:  Bug Report - General          |         Status:  new
 Priority:  minor                         |      Milestone:  unknown
Component:  MythTV - Mythtranscode        |        Version:  0.27.5
 Severity:  medium                        |     Resolution:
 Keywords:  disk full transcode truncate  |  Ticket locked:  0
------------------------------------------+---------------------------

Comment (by Timothy D Witham <twitham@…>):

 Sorry, my attempt to read the source code was still wrong.  But my theory
 of the root cause was right.

 Thanks to your excellent Wiki documentation, I was able to build
 mythtranscode from fixes/0.27 from github.  Then after adding a few
 debugging lines, I discovered the writes are actually in
 programs/mythtranscode/replex/multiplex.c, at least for my .mpg
 recordings.  The return value of write and close in there are discarded.
 Sure enough, write detects the full disk right away:

 {{{
         if (write(mx->fd_out, outbuf, written) < 0)
           LOG(VB_GENERAL, LOG_ERR, "twitham: failed to write %d bytes:
 %d", written, errno);

 Jan 24 13:18:06 mythtv mythtranscode: mythtranscode[24118]: E MPEG2Replex
 replex/multiplex.c:444 (writeout_ext) twitham: failed to write 2048 bytes:
 28
 Jan 24 13:18:06 mythtv mythtranscode: mythtranscode[24118]: E MPEG2Replex
 replex/multiplex.c:299 (writeout_video) twitham: failed to write 2048
 bytes: 28
 Jan 24 13:18:06  mythtranscode: last message repeated 55 times

 #define ENOSPC          28      /* No space left on device */
 }}}

 The write and close is currently in functions that return void.  So now I
 need to figure out how to improve this so the failure can be seen by the
 calling code and cancel the file rename and preserve the original seek
 table and cutlist, and probably unlink the failed .tmp file.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12602#comment:6>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list