Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147267 - media-video/noad crashes very badly when deleting the recording which is being cut
Summary: media-video/noad crashes very badly when deleting the recording which is bein...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo VDR Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 00:06 UTC by Matthias Schwarzott
Modified: 2006-10-07 04:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to add better error-checking for preventing segfault (noad-0.6.0-delete-while-scanning.diff,689 bytes, patch)
2006-09-22 06:43 UTC, Matthias Schwarzott
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Schwarzott gentoo-dev 2006-09-12 00:06:41 UTC
A running noad process will crash badly when the recording to be cut is deleted while it runs.
This leads to noad only be killable via "kill -9".
This hanging noad-process will keep vdr from shutting down.

Thus something should be done against. There are several possibilities:
1. Construct a timeout for noad-runs and kill it after 30m or so.
(From the calling shell-script, or from shutdown-script when noad-process is too old).
2a. Implement the timeout directly in noad-executable.
2b. (Better, but more complicated) Find the real cause of the crash.
Comment 1 Matthias Schwarzott gentoo-dev 2006-09-22 06:42:51 UTC
Steps to reproduce the error:
1. Record something, recording should contain multiple files 001.vdr 002.vdr ...
1a. either record something very long
1b. or reduce the max-filesize of recording-files

2. stop the recording/wait for its end.
3. when noad started, delete the recording
4. when noad tries to access the next file it will hang

This is due to bad error-checking in noad.
File cannot be opened => set filenr=-1, the read-command will not check this condition and noad will segfault.

Attached patch will check this condition in read-code-path and kill noad sane (at least I hope so).
Comment 2 Matthias Schwarzott gentoo-dev 2006-09-22 06:43:47 UTC
Created attachment 97749 [details, diff]
patch to add better error-checking for preventing segfault
Comment 3 Matthias Schwarzott gentoo-dev 2006-10-07 04:19:43 UTC
Added patch to ebuild.