AnsweredAssumed Answered

"Maximum number of clients reached" after a few hundred OpenCL iterations...

Question asked by astram on May 24, 2012
Latest reply on May 21, 2013 by Meteorhead

Hi,

 

I was quite disappointed to find that the AMD Firestream drivers require that an X server be running. It seems pretty arrogant for AMD to market a card for HPCC purposes, then create such a hurdle for HPCC users who usually don't have Xorg installed in the first place.

 

To make matters worse, it seems that this X server dependency is causing problems that make our four AMD Firestream 9270s completely useless in our production environment.

 

Observe the following:

 

20:16 astram@sailfish:~$ let i=1; while [[ $rc -eq 0 ]]; do echo "Iteration #$i"; /opt/firestream/bin/x86_64/fglrxinfo ; rc=$?; let i++;  done &> out

 

20:23 astram@sailfish:~$ head out

Iteration #1

display: :0.0  screen: 0

OpenGL vendor string: Advanced Micro Devices, Inc.

OpenGL renderer string: AMD FireStream 9270

OpenGL version string: 3.3.11631 Compatibility Profile Context FireGL

display: :0.0  screen: 1

OpenGL vendor string: Advanced Micro Devices, Inc.

 

20:23 astram@sailfish:~$ tail -n15 out

Iteration #234

display: :0.0  screen: 0

OpenGL vendor string: Advanced Micro Devices, Inc.

OpenGL renderer string: AMD FireStream 9270

OpenGL version string: 3.3.11631 Compatibility Profile Context FireGL

display: :0.0  screen: 1

OpenGL vendor string: Advanced Micro Devices, Inc.

OpenGL renderer string: AMD FireStream 9270

OpenGL version string: 3.3.11631 Compatibility Profile Context FireGL

 

Iteration #235

Maximum number of clients reachedMaximum number of clients reachedMaximum number of clients reachedMaximum number of clients reachedError: unable to open display (null)

 

If these are instances of an OpenCL program, instead of fglrxinfo, I will no longer be able to compute on the AMD gpus until Xorg is restarted.

 

It seems that with each instance of fglrxinfo (or anything that queries a GPU, for that matter), Xorg is prompted to open "/dev/ati/card0", but won't release it even when the program is done executing. Thus the "maximum number of clients" limit is hit pretty quickly.

 

Hence, after 235 iterations, I have something like this:

 

-su-4.1# lsof -p `pidof Xorg`   | tail
Xorg22099 root  246u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  247u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  248u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  249u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  250u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  251u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  252u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  253u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  254u  CHR          251,0  0t0   8270 /dev/ati/card0
Xorg22099 root  255u  netlink                     0t0 171989 KOBJECT_UEVENT

-su-4.1#

 

-su-4.1# /tmp/lsof -p `pidof Xorg`   | grep '/dev/ati/' | wc -l

245

 

 

 

This is with the latest fglrx drivers, and X.Org X Server 1.9.3.

 

Any ideas are greatly appreciated.

 

--Alex

Outcomes