Replying to my own message, I did some more tests with 1.5.5
and ccid-1.3.11 and can get a bus error with these also.

 I then did:
 reboot with reader present.
 Start pcscd -d -f
 unplugged reader
 plugged it back in
 insert card

 Got message about IFDHPowerICC() PowerUp failed
 So reinserted the card.

 run pkcs15-tool -r
 pulled out card
 inserted card
 pulled out card
 unplugged reader
 got bus error.

So the bus error is not related to latest mods. but
still present.


Douglas E. Engert wrote:


Ludovic Rousseau wrote:
2010/2/10 Douglas E. Engert <[email protected]>:
Ludovic Rousseau wrote:
Hello,

I uploaded to [1] new versions of pcsc-lite and libccid. They have
many and important changes (in particular for pcsc-lite). I would like
to test these versions before I release them as stable. They work for
me and should work for you too.
On Solaris 10 using Sun's libucb, I am getting intermittent core dumps.
The #2 output attached is from starting pcscd -f -d  with a GemPC twin
reader, and inserting a card, removing it and inserting again.

The #1 output was after pcsc15-tool -r read a certificate
correctly, then when going to remove the card, got a core dump.

According to the logs the reader "disapeared" from the USB bus. And
pcscd removed it from its list. But you do not indicate you removed
the reader. Is that exact?


That is correct.

But as a test, I started pcscd with the reader plugged in, then unplug
the reader, I get a Bus Error. See: pcsc-svn.error.3.txt

So powered down the machine, to make sure any hardware was reset,
booted, and tried running the pcscd-1.5.5 and ccid-1.3.11. No problems
pulling the reader. See pcsc-1.5.5.ok.3.txt


Then tried the pcscd-1.5.6-svn... and ccid-1.3.11-svn...
I then did:
unplugged reader
plugged it back in
insert card
run pkcs15-tool -r
pulled out card
inserted card
pulled out card
unplugged reader
got bus error.  see pcsc-svn.error.4.txt

Further attempts after starting pcscd then unplugging the reader
got bus errors.

So it is not clear if something is leaving the Solaris usb code in
a strange state?


Then the crash happens in a libusb call.
#6  0xff382ca4 in usb_find_devices () from /usr/sfw/lib/libusb.so.1

I would suspect a bug in the USB layer.

pcsc-lite-1.5.5 and ccid-1.3.11 work fine (pcsc-1.5.5 does have
this patch which appears to be in 1.5.6-snv-4744)

--- ./src/,pcscdaemon.c Sat Jul  4 03:10:31 2009
+++ ./src/pcscdaemon.c  Mon Aug 31 16:18:18 2009
@@ -576,6 +576,8 @@
               return;

       HPReCheckSerialReaders();
+
+       (void)signal(SIGUSR1, signal_reload);
 } /* signal_reload */

 static void signal_trap(/*...@unused@*/ int sig)

This was added in revision 4375
http://lists.alioth.debian.org/pipermail/pcsclite-cvs-commit/2009-September/003893.html

pkcs15-tool is reading a certificate...


00000067 ../../src/src/ifdhandler.c:1219:IFDHTransmitToICC()
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00050829 ../../src/src/winscard_svc.c:290:ContextThread() Received command:
TRANSMIT from client 10
00000127 ../../src/src/winscard.c:1660:SCardTransmit() Send Protocol: T=1
00000068 ../../src/src/ifdhandler.c:1219:IFDHTransmitToICC()
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00045231 ../../src/src/winscard_svc.c:290:ContextThread() Received command:
TRANSMIT from client 10
00000120 ../../src/src/winscard.c:1660:SCardTransmit() Send Protocol: T=1
00000070 ../../src/src/ifdhandler.c:1219:IFDHTransmitToICC()
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00053094 ../../src/src/winscard_svc.c:290:ContextThread() Received command:
END_TRANSACTION from client 10
00000109 ../../src/src/winscard.c:1193:SCardEndTransaction() Status:
0x00000000
00010371 ../../src/src/winscard_svc.c:290:ContextThread() Received command:
DISCONNECT from client 10
00000103 ../../src/src/winscard.c:866:SCardDisconnect() Active Contexts: 1
00000673 ../../src/src/ifdhandler.c:1090:IFDHPowerICC() action: Reset,
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00286468 ../../src/src/winscard.c:927:SCardDisconnect() Reset complete.
00000391 ../../src/src/winscard_svc.c:290:ContextThread() Received command:
RELEASE_CONTEXT from client 10
00000086 ../../src/src/winscard.c:228:SCardReleaseContext() Releasing
Context: 0x1033911
00002782 ../../src/src/winscard_svc.c:284:ContextThread() Client die: 10
00000162 ../../src/src/winscard_svc.c:921:MSGCleanupClient() Thread is
stopping: dwClientID=10, threadContext @548B0
00000071 ../../src/src/winscard_svc.c:927:MSGCleanupClient() Freeing
SCONTEXT @548B0
08517173 ../../src/src/ccid_usb.c:595:WriteUSB()
usb_bulk_write(/dev/usb/8e6.3437/0): No such device

