From ataraxia@cox.net  Thu Oct 31 18:34:16 2002
Return-Path: <ataraxia@cox.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B6C2937B401
	for <freebsd-gnats-submit@freebsd.org>; Thu, 31 Oct 2002 18:34:16 -0800 (PST)
Received: from lakemtao03.cox.net (lakemtao03.cox.net [68.1.17.242])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1C97F43E97
	for <freebsd-gnats-submit@freebsd.org>; Thu, 31 Oct 2002 18:34:16 -0800 (PST)
	(envelope-from ataraxia@cox.net)
Received: from cox.net ([68.98.184.165]) by lakemtao03.cox.net
          (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP
          id <20021101023415.RBMD16428.lakemtao03.cox.net@cox.net>
          for <freebsd-gnats-submit@freebsd.org>;
          Thu, 31 Oct 2002 21:34:15 -0500
Message-Id: <3DC1E827.6090309@cox.net>
Date: Thu, 31 Oct 2002 21:34:15 -0500
From: Ray Kohler <ataraxia@cox.net>
To: freebsd-gnats-submit@freebsd.org
Subject: (no subject)

>Number:         44803
>Category:       bin
>Synopsis:       burncd hangs after 'blank'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 31 18:40:01 PST 2002
>Closed-Date:    Thu Feb 20 12:28:52 PST 2003
>Last-Modified:  Thu Feb 20 12:28:52 PST 2003
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
  >Submitter-Id:  current-users
  >Originator:    Ray Kohler
  >Confidential:  no
  >Synopsis:      burncd hangs after 'blank'
  >Severity:      serious
  >Priority:      medium
  >Category:      kern
  >Class:         sw-bug
  >Release:       FreeBSD 5.0-CURRENT i386
  >Environment:
 System: FreeBSD arkadia.nv.cox.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: 
 Thu Oct 31 17:39:52 EST 2002 root@arkadia.nv.cox.net:/u
 sr/obj/usr/src/sys/ARKADIA i386
 
 
  >Description:
 If I do a 'blank' the operation completes but burncd then hangs. I have
 a gdb session that shows the situation quite nicely: when burncd does
 CDRIOCGETPROGRESS to get the number for the progress bar, it always
 reports 0, and with no error, so burncd gets stuck in an infinite loop.
 The more I look at this, the more it looks like the drive is giving back
 bogus info for an ATAPI sense command, but this is odd, since it worked
 fine on -stable 3 days ago (before I upgraded).
 
  >How-To-Repeat:
 
 Sorry about the line-wrapping.
 
 /usr/src/usr.sbin/burncd 10:23PM % sudo cc -O -pipe -g -march=athlon
 -Wall -Wno-format-y2k -Wno-uninitialized  -o burncd  burncd.c
 /usr/src/usr.sbin/burncd 10:26PM % sudo gdb burncd
 GNU gdb 5.2.1 (FreeBSD)
 Copyright 2002 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "i386-undermydesk-freebsd"...
 (gdb) r -s 4 -f /dev/acd0c blank
 Starting program: /usr/src/usr.sbin/burncd/burncd -s 4 -f /dev/acd0c blank
 ^Zanking CD, please wait..
 Program received signal SIGTSTP, Stopped (user).
 0x280b0823 in nanosleep () from /usr/lib/libc.so.5
 (gdb) bt
 #0  0x280b0823 in nanosleep () from /usr/lib/libc.so.5
 #1  0x280a594f in sleep () from /usr/lib/libc.so.5
 #2  0x08049069 in main (argc=1, argv=0x2812247c) at burncd.c:194
 #3  0x08048a80 in _start ()
 (gdb) up 2
 #2  0x08049069 in main (argc=1, argv=0x2812247c) at burncd.c:194
 194                                     sleep(1);
 (gdb) l
 189                                             blank == CDR_B_ALL ? 
 "eras" : "blank");
 190
 191                             if (ioctl(fd, CDRIOCBLANK, &blank) < 0)
 192                                     err(EX_IOERR, "ioctl(CDRIOCBLANK)");
 193                             while (1) {
 194                                     sleep(1);
 195                                     error = ioctl(fd, 
 CDRIOCGETPROGRESS, &percent);
 196                                     if (percent > 0 && !quiet)
 197                                             fprintf(stderr,
 198                                                     "%sing CD - %d 
 %% done     \r",
 (gdb)
 199                                                     blank == CDR_B_ALL ?
 200                                                     "eras" : 
 "blank", percent);
 201                                     if (error || percent == 100 ||
 202                                             (percent == 0 && last == 
 99))
 203                                             break;
 204                                     last = percent;
 205                             }
 206                             if (!quiet)
 207                                     printf("\n");
 208                             continue;
 (gdb) p error
 $1 = 0
 (gdb) p percent
 $2 = 0
 (gdb) p last
 $3 = 0
 (gdb) set last=99
 (gdb) p last
 $4 = 99
 (gdb) c
 Continuing.
 
 
 Program exited normally.
 (gdb) q
 
  >Fix:
 This really looks like an ioctl() issue more than a burncd one: either
 CDRIOCGETPROGRESS shouldn't be allowed on 'blank' or it should return
 valid information.
 
 
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->bin 
Responsible-Changed-By: tom 
Responsible-Changed-When: Mon Nov 4 08:23:30 PST 2002 
Responsible-Changed-Why:  
Reassign misfiled burncd(8) problem report 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44803 
Responsible-Changed-From-To: bin->freebsd-bugs 
Responsible-Changed-By: tom 
Responsible-Changed-When: Tue Nov 19 08:50:40 PST 2002 
Responsible-Changed-Why:  
Reassign burncd(8) problem (hopefully correctly reassigned this time) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44803 
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sun Nov 24 03:39:01 PST 2002 
Responsible-Changed-Why:  
Over to burncd author/maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44803 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Thu Feb 20 12:27:46 PST 2003 
State-Changed-Why:  
Belived fixed in -current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44803 
>Unformatted:
