Hello people

I want some help of you in order to get 2 tokens Aladdin eToken PRO 64
working at same time

When I have pcscd running with one token everything is fine, but with two,
they don't work and sometimes I get a segfault on libopenctapi.so

I have some background in C, so I used valgrind to run pcscd in order to
discovery what is happing and valgrind is saying that libopenctapi.so is
using a memory location already free'd (see attached file)

I have tested at 2 Ubuntu 11.04 (x86 64 bits and 32bits with default
package) and 1 Debian 6.0 (x86 32 bits with last compiled packages)

If someone has the key to fix this problem or can give me where I can get
start in order to try to fix the problem, I will appreciate that.


-- 
Iuri Diniz
http://iuridiniz.com [Sou um agitador, não um advogado]
http://blog.igdium.com [Linux on Limbo]
==14646== Memcheck, a memory error detector
==14646== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==14646== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==14646== Command: /usr/sbin/pcscd -f -d
==14646== 
debuglog.c:277:DebugLogSetLevel() debug level=debug
configfile.l:245:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/openct
configfile.l:287:DBGetReaderList() Parsing conf file: 
/etc/reader.conf.d/libccidtwin
pcscdaemon.c:550:main() pcsc-lite 1.7.0 daemon ready.
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0001, path: /dev/bus/usb/003/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0001, path: /dev/bus/usb/004/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0002, path: /dev/bus/usb/001/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0002, path: /dev/bus/usb/001/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0C45, PID: 
0x63E0, path: /dev/bus/usb/001/002
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0C45, PID: 
0x63E0, path: /dev/bus/usb/001/002
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0001, path: /dev/bus/usb/005/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0001, path: /dev/bus/usb/006/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0001, path: /dev/bus/usb/006/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1BCF, PID: 
0x053A, path: /dev/bus/usb/006/002
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1BCF, PID: 
0x053A, path: /dev/bus/usb/006/002
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0001, path: /dev/bus/usb/007/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 
0x0002, path: /dev/bus/usb/002/001
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0529, PID: 
0x0600, path: /dev/bus/usb/006/014
hotplug_libudev.c:309:HPAddDevice() Adding USB device: Aladdin eToken PRO 64
readerfactory.c:934:RFInitializeReader() Attempting startup of Aladdin eToken 
PRO 64 00 00 using 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so
dyn_unix.c:81:DYN_GetAddress() IFDHCreateChannelByName: 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so: undefined 
symbol: IFDHCreateChannelByName
readerfactory.c:792:RFBindFunctions() Loading IFD Handler 2.0
readerfactory.c:290:RFAddReader() Using the pcscd polling thread
eventhandler.c:256:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
Card ATR: 3B F2 18 00 02 C1 0A 31 FE 58 C8 09 75 
Error: Bad CTBCS APDU, ins=0x15
eventhandler.c:446:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0529, PID: 
0x0600, path: /dev/bus/usb/005/009
hotplug_libudev.c:309:HPAddDevice() Adding USB device: Aladdin eToken PRO 64
readerfactory.c:587:RFSetReaderName() Support 16 simultaneous readers
readerfactory.c:934:RFInitializeReader() Attempting startup of Aladdin eToken 
PRO 64 01 00 using 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so
readerfactory.c:738:RFLoadReader() Reusing already loaded driver for 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so
dyn_unix.c:81:DYN_GetAddress() IFDHCreateChannelByName: 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so: undefined 
symbol: IFDHCreateChannelByName
readerfactory.c:792:RFBindFunctions() Loading IFD Handler 2.0
readerfactory.c:965:RFInitializeReader() Open Port 0x200001 Failed 
(usb:0529/0600:libudev:0:/dev/bus/usb/005/009)
readerfactory.c:275:RFAddReader() Aladdin eToken PRO 64 init failed.
readerfactory.c:985:RFUnInitializeReader() Attempting shutdown of Aladdin 
eToken PRO 64 01 00.
hotplug_libudev.c:377:HPAddDevice() Failed adding USB device: Aladdin eToken 
PRO 64
utils.c:95:CheckForOpenCT() Remove OpenCT and try again
==14646== Thread 3:
==14646== Invalid read of size 2
==14646==    at 0x403BA4A: CT_data (in /usr/lib/libopenctapi.so)
==14646==    by 0x402C865: IFDHICCPresence (in 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so)
==14646==    by 0x804D230: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804C668: ??? (in /usr/sbin/pcscd)
==14646==    by 0x4068E98: start_thread (pthread_create.c:304)
==14646==    by 0x414C73D: clone (clone.S:130)
==14646==  Address 0x4272938 is 0 bytes inside a block of size 1,876 free'd
==14646==    at 0x4025BF0: free (vg_replace_malloc.c:366)
==14646==    by 0x403BB83: CT_close (in /usr/lib/libopenctapi.so)
==14646==    by 0x403BE07: CT_init (in /usr/lib/libopenctapi.so)
==14646==    by 0x402CF68: IFDHCreateChannel (in 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so)
==14646==    by 0x804D09A: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804FD8A: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8050503: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8054AD7: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8054EE1: ??? (in /usr/sbin/pcscd)
==14646==    by 0x4068E98: start_thread (pthread_create.c:304)
==14646==    by 0x414C73D: clone (clone.S:130)
==14646== 
==14646== Invalid read of size 4
==14646==    at 0x403BA40: CT_data (in /usr/lib/libopenctapi.so)
==14646==    by 0x402C865: IFDHICCPresence (in 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so)
==14646==    by 0x804D230: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804C668: ??? (in /usr/sbin/pcscd)
==14646==    by 0x4068E98: start_thread (pthread_create.c:304)
==14646==    by 0x414C73D: clone (clone.S:130)
==14646==  Address 0x4273088 is 1,872 bytes inside a block of size 1,876 free'd
==14646==    at 0x4025BF0: free (vg_replace_malloc.c:366)
==14646==    by 0x403BB83: CT_close (in /usr/lib/libopenctapi.so)
==14646==    by 0x403BE07: CT_init (in /usr/lib/libopenctapi.so)
==14646==    by 0x402CF68: IFDHCreateChannel (in 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so)
==14646==    by 0x804D09A: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804FD8A: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8050503: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8054AD7: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8054EE1: ??? (in /usr/sbin/pcscd)
==14646==    by 0x4068E98: start_thread (pthread_create.c:304)
==14646==    by 0x414C73D: clone (clone.S:130)
==14646== 
ifdwrapper.c:346:IFDStatusICC() Card not transacted: 612
eventhandler.c:303:EHStatusHandlerThread() Error communicating to: Aladdin 
eToken PRO 64 00 00
ifdwrapper.c:346:IFDStatusICC() Card not transacted: 612
eventhandler.c:303:EHStatusHandlerThread() Error communicating to: Aladdin 
eToken PRO 64 00 00
ifdwrapper.c:346:IFDStatusICC() Card not transacted: 612
eventhandler.c:303:EHStatusHandlerThread() Error communicating to: Aladdin 
eToken PRO 64 00 00
ifdwrapper.c:346:IFDStatusICC() Card not transacted: 612
eventhandler.c:303:EHStatusHandlerThread() Error communicating to: Aladdin 
eToken PRO 64 00 00
pcscdaemon.c:676:signal_trap() Received signal: 2
pcscdaemon.c:681:signal_trap() Preparing for suicide
ifdwrapper.c:346:IFDStatusICC() Card not transacted: 612
eventhandler.c:303:EHStatusHandlerThread() Error communicating to: Aladdin 
eToken PRO 64 00 00
ifdwrapper.c:346:IFDStatusICC() Card not transacted: 612
eventhandler.c:303:EHStatusHandlerThread() Error communicating to: Aladdin 
eToken PRO 64 00 00
ifdwrapper.c:346:IFDStatusICC() Card not transacted: 612
eventhandler.c:303:EHStatusHandlerThread() Error communicating to: Aladdin 
eToken PRO 64 00 00
readerfactory.c:1254:RFCleanupReaders() entering cleaning function
readerfactory.c:1263:RFCleanupReaders() Stopping reader: Aladdin eToken PRO 64 
00 00
eventhandler.c:148:EHDestroyEventHandler() Stomping thread.
eventhandler.c:177:EHDestroyEventHandler() Waiting polling thread
eventhandler.c:469:EHStatusHandlerThread() Die
eventhandler.c:188:EHDestroyEventHandler() Thread stomped.
readerfactory.c:985:RFUnInitializeReader() Attempting shutdown of Aladdin 
eToken PRO 64 00 00.
==14646== Thread 1:
==14646== Invalid read of size 2
==14646==    at 0x403BB62: CT_close (in /usr/lib/libopenctapi.so)
==14646==    by 0x402CEC3: IFDHCloseChannel (in 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so)
==14646==    by 0x804D162: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804FED1: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8050102: ??? (in /usr/sbin/pcscd)
==14646==    by 0x805142F: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804E4FD: ??? (in /usr/sbin/pcscd)
==14646==    by 0x4092E36: (below main) (libc-start.c:226)
==14646==  Address 0x4272938 is 0 bytes inside a block of size 1,876 free'd
==14646==    at 0x4025BF0: free (vg_replace_malloc.c:366)
==14646==    by 0x403BB83: CT_close (in /usr/lib/libopenctapi.so)
==14646==    by 0x403BE07: CT_init (in /usr/lib/libopenctapi.so)
==14646==    by 0x402CF68: IFDHCreateChannel (in 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so)
==14646==    by 0x804D09A: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804FD8A: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8050503: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8054AD7: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8054EE1: ??? (in /usr/sbin/pcscd)
==14646==    by 0x4068E98: start_thread (pthread_create.c:304)
==14646==    by 0x414C73D: clone (clone.S:130)
==14646== 
==14646== Invalid read of size 4
==14646==    at 0x403BB58: CT_close (in /usr/lib/libopenctapi.so)
==14646==    by 0x402CEC3: IFDHCloseChannel (in 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so)
==14646==    by 0x804D162: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804FED1: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8050102: ??? (in /usr/sbin/pcscd)
==14646==    by 0x805142F: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804E4FD: ??? (in /usr/sbin/pcscd)
==14646==    by 0x4092E36: (below main) (libc-start.c:226)
==14646==  Address 0x4273088 is 1,872 bytes inside a block of size 1,876 free'd
==14646==    at 0x4025BF0: free (vg_replace_malloc.c:366)
==14646==    by 0x403BB83: CT_close (in /usr/lib/libopenctapi.so)
==14646==    by 0x403BE07: CT_init (in /usr/lib/libopenctapi.so)
==14646==    by 0x402CF68: IFDHCreateChannel (in 
/usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so)
==14646==    by 0x804D09A: ??? (in /usr/sbin/pcscd)
==14646==    by 0x804FD8A: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8050503: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8054AD7: ??? (in /usr/sbin/pcscd)
==14646==    by 0x8054EE1: ??? (in /usr/sbin/pcscd)
==14646==    by 0x4068E98: start_thread (pthread_create.c:304)
==14646==    by 0x414C73D: clone (clone.S:130)
==14646== 
readerfactory.c:861:RFUnloadReader() Unloading reader driver.
winscard_svc.c:130:ContextsDeinitialize() remaining threads: 0
pcscdaemon.c:628:at_exit() cleaning /var/run/pcscd
==14646== 
==14646== HEAP SUMMARY:
==14646==     in use at exit: 108,446 bytes in 2,180 blocks
==14646==   total heap usage: 4,390 allocs, 2,210 frees, 391,764 bytes allocated
==14646== 
==14646== For a detailed leak analysis, rerun with: --leak-check=full
==14646== 
==14646== For counts of detected and suppressed errors, rerun with: -v
==14646== ERROR SUMMARY: 16 errors from 4 contexts (suppressed: 31 from 10)
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to