Your device disapeared here.
Have you removed it?

No.


00000143 ../../src/src/ifdwrapper.c:471:IFDStatusICC() Card not transacted:
617
00000204 ../../src/src/utils.c:66:SendHotplugSignal() Send hotplug signal to
pcscd (pid=10619)
00000166 ../../src/src/eventhandler.c:378:EHStatusHandlerThread() Error
communicating to: Gemplus GemPC Twin 00 00
00112336 ../../src/src/hotplug_libusb.c:557:HPRemoveHotPluggable() Removing
USB device[0]: /dev/usb:8e6.3437/0
00000132 ../../src/src/eventhandler.c:170:EHDestroyEventHandler() Stomping
thread.
00000086 ../../src/src/ifdhandler.c:365:IFDHGetCapabilities() tag: 0xFB1,
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00000079 ../../src/src/eventhandler.c:183:EHDestroyEventHandler() Waiting
polling thread
00287507 ../../src/src/eventhandler.c:519:EHStatusHandlerThread() Die
00000233 ../../src/src/eventhandler.c:207:EHDestroyEventHandler() Thread
stomped.
00000089 ../../src/src/readerfactory.c:1021:RFUnInitializeReader()
Attempting shutdown of Gemplus GemPC Twin 00 00.
00000106 ../../src/src/ifdhandler.c:266:IFDHCloseChannel()
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00000294 ../../src/src/ccid_usb.c:595:WriteUSB()
usb_bulk_write(/dev/usb/8e6.3437/0): No such device
00000199 ../../src/src/readerfactory.c:881:RFUnloadReader() Unloading reader
driver.
Bus Error (core dumped)

