Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#11801 closed Bug Report - General (fixed)

mythutil can generate corrupted, truncated file

Reported by: JYA Owned by: JYA
Priority: critical Milestone: 0.27
Component: MythTV - Recording Version: Unspecified
Severity: medium Keywords:
Cc: paulh Ticket locked: no

Description

When copying a file > 128MB will usually result in a truncated file. the happens when writing on a media slower than a media the content is copied from.

mythutil returns no error code when that happens

I'm lodging the bug under recordings as the problem is in ThreadedFileWriter? and can also be reproduced when recording on a slow medium...

logs:

mythutil --copyfile --infile myth://Default@192.168.1.20:6543/6005_20130724195900.mpg --outfile /mnt/usbdrive/6005_20130724195900.mpg
2013-08-25 12:52:16.445483 C  mythutil version: master [v0.27-beta-55-g38aba3d-dirty] www.mythtv.org
2013-08-25 12:52:16.445523 C  Qt version: compile: 4.8.5, runtime: 4.8.5
2013-08-25 12:52:16.445527 N  Enabled verbose msgs:  general
2013-08-25 12:52:16.445545 N  Setting Log Level to LOG_INFO
2013-08-25 12:52:16.446155 I  Added logging to the console
2013-08-25 12:52:16.446443 I  Setup Interrupt handler
2013-08-25 12:52:16.446454 I  Setup Terminated handler
2013-08-25 12:52:16.446473 I  Setup Segmentation fault handler
2013-08-25 12:52:16.446481 I  Setup Aborted handler
2013-08-25 12:52:16.446489 I  Setup Bus error handler
2013-08-25 12:52:16.446497 I  Setup Floating point exception handler
2013-08-25 12:52:16.446504 I  Setup Illegal instruction handler
2013-08-25 12:52:16.446515 I  Setup Real-time signal 0 handler
2013-08-25 12:52:16.446657 N  Using runtime prefix = /usr
2013-08-25 12:52:16.446674 N  Using configuration directory = /root/.mythtv
2013-08-25 12:52:16.446896 I  Assumed character encoding: en_GB.UTF-8
2013-08-25 12:52:16.483427 N  Empty LocalHostName.
2013-08-25 12:52:16.483446 I  Using localhost value of phenom
2013-08-25 12:52:16.483513 I  Testing network connectivity to '192.168.1.20'
2013-08-25 12:52:16.483818 I  Starting process manager
2013-08-25 12:52:16.483911 I  Starting process signal handler
2013-08-25 12:52:16.484040 I  Starting IO manager (write)
2013-08-25 12:52:16.484040 I  Starting IO manager (read)
2013-08-25 12:52:16.670442 N  Setting QT default locale to en_GB
2013-08-25 12:52:16.670469 I  Current locale en_GB
2013-08-25 12:52:16.670562 N  Reading locale defaults from /usr/share/mythtv//locales/en_gb.xml
2013-08-25 12:52:16.679358 I  Added logging to mythlogserver at TCP:35327
2013-08-25 12:52:16.695718 I  Copying myth://Default@192.168.1.20:6543/6005_20130724195900.mpg to /mnt/usbdrive/6005_20130724195900.mpg
2013-08-25 12:52:16.707183 I  MythCoreContext: Connecting to backend server: 192.168.1.20:6543 (try 1 of 1)
2013-08-25 12:52:16.709653 I  Using protocol version 77
2013-08-25 12:52:16.896809 I  2097152 bytes copied, 0% complete
2013-08-25 12:52:16.965647 I  4194304 bytes copied, 0% complete
2013-08-25 12:52:17.025430 I  6291456 bytes copied, 0% complete
2013-08-25 12:52:17.061630 I  8388608 bytes copied, 0% complete
2013-08-25 12:52:17.097673 I  10485760 bytes copied, 0% complete
2013-08-25 12:52:17.121077 I  12582912 bytes copied, 0% complete
2013-08-25 12:52:17.721024 I  65011712 bytes copied, 5% complete
2013-08-25 12:52:17.745008 I  67108864 bytes copied, 5% complete
2013-08-25 12:52:17.769655 I  69206016 bytes copied, 5% complete
2013-08-25 12:52:17.793341 I  71303168 bytes copied, 5% complete
2013-08-25 12:52:17.817181 I  73400320 bytes copied, 5% complete
2013-08-25 12:52:17.841021 I  75497472 bytes copied, 5% complete
2013-08-25 12:52:18.464556 I  130023424 bytes copied, 10% complete
2013-08-25 12:52:18.488697 I  132120576 bytes copied, 10% complete
2013-08-25 12:52:18.512612 I  134217728 bytes copied, 10% complete
2013-08-25 12:52:18.536734 I  136314880 bytes copied, 10% complete
2013-08-25 12:52:18.560463 I  138412032 bytes copied, 10% complete
2013-08-25 12:52:18.584528 I  140509184 bytes copied, 10% complete
2013-08-25 12:52:19.210664 I  195035136 bytes copied, 15% complete
2013-08-25 12:52:19.233769 I  197132288 bytes copied, 15% complete
2013-08-25 12:52:19.256865 I  199229440 bytes copied, 15% complete
2013-08-25 12:52:19.282895 I  201326592 bytes copied, 15% complete
2013-08-25 12:52:19.306472 I  203423744 bytes copied, 15% complete
2013-08-25 12:52:19.330850 I  205520896 bytes copied, 15% complete
2013-08-25 12:52:19.953547 I  260046848 bytes copied, 20% complete
2013-08-25 12:52:19.979229 I  262144000 bytes copied, 20% complete
2013-08-25 12:52:20.002347 I  264241152 bytes copied, 20% complete
2013-08-25 12:52:20.026879 I  266338304 bytes copied, 20% complete
2013-08-25 12:52:20.050662 I  268435456 bytes copied, 20% complete
2013-08-25 12:52:20.073553 I  270532608 bytes copied, 20% complete
2013-08-25 12:52:20.696456 I  325058560 bytes copied, 25% complete
2013-08-25 12:52:20.722748 I  327155712 bytes copied, 25% complete
2013-08-25 12:52:20.746619 I  329252864 bytes copied, 25% complete
2013-08-25 12:52:20.770607 I  331350016 bytes copied, 25% complete
2013-08-25 12:52:20.793640 I  333447168 bytes copied, 25% complete
2013-08-25 12:52:20.816689 I  335544320 bytes copied, 25% complete
2013-08-25 12:52:21.418504 I  387973120 bytes copied, 30% complete
2013-08-25 12:52:21.442800 I  390070272 bytes copied, 30% complete
2013-08-25 12:52:21.466592 I  392167424 bytes copied, 30% complete
2013-08-25 12:52:21.489749 I  394264576 bytes copied, 30% complete
2013-08-25 12:52:21.514560 I  396361728 bytes copied, 30% complete
2013-08-25 12:52:21.538474 I  398458880 bytes copied, 30% complete
2013-08-25 12:52:21.562412 I  400556032 bytes copied, 30% complete
2013-08-25 12:52:22.172115 I  452984832 bytes copied, 35% complete
2013-08-25 12:52:22.197652 I  455081984 bytes copied, 35% complete
2013-08-25 12:52:22.222581 I  457179136 bytes copied, 35% complete
2013-08-25 12:52:22.246952 I  459276288 bytes copied, 35% complete
2013-08-25 12:52:22.271830 I  461373440 bytes copied, 35% complete
2013-08-25 12:52:22.297713 I  463470592 bytes copied, 35% complete
2013-08-25 12:52:22.936316 I  517996544 bytes copied, 40% complete
2013-08-25 12:52:22.960928 I  520093696 bytes copied, 40% complete
2013-08-25 12:52:22.985074 I  522190848 bytes copied, 40% complete
2013-08-25 12:52:23.010384 I  524288000 bytes copied, 40% complete
2013-08-25 12:52:23.034911 I  526385152 bytes copied, 40% complete
2013-08-25 12:52:23.060196 I  528482304 bytes copied, 40% complete
2013-08-25 12:52:23.376391 E  TFW(/mnt/usbdrive/6005_20130724195900.mpg:45): Maximum buffer size exceeded.
                        file will be truncated, no further writing will be done.
                        This generally indicates your disk performance 
                        is insufficient to deal with the number of on-going 
                        recordings, or you have a disk failure.
