pcscd only runs fine in "--debug" mode

Bug #1076468 reported by Damiano Albani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openct (Ubuntu)
New
Undecided
Unassigned

Bug Description

I've recently upgraded to 12.04/amd64 and now I can't use either my eToken Pro or e-gate card.
For exampe, a simple "opensc-tool -a" call fails if I do it twice in a row!?
See the log file that I attach as "report 1", made with OpenSC in debug mode.

Then I thought of running "pcscd" itself in debug mode, e.g.:
$ PCSCLITE_PCSCD_ARGS="--debug" opensc-tool -a

Immediately my problem disappeared: I can call "opensc-tool -a" as much as I want without error. Other OpenSC-provided "pkcs1{1,5}-tool" calls worked fine as well.
See the log file attached as "report 2".

Finally, I switched "pcscd" error reporting mode to "error", just as a test. And back again was I in trouble...
Same symptom, I can't call this more than one or two times in a row before if fails :
$ PCSCLITE_PCSCD_ARGS="--error" opensc-tool -a
See the log file attached as "report 3".

And running "pcscd --info" produced the same behavior as with "--error"!? Only "--debug" works correctly some (strange) reason.

Revision history for this message
Damiano Albani (damiano-albani) wrote :
Revision history for this message
Damiano Albani (damiano-albani) wrote :
Revision history for this message
Damiano Albani (damiano-albani) wrote :
Revision history for this message
Ludovic Rousseau (ludovic-rousseau+ubuntu-one) wrote :

From "report 3":
Nov 8 17:44:33 optiplex960 pcscd: winscard.c:316:SCardConnect() Error powering up card: -2146435050 0x80100016

The driver failed to power up the card.

I have no idea why the use of "--debug" would work better.
Can you follow http://pcsclite.alioth.debian.org/pcsclite.html#support to generate a complete pcscd trace?

Revision history for this message
Damiano Albani (damiano-albani) wrote :

Here's the log file generated using:
sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu | tee log.txt

Revision history for this message
Damiano Albani (damiano-albani) wrote :

The trouble is that the behavior is somewhat erratic.
It sometimes work, it sometimes doesn't.

One thing I've just noticed though: when I run "pcscd" in the background, "opensc-tool -a" calls invariably fail.
However it works fine if I simply use "pcsd --foreground", regardless of the debug / error logging options.

How could I produce a log file of a background pcscd?

Revision history for this message
Ludovic Rousseau (ludovic-rousseau-gmail) wrote :

"Attempting startup of Axalto/Schlumberger/Gemalo egate token 00 00 using /usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Linux/openct-ifd.so"

You are using the OpenCT driver.

You should report the bug to OpenCT (openct package)

affects: pcsc-lite (Ubuntu) → openct (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.