Hi Ludovic, thanks for having a look into this. Here is the output of gdb:
root@linux:/home/karsten# gdb /usr/sbin/pcscd GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/sbin/pcscd...(no debugging symbols found)...done. (gdb) set args -dfa (gdb) run Starting program: /usr/sbin/pcscd -dfa [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 00000000 pcscdaemon.c:240:main() pcscd set to foreground with debug send to stdout 00000042 debuglog.c:298:DebugLogSetCategory() Debug options: APDU 00000106 configfile.l:254:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d 00000045 configfile.l:307:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin 00000112 configfile.l:266:DBGetReaderListDir() Skipping non regular file: . 00000014 configfile.l:266:DBGetReaderListDir() Skipping non regular file: .. 00000018 pcscdaemon.c:545:main() pcsc-lite 1.8.10 daemon ready. 00002199 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001 00000145 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001 00000138 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0020, path: /dev/bus/usb/001/002 00000143 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1210, PID: 0x2604, path: /dev/bus/usb/001/003 00000138 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1210, PID: 0x2604, path: /dev/bus/usb/001/003 00000135 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0020, path: /dev/bus/usb/001/002 00000172 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001 00000126 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001 00000132 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0020, path: /dev/bus/usb/002/002 00000137 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x219C, path: /dev/bus/usb/002/003 00000134 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x219C, path: /dev/bus/usb/002/003 00000132 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x219C, path: /dev/bus/usb/002/003 00000132 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x219C, path: /dev/bus/usb/002/003 00000367 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0020, path: /dev/bus/usb/002/002 [New Thread 0x7ffff6956700 (LWP 15827)] 27173296 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0C4B, PID: 0x0500, path: /dev/bus/usb/001/004 00000031 hotplug_libudev.c:321:HPAddDevice() Adding USB device: REINER SCT cyberJack RFID standard 00000134 readerfactory.c:989:RFInitializeReader() Attempting startup of REINER SCT cyberJack RFID standard (5372633771) 00 00 using /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so CYBERJACK: Started 00065124 readerfactory.c:874:RFBindFunctions() Loading IFD Handler 3.0 [New Thread 0x7ffff54dc700 (LWP 15832)] [Thread 0x7ffff54dc700 (LWP 15832) exited] [New Thread 0x7ffff54dc700 (LWP 15833)] [Thread 0x7ffff54dc700 (LWP 15833) exited] [New Thread 0x7ffff54dc700 (LWP 15834)] 00027861 readerfactory.c:327:RFAddReader() Using the pcscd polling thread [New Thread 0x7ffff4cdb700 (LWP 15835)] 17558580 hotplug_libudev.c:594:HPEstablishUSBNotifications() Device removed 00000908 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001 00000207 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001 00000163 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0020, path: /dev/bus/usb/001/002 00000156 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1210, PID: 0x2604, path: /dev/bus/usb/001/003 00000166 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1210, PID: 0x2604, path: /dev/bus/usb/001/003 00000161 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0020, path: /dev/bus/usb/001/002 00000204 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001 00000163 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001 00000155 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0020, path: /dev/bus/usb/002/002 00000157 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x219C, path: /dev/bus/usb/002/003 00000152 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x219C, path: /dev/bus/usb/002/003 00000226 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x219C, path: /dev/bus/usb/002/003 00000178 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x219C, path: /dev/bus/usb/002/003 00000168 hotplug_libudev.c:269:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0020, path: /dev/bus/usb/002/002 00000025 hotplug_libudev.c:520:HPRescanUsbBus() Removing USB device[0]: REINER SCT cyberJack RFID standard (5372633771) at /dev/bus/usb/001/004 00000037 readerfactory.c:535:RFRemoveReader() UnrefReader() count was: 1 00000011 eventhandler.c:156:EHDestroyEventHandler() Stomping thread. 00000175 eventhandler.c:185:EHDestroyEventHandler() Waiting polling thread 00270837 eventhandler.c:478:EHStatusHandlerThread() Die 00003601 eventhandler.c:196:EHDestroyEventHandler() Thread stomped. 00000027 readerfactory.c:1040:RFUnInitializeReader() Attempting shutdown of REINER SCT cyberJack RFID standard (5372633771) 00 00. [Thread 0x7ffff4cdb700 (LWP 15835) exited] *** Error in `/usr/sbin/pcscd': free(): corrupted unsorted chunks: 0x00007ffff00054d0 *** Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff6956700 (LWP 15827)] 0x00007ffff720ff79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) backtrace #0 0x00007ffff720ff79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff7213388 in __GI_abort () at abort.c:89 #2 0x00007ffff724d1d4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff735ba10 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007ffff72594ae in malloc_printerr (ptr=<optimised out>, str=0x7ffff735bb60 "free(): corrupted unsorted chunks", action=1) at malloc.c:4996 #4 _int_free (av=<optimised out>, p=<optimised out>, have_lock=0) at malloc.c:3840 #5 0x00007ffff5f40954 in ?? () from /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so #6 0x00007ffff5f3d876 in ?? () from /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so #7 0x00007ffff5f3d8cf in ?? () from /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so #8 0x00007ffff5f3d8f9 in ?? () from /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so #9 0x00007ffff5f3bc58 in CReader::Disonnect() () from /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so #10 0x00007ffff5f26f9a in ?? () from /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so #11 0x00007ffff5f27179 in IFDHCloseChannel () from /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so #12 0x00000000004069ba in ?? () #13 0x000000000040857d in ?? () #14 0x00000000004087cf in ?? () #15 0x0000000000408add in ?? () #16 0x000000000040e47f in ?? () #17 0x000000000040e781 in ?? () #18 0x00007ffff75a7182 in start_thread (arg=0x7ffff6956700) at pthread_create.c:312 #19 0x00007ffff72d430d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to pcsc-lite in Ubuntu. https://bugs.launchpad.net/bugs/1323795 Title: pcscd crashes when removing usb chipcard reader Status in “pcsc-lite” package in Ubuntu: New Bug description: pcscd (1.8.10-1ubuntu1) crashed reproducibly in Ubuntu 14.04LTS when I remove my Reiner SCT chipcard reader. The reader uses the libifd-cyberjack6 driver. I tried with the driver version from the Ubuntu repositories first, when that failed I also tried with the ones provided from the manufacturer's homepage, but pcscd crashes in both cases. I ran pcscd in debug mode attached the chipcard reader, inserted and removed the chipcard a couple of times and got this output: /usr/share/doc/libusb-1.0-0 $ sudo pcscd -d -f 00000000 pcscdaemon.c:240:main() pcscd set to foreground with debug send to stdout 00000158 configfile.l:254:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d 00000033 configfile.l:307:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin 00000046 configfile.l:266:DBGetReaderListDir() Skipping non regular file: . 00000012 configfile.l:266:DBGetReaderListDir() Skipping non regular file: .. 00000013 pcscdaemon.c:545:main() pcsc-lite 1.8.10 daemon ready. [...] 00000024 hotplug_libudev.c:321:HPAddDevice() Adding USB device: REINER SCT cyberJack RFID standard 00000086 readerfactory.c:989:RFInitializeReader() Attempting startup of REINER SCT cyberJack RFID standard (5321633775) 00 00 using /usr/lib/pcsc/drivers/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so CYBERJACK: Started 00002092 readerfactory.c:874:RFBindFunctions() Loading IFD Handler 3.0 00016618 readerfactory.c:327:RFAddReader() Using the pcscd polling thread 02479431 eventhandler.c:381:EHStatusHandlerThread() powerState: POWER_STATE_POWERED 00000045 eventhandler.c:396:EHStatusHandlerThread() Card inserted into REINER SCT cyberJack RFID standard (5321633775) 00 00 00000026 Card ATR: 3B FF 96 00 FF 81 31 FE 45 65 63 66 07 52 02 50 00 10 09 23 C0 19 06 40 76 00401109 eventhandler.c:455:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED 02003760 eventhandler.c:335:EHStatusHandlerThread() Card Removed From REINER SCT cyberJack RFID standard (5372633771) 00 00 02060183 eventhandler.c:381:EHStatusHandlerThread() powerState: POWER_STATE_POWERED 00000027 eventhandler.c:396:EHStatusHandlerThread() Card inserted into REINER SCT cyberJack RFID standard (5321633775) 00 00 00000016 Card ATR: 3B FF 96 00 FF 81 31 FE 45 65 63 66 07 52 02 50 00 10 09 23 C0 19 06 40 76 00401125 eventhandler.c:455:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED 01603142 eventhandler.c:335:EHStatusHandlerThread() Card Removed From REINER SCT cyberJack RFID standard (5372633771) 00 00 RSCT: No USB context.}n*** Error in `pcscd': free(): corrupted unsorted chunks: 0x00007fbacc0077e0 *** --- if I remove the reader while the card is inserted the log looks slightly different, but pcscd still crashes: 06279214 hotplug_libudev.c:594:HPEstablishUSBNotifications() Device removed [...] 00000025 hotplug_libudev.c:520:HPRescanUsbBus() Removing USB device[0]: REINER SCT cyberJack RFID standard (5321633775) at /dev/bus/usb/001/010 00000038 readerfactory.c:535:RFRemoveReader() UnrefReader() count was: 1 00000012 eventhandler.c:156:EHDestroyEventHandler() Stomping thread. 00000025 eventhandler.c:185:EHDestroyEventHandler() Waiting polling thread 00127580 eventhandler.c:478:EHStatusHandlerThread() Die 00000169 eventhandler.c:196:EHDestroyEventHandler() Thread stomped. 00000014 readerfactory.c:1040:RFUnInitializeReader() Attempting shutdown of REINER SCT cyberJack RFID standard (5321633775) 00 00. *** Error in `pcscd': free(): corrupted unsorted chunks: 0x00007ff9fc0077e0 *** --- pcscd also crashes if no card was inserted at any time while the reader was attached. I didn't experience this problem in 13.10 Please let me know, if I can help more to resolve this issue. Cheers, Karsten To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pcsc-lite/+bug/1323795/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp

