Danny20v / eid-applet

Automatically exported from code.google.com/p/eid-applet
Other
0 stars 0 forks source link

Inadequate (lock?) cleanup #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start the applet
2. While reading the BeID card, interrupt the applet (refresh the page or 
click a link to navigate away or ...)
3. Next time the applet loads, it will get stuck in different ways.

What is the expected output? What do you see instead?
I expect the applet to read out the card.

Instead, I see the applet get stuck in a number of ways.  Each time the 
reader is attached and the eID card is inserted.  Each time, pcsctest(1) runs 
all tests just fine:

1. Not sure how to reproduce:

osName = Mac OS X
osVersion = 10.6.2
Detecting eID card...
Scanning card terminal: OmniKey CardMan 3121 00 00
could not connect to card: connect() failed
Please insert your eID card...

When I remove the card, this appears:
Scanning card terminal: OmniKey CardMan 3121 00 00

When I insert the card again, this appears:
Scanning card terminal: OmniKey CardMan 3121 00 00
could not connect to card: connect() failed

2. Reproduced by refreshing the page while authenticating (or causing an 
AJAX request on the page etc.):

osName = Mac OS X
osVersion = 10.6.2
Detecting eID card...
Scanning card terminal: OmniKey CardMan 3121 00 00
could not connect to card: Exclusive access has already been assigned to 
Thread Thread-30
Please insert your eID card...

When I remove the card, this appears:
Scanning card terminal: OmniKey CardMan 3121 00 00

When I insert the card again, this appears:
Scanning card terminal: OmniKey CardMan 3121 00 00

Next time I load the applet, this appears:
osName = Mac OS X
osVersion = 10.6.2
Detecting eID card...

What version of the product are you using? On what operating system?
1.0.0.GA on Mac OS X 10.6.2 with Java:
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)

Original issue reported on code.google.com by lhunath on 11 Mar 2010 at 8:30

GoogleCodeExporter commented 9 years ago
Actually; I lied.  pcsctest(1) only runs the tests fine in case 1.

In case 2., pcsctest(1) gets stuck as such:
MUSCLE PC/SC Lite Test Program

Testing SCardEstablishContext    : Command successful.
Testing SCardGetStatusChange 
Please insert a working reader   : Command successful.
Testing SCardListReaders         : Command successful.
Reader 01: OmniKey CardMan 3121 00 00
Enter the reader number          : 
Invalid Value - try again
Enter the reader number          : 1
Waiting for card insertion         
                                 : Command successful.

Original comment by lhunath on 11 Mar 2010 at 8:32

GoogleCodeExporter commented 9 years ago
What is pcsctest?

Original comment by frank.co...@gmail.com on 14 Aug 2010 at 6:28

GoogleCodeExporter commented 9 years ago
pcsctest runs a test on pcscd, lists the readers currently connected, and 
displays card information if a card is inserted.

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/
man8/pcsctest.8.html

Original comment by lhunath on 10 Sep 2010 at 1:37