I ran gdb again, this time with debug symbols installed and using the
cyberjack driver built from sources. This gives a little more detail
about where the actual problem is:

(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=<optimized out>, 
    str=0x7ffff735bb60 "free(): corrupted unsorted chunks", action=1)
    at malloc.c:4996
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0)
    at malloc.c:3840
#5  0x00007ffff5f42744 in ausb_close (ah=0x7ffff0006f70) at ausb.c:178
#6  0x00007ffff5f3e8d6 in CUSBUnix::Close (this=0x7ffff0004ed0)
    at USBUnix.cpp:395
#7  0x00007ffff5f3ec2e in CUSBUnix::Write (this=0x7ffff0004ed0, 
    Message=0x7ffff6953140, len=14) at USBUnix.cpp:178
#8  0x00007ffff5f2c5b5 in CBaseReader::Write (this=this@entry=0x7ffff00078c0, 
    Message=Message@entry=0x7ffff6953140, len=14) at BaseReader.cpp:427
#9  0x00007ffff5f2d211 in CCCIDReader::Transfer (
    this=this@entry=0x7ffff00078c0, Message=Message@entry=0x7ffff6953140, 
    Response=Response@entry=0x7ffff6954550) at CCIDReader.cpp:145
#10 0x00007ffff5f34683 in CEC30Reader::IfdPower (
    this=this@entry=0x7ffff00078c0, Mode=Mode@entry=0, ATR=0x0, 
    ATR_Length=0x0, Timeout=0) at EC30Reader.cpp:1045
#11 0x00007ffff5f3c464 in CRFSReader::IfdPower (this=0x7ffff00078c0, Mode=0, 
    ATR=<optimized out>, ATR_Length=<optimized out>, Timeout=<optimized out>)
    at RFSReader.cpp:51
#12 0x00007ffff5f3cd41 in CReader::Disonnect (this=0x7ffff0004d50)
    at Reader.cpp:185
#13 0x00007ffff5f2990a in IFDHandler::closeChannel (
    this=this@entry=0x7ffff61554c0 <rsct_ifd_handler>, Lun=Lun@entry=0)
    at ifd.cpp:639
#14 0x00007ffff5f29ae9 in IFDHCloseChannel (Lun=0) at ifd.cpp:1502
#15 0x00000000004069ba in IFDCloseIFD (rContext=rContext@entry=0x620320)
    at ifdwrapper.c:169
#16 0x000000000040857d in RFUnInitializeReader (
    rContext=rContext@entry=0x620320) at readerfactory.c:1044
#17 0x00000000004087cf in removeReader (sContext=0x620320)
    at readerfactory.c:559
#18 _UnrefReader (sReader=0x620320) at readerfactory.c:104
#19 0x0000000000408add in _UnrefReader (sReader=<optimized out>)
    at readerfactory.c:96
#20 RFRemoveReader (
    readerName=0x7ffff00026f0 "REINER SCT cyberJack RFID standard 
(5372633771)", port=port@entry=2097152) at readerfactory.c:535
#21 0x000000000040e47f in HPRescanUsbBus (udev=udev@entry=0x61e240)
    at hotplug_libudev.c:522
#22 0x000000000040e781 in HPEstablishUSBNotifications (udev=0x61e240)
    at hotplug_libudev.c:595
#23 0x00007ffff75a7182 in start_thread (arg=0x7ffff6956700)
    at pthread_create.c:312
#24 0x00007ffff72d430d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

from ausb_close (ausb.c:178) I followed the source further into the 
ausb[13]1?.c files where
I believe the "free" that causes the exception is for example at ausb3.c:306. 
The ausb_close 
implementations in all 4 files look similar, with the difference that ausb1.c 
and ausb3.c call
usb_close and ausb11 and ausb31 call libusb_close.


Cheers,
Karsten

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1323795

Title:
  pcscd crashes when removing usb chipcard reader

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pcsc-cyberjack/+bug/1323795/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to