[Pcsclite-muscle] Unplugging & replugging a device causes SIGSEGV

Giuseppe M gdm23 at iragan.org
Thu Oct 2 11:51:50 UTC 2014


On 02/10/14 13:34, Ludovic Rousseau wrote:
>> I am using the following setup:
>> driver ifokccid v4.0.5.4 (OEM-provided, closed source)
>> pcscd v1.8.12 (current SVN trunk + patch from my other email)
>> Ubuntu 14.04
>>
>> Reader: Omnikey 6121
> Please use my CCID driver
> http://pcsclite.alioth.debian.org/ccid.html
>
> The Omnikey 6121 should work
> http://pcsclite.alioth.debian.org/ccid/shouldwork.html#0x076B0x6622
The thing is, idProduct of these more recent models is 6623 so it does
not match. This is at least what I understood so far...but I haven't yet
tried compiling ccid from sources.

>> I am sending you a complete log output + valgrind messages.
>> It was not necessary to Ctrl+C because it exited with SIGSEGV.
>>
>> In order to generate this log, I started pcscd with:
>>         sudo valgrind --leak-check=full --show-leak-kinds=all pcscd -a -d -f
>>
>> Then I plugged, unplugged and re-plugged the reader. SIGSEGV happens
>> instantly when replugging.
>>
>> Some of the entries in the log might be false positives, but perhaps
>> there is some stack corruption. Although there is a closed source driver
>> here :( it does not seem involved in this specific problem.
> ==15817== Invalid read of size 1
> ==15817==    at 0x545E3E0: pthread_mutex_destroy (pthread_mutex_destroy.c:31)
> ==15817==    by 0x6EC94FF: CCIDSlotClose (common.c:3543)
> ==15817==    by 0x40709C: IFDCloseIFD (ifdwrapper.c:195)
> ==15817==    by 0x40B9E3: RFUnInitializeReader (readerfactory.c:1070)
> ==15817==    by 0x40A48D: removeReader (readerfactory.c:585)
> ==15817==    by 0x408E56: _UnrefReader (readerfactory.c:130)
> ==15817==    by 0x40A3D7: RFRemoveReader (readerfactory.c:561)
> ==15817==    by 0x412407: HPRemoveDevice (hotplug_libudev.c:367)
> ==15817==    by 0x412E42: HPEstablishUSBNotifications (hotplug_libudev.c:637)
> ==15817==    by 0x545C181: start_thread (pthread_create.c:312)
> ==15817==    by 0x576CFBC: clone (clone.S:111)
>
> CCIDSlotClose is from the proprietary driver.
Ok, thanks. Now this explains all the leaks...

>> Any help to make unplugging & replugging work would be greatly
>> appreciated, as I have to start pcscd in the ADD udev rule now :(
> Why do you use the proprietary driver?
Perhaps we should add also 0x6623 to be recognized as an Omnikey 6121?

Regards,

--
  Giuseppe M
  https://keybase.io/gdm85





More information about the Pcsclite-muscle mailing list