From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Apr 10 13:50:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E07031065670 for ; Fri, 10 Apr 2009 13:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BC0258FC23 for ; Fri, 10 Apr 2009 13:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3ADo17Q027513 for ; Fri, 10 Apr 2009 13:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3ADo1ow027512; Fri, 10 Apr 2009 13:50:01 GMT (envelope-from gnats) Resent-Date: Fri, 10 Apr 2009 13:50:01 GMT Resent-Message-Id: <200904101350.n3ADo1ow027512@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Oleg Ginzburg Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0C63106566B for ; Fri, 10 Apr 2009 13:43:21 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id DF7E88FC0A for ; Fri, 10 Apr 2009 13:43:21 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3ADhKMm021151 for ; Fri, 10 Apr 2009 13:43:20 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n3ADhKAg021149; Fri, 10 Apr 2009 13:43:20 GMT (envelope-from nobody) Message-Id: <200904101343.n3ADhKAg021149@www.freebsd.org> Date: Fri, 10 Apr 2009 13:43:20 GMT From: Oleg Ginzburg To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/133564: audio/cdplay ports - bad behavior when cd drive is empty X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2009 13:50:02 -0000 >Number: 133564 >Category: ports >Synopsis: audio/cdplay ports - bad behavior when cd drive is empty >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 10 13:50:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Oleg Ginzburg >Release: 8.0-CURRENT >Organization: no company >Environment: FreeBSD oleg.net.nevosoft.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #18 r190838M: Wed Apr 8 13:43:35 MSD 2009 root@oleg.net.nevosoft.ru:/usr/obj/usr/src/sys/o20090103 i386 >Description: If execute cdplay -d with empty cd-drive, system come to unstable for "kern.maxfiles limit exceeded by uid NNNN, please see tuning(7)" reason. If looks at this time through lsof(8) -p i see many repeating cdplay 27171 root *116r VCHR 0,86 0t0 86 /dev/acd0 if connect to PID with truss: truss -o /usr/out3.txt -p 27087 then examining /usr/out3.txt give looped messages: .. nanosleep({2.000000000 }) = 0 (0x0) open("/dev/acd0",O_RDONLY,00) ERR#23 'Too many open files in system' nanosleep({2.000000000 }) = 0 (0x0) open("/dev/acd0",O_RDONLY,00) ERR#23 'Too many open files in system' nanosleep({2.000000000 }) = 0 (0x0) .. My CD-ROM hardware/vendor: DVDR >How-To-Repeat: Eject cdrom drive and remove any disc cdplay -f /dev/acd (if acd0 - is correct cd drive) and watching. >Fix: IMHO needs some interval of seconds for attempts to open CD (if cdrom starts slowly) or error count and exit where num of errors overflow. Somewhere close to 69 strings of cd.c .. /* Used to initalise cd */ void init_cd(void) { struct ioc_read_toc_entry read_entry; struct cd_toc_entry toc_buffer[100]; int i; 69: while((cd_fd=open(cd_device,O_RDONLY))<0) sleep(2); cdinfo.eject=0; .. >Release-Note: >Audit-Trail: >Unformatted: