On 06/12/2012 06:37 PM, Bruno Jesus wrote:
On Tue, Jun 12, 2012 at 11:50 AM, Umberto Rustichelli aka Ubi
<[email protected]>  wrote:
...
Jun  5 15:43:15 pes-app-blank-01 pcscd:
winscard_svc.c:106:CreateContextThread() SYS_ThreadCreate failed: Cannot
allocate memory
Jun  5 15:43:15 pes-app-blank-01 pcscd: pcscdaemon.c:151:SVCServiceRunLoop()
Problem during the context thread creation
...
Question 2: any clue about this issue???
You could try limiting the stack size for each thread to see if the
problem vanishes. Look for the functions pthread_attr_getstacksize and
pthread_attr_setstacksize in man and try using them where the threads
are created.
Read more at:
https://computing.llnl.gov/tutorials/pthreads/#Stack

Hope it helps.


Thak you very much everybody, I was going to recompile the glibc in order to change that globally (yes, you guess right, I'm no thread expert!), this helps me a lot; nevertheless, it could not solve. A couple of questions about pcscd, then: I see that when I run an application, 16 threads are consumed (I run, hope doing good: for FL in `find /proc -iname cmdline` ; do grep pcscd ; done | wc). I thought that threads were activated on a pre-need basis, but apparently it is not (most likely because PCSCD cannot reasonably handle them / not its job after the application starts). I understand that this is governed by the defines in pcscd.h but which one is setting that 16? Is it PCSCLITE_MAX_APPLICATION_CONTEXTS? Or is it PCSCLITE_MAX_APPLICATION_CONTEXT_CHANNELS? And, can I lower that or is there a specific reason to keep it? Consider that the application is not accessing the reader / smart card in parallel, it does one thing at a time.
Second question: what is the role of PCSCLITE_MAX_THREADS?
Cannot be a "global" limit because the threads I see in the system already are more than that limit, so what?





_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to