Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oberthur PKCS#11 module is buggy on Ubuntu 18.04.01 LTS #41

Closed
martinpaljak opened this issue Jan 8, 2019 · 5 comments
Closed

Oberthur PKCS#11 module is buggy on Ubuntu 18.04.01 LTS #41

martinpaljak opened this issue Jan 8, 2019 · 5 comments

Comments

@martinpaljak
Copy link
Contributor

martinpaljak commented Jan 8, 2019

C_Finalize always hangs:

export PKCS11SPY=/usr/local/AWP/lib/libOcsPKCS11Wrapper.so
pkcs11-tool --module /usr/lib/x86_64-linux-gnu/pkcs11-spy.so -O

(running this via gdb)

4: C_Finalize
2019-01-07 23:25:07.782
^C
Thread 1 "pkcs11-tool" received signal SIGINT, Interrupt.
0x00007ffff716ed2d in __GI___pthread_timedjoin_ex (threadid=140737307977472, 
    thread_return=0x0, abstime=0x0, block=<optimized out>)
    at pthread_join_common.c:89
89	pthread_join_common.c: No such file or directory.
(gdb) bt
#0  0x00007ffff716ed2d in __GI___pthread_timedjoin_ex (
    threadid=140737307977472, thread_return=0x0, abstime=0x0, 
    block=<optimized out>) at pthread_join_common.c:89
#1  0x00007ffff59285bb in CSmartCardConnectionNotifier::stop(bool) ()
   from /usr/local/AWP/lib/libOcsCryptoki.so
@martinpaljak
Copy link
Contributor Author

This seems to be a common problem: https://www.google.com/search?rls=en&q=pthread_join_common.c

@virtual-machinist
Copy link

May this be the cause why Chromium crashes randomly after a couple of minutes with the plugin enabled? I don't have any logs to tie the crashing to open-eid, but the crashes disappeared after removing open-eid and everything related (and there weren't any before the inclusion of this middleware). Can anyone confirm this?

@martinpaljak
Copy link
Contributor Author

Have not tried with Chromium, but apparently having the PKCS#11 module loaded to Firefox (on Debian that is) resulted in random crashes of Firefox. As both are based on NSS on Linux, I assume the symptoms are the same. Keep in mind that open-eid should contain multiple PKCS#11 modules and only the Oberthur one seems to cause the random crashes (as currently observed)

@thsnr
Copy link

thsnr commented May 9, 2019

C_Finalize always hangs:

It seems that it only hangs if no card reader is connected:

2: C_GetSlotList
2019-05-09 11:42:17.939
[in] tokenPresent = 0x0
[out] pSlotList: 
Count is 0
[out] *pulCount = 0x0
Returned:  0 CKR_OK

...

4: C_Finalize
2019-05-09 11:42:17.941
^C

With one connected, it works:

2: C_GetSlotList
2019-05-09 11:42:08.528
[in] tokenPresent = 0x0
[out] pSlotList: 
Count is 1
[out] *pulCount = 0x1
Returned:  0 CKR_OK

...

5: C_Finalize
2019-05-09 11:42:08.530
Returned:  0 CKR_OK

Connecting a card reader while the library is hung also wakes it up.

@Jalakas
Copy link
Contributor

Jalakas commented Jun 13, 2019

"May this be the cause why Chromium crashes randomly after a couple of minutes with the plugin enabled?"

"awp" dependency is removed now: https://github.com/open-eid/linux-installer/pull/49/files
Hope there will be 19.06 release soon: https://installer.id.ee/media/ubuntu/

@metsma metsma closed this as completed Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants