evdev problems
Magnus Vigerlöf
Magnus.Vigerlof at home.se
Tue Mar 20 15:53:09 PDT 2007
On Tuesday 20 March 2007 07:31, Peter Hutterer wrote:
> I was having some troubles with evdev lately.
>
> When I take a keyboard and plug it in, unplug it and plug it in
> again, the server SIGABRTs. I can't seem to reliably reproduce it in
> master, but it definitely happens on the mpx branch.
>
> Reason for the SIGABRT is a double call to xfree.
>
> In EvdevNew, the driver somehow fails to grab the device.
> ioctl(pInfo->fd, EVIOCGRAB, (void*)1)) in evdev.c:304
>
> As a result, xf86DeleteInput() is called because the XI86_CONFIGURED
> flag is not set (evdev.c:331). However, evdevCorePreInit will still
> return a non-NULL value. The XI86_CONFIGURED flag is still not set,
> and xf86DeleteInput is called again, causing a SIGABRT.
Correct me if I'm wrong, but shouldn't the call to xf86DeleteInput be regarded
as a bug in the evdev-driver? As far as I can see, it's only evdev that makes
this call in the preInit-call. (Ok, calcomp does too, but it returns NULL in
that case.)
It wouldn't solve your problem, but your server wouldn't crash at least..
> I'm not sure what exactly goes wrong. If the ioctl wouldn't fail, I
> suppose it should work. So why does it fail?
What I can see, there should be something written to the log-file which
includes the errno-string (X_INFO only, but maybe it got into the log) that
could give you a hint.
Btw, how many are actually working on input-related stuff at the moment?
I'm asking as I've been looking through the code for a few days to see what
changes are needed in the wacom-driver to make it hotpluggable. So far I've
seen memory-leaks, security holes, old limitations (and maybe some other,
smaller things) in the server code, but not very much activity on the list
addressing this. Maybe people are working, but I don't see it..
I'm interested in making hotplugging work. I'm most interested in the wacom
driver, but if getting that driver to work means I have to work on more
generic parts I won't shy away from it. My 'only' problem is that I've only
looked at the source for a limited time and haven't lurked here long enough
to have the big picture, so I'd appreciate a few pointers helping me
understand what should happend with this part in the long term.
Cheers
Magnus V
More information about the xorg
mailing list