Bug 7912 - too many times connect acpid's UNIX socket
Summary: too many times connect acpid's UNIX socket
Status: VERIFIED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.1 (2006.05)
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-18 02:07 UTC by Gordon Jin
Modified: 2008-12-21 18:25 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Gordon Jin 2006-08-18 02:07:25 UTC
With the latest xf86-video-intel (with i965 support), below problem occurs 
sometimes if X app running for long time (e.g. xtest running):
OS: FC5
kernel: 2.6.17.7
X: 7.1

Here's a snip of /var/log/acpid:
......
......
[Fri Aug 18 12:44:24 2006] client connected from 8158[0:0]
[Fri Aug 18 12:44:24 2006] 1 client rule loaded
[Fri Aug 18 12:44:27 2006] client connected from 8158[0:0]
[Fri Aug 18 12:44:27 2006] 1 client rule loaded
[Fri Aug 18 12:44:29 2006] client connected from 8158[0:0]
[Fri Aug 18 12:44:29 2006] 1 client rule loaded
[Fri Aug 18 12:44:32 2006] client connected from 8158[0:0]
[Fri Aug 18 12:44:32 2006] 1 client rule loaded
[Fri Aug 18 12:44:34 2006] client connected from 8158[0:0]
[Fri Aug 18 12:44:34 2006] 1 client rule loaded
[Fri Aug 18 12:44:37 2006] client connected from 8158[0:0]
[Fri Aug 18 12:44:37 2006] 1 client rule loaded
[Fri Aug 18 12:44:39 2006] client connected from 8158[0:0]
[Fri Aug 18 12:44:39 2006] 1 client rule loaded
[Fri Aug 18 12:44:42 2006] ERR: can't accept client: Too many open files
[Fri Aug 18 12:44:42 2006] ERR: can't accept client: Too many open files
[Fri Aug 18 12:44:42 2006] ERR: can't accept client: Too many open files
[Fri Aug 18 12:44:42 2006] ERR: can't accept client: Too many open files
[Fri Aug 18 12:44:42 2006] ERR: can't accept client: Too many open files
[Fri Aug 18 12:44:42 2006] ERR: can't accept client: Too many open files
[Fri Aug 18 12:44:42 2006] ERR: can't accept client: Too many open files
......
......

8158 is the pid of X server. You can see the client rule loaded without exited.
Some processes try to connect acpid’s UNIX socket for many times, and soon the 
connection is above the limit of the number of files a process can open, so 
acpid will start log error info (at 12:44:42), then lots of ERR happen in 
every second, thus impacts system performance, and /var/log/acpid starts 
increasing size to very huge.
Comment 1 Alan Hourihane 2006-08-18 02:19:57 UTC
In xserver/hw/xfree86/os-support/linux/lnx_acpi.c, can you change the line that
says....

 if (n <= 0) {

to 

 if (n < 0) {

and recompile the xserver. That should fix the problem.
Comment 2 Alan Hourihane 2006-08-18 02:23:29 UTC
Oh, and on the line above, change this...

 } while ((n == -1) && (errno == EAGAIN || errno == EINTR));

to this..

 } while (errno == EAGAIN || errno == EINTR);
Comment 3 Alan Hourihane 2006-08-18 02:25:56 UTC
Actually, scrap the while change, and just do the first patch.
Comment 4 Gordon Jin 2006-08-21 02:09:35 UTC
Alan, the first patch doesn't resolve this issue.
Comment 5 Alan Hourihane 2006-08-21 02:29:58 UTC
Re-assigning to ajax as I know he was the last fiddling with this code :-)
Comment 6 Gordon Jin 2006-08-22 18:57:52 UTC
We see this issue on both G965 and 915G platform.
Comment 7 Gordon Jin 2006-08-31 02:40:32 UTC
Ajax, any idea?
Comment 8 Daniel Stone 2007-02-27 01:33:14 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 9 Gordon Jin 2007-03-14 19:26:40 UTC
The bug priority was upgraded (P2->high) with the bugzilla configuration change.
I'm Changing the priority back to the normal one.
Sorry for the spam.
Comment 10 Wang Zhenyu 2007-08-19 18:51:25 UTC
truely not X related, and acpid is crap, kernel is moving to netlink interface...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.