Re: 2.3.51: module bttv refcount never decreases

From: Guus Sliepen (guus@warande3094.warande.uu.nl)
Date: Wed Mar 15 2000 - 09:50:48 EST


On Sun, 12 Mar 2000, Gerd Knorr wrote:

> > In kernel 2.3.51 (and 2.3.50 too), when running and then stopping a
> > process that uses /dev/video, the bttv module is left in a state with a
> > positive refcount. fuser /dev/video shows that noone is using that device
> > anymore.

I did some more tests on 2.3.99-pre1. I found out that:

Doing "cat /dev/video >/dev/null" for a while and then pressing ctrl-C
makes the modules autoload, and after I stop cat I can remove them
all. However, if I run "xawtv" for a while and quit it, lsmod shows that
tuner and msp3400 have a refcount of 1 (while not being used by other
modules), and therefore they can't be removed. I've fuserd every file in
/dev, but none of the video4linux nor the sound devices are in use.

The only thing I can see is that the msp3400 kernel thread is still
running (Gerd, sorry for the attachments in the last mail, I noticed
they contained ansi codes):

[root@haplo]~>ps aux|grep msp
root 512 0.0 0.0 0 0 pts/5 SW 15:34 0:00 [msp3410
[auto]]
[root@haplo]~>cd /proc/512
[root@haplo]/proc/512>ls -lR
ls: exe: No such file or directory
.:
total 0
-r--r--r-- 1 root root 0 Mar 15 15:45 cmdline
lrwxrwxrwx 1 root root 0 Mar 15 15:45 cwd -> //
-r-------- 1 root root 0 Mar 15 15:45 environ
lrwxrwxrwx 1 root root 0 Mar 15 15:45 exe
dr-x------ 2 root root 0 Mar 15 15:45 fd/
-r--r--r-- 1 root root 0 Mar 15 15:45 maps
-rw------- 1 root root 0 Mar 15 15:45 mem
lrwxrwxrwx 1 root root 0 Mar 15 15:45 root -> //
-r--r--r-- 1 root root 0 Mar 15 15:45 stat
-r--r--r-- 1 root root 0 Mar 15 15:45 statm
-r--r--r-- 1 root root 0 Mar 15 15:45 status

./fd:
total 0
lr-x------ 1 root root 64 Mar 15 15:45 0 ->
/lib/modules/2.3.99-pre1/misc/msp3400.o
[root@haplo]/proc/512>cat status
Name: msp3410 [auto]
State: S (sleeping)
Pid: 512
PPid: 1
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 32
Groups: 0
SigPnd: 0000000000024100
SigBlk: ffffffffffffffff
SigIgn: 8000000000000000
SigCgt: 0000000000000000
CapInh: 00000000ffffffff
CapPrm: 00000000ffffffff
CapEff: 00000000ffffffff

Met vriendelijke groet,
Guus Sliepen.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:17 EST