From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Erik Slagter <erik@slagter.name>
Cc: linux-input@vger.kernel.org
Subject: Re: event devices not released
Date: Mon, 11 Feb 2008 11:58:27 -0500 [thread overview]
Message-ID: <20080211115631.ZZRA012@mailhub.coreip.homeip.net> (raw)
In-Reply-To: <47B043ED.3020309@slagter.name>
Hi Erik,
On Mon, Feb 11, 2008 at 01:47:41PM +0100, Erik Slagter wrote:
> Hi,
>
> I think I've found a bug :-/
>
> Symptoms: when I remove (unplug) a USB keyboard or mouse, the corresponding
> event device seems to be closed but not released; when I plug the device
> back in, it gets a new input device handle. This means that after several
> suspend/resume cycles (in which it seems all usb devices are virtually
> unplugged and replugged) the kernel is out of event devices and complains
> likewise. My nice little program that catches specific keystrokes also
> stops to get any interesting events from that moment on. After reboot
> everything works again as expected.
>
> I've seen a similar bug report on linux-kernel but it wasn't followed up
> on. Also this only mentioned problems through suspend cycles while I also
> have the problem simply plugging in and out.
>
> Environment: linux kernel 2.6.24 vanilla on i386. The event files are held
> open by one or more processes when the devices are unplugged. Unfortunatly
> my program is not the only one that has them open, but hald and Xorg also
> have some of the devices open, so I cannot prevent this situation. Upon
> POLLERR | POLLHUP my app closes all event devices and rescans the
> /dev/input directory, this should be enough imho? I don't know how the
> other apps handle unplugging.
>
What happens if you kill HAL and X and leave only your application
running? Do event devices get released/reused in this case? Do you
see POLLERR or POLLHUP signals devlievered to your app?
--
Dmitry
next prev parent reply other threads:[~2008-02-11 16:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 12:47 event devices not released Erik Slagter
2008-02-11 16:58 ` Dmitry Torokhov [this message]
2008-02-11 20:15 ` Erik Slagter
2008-02-11 21:48 ` Jiri Kosina
2008-02-12 9:10 ` Erik Slagter
2008-02-12 10:51 ` Jiri Kosina
2008-02-12 11:27 ` Erik Slagter
2008-02-12 11:44 ` Erik Slagter
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=20080211115631.ZZRA012@mailhub.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=erik@slagter.name \
--cc=linux-input@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;
as well as URLs for NNTP newsgroup(s).