Opened 13 years ago

Closed 13 years ago

#3167 closed defect (fixed)

MythArchive: machine hangs/crashes if working directory contains a trailing "/" character

Reported by: briand <turbo@…> Owned by: paulh
Priority: major Milestone: unknown
Component: mytharchive Version: head
Severity: high Keywords:
Cc: Ticket locked: no

Description

It looks like most of MythArchive? can contend with a trailing '/' character specified in setup, but the process will fail when trying to create chapter thumbnails. When it fails, there is no error message generated, no core files created, no segfault -- it just stops. Any processes that were running either stop running or stop being responsive (I was logged out of my ssh session and couldn't reconnect to the myth box), requiring use of the "big red switch" to recover.

Removing the trailing '/' character from the path on subsequent tries allows the process to proceed as expected without hanging the machine. Perhaps the setup can detect & remove any trailing '/' characters on this setting before saving to the database.

Change History (3)

comment:1 Changed 13 years ago by paulh

It's hard to see how a double '/' in a path would cause the problems you have been having. Adding a extra '/' on the end of the temp path has no effect for me.

I just happened to be looking though the mythtv users irc transcripts and came across your conversation with squish102 about this problem. What is strange about the log extract you posted on pastebin is it looks like it was the second file that failed and also I just don't see any path through the code in question can produce that log in normal operation so I suspect that some sort of stack corruption is taking place somewhere. I think the most likely explanation is that the file is corrupt and the avcodec library is choking on the file.

What version of compiler are you using. There may be a problem with using gcc v3.x with libavcodec which complains about the compiler not aligning stack variables. Not sure how big a problem this is I see that warning all the time and it doesn't seem to affect anything but may be something to try.

In any case I will fix the double '/' in the temp work directory path.

comment:2 in reply to:  1 Changed 13 years ago by briand

Replying to paulh:

I just happened to be looking though the mythtv users irc transcripts and came across your conversation with squish102 about this problem. What is strange about the log extract you posted on pastebin is it looks like it was the second file that failed and also I just don't see any path through the code in question can produce that log in normal operation so I suspect that some sort of stack corruption is taking place somewhere. I think the most likely explanation is that the file is corrupt and the avcodec library is choking on the file.

It seemed odd to me, as well. The process would chug along as normal and then just die at that point (creating thumbnail images for the chapters). This is after all of the subdirectories under the temp directory were created and populated with various working files and logs -- in other words, there were plenty of opportunities for it to choke on the '/' before the point it (apparently) did.

I'm not sure about file corruption. The problem originally occurred when I was creating a DVD of two Bruce Hornsby concerts: "Live at the Town Hall" recorded at 480x480 from PBS and "Crossroads: Bruce Hornsby & Ricky Skaggs" recorded at 720x480 from CMT. I had chosen the animated MythCenter? theme for the menus. I had thought that there might be a problem with the older file (at 480x480) during transcoding to dvd resolution, so my second attempt was just with the 720x480 file. That, too, failed... and at the same point. Third attempt was just with the 480x480 file, which also failed at the same point. It was at this point that squish102 posted a 'good' log for me to compare, and the extra '/' is all I saw different. We compared how our temporary working directories were specified, and I eliminated the trailing '/' on my path in setup. I cleared out the /video/tmp directory (rm -rf *, as I had between previous attempts) and re-ran the original attempt with both videos on the resultant dvd. At this point, it ran to completion.

What version of compiler are you using. There may be a problem with using gcc v3.x with libavcodec which complains about the compiler not aligning stack variables. Not sure how big a problem this is I see that warning all the time and it doesn't seem to affect anything but may be something to try.

[root@myth ~]# gcc --version gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1) Copyright (C) 2006 Free Software Foundation, Inc.

In any case I will fix the double '/' in the temp work directory path.

Okay. Again, I agree that this seems to be an odd (and unrelated) fix to a strange 'hang' problem. I'll be archiving more stuff to DVD as my schedule allows, so there'll be plenty of opportunity to stress things, here.

comment:3 Changed 13 years ago by paulh

Resolution: fixed
Status: newclosed

(In [12950]) Better handling of the temp work directory setting to prevent double '/'s from being added to paths.

Closes #3167.

Note: See TracTickets for help on using tickets.