"Device or resource busy" - but it is not so

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

"Device or resource busy" - but it is not so

Carlos E. R.-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Hi,

My /dev/dsp device appears to be busy, but I can't find who has it:

cer@nimrodel:~> echo "Hello " | /usr/bin/festival --tts
Linux: can't open /dev/dsp

as root:

nimrodel:~ # echo "Hello " | /usr/bin/festival --tts
Linux: can't open /dev/dsp

nimrodel:~ # echo pepe > /dev/dsp
- -bash: /dev/dsp: Device or resource busy


But nothing is using dsp:

nimrodel:~ # lsof | grep -i dsp
nimrodel:~ #

I can't find anything under "/var/lock" named dsp or anything close.
Firefox is not running, so no flash.


How can I find who or what is holding the device?


- --
Cheers,
        Carlos Robinson

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)

iD8DBQFH5aHvtTMYHG2NR9URAuzEAJ9xjZhS4Tkkd14i4WreamWD6HVBFQCfTEDF
G6daQblOmvxKJurq9ylONY0=
=+mTe
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: "Device or resource busy" - but it is not so

Sontek
> My /dev/dsp device appears to be busy, but I can't find who has it:
>
> nimrodel:~ # lsof | grep -i dsp
> nimrodel:~ #

You can use fuser -m /dev/dsp and lsof /dev/snd/* to find a list of
processes using sound.

Hopefully this helps.

--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: "Device or resource busy" - but it is not so [solved]

Carlos E. R.-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



The Saturday 2008-03-22 at 18:50 -0600, John M. Anderson wrote:

> You can use fuser -m /dev/dsp and lsof /dev/snd/* to find a list of
> processes using sound.

nimrodel:~ # lsof /dev/snd/*
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
timidity  16496  cer  mem    CHR  116,6      8830 /dev/snd/pcmC0D0p
timidity  16496  cer    4r   CHR  116,2      8628 /dev/snd/timer
timidity  16496  cer    5u   CHR  116,6      8830 /dev/snd/pcmC0D0p
mixer_app 25066  cer   18u   CHR  116,8      8854 /dev/snd/controlC0
mixer_app 25066  cer   19u   CHR  116,8      8854 /dev/snd/controlC0


timidity! It was not in view, but it was hanging somewhere.

[...]

I had to kill -9 it. Now it works.


nimrodel:~ # lsof /dev/snd/*
COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
mixer_app 25066  cer   18u   CHR  116,8      8854 /dev/snd/controlC0
mixer_app 25066  cer   19u   CHR  116,8      8854 /dev/snd/controlC0
nimrodel:~ # fuser -m /dev/dsp
/dev/dsp:                1   489   491   679  1102  1104  1106  1109  1130
1148  2164  2972  2976  2979  3000  3069  3075  3148  3165  3625  3767
3792  3828  4364  4366  4570  4683  4716  4719  4798  4839  4846  4903
4920  4935  4994  5015  5034  5104  5159  5167  5183  5184  5185  5186
5187  5188  5190  5357  5361  5362  5363  5364  5769  5964  5970  7888
7889  7890  8137  8329  9637 10039 10317 10552 10606 10632 10655 11555
11697 11717 11728 12047 12103 12517 13195 14704 15385 15806 16114 16319
18803 24270 24271 24904 24908m 24944 24988 24989 24993 24998 25005 25007
25009 25017 25018 25019 25021 25024 25037 25041 25043 25051 25064 25066
25068 25070 25071 25087 25095 25096 25102 25105 25111 25121 25124 25130
25139 25140 25145 25165 25171 25179 25180 25212 25240 25290 25980 26761
26779 26781 27036 27086 29174 29199 29813 31480 32402 32421


Funny all thosr pids..



> Hopefully this helps.

Yes, it did, thanks :-)

- --
Cheers,
        Carlos E. R.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)

iD8DBQFH5bD2tTMYHG2NR9URApWQAJ9uQZJhiazuwmp2PfLa68QlCUEEEwCeLYsi
hSmE9+uRHTjOpeHIWCnKSa8=
=FkqQ
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: "Device or resource busy" - but it is not so [solved]

Ed McCanless
Carlos E. R. wrote:

>
>
> The Saturday 2008-03-22 at 18:50 -0600, John M. Anderson wrote:
>
> > You can use fuser -m /dev/dsp and lsof /dev/snd/* to find a list of
> > processes using sound.
>
> nimrodel:~ # lsof /dev/snd/*
> COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
> timidity  16496  cer  mem    CHR  116,6      8830 /dev/snd/pcmC0D0p
> timidity  16496  cer    4r   CHR  116,2      8628 /dev/snd/timer
> timidity  16496  cer    5u   CHR  116,6      8830 /dev/snd/pcmC0D0p
> mixer_app 25066  cer   18u   CHR  116,8      8854 /dev/snd/controlC0
> mixer_app 25066  cer   19u   CHR  116,8      8854 /dev/snd/controlC0
>
>
> timidity! It was not in view, but it was hanging somewhere.
>
> [...]
>
> I had to kill -9 it. Now it works.
>
>
> nimrodel:~ # lsof /dev/snd/*
> COMMAND     PID USER   FD   TYPE DEVICE SIZE NODE NAME
> mixer_app 25066  cer   18u   CHR  116,8      8854 /dev/snd/controlC0
> mixer_app 25066  cer   19u   CHR  116,8      8854 /dev/snd/controlC0
> nimrodel:~ # fuser -m /dev/dsp
> /dev/dsp:                1   489   491   679  1102  1104  1106  1109
> 1130 1148  2164  2972  2976  2979  3000  3069  3075  3148  3165  3625
> 3767 3792  3828  4364  4366  4570  4683  4716  4719  4798  4839  4846
> 4903 4920  4935  4994  5015  5034  5104  5159  5167  5183  5184  5185
> 5186 5187  5188  5190  5357  5361  5362  5363  5364  5769  5964  5970
> 7888 7889  7890  8137  8329  9637 10039 10317 10552 10606 10632 10655
> 11555 11697 11717 11728 12047 12103 12517 13195 14704 15385 15806
> 16114 16319 18803 24270 24271 24904 24908m 24944 24988 24989 24993
> 24998 25005 25007 25009 25017 25018 25019 25021 25024 25037 25041
> 25043 25051 25064 25066 25068 25070 25071 25087 25095 25096 25102
> 25105 25111 25121 25124 25130 25139 25140 25145 25165 25171 25179
> 25180 25212 25240 25290 25980 26761 26779 26781 27036 27086 29174
> 29199 29813 31480 32402 32421
>
>
> Funny all thosr pids..
>
>
>
> > Hopefully this helps.
>
> Yes, it did, thanks :-)
>
> -- Cheers,
>        Carlos E. R.
>
Thanks for posting your solution, Carlos.
I have never had this problem, but I use timidity a lot. I figure it's
only a matter of time. Good info to have on hand.

                               -ED-
--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: "Device or resource busy" - but it is not so [solved]

Charles philip Chan
In reply to this post by Carlos E. R.-2
Ed McCanless <[hidden email]>
writes:

> Thanks for posting your solution, Carlos.  I have never had this
> problem, but I use timidity a lot. I figure it's only a matter of
> time. Good info to have on hand.

If you don't have any really low latency needs. Another solution is to
setup dmix:

http://alsa.opensrc.org/home/w/org/opensrc/alsa/index.php?title=DmixPlugin

in ALSA.

Charles

attachment0 (199 bytes) Download Attachment