Bug 146478 - xcdroast says "Error writing tracks" even when successful
xcdroast says "Error writing tracks" even when successful
Product: Fedora
Classification: Fedora
Component: xcdroast (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Depends On:
  Show dependency treegraph
Reported: 2005-01-28 13:26 EST by Robin Green
Modified: 2008-02-05 01:08 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-05 01:08:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A cdrecord log (2.85 KB, text/plain)
2005-01-28 13:27 EST, Robin Green
no flags Details
Another cdrecord log (2.83 KB, text/plain)
2005-01-28 13:27 EST, Robin Green
no flags Details

  None (edit)
Description Robin Green 2005-01-28 13:26:08 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
Whenever I burn a CD, xcdroast says "Error writing tracks" in the
status bar at the top of the burn window at the end, even when there
were apparently no errors. Log file attached.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Burn an ISO image using xcdroast

Actual Results:  It said "Error writing tracks"

Expected Results:  "Success" or similar

Additional info:

Kernel version: kernel-2.6.10-1.741_FC3
cdrecord version: cdrecord-2.01.1-5
Comment 1 Robin Green 2005-01-28 13:27:11 EST
Created attachment 110363 [details]
A cdrecord log
Comment 2 Robin Green 2005-01-28 13:27:46 EST
Created attachment 110364 [details]
Another cdrecord log
Comment 3 Didier Heyden 2005-02-03 04:58:11 EST
I think the problem lies in the way xcdroast determines the exit
status code of some of its child processes. For example,
read_write_out() in src/io.c:

    /* pick up return status of child */
    waitpid((pid_t)readcdda_pid, &ret, WNOHANG);

    read_done = WEXITSTATUS(ret);

Since the WNOHANG flag is used in the waitpid() call, we can't be sure
the child has really exited, successfully or not, at the moment the
read_done variable is assigned. A possible work-around could be
something like:

   /* pick up return status of child */
   retries = 100;
   do {
      if (waitpid((pid_t)readcdda_pid, &ret, WNOHANG) ==
          (pid_t)readcdda_pid) {
        if (WIFEXITED(ret)) {
          read_done = WEXITSTATUS(ret);
   } while (--retries > 0);

   if (read_done == 999)
     read_done = -1;

However, this approach may have the disadvantage of freezing the GUI
for a while -- although it wouldn't be forever even if the child
cdrecord process was stuck in some uninterruptible system call.
Comment 4 Harald Hoyer 2005-02-03 05:26:43 EST
good catch! :) Thx!
Comment 5 Matthew Miller 2006-07-10 18:14:50 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 6 petrosyan 2008-02-05 01:08:24 EST
Fedora Core 3 is not maintained anymore.

Setting status to "INSUFFICIENT_DATA". If you can reproduce this bug in the
current Fedora release please reopen this bug.

Note You need to log in before you can comment on or make changes to this bug.