From owner-freebsd-questions@FreeBSD.ORG Sat Oct 11 02:38:59 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CC7016A4B3 for ; Sat, 11 Oct 2003 02:38:59 -0700 (PDT) Received: from mailbo.vtcif.telstra.com.au (mailbo.vtcif.telstra.com.au [202.12.144.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB8C843FAF for ; Sat, 11 Oct 2003 02:38:54 -0700 (PDT) (envelope-from ghd832332157@geckomail.org) Received: by mailbo.vtcif.telstra.com.au (Postfix, from userid 5) id 29A9822881; Sat, 11 Oct 2003 19:38:52 +1000 (EST) Received: from mailbi.vtcif.telstra.com.au(202.12.142.19) via SMTP by mailbo.vtcif.telstra.com.au, id smtpdQ2aOv5; Sat Oct 11 19:38:20 2003 Received: from mailbi.vtcif.telstra.com.au (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 290DE22882 for ; Sat, 11 Oct 2003 19:38:20 +1000 (EST) Received: from mail.cdn.telstra.com.au (mail.cdn.telstra.com.au [144.135.138.138]) by mailbi.vtcif.telstra.com.au (Postfix) with ESMTP id C40E222881 for ; Sat, 11 Oct 2003 19:38:19 +1000 (EST) Received: from fuzzy.trl.telstra.com.au (fuzzy.trl.telstra.com.au [137.147.132.229]) by mail.cdn.telstra.com.au (8.8.2/8.6.9) with SMTP id TAA18670 for ; Sat, 11 Oct 2003 19:38:19 +1000 (EST) Received: (qmail 28567 invoked from network); 11 Oct 2003 09:38:19 -0000 Received: from buttercup.trl.telstra.com.au (HELO ?137.147.132.188?) (137.147.132.188) by fuzzy.trl.telstra.com.au with SMTP; 11 Oct 2003 09:38:19 -0000 From: CJ East To: freebsd-questions@freebsd.org Content-Type: text/plain Message-Id: <1065865072.2409.7.camel@buttercup.trl.telstra.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 11 Oct 2003 19:37:53 +1000 Content-Transfer-Encoding: 7bit Subject: Malloc debugging for snd_pcm X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 09:38:59 -0000 Hi all :P My apologies if this is a fixed problem/etc I'm new to FreeBSD so here goes... Additionally, my apologies if my this is the inappropriate list for discussion of this problem- if you would be so kind as to let me know where it would be more appropriate, please do so... I'm running a world build from cvs tagged RELENG_5_1 a little over a week ago. I'm as yet to figure out what that branch is called... Disclaimers away, here's the meat... ==================================== PR Kern/40711 looks very similar to the problem I'm having, it looks to have the same symptoms as my own, however my looking has lead me to snd_pcm.ko module as the root cause. (The driver I'm using is in fact snd_ich) Specifically, I can reproduce the problem (making hw.snd.pcm0.vchans=8) and have taken it as far as sndbuf_remalloc (in /usr/src/sys/dev/sound/pcm/buffer.c), in which one of two malloc calls fail, unwinding all the way to the top where xmms prints it's lovely message. The actual call to malloc looks sane enough to my eyes (131072 bytes, it does this successfully beforehand so I'm guessing no probs there). I'm suspecting that there's a leak somewhere and we've hit a hard limit. (Of course, I'm just stabbing in the dark, so let me know if y'all have another idea) If somebody could let me know where to run with this it would be quite helpful (I'm assuming there's some way of checking the amount allocated to M_DEVBUF, but I've no idea how! :( ) -- I can reproduce the problem (reasonably sporadically, about once an hour or so with xmms playing) I looked at the underlying malloc function but I'm a little retiscent to start putting printf's in there... ;) What's the best course of action somebody? -cje-