Malloc debugging for snd_pcm

From: CJ East (ghd832332157_at_geckomail.org)
Date: 10/11/03

  • Next message: Aaron Burke: "Broken gif interface for IPV4 over IPV4 tunnel on FreeBSD 4.5-Release-P6"
    To: freebsd-questions@freebsd.org
    Date: Sat, 11 Oct 2003 19:37:53 +1000
    
    

    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-

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Aaron Burke: "Broken gif interface for IPV4 over IPV4 tunnel on FreeBSD 4.5-Release-P6"