http://bugs.winehq.org/show_bug.cgi?id=3891
Summary: Wine runs out of file descriptors no matter what ulimit -n is set to Product: Wine Version: 0.9.1. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: wine-misc AssignedTo: wine-bugs@winehq.org ReportedBy: alaeddinaydiner@yahoo.com
Hello,
This problem actually should not be that difficult to fix if wine can simply properly close the (pipe?) file descriptors it used. Let me elaborate...
I have managed to run the Belkin GPS Navigator under wine without any _real_ problems after I connect to the GPS using hcitool and rfcomm, both being Bluetooth commands.
The problem is that it stops running after a while. My setup is such that com8 under ~/.wine/dosdevices points to /dev/rfcomm0. Wine stops with a "too many file descriptors" error in the wine client. The problem turned out to be not that there are so many files that need to be opened but that wine repeatedly opens /dev/rfcomm0, which is easy to see under /proc/wine_client_pid/fd. Here is a snapshot after I set ulimit to 20000!
lrwx------ 1 alaeddin alaeddin 64 Kas 20 09:07 5609 -> /dev/rfcomm0 lr-x------ 1 alaeddin alaeddin 64 Kas 20 09:07 5610 -> pipe:[234038] l-wx------ 1 alaeddin alaeddin 64 Kas 20 09:07 5611 -> pipe:[234037] lrwx------ 1 alaeddin alaeddin 64 Kas 20 09:07 5612 -> /dev/rfcomm0 lr-x------ 1 alaeddin alaeddin 64 Kas 20 09:07 5613 -> pipe:[234039] l-wx------ 1 alaeddin alaeddin 64 Kas 20 09:07 5614 -> pipe:[234039] lrwx------ 1 alaeddin alaeddin 64 Kas 20 09:07 5350 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Kas 20 09:07 5351 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Kas 20 09:07 5352 -> /dev/rfcomm0
Here is what happens after a while when the above pipes die or are not used and the wine client keeps opening new ones:
$ls -alt | head total 5981 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5932 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5933 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5934 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5935 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5936 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5937 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5938 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5939 -> /dev/rfcomm0 lrwx------ 1 alaeddin alaeddin 64 Nov 20 09:08 5940 -> /dev/rfcomm0
Could wine make sure that pipes/file descriptors to com devices are closed properly after they are opened?
Thanks for the great software! Alaeddin awaiting wine to crash soon. :-)