On Mar 10, 2011, at 10:42 AM, Art Peck wrote:

> I'm seeing lots of:
>  
> pcscd[26379]: [ID 952149 user.error] [errno = 24] "Too many open files"


>  
> on one of five SRS.
>  
> SUNWpcsc version 1.3_01
> SUNWusb-scrdr version 1.3.10_03
>  
> SUNWutr version 4.2_77,REV=2009.10.19.17.01
>  
> Anyone recognize this error message?? Since pcscd runs as root, doe it not 
> inherit root's ulimit??
>  
> Art

I wasn't able to determine the source of that error message in the source base
after about 15 minutes of grepping, but it looks like something I'd expect to 
see
logged by our PC/SC-lite implementation.  Typically such messages are prefixed 
(or preceded) by text describing the operation active when it occurs.  Did you
omit any relevant lines above the one you showed?

Here's a little background:

There are two types of pcscd daemons.  There's the pcscd launcher daemon, 
which maintains pcscd instances and introduces client connections to instances.

The pcscd launcher daemon is robust.  It sees a *lot* of traffic, particularly 
at
large customer sites, yet maintains a steady state of fds well below the 
per-process 
standard 256 file descriptor (fd) limit.  That has been vetted and measured in 
realtime.

Hypothetically speaking, it's possible that you're running into a problem with 
fd exhaustion in one or more pcscd instances.  ulimit might be a red herring,
as it's hard to see how anyone could (or would) set the ulimit on any pcscd 
daemon
based on how those daemons are launched.

Conceivably, a pcscd instance daemon could be having its 256 fd limit exceeded
due to a change we made in our implementation to increase the number of 
contexts 
available to clients, above the limits originally imposed by the Open Source 
PC/SC-lite 
project.  We did that because some customers were exceeding the original 
context limit 
and their apps were failing.  Short of a major re-write we were forced to find 
a tradeoff 
that suited the majority of use cases.

In PC/SC-lite, each context has an associated fd.  So if the sum total of 
active contexts 
spread out over 'n' consumers of libpcslite.so.1 in any given Sun Ray session 
exceeds 
256 - x, where x is a very small number, then the representative pcscd daemon 
might 
suffer fd exhaustion, which obviously should be caught prior and logged more 
clearly
than what you found in the syslog (if my hypothesis is correct).

It would be interesting to know what your use case is:

Do you have a plurality of libpcsclite.so.1 consumers active at once in a 
single Sun Ray 
session?  Any single library consumer is limited to using 100 contexts, which 
wouldn't
be enough to trigger the scenario I explained above; but if there are multiple 
library 
consumers active, it could add up and exceed the implicit session-wide 
PC/SC-lite limit.

We will have to explore this internally.  Meanwhile, you might want to evaluate
scenario and mitigate if applicable.  I'm just speculating.  The message could 
very well
be occurring for another reason, because the chances of exhausting fds in that 
way is 
relatively low based on how most people tend use the product.

Paul



_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to