Core was generated by `/opt/smartcard/sbin/pcscd -f -d'.
Program terminated with signal 10, Bus error.
#0  0xff2570a8 in t_splay () from /lib/libc.so.1
(gdb) where
#0  0xff2570a8 in t_splay () from /lib/libc.so.1
#1  0xff256f38 in t_delete () from /lib/libc.so.1
#2  0xff2565c4 in _malloc_unlocked () from /lib/libc.so.1
#3  0xff25641c in malloc () from /lib/libc.so.1
#4  0xff09415c in usb_search_dev_usb () from
/usr/sfw/lib/libusb_plugins/libusbugen.so.1
#5  0xff091428 in usb_find_devices () from
/usr/sfw/lib/libusb_plugins/libusbugen.so.1
#6  0xff382ca4 in usb_find_devices () from /usr/sfw/lib/libusb.so.1
#7 0x0001a698 in HPRescanUsbBus () at ../../src/src/hotplug_libusb.c:258
#8  0x0001ad2c in HPEstablishUSBNotifications () at
../../src/src/hotplug_libusb.c:424
#9  0xff2c8a28 in _lwp_start () from /lib/libc.so.1
#10 0xff2c8a28 in _lwp_start () from /lib/libc.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


# /opt/smartcard/sbin/pcscd -f -d
00000000 ../../src/src/debuglog.c:230:DebugLogSetLevel() debug level=debug
00001919 ../../src/src/pcscdaemon.c:525:main() pcsc-lite 1.5.6-svn-4744
daemon ready.
01442788 ../../src/src/hotplug_libusb.c:480:HPAddHotPluggable() Adding USB
device: /dev/usb:8e6.3437/0
00001346 ../../src/src/readerfactory.c:975:RFInitializeReader() Attempting
startup of Gemplus GemPC Twin 00 00 using
/opt/smartcard/pcsc/drivers/ifd-ccid.bundle/Contents/Solaris/libccid.so
00002752 ../../src/src/readerfactory.c:844:RFBindFunctions() Loading IFD
Handler 3.0
00000235 ../../src/src/ifdhandler.c:1597:init_driver() Driver version:
1.3.11-svn-4750
00002906 ../../src/src/ifdhandler.c:1610:init_driver() LogLevel: 0x0003
00002936 ../../src/src/ifdhandler.c:1630:init_driver() DriverOptions: 0x0000
00000944 ../../src/src/ifdhandler.c:82:IFDHCreateChannelByName() lun: 0,
device: usb:08e6/3437:libusb:/dev/usb:8e6.3437/0
00004177 ../../src/src/ccid_usb.c:284:OpenUSBByName() Manufacturer: Ludovic
Rousseau ([email protected])
00002928 ../../src/src/ccid_usb.c:294:OpenUSBByName() ProductString: Generic
CCID driver
00002902 ../../src/src/ccid_usb.c:300:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1,
or (at your option) any later version.
00012565 ../../src/src/ccid_usb.c:500:OpenUSBByName() Found Vendor/Product:
08E6/3437 (Gemplus GemPC Twin)
00001027 ../../src/src/ccid_usb.c:502:OpenUSBByName() Using USB bus/device:
/dev/usb/8e6.3437/0
00003661 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 10753 bps 00000932 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 14337 bps 00000431 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 15625 bps 00000082 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 17204 bps 00000074 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 20833 bps 00000074 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 21505 bps 00000073 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 23438 bps 00000074 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 25806 bps 00000072 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 28674 bps 00000058 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 31250 bps 00000058 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 32258 bps 00000058 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 34409 bps 00000058 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 39063 bps 00000057 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 41667 bps 00000059 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 43011 bps 00000048 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 46875 bps 00001472 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 52083 bps 00000073 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 53763 bps 00000070 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 57348 bps 00000072 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 62500 bps 00000069 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 64516 bps 00000069 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 68817 bps 00000054 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 71685 bps 00000054 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 78125 bps 00000054 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 83333 bps 00000054 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 86022 bps 00000054 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 93750 bps 00000054 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 104167 bps 00000046 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 107527 bps 00000047 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 114695 bps 00000048 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 125000 bps 00000048 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 129032 bps 00000048 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 143369 bps 00002052 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 156250 bps 00000076 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 166667 bps 00000070 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 172043 bps 00000070 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 215054 bps 00000071 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 229391 bps 00000071 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 250000 bps 00000069 ../../src/src/ccid_usb.c:928:get_data_rates() declared: 344086 bps 00032855 ../../src/src/ifdhandler.c:365:IFDHGetCapabilities() tag: 0xFB0,
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00001156 ../../src/src/readerfactory.c:268:RFAddReader() Using the pcscd
polling thread
00000856 ../../src/src/ifdhandler.c:365:IFDHGetCapabilities() tag: 0xFAE,
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00000095 ../../src/src/ifdhandler.c:453:IFDHGetCapabilities() Reader
supports 1 slot(s)
00000099 ../../src/src/hotplug_libusb.c:406:HPEstablishUSBNotifications() Driver ifd-ccid.bundle does not support IFD_GENERATE_HOTPLUG. Using active
polling instead.
00000076 ../../src/src/hotplug_libusb.c:415:HPEstablishUSBNotifications()
Polling forced every 1 second(s)


12856688 ../../src/src/ccid_usb.c:595:WriteUSB()
usb_bulk_write(/dev/usb/8e6.3437/0): I/O error
00000150 ../../src/src/ifdwrapper.c:471:IFDStatusICC() Card not transacted:
612
00000085 ../../src/src/eventhandler.c:378:EHStatusHandlerThread() Error
communicating to: Gemplus GemPC Twin 00 00
10420012 ../../src/src/ccid_usb.c:595:WriteUSB()
usb_bulk_write(/dev/usb/8e6.3437/0): I/O error
00000134 ../../src/src/ifdwrapper.c:471:IFDStatusICC() Card not transacted:
612
00000084 ../../src/src/eventhandler.c:378:EHStatusHandlerThread() Error
communicating to: Gemplus GemPC Twin 00 00
07839987 ../../src/src/ccid_usb.c:595:WriteUSB()
usb_bulk_write(/dev/usb/8e6.3437/0): I/O error
00000139 ../../src/src/ifdwrapper.c:471:IFDStatusICC() Card not transacted:
612
00000082 ../../src/src/eventhandler.c:378:EHStatusHandlerThread() Error
communicating to: Gemplus GemPC Twin 00 00
00400239 ../../src/src/ccid_usb.c:595:WriteUSB()
usb_bulk_write(/dev/usb/8e6.3437/0): No such device

Your device disapeared here.
Have you removed it?

00000117 ../../src/src/ifdwrapper.c:471:IFDStatusICC() Card not transacted:
617
00000197 ../../src/src/utils.c:66:SendHotplugSignal() Send hotplug signal to
pcscd (pid=10644)
00000158 ../../src/src/eventhandler.c:378:EHStatusHandlerThread() Error
communicating to: Gemplus GemPC Twin 00 00
00400275 ../../src/src/ccid_usb.c:595:WriteUSB()
usb_bulk_write(/dev/usb/8e6.3437/0): No such device
00000135 ../../src/src/ifdwrapper.c:471:IFDStatusICC() Card not transacted:
617
00000188 ../../src/src/utils.c:66:SendHotplugSignal() Send hotplug signal to
pcscd (pid=10644)
00000163 ../../src/src/eventhandler.c:378:EHStatusHandlerThread() Error
communicating to: Gemplus GemPC Twin 00 00
00120096 ../../src/src/hotplug_libusb.c:557:HPRemoveHotPluggable() Removing
USB device[0]: /dev/usb:8e6.3437/0
00000119 ../../src/src/eventhandler.c:170:EHDestroyEventHandler() Stomping
thread.
00000085 ../../src/src/ifdhandler.c:365:IFDHGetCapabilities() tag: 0xFB1,
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00000079 ../../src/src/eventhandler.c:183:EHDestroyEventHandler() Waiting
polling thread
00279755 ../../src/src/eventhandler.c:519:EHStatusHandlerThread() Die
00000242 ../../src/src/eventhandler.c:207:EHDestroyEventHandler() Thread
stomped.
00000090 ../../src/src/readerfactory.c:1021:RFUnInitializeReader()
Attempting shutdown of Gemplus GemPC Twin 00 00.
00000095 ../../src/src/ifdhandler.c:266:IFDHCloseChannel()
usb:08e6/3437:libusb:/dev/usb:8e6.3437/0 (lun: 0)
00000224 ../../src/src/ccid_usb.c:595:WriteUSB()
usb_bulk_write(/dev/usb/8e6.3437/0): No such device
00000216 ../../src/src/readerfactory.c:881:RFUnloadReader() Unloading reader
driver.
Bus Error (core dumped)




Core was generated by `/opt/smartcard/sbin/pcscd -f -d'.
Program terminated with signal 10, Bus error.
#0  0xff2570a8 in t_splay () from /lib/libc.so.1
(gdb) where
#0  0xff2570a8 in t_splay () from /lib/libc.so.1
#1  0xff256f38 in t_delete () from /lib/libc.so.1
#2  0xff2565c4 in _malloc_unlocked () from /lib/libc.so.1
#3  0xff25641c in malloc () from /lib/libc.so.1
#4  0xff09415c in usb_search_dev_usb () from
/usr/sfw/lib/libusb_plugins/libusbugen.so.1
#5  0xff091428 in usb_find_devices () from
/usr/sfw/lib/libusb_plugins/libusbugen.so.1
#6  0xff382ca4 in usb_find_devices () from /usr/sfw/lib/libusb.so.1
#7 0x0001a698 in HPRescanUsbBus () at ../../src/src/hotplug_libusb.c:258
#8  0x0001ad2c in HPEstablishUSBNotifications () at
../../src/src/hotplug_libusb.c:424
#9  0xff2c8a28 in _lwp_start () from /lib/libc.so.1
#10 0xff2c8a28 in _lwp_start () from /lib/libc.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)



--

 Douglas E. Engert  <[email protected]>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439
 (630) 252-5444
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to