From batuto@yb3791.spb.edu  Sat Nov 30 14:44:39 2002
Return-Path: <batuto@yb3791.spb.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E878737B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Nov 2002 14:44:39 -0800 (PST)
Received: from wg.pu.ru (wg.pu.ru [193.124.85.219])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2F8A243EB2
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 30 Nov 2002 14:44:38 -0800 (PST)
	(envelope-from batuto@yb3791.spb.edu)
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id WAA06660
	for FreeBSD-gnats-submit@freebsd.org; Sat, 30 Nov 2002 22:44:36 GMT
Received: from yb3791.spb.edu (yb3791.spb.edu [192.168.10.2])
	by gate3791.spb.edu (Postfix) with SMTP id AFE716C1
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  1 Dec 2002 01:09:52 +0300 (MSK)
Received: by yb3791.spb.edu (Postfix, from userid 1000)
	id 88D951D80; Sat, 30 Nov 2002 15:43:05 +0300 (MSK)
Message-Id: <20021130124305.88D951D80@yb3791.spb.edu>
Date: Sat, 30 Nov 2002 15:43:05 +0300 (MSK)
From: "Yan V.Batuto" <batuto@wgc.chem.pu.ru>
Reply-To: "Yan V.Batuto" <batuto@wgc.chem.pu.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Kernel trap 12 in sound/pcm code
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         45889
>Category:       kern
>Synopsis:       Kernel trap 12 in sound/pcm code
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 30 14:50:01 PST 2002
>Closed-Date:    Sat Nov 30 17:27:54 PST 2002
>Last-Modified:  Sat Nov 30 17:27:54 PST 2002
>Originator:     Yan V. Batuto
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
St. Petersburg State University
>Environment:
System: FreeBSD 4.7-STABLE #0: Fri Nov 29 01:05:16 MSK 2002 i386
Motherboard: JetWay V333U (VIA KT333 with VT8235 south bridge)
pcm0: <VIA VT8235> port 0xe400-0xe4ff irq 5 at device 17.5 on pci0
	
>Description:
	
Kernel crashes usually during KDE initialization. It depends on
KDE configuration ("rm -rf ~/.kde && startx startkde" never
crashed yet, and AC'97 sound worked OK), and hw.snd.pcm0.vchans
setting. Kernel trap with hw.snd.pcm0.vchans=4 at least much
more probable than with vchans=0.

Trap occurs in dev/sound/pcm/feeder_rate.c:171
==== from gdb session ====
165                     alpha += info->srcinc;
166                     spos += (alpha >> 16) * 2;
167                     alpha &= 0xffff;
168
169             }
170             info->alpha = alpha & 0xffff;
171             info->buffer[0] = info->buffer[spos - hidelta];
172             info->buffer[1] = info->buffer[spos - hidelta + 1];

(kgdb) print spos-hidelta
$1 = -2
(kgdb) print info->buffer[spos-hidelta]
Cannot access memory at address 0xc0fe0ffc.
==== from gdb session ====

>How-To-Repeat:
	

>Fix:
As a ugly workaround try to 
sysctl -w hw.snd.pcm0.vchans=0
but I'm NOT sure it is sufficiently.
	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Sat Nov 30 17:23:34 PST 2002 
State-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=45889 
State-Changed-From-To: closed->open 
State-Changed-By: maxim 
State-Changed-When: Sat Nov 30 17:24:18 PST 2002 
State-Changed-Why:  
I have forgotten to specify a reason why I closed the PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=45889 
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Sat Nov 30 17:27:28 PST 2002 
State-Changed-Why:  
Duplicate of kern/45871. 

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