2013-08-25 12:52:23.663816 I  583008256 bytes copied, 45% complete
2013-08-25 12:52:23.687991 I  585105408 bytes copied, 45% complete
2013-08-25 12:52:23.712274 I  587202560 bytes copied, 45% complete
2013-08-25 12:52:23.735961 I  589299712 bytes copied, 45% complete
2013-08-25 12:52:23.759852 I  591396864 bytes copied, 45% complete
2013-08-25 12:52:23.783770 I  593494016 bytes copied, 45% complete
2013-08-25 12:52:24.409228 I  648019968 bytes copied, 50% complete
2013-08-25 12:52:24.433144 I  650117120 bytes copied, 50% complete
2013-08-25 12:52:24.457383 I  652214272 bytes copied, 50% complete
2013-08-25 12:52:24.481227 I  654311424 bytes copied, 50% complete
2013-08-25 12:52:24.505548 I  656408576 bytes copied, 50% complete
2013-08-25 12:52:24.527071 I  658505728 bytes copied, 50% complete
2013-08-25 12:52:25.129511 I  710934528 bytes copied, 55% complete
2013-08-25 12:52:25.151269 I  713031680 bytes copied, 55% complete
2013-08-25 12:52:25.177370 I  715128832 bytes copied, 55% complete
2013-08-25 12:52:25.201802 I  717225984 bytes copied, 55% complete
2013-08-25 12:52:25.225212 I  719323136 bytes copied, 55% complete
2013-08-25 12:52:25.247848 I  721420288 bytes copied, 55% complete
2013-08-25 12:52:25.273566 I  723517440 bytes copied, 55% complete
2013-08-25 12:52:25.871287 I  775946240 bytes copied, 60% complete
2013-08-25 12:52:25.895436 I  778043392 bytes copied, 60% complete
2013-08-25 12:52:25.919283 I  780140544 bytes copied, 60% complete
2013-08-25 12:52:25.943258 I  782237696 bytes copied, 60% complete
2013-08-25 12:52:25.969648 I  784334848 bytes copied, 60% complete
2013-08-25 12:52:25.993143 I  786432000 bytes copied, 60% complete
2013-08-25 12:52:26.617371 I  840957952 bytes copied, 65% complete
2013-08-25 12:52:26.639312 I  843055104 bytes copied, 65% complete
2013-08-25 12:52:26.663785 I  845152256 bytes copied, 65% complete
2013-08-25 12:52:26.689540 I  847249408 bytes copied, 65% complete
2013-08-25 12:52:26.711301 I  849346560 bytes copied, 65% complete
2013-08-25 12:52:26.735583 I  851443712 bytes copied, 65% complete
2013-08-25 12:52:27.359292 I  905969664 bytes copied, 70% complete
2013-08-25 12:52:27.383628 I  908066816 bytes copied, 70% complete
2013-08-25 12:52:27.409417 I  910163968 bytes copied, 70% complete
2013-08-25 12:52:27.431248 I  912261120 bytes copied, 70% complete
2013-08-25 12:52:27.457387 I  914358272 bytes copied, 70% complete
2013-08-25 12:52:27.481357 I  916455424 bytes copied, 70% complete
2013-08-25 12:52:28.105392 I  970981376 bytes copied, 75% complete
2013-08-25 12:52:28.127165 I  973078528 bytes copied, 75% complete
2013-08-25 12:52:28.151441 I  975175680 bytes copied, 75% complete
2013-08-25 12:52:28.175263 I  977272832 bytes copied, 75% complete
2013-08-25 12:52:28.199411 I  979369984 bytes copied, 75% complete
2013-08-25 12:52:28.223372 I  981467136 bytes copied, 75% complete
2013-08-25 12:52:28.849420 I  1035993088 bytes copied, 80% complete
2013-08-25 12:52:28.870944 I  1038090240 bytes copied, 80% complete
2013-08-25 12:52:28.898795 I  1040187392 bytes copied, 80% complete
2013-08-25 12:52:28.922603 I  1042284544 bytes copied, 80% complete
2013-08-25 12:52:28.945311 I  1044381696 bytes copied, 80% complete
2013-08-25 12:52:28.969504 I  1046478848 bytes copied, 80% complete
2013-08-25 12:52:29.567373 I  1098907648 bytes copied, 85% complete
2013-08-25 12:52:29.594711 I  1101004800 bytes copied, 85% complete
2013-08-25 12:52:29.617114 I  1103101952 bytes copied, 85% complete
2013-08-25 12:52:29.639699 I  1105199104 bytes copied, 85% complete
2013-08-25 12:52:29.663947 I  1107296256 bytes copied, 85% complete
2013-08-25 12:52:29.687886 I  1109393408 bytes copied, 85% complete
2013-08-25 12:52:30.313478 I  1163919360 bytes copied, 90% complete
2013-08-25 12:52:30.337421 I  1166016512 bytes copied, 90% complete
2013-08-25 12:52:30.361357 I  1168113664 bytes copied, 90% complete
2013-08-25 12:52:30.385354 I  1170210816 bytes copied, 90% complete
2013-08-25 12:52:30.407135 I  1172307968 bytes copied, 90% complete
2013-08-25 12:52:30.431299 I  1174405120 bytes copied, 90% complete
2013-08-25 12:52:31.055467 I  1228931072 bytes copied, 95% complete
2013-08-25 12:52:31.079173 I  1231028224 bytes copied, 95% complete
2013-08-25 12:52:31.103332 I  1233125376 bytes copied, 95% complete
2013-08-25 12:52:31.127450 I  1235222528 bytes copied, 95% complete
2013-08-25 12:52:31.151311 I  1237319680 bytes copied, 95% complete
2013-08-25 12:52:31.177523 I  1239416832 bytes copied, 95% complete
2013-08-25 12:52:31.389852 W  TFW(/mnt/usbdrive/6005_20130724195900.mpg:45): write(2097152) cnt 64 total 134217728 -- took a long time, 9612 ms
2013-08-25 12:52:31.795498 I  1292382876 bytes copied, 100% complete
2013-08-25 12:52:31.811148 I  Wrote 1292382876 bytes total
2013-08-25 12:52:31.811154 I  Waiting for write buffer to flush

Attachments (1)

0001-Wait-until-there-s-more-space-to-write-in-buffer.patch (6.3 KB) - added by JYA 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by JYA

comment:1 Changed 6 years ago by JYA

Cc: paulh added

attempted fix.. reduce the amount of verbosity to only once per session

comment:2 Changed 6 years ago by Jean-Yves Avenard <jyavenard@…>

Resolution: fixed
Status: newclosed

In b199ca363127637e91f4e3f968a9b296911355ee/mythtv:

Make use of ThreadedFileWriter? to tools requiring it

Fixes #11801

comment:3 Changed 6 years ago by Raymond Wagner

Milestone: unknown0.27

comment:4 Changed 6 years ago by Jean-Yves Avenard <jyavenard@…>

In adcc0c829df34f3d16959a261be510e58431dad4/mythtv:

Make use of ThreadedFileWriter? to tools requiring it

Fixes #11801

(cherry picked from commit b199ca363127637e91f4e3f968a9b296911355ee)

Note: See TracTickets for help on using tickets.