G'day, Resurrecting this old thread. I've found that loading coolkey and calling C_Initialize() normally works fine, but calling syslog(LOG_DEBUG, ...) before C_Initialize() will cause pthread_mutex_lock() in machdep.cpp to hang. Has anyone else found this behaviour? -- Geoff -----Original Message----- From: coolkey-devel-bounces@xxxxxxxxxx [mailto:coolkey-devel-bounces@xxxxxxxxxx] On Behalf Of Geoff Elgey Sent: Wednesday, 6 December 2006 5:38 PM To: coolkey-devel@xxxxxxxxxx Subject: RE: Coolkey hanging? G'day, > I know I've built and run coolkey on rhel4, which version of > pcsc-lite-devel did you build with, and which version are you running? I compiled and installed pcsc-lite-1.3.2 and ccid-1.0.0. I configured coolkey with the location of the pcsc-lite package info, compiled and installed it. Then I executed the installed pcscd. I also tried pcsc-lite-1.3.1 and pcsc-lite-1.3.0 in place of pcsc-lite-1.3.2. In all cases, I had to comment out the pthread_mutex_lock() and pthread_mutex_unlock() calls of the OSLock implementation in src/coolkey/machdep.cpp. Otherwise, the first call to OSLock::getLock() hangs: (gdb) where #0 0x0048c7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x006e71ce in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0 #2 0x006e3e2b in _L_mutex_lock_35 () from /lib/tls/libpthread.so.0 #3 0x00000000 in ?? () The pcscd info at this point is: pcscdaemon.c:151:SVCServiceRunLoop() A new context thread creation is requested: 6 winscard_svc.c:136:ContextThread() Thread is started: 6 winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 6 winscard_svc.c:178:ContextThread() Client is protocol version 2:0 winscard_msg_srv.c:274:SHMProcessEventsContext() correctly processed client: 6 winscard.c:159:SCardEstablishContext() Establishing Context: 16992231 Once the mutex calls are removed, the PKCS#11 library functions normally. I am using a Reflex USB v3 reader and a pre-initialized common access card. This is on RHEL 4.0.3 WS, using kernel 2.6.9-34.EL I copied the OSLock imlpementation to another file, and made a test program that called OSLock::getLock() and OSLock::releaseLock() repeatedly. This worked without problem, so pthread_mutex_lock() and pthread_mutex_unlock() seem to work fine by themselves. -- Geoff _______________________________________________ Coolkey-devel mailing list Coolkey-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/coolkey-devel _______________________________________________ Coolkey-devel mailing list Coolkey-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/coolkey-devel