public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael <auslands-kv@gmx.de>
To: linux-media@vger.kernel.org
Subject: Possible memory corruption in bttv driver ?
Date: Wed, 03 Feb 2010 18:10:59 +0100	[thread overview]
Message-ID: <hkcan2$72f$1@ger.gmane.org> (raw)

Hello

We use embedded devices running debian lenny (kernel 2.6.31.4 with bttv 
driver 0.9.18) to monitor an incoming video signal digitized via a video 
grabber. The /dev/video0 device is opened and closed several hundred times a 
day.

We used to use an em28xx USB based grabber but now switched to an Mini-PCI 
bttv card (Commel MP-878) due to USB issues.

With the bttv card we experience different crashes, usually after a couple 
of days, while the systems using the em28xx show none even after an extended 
time frame.

The crashes differ strongly. We saw system freezes and also a very 
interesting problem, where libasound.so.2 couldn't find some symbol. We 
debugged the latter case, finding that all applications using libasound.so.2 
no longer worked, giving the same error of a symbol not found. The problem 
could be remedied by flushing the kernel cashes (echo 1 > 
/proc/sys/vm/drop_caches).

So it might be possible that the systems using the bttv Mini-PCI card 
corrupt memory after a couple of days, resulting into different failures.

To examine the crashes I wrote a small test program, which simply opens and 
closes the bttv video device repeatedly:

#!/bin/bash

count=0
while [ 1 == 1 ]
do
        ((count++))
        date; echo "COUNT = " $count
        mplayer -frames 10 -fs -vo xv tv:// -tv norm=pal:input=1 > /dev/null
        sleep 0.1
done

With this program I experienced full hard crashes after 85 counts, 760 
counts and 3870 counts today, comprising between a couple of minutes and 
hours. In all cases the hardware watchdog timer resetted the system.

The exact same system using an USB ex28xx based grabber instead of the bttv 
does not crash.

1.) Is there a way to diagnose memory corruption in order to ensure that it 
is really a corruption problem and to locate the possible bug?

2.) Do newer kernel versions have improved bttv drivers (maybe even with
patched memory corruption issues)?

3.) As a last resort: Do you know of other Mini-PCI video grabber cards that
are based on other chipsets that are supported by the kernel?

Thanks a lot for any help

Michael


             reply	other threads:[~2010-02-22  0:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 17:10 Michael [this message]
     [not found] ` <c2fe070d1002211757p7aace520h97bd5c8f03f9d024@mail.gmail.com>
2010-02-22  7:09   ` Possible memory corruption in bttv driver ? auslands-kv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hkcan2$72f$1@ger.gmane.org' \
    --to=auslands-kv@gmx.de \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox