mipops / dvrescue

Archivist-made software that supports data migration from DV tapes into digital files suitable for long-term preservation. Snapshot daily builds are at https://mediaarea.net/download/snapshots/binary/dvrescue/.
BSD 3-Clause "New" or "Revised" License
95 stars 20 forks source link

Capture crash on Ubuntu (22.04.3) #827

Closed privatezero closed 7 months ago

privatezero commented 9 months ago

Attempting to use CLI capture on Ubuntu and I am having consistent fatal crashes after a couple minutes of capture. I've tested this on two decks with the same results. Command and error results (minorly edited for paths) are:

dvrescue device://0x8004602010e758f --capture --merge-output-concealed --merge-ignore-speed --cc-format scc --cc-output testCapture.dv.dvrescue.scc --xml-output testCapture.dv.dvrescue.xml --merge testCapture.dv
DVRescue v.24.01 (MediaInfoLib v.24.01.20240205) by MIPoPS
double free or corruption (out)1:02:35 (0.5x, DV 32)
Aborted (core dumped)
JeromeMartinez commented 9 months ago

@privatezero our cam connected to our Linux machine has more or less died, would it be possible to have a SSH access or similar to your machine?

privatezero commented 9 months ago

Hi @JeromeMartinez sorry - SSH access isn't possible as I'm testing from my work location. I'm happy to test builds as available though.

JeromeMartinez commented 9 months ago

@privatezero does a dev snapshot from e.g. begin of 2023 works? We are interested in knowing if it ever worked on this machine (bug introduced later or was always there).

privatezero commented 9 months ago

@JeromeMartinez I've just tested the identical command in a version from early 2023 - it resulted in the same error/crash after a few minutes of capture.

dvrescue device://0x8004602010e758f --capture --merge-output-concealed --merge-ignore-speed --cc-format scc --cc-output testCapture.dv.dvrescue.scc --xml-output testCapture.dv.dvrescue.xml --merge testCapture.dv DVRescue v.0.21.11.20230128 (MediaInfoLib v.24.01.20240217) by MIPoPS double free or corruption (fasttop):21 (0.5x, DV 32) Aborted (core dumped)

JeromeMartinez commented 9 months ago

it resulted in the same error/crash after a few minutes of capture.

So issue is maybe due to a driver or OS thing, if it was working in the past. Do you remember to have had it running in the past with another version of the OS?

privatezero commented 9 months ago

Unfortunately we never were using the Ubuntu version in production so I don't really have comparable testing of trying to run longer transfers on an earlier version. I might be able to test that via a USB boot of Ubuntu 20.04 if that would be helpful (but not sure if that would actually give great test results due to how slow those always run).

g-maxime commented 8 months ago

Test snapshot with a memory error fixed MediaArea/MediaInfoLib#1983 https://mediaarea.net/download/snapshots/binary/dvrescue/20240314/

privatezero commented 8 months ago

I only had time to do one quick test of this last week and I still had the same crash/error. I'll try to find some time to do some more thorough testing today or tomorrow. Does this work on your end for extended captures?

g-maxime commented 8 months ago

New snapshot with #832 https://mediaarea.net/download/snapshots/binary/dvrescue/20240319-2/

privatezero commented 8 months ago

great - I'll try to find time this afternoon to test

privatezero commented 8 months ago

I just tested this a couple of times - unfortunately, this time instead of dvrescue itself crashing both transfer attempts resulted in my computer freezing and needing to be force rebooted.

privatezero commented 8 months ago

If this is working on your end, I'll try to find some other way to test on a different machine - right now though I'm limited to my one Linux machine that has thunderbolt ins.

g-maxime commented 8 months ago

I can capture a whole tape without crashes on my machine. But a have a classic ieee1394 card, no a thunderbolt adapter.

Does dvgrab works without crashes on your side?

privatezero commented 8 months ago

I haven't tried a long capture with dvgrab - I've been using FFmpeg's IEC61883 device for capture with no issues though. I'll test dvrescue again this afternoon I can give dvgrab a shot as well.

privatezero commented 8 months ago

@g-maxime I was able to do some testing today and basically had the same results using the same command from above attempting to capture would either crash with the same errors or cause my computer to freeze - often relatively quickly.

I was able to use both dvgrab and FFmpeg to successfully capture the same tape so the problem does seem unique to DVRescue, although I'm not sure if it is an issue caused by my environment.

privatezero commented 8 months ago

Here is a gist of a crash log

g-maxime commented 7 months ago

Hi,

Here's a snapshot with debug information (install both dvrescue and dvrescue-dbg): https://mediaarea.net/download/snapshots/binary/dvrescue/20240422/

It also prints a call trace so we can see in which function the crash appears.

g-maxime commented 7 months ago

Does it only crash with the capture command or also with the other commands (-cmd rew, -cmd ff, -cmd play...)?

Another snapshot: https://mediaarea.net/download/snapshots/binary/dvrescue/20240426/ With dvrescue and dvrescue-dbg installed, you can run it with gdb and type r to run the program and bt after the crash, e.g.

$ gdb --args dvrescue -y device://0 -m out.dv
(gdb) r
<program output>
(gdb) bt
privatezero commented 7 months ago

@g-maxime using the latest snapshot I've been able to complete several longish transfers, so it appears the issue I've been running into might be resolved