hal crashes under uinput load

Paul S paulatgm at gmail.com
Thu Dec 11 12:33:46 PST 2008


I'm running a program that uses uinput to replace the keyboard.

After only 13 minutes of feeding a steady stream of input via uinput, 
hal powermanagment crashes and pops up a message saying the battery is 
missing, and hald-addon-input consuming excess cpu.

During this period, /var/log/messages contains:

Dec 11 14:36:06 localhost kernel: [ 9872.306690] input: opengazer as 
/devices/virtual/input/input15
Dec 11 14:36:06 localhost kernel: [ 9870.395978] input: opengazer as 
/devices/virtual/input/input16
Dec 11 14:36:06 localhost kernel: [ 9870.547706] input: opengazer as 
/devices/virtual/input/input17
...
...
Dec 11 14:49:26 localhost kernel: [10671.215211] input: opengazer as 
/devices/virtual/input/input1749
Dec 11 14:49:26 localhost kernel: [10671.309208] input: opengazer as 
/devices/virtual/input/input1750
Dec 11 14:49:26 localhost kernel: [10671.398859] input: opengazer as 
/devices/virtual/input/input1751

at which point the uinput stream was killed. Killing hald-addon-input 
and restarting /etc/init.d/hal restores the battery monitor and normalcy.

I think hal should be able to handle this.

To demonstrate this and develop a solution, do the following:

1) copy the attached uinput-feed.c.txt to uinput-feed.c and compile to 
uinput-feed (gcc uinput-feed.c -o uinput-feed)
2) with uinput-feed in the same directory, execute a "spammer" loop, 
such as:
$ while true ; do ./uinput-feed -c h ; ./uinput-feed -c e ; 
./uinput-feed -c l ; ./uinput-feed -c l ; ./uinput-feed -c o ; done
3) wait about 13 minutes
4) to break out, hit ctrl-C in the terminal where you executed uinput-feed

Attached is uinput-feed.c
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uinput-feed.c.txt
Url: http://lists.freedesktop.org/archives/hal/attachments/20081211/f9d3fc3a/attachment.txt 


More information about the hal mailing list