|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
RE: [Muscle] 2nd: Differences in ScardDisconnect betweenSCARD_LEAVE_CARD and SCARD_RESET_CARD
From: Merlet Fabien (fabien.merlet
nagra.com)
Date: Wed Mar 29 2006 - 02:25:10 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Ludovic,
Thanks for your comments.
I've installed pcsc-lite 1.3.0 and started the test again.
I obtained exactly the same result.
Here is an extract of the server logs during the tests if it may help:
---
pcscdaemon.c:259:main() pcscd set to foreground with debug send to
stderr
pcscdaemon.c:464:main() pcsc-lite 1.3.0 daemon ready.
... # ?
readerfactory.c:812:RFLoadReader() Warning library pointer not NULL
...
prothandler.c:130:PHSetProtocol() Attempting PTS to T=1
... # next lines observed hundred times
winscard_msg_srv.c:243:SHMProcessEventsContext() select returns with
failure: Bad file descriptor
winscard_svc.c:204:ContextThread() Error in SHMProcessEventsContext
... # much later
winscard.c:241:SCardConnect() Error Reader Exclusive
---
- First, I generally observe "RPC transport error" messages (when a call
to SCardTransmit is not received by the card),
and after problems with calls to SCardDisconnect which fail on error
"Unknown error 0x00000008".
And it finally ends with a "sharing violation" error on the reader on a
SCardConnect call.
- As I stated in my last mail, I don't think this is linked to the SCM
driver we use, because problem is at the end in the server,
("Exclusive reader" which can't be cleaned except if I kill the pcscd
daemon) and changing parameters in SCardDisconnect calls has an effect,
so IMHO this is somewhere in the PCSC layer... (but I may be wrong of
course). On rare occasions, I also observed pcscd daemon crashes...
- Yesterday, it took a couple of errors to raise, so I doubt a simpler
example would be of any help ...
I suspect a raise condition which may be linked to the complex
environment of the application (several contexts, multi-thread,
multi-process ...)
Feel free to tell me if you have new tests or anything that may help me
investigate this.
TIA
Fabien
>-----Original Message-----
>From: Ludovic Rousseau [mailto:ludovic.rousseau
gmail.com]
>Sent: lundi, 27. mars 2006 09:18
>To: MUSCLE
>Subject: Re: [Muscle] 2nd: Differences in ScardDisconnect
>betweenSCARD_LEAVE_CARD and SCARD_RESET_CARD
>
>On 23/03/06, Merlet Fabien <fabien.merlet
nagra.com> wrote:
>> Hello,
>
>Hi,
>
>> I'm using pcsc-lite 1.2.9beta6 on Debian Linux and I encounter a
>> little problem.
>> I'm analysing it for weeks/months now trying to determine where the
>> origin is, and it seems to be linked to a difference of behaviour in
>> SCardDisconnect calls.
>>
>> If I repeatedly close a connection (every few minutes) to a
>smartcard
>> using SCARD_LEAVE_CARD in case of normal behaviour (not on
>errors), it
>> finally ends with a "RPC transport error", which generally ends by a
>> failure in pcscd ("service not available") or a "sharing
>violation" on
>> the reader.
>> If I always close connections with SCARD_RESET_CARD, it seems to
>> behave normally in the same conditions.
>> I had a look to the function and there are several flags
>reset in case
>> of a call to SCARD_RESET_CARD.
>>
>> Is it possible that if these flags are not reset, it may lead to
>> troubles on the communication layer under certain circumstances ?
>
>Any thing is possible. A first step I suggest is to try
>pcsc-lite 1.3.0 to see if you still have the bug.
>
>> NB: I spied the communication between the card and the reader and I
>> observe SCardTransmit calls which never reach the card.
>
>Was is before or after the error?
>What driver are you using?
>
>> NB2: I don't think the problem may be located in the driver as
>> otherewise "SCARD_RESET_CARD" wouldn't have any effect.
>
>> NB3: This situation is tricky and can't be easily reproduced in a
>> short example.
>
>Bad luck. Can you reproduce it with a not so short example?
>
>> I tried to analyse as far as I could, but if anyone has a suggestion
>> on how to confirm this or not, he is welcome.
>
>Please try pcsc-lite version 1.3.0.
>
>Bye,
>
>--
> Dr. Ludovic Rousseau
>
>
>
_______________________________________________
Muscle mailing list
Muscle
lists.musclecard.com
http://lists.drizzle.com/mailman/listinfo/muscle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]