Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/47142: usbhidctl vs. SDL et al.



Does anyone have an idea on this one (kern/47142)?

Thanks,
 Thomas

----- Forwarded message from Thomas Klausner <wiz%NetBSD.org@localhost> -----

>Submitter-Id:  net
>Originator:    Thomas Klausner
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Confidential:  no
>Synopsis:      usbhidctl vs. SDL et al.
>Severity:      serious
>Priority:      medium
>Category:      kern
>Class:         sw-bug
>Release:       NetBSD 6.99.14
        
        
>Environment:
        
        
System: NetBSD yt.nih.at 6.99.14 NetBSD 6.99.14 (YT) #27: Sat Oct 20 15:01:54 
CEST 2012 
wiz%yt.nih.at@localhost:/archive/cvs/src/sys/arch/amd64/compile/obj/YT amd64
Architecture: x86_64
Machine: amd64
>Description:
Programs using SDL and some others would hang during startup.
I've tracked it down to the reason that usbhidctl is started together with
my X session (.xinitrc). If that is still running, SDL hangs when trying
to access /dev/uhid0. Such a program can't even be killed with -9.

When I kill usbhidctl first, SDL-using programs start fine.

When I kill usbhidctl after starting an SDL-using programs (which hangs
trying to access /dev/uhid0), I get a kernel panic.
I don't see the panic, since I'm in X, but in the next boot's log I see
Oct 16 21:28:41 yt savecore: reboot after panic: 836 1835 1834 1833 1832 1831 
1830 1829 1828 1827 1826 1825 1824 1823 1822 1821 1820 1819 1818 1817 1816 1815

-rw-------   1 root  wheel  8292230744 Oct 16 21:35 netbsd.2.core.gz
-rw-------   1 root  wheel      372043 Oct 16 21:35 netbsd.2.gz
exist, but netbsd.2.gz looks too small to be useful (separate issue).

This leaves me with some questions:
Why is /dev/uhid0 blocked when usbhidctl is active?
Why does SDL care, and not just try opening non-blocking?
Why can't I kill -9 such programs?
Why do I get a kernel panic (see above)?
>How-To-Repeat:
cat > .usbhidconf << EOF
Consumer:Play/Pause     1       mpc toggle
Consumer:Scan_Next_Track        1       mpc next
Consumer:Scan_Previous_Track    1       mpc prev
Consumer:Volume_Up      1       mixerctl -w outputs.master2++
Consumer:Volume_Down    1       mixerctl -w outputs.master2--
Consumer:Mute   1       mixerctl -w outputs.master7.mute--
EOF

usbhidctl -f 0 -c $(pwd)/.usbhidconf
cd /usr/pkgsrc/games/monsterz
make install
monsterz

(other SDL-using programs should be fine too)
>Fix:
Yes, please.

----- End forwarded message -----


Home | Main Index | Thread Index | Old Index