Page MenuHome GnuPG
Feed Advanced Search

Thu, Dec 5

werner closed T7309: gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received as Resolved.
Thu, Dec 5, 4:33 PM · Info Needed, scd, gpgagent, Bug Report

Fri, Nov 29

gniibe closed T7058: KDF-DO is not properly implemented as Resolved.

Fixed in 2.5.0 and 2.4.6.

Fri, Nov 29, 8:02 AM · scd, gnupg, Bug Report
gniibe closed T7160: scd: pipe server shutdown, a subtask of T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close, as Resolved.
Fri, Nov 29, 8:01 AM · gpgagent, scd, gnupg24, Bug Report
gniibe closed T7160: scd: pipe server shutdown as Resolved.

Fixed in 2.5.0 and 2.4.6.

Fri, Nov 29, 8:01 AM · scd, gpgagent, Bug Report
gniibe closed T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close as Resolved.

Fixed in 2.4.6.

Fri, Nov 29, 7:57 AM · gpgagent, scd, gnupg24, Bug Report
gniibe closed T7044: Deadlock on Windows in sdaemon as Resolved.

I believe this was fixed by T7386. Or it is now no hard lock up by T7402.
So, let me close this ticket.
If any new symptom, please add information into T7396.

Fri, Nov 29, 7:56 AM · scd, Bug Report, Windows, gnupg24
gniibe closed T7402: No hard lockup when SCardConnect never returns, a subtask of T7396: Windows: hard lockup of scdaemon, as Resolved.
Fri, Nov 29, 7:53 AM · Windows, scd
gniibe closed T7402: No hard lockup when SCardConnect never returns as Resolved.

I can say it's fixed in 2.4.7.

Fri, Nov 29, 7:53 AM · Windows, scd

Mon, Nov 25

ikloecker merged task T6282: Kleopatra: Smartcard dialog for Signature Card 2.0 does not show keys if one key wasn't imported from the card into T6830: Kleopatra: Smart card view does not show any certificates if one certficate could not be listed.
Mon, Nov 25, 3:59 PM · Bug Report, kleopatra, scd

Nov 18 2024

gniibe updated the task description for T7396: Windows: hard lockup of scdaemon.
Nov 18 2024, 10:11 AM · Windows, scd
gniibe triaged T7400: Netkey 3.0 card slow detection as Normal priority.
Nov 18 2024, 6:44 AM · Bug Report, scd
gniibe changed the status of T7402: No hard lockup when SCardConnect never returns, a subtask of T7396: Windows: hard lockup of scdaemon, from Open to Testing.
Nov 18 2024, 6:30 AM · Windows, scd
gniibe changed the status of T7402: No hard lockup when SCardConnect never returns from Open to Testing.

In select_application function, we can minimize the holding W-lock.

Nov 18 2024, 6:30 AM · Windows, scd
gniibe added a comment to T7401: PC/SC: Cancel SCardConnect with timeout.

This may requires major changes for scdaemon.

Nov 18 2024, 5:35 AM · Windows, scd
gniibe lowered the priority of T7401: PC/SC: Cancel SCardConnect with timeout from High to Wishlist.
Nov 18 2024, 5:35 AM · Windows, scd
gniibe triaged T7402: No hard lockup when SCardConnect never returns as High priority.
Nov 18 2024, 5:33 AM · Windows, scd
gniibe added a comment to T7401: PC/SC: Cancel SCardConnect with timeout.

For the cancelling operation, each card reader access should have an independent resource manager context.
Currently, a single pcsc.context is shared by all reader accesses.

Nov 18 2024, 5:24 AM · Windows, scd
gniibe triaged T7401: PC/SC: Cancel SCardConnect with timeout as High priority.
Nov 18 2024, 5:21 AM · Windows, scd
gniibe added a comment to T7396: Windows: hard lockup of scdaemon.

Hard lockup should be avoided. In particular, following conditions should meet:

  • gpgconf --kill scdaemon can kill scdaemon
  • KEYINFO requests can be answered for other connections of scdaemon
Nov 18 2024, 3:49 AM · Windows, scd
gniibe updated subscribers of T7396: Windows: hard lockup of scdaemon.

As of 2024-11-18, my hypothesis is:

  • there are some sort of race conditions between PC/SC + card reader (or its driver) + smartcard + scdaemon on Windows, at least at initial use after boot
  • because of this, SCardConnect of PC/SC call wrongly fails (somehow confirmed by @ebo's experiments + @gniibe's speculation), or wrongly never returns (@gniibe's guess, side info: its slowness is observed in T7400).
Nov 18 2024, 3:40 AM · Windows, scd
gniibe added a parent task for T7400: Netkey 3.0 card slow detection: T7396: Windows: hard lockup of scdaemon.
Nov 18 2024, 3:10 AM · Bug Report, scd
gniibe added a subtask for T7396: Windows: hard lockup of scdaemon: T7400: Netkey 3.0 card slow detection.
Nov 18 2024, 3:10 AM · Windows, scd
gniibe lowered the priority of T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent) from High to Normal.

@ebo Thank you for your testing.

Nov 18 2024, 3:09 AM · Windows, Bug Report, scd
gniibe added projects to T7400: Netkey 3.0 card slow detection: scd, Bug Report.
Nov 18 2024, 2:49 AM · Bug Report, scd

Nov 16 2024

werner added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

@ikloecker indeed we try only for 5 seconds:

Nov 16 2024, 2:59 PM · Windows, Bug Report, scd

Nov 15 2024

ebo added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

I think that the card reader is not connected and there is no Scardsvr at this time.
And the card reader connection to USB port results invoking Scardsvr. Then, "SCD SERIALNO --all" gets success.

Nov 15 2024, 4:07 PM · Windows, Bug Report, scd
ikloecker added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

For T6567 I changed the way that Kleopatra runs "gpgconf --launch gpg-agent". This change is not yet in Eva's test build. It seems my change is not good because running "gpgconf --launch gpg-agent" timed out after 5 seconds in 3 of 3 tests starting Kleopatra after a reboot of the VM. To check if "gpgconf --launch gpg-agent" really takes that long I measured the time in PowerShell after another reboot of the VM. The result is shocking.

Nov 15 2024, 2:41 PM · Windows, Bug Report, scd
gniibe added a project to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent): Windows.

Please note that a card insertion to a card reader and a card reader connection to PC are different things.
It may cause different results.

Nov 15 2024, 8:40 AM · Windows, Bug Report, scd
gniibe added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

ebo: Thank you for your testing.

Nov 15 2024, 6:36 AM · Windows, Bug Report, scd
gniibe added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

I found an issue in libassuan, which might be related possibly, it is described in T7399.
When the response is not consumed like the case in T7399, if repeatedly, it may fill up the buffer eventually.

Nov 15 2024, 5:20 AM · Windows, Bug Report, scd

Nov 14 2024

ebo added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

I believe this is a case of non-consumption of client. on Gpg4win-Beta-75 + updated GnuPG.
Setup: I had two cards connected, one Yubikey and one Netkey3.0 card. I rebooted windows and started Kleopatra. Nothing else.

Nov 14 2024, 3:01 PM · Windows, Bug Report, scd
gniibe added projects to T7396: Windows: hard lockup of scdaemon: scd, Windows.
Nov 14 2024, 7:45 AM · Windows, scd
gniibe claimed T7044: Deadlock on Windows in sdaemon.

I put "scd" tag and let me claim this ticket.

Nov 14 2024, 7:31 AM · scd, Bug Report, Windows, gnupg24

Nov 13 2024

werner added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

FWIW, we should eventually get rid of the pipe + socket style connection model. It is just to complex with no real benefit.

Nov 13 2024, 8:35 AM · Windows, Bug Report, scd
gniibe added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

After fixing two bugs, I changed the title to express the scope of this ticket.

Nov 13 2024, 7:50 AM · Windows, Bug Report, scd
gniibe renamed T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent) from scdaemon hangs up (when output from scdaemon is not consumed gpg-agent) to scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).
Nov 13 2024, 5:31 AM · Windows, Bug Report, scd
gniibe renamed T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent) from scdaemon hangs up (when output from scdaemon is not consumed any more) to scdaemon hangs up (when output from scdaemon is not consumed gpg-agent).
Nov 13 2024, 5:31 AM · Windows, Bug Report, scd
gniibe renamed T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent) from scdaemon hangs up to scdaemon hangs up (when output from scdaemon is not consumed any more).
Nov 13 2024, 3:49 AM · Windows, Bug Report, scd

Nov 6 2024

gniibe added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

I found a problem of possible duplicate registration of another APP, due to no serialization for CARD access.

Nov 6 2024, 3:38 AM · Windows, Bug Report, scd
gniibe added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

The resource leak was fixed in: rG40707c8bff49: agent: Fix resource leak for PRIMARY_CTX.

Nov 6 2024, 3:25 AM · Windows, Bug Report, scd

Nov 5 2024

yescallop added a comment to T5942: scdaemon is blocking system shutdown.

This seems to have been resolved in 2.4.6 by T7151 or T7160. I don't really remember the details, but at least I don't see anything blocking system shutdown now.

Nov 5 2024, 5:45 AM · Support, scd, gpgagent

Oct 29 2024

werner moved T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close from Backlog to QA on the gnupg24 board.
Oct 29 2024, 1:39 PM · gpgagent, scd, gnupg24, Bug Report
werner edited projects for T7041: Yubikey (PGP + PIV) --pcsc-shared: PIN requires every time, added: gnupg26; removed gnupg24.

You should use gpg-agent's integrated ssh-agent. It is anyway much more convenient. I'll move this task to gnupg26, though.

Oct 29 2024, 1:16 PM · gnupg26, yubikey, scd, Bug Report
werner edited projects for T7099: Disable the import of certain card objects, added: gnupg26; removed gnupg24.
Oct 29 2024, 1:13 PM · gnupg26, scd, Restricted Project, Feature Request

Oct 21 2024

gniibe added a comment to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent).

I found fd resource leak in gpg-agent.

  • gpg-connect-agent "scd killscd" /bye seems not release a file descriptor somewhere
Oct 21 2024, 7:35 AM · Windows, Bug Report, scd

Oct 10 2024

werner triaged T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent) as High priority.
Oct 10 2024, 9:45 AM · Windows, Bug Report, scd

Oct 9 2024

werner added projects to T7323: scdaemon hangs up (when output from scdaemon is not consumed by gpg-agent): scd, Bug Report.

But the DEVINFO --watch is required to trigger this hang? Kleopatra does not use this but we see simlar hangs from time to time in the current version.

Oct 9 2024, 6:18 PM · Windows, Bug Report, scd

Oct 4 2024

werner closed T6843: after enable kdf-setup impossible change user/admin pin as Resolved.
Oct 4 2024, 11:45 AM · gnupg22 (gnupg-2.2.43), scd, yubikey
werner moved T6843: after enable kdf-setup impossible change user/admin pin from QA to gnupg-2.2.43 on the gnupg22 board.
Oct 4 2024, 11:45 AM · gnupg22 (gnupg-2.2.43), scd, yubikey
werner changed the status of T6843: after enable kdf-setup impossible change user/admin pin from Resolved to Duplicate.
Oct 4 2024, 11:45 AM · gnupg22 (gnupg-2.2.43), scd, yubikey
werner closed T6843: after enable kdf-setup impossible change user/admin pin as Resolved.

Porting to 2.2 was straightforward - we won't give it an extra QA run.

Oct 4 2024, 11:45 AM · gnupg22 (gnupg-2.2.43), scd, yubikey

Oct 1 2024

gniibe changed the status of T7309: gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received from Open to Testing.

Fixed in master: rGe7891225788a: gpg: Robust error handling for SCD READKEY.

Oct 1 2024, 3:58 AM · Info Needed, scd, gpgagent, Bug Report

Sep 30 2024

werner triaged T7309: gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received as Normal priority.

Some would say it is a bug if keys are not shown - even if the algo is not known ;-)

Sep 30 2024, 4:06 PM · Info Needed, scd, gpgagent, Bug Report
saper renamed T7309: gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received from gpg should notice if scdaemon crashes to gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received.
Sep 30 2024, 11:54 AM · Info Needed, scd, gpgagent, Bug Report
saper added a comment to T7309: gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received.

scdaemon in this case was a broken experiment of mine (trying to see if I can get SoftHSM to work as the OpenPGP card). So this was not a normal, released scdaemon code.

Sep 30 2024, 10:46 AM · Info Needed, scd, gpgagent, Bug Report
gniibe claimed T7309: gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received.
Sep 30 2024, 3:49 AM · Info Needed, scd, gpgagent, Bug Report

Sep 28 2024

werner added a comment to T7309: gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received.

Please send an excerpt from the scdaemon debug output to evaluate why you get somewhat strange looking data. Is this an experimental card? 0xa5 is a common test pattern.

Sep 28 2024, 7:38 PM · Info Needed, scd, gpgagent, Bug Report
saper created T7309: gpg should not proceed with the key import from the smartcard if no valid SCD READKEY information is received.
Sep 28 2024, 3:10 AM · Info Needed, scd, gpgagent, Bug Report

Sep 27 2024

gouttegd added a comment to T7291: scdaemon randomly hangs when trying to access a token.

With no scd-event script, it might improve the situation

Sep 27 2024, 1:21 PM · scd

Sep 25 2024

werner edited projects for T5085: Filter APDUs in log output, added: gnupg; removed gnupg24, gnupg22.
Sep 25 2024, 4:23 PM · gnupg, Feature Request, scd
werner moved T7121: gnupg 2.2.43: scdaemon fails with KDF from Backlog to gnupg-2.2.44 on the gnupg22 board.
Sep 25 2024, 4:19 PM · gnupg22 (gnupg-2.2.44), yubikey, scd, Bug Report

Sep 20 2024

gniibe added a comment to T7291: scdaemon randomly hangs when trying to access a token.

The change of spawn functions (basically, it was factored out to libgpg-error) results more possibilities to have blocked scdaemon, since the implementation in libgpg-error introduced context switch points when it spawns a child process.

Sep 20 2024, 4:02 AM · scd
gniibe added a comment to T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close.

Found another thinko; When there is no clients with DEVINFO --watch, the pipe to be notified is not consumed at all (no read). It eventually results blocked by write(2), when the pipe is filled.

Sep 20 2024, 3:51 AM · gpgagent, scd, gnupg24, Bug Report

Sep 19 2024

gouttegd added a comment to T7291: scdaemon randomly hangs when trying to access a token.

I don’t think I have any other client that would invoke SCD DEVINFO --watch.

Sep 19 2024, 10:44 AM · scd
gniibe added a comment to T7291: scdaemon randomly hangs when trying to access a token.

Do you have scd-event script in your GNUPGHOME?

Sep 19 2024, 9:13 AM · scd
werner added a comment to T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close.

I see. the systemd race of having two gpg-agent processes. The second gpg-agent should eventually go away but than it is already too late.

Sep 19 2024, 8:56 AM · gpgagent, scd, gnupg24, Bug Report
gniibe added a comment to T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close.

I mean: two gpg-agent requests simultaneously running DEVINFO --watch.
Single scdaemon, two threads handling DEVINFO --watch simultaneously, by pselect + read.
Two threads waken up, but it was only one thread which can read(2), another was blocked (before the fix).

Sep 19 2024, 1:43 AM · gpgagent, scd, gnupg24, Bug Report

Sep 18 2024

werner added a comment to T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close.

You mean it is possible that the initialization function is called by several threads - or that two scdaemon's are running before they realize that one of them is in the way?

Sep 18 2024, 6:30 PM · gpgagent, scd, gnupg24, Bug Report
gniibe lowered the priority of T7291: scdaemon randomly hangs when trying to access a token from Unbreak Now! to High.

For POSIX, I found an issue of T7151.
If you are using multiple clients which invoke SCD DEVINFO --watch, the problem should be fixed.
If it's not the case, let us locate a bug (or two).

Sep 18 2024, 6:55 AM · scd
gniibe added a comment to T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close.

Fixed in rGfc30f7059650: scd: Fix DEVINFO to allow multiple clients.

Sep 18 2024, 6:52 AM · gpgagent, scd, gnupg24, Bug Report
gniibe added a comment to T7151: graceful shutdown: DEVINFO should be a gpg-agent command: also watching input close.

I realized that I put a bug on POSIX; When multiple clients do DEVINFO --watch, it is possible for scdaemon to hang (waiting pselect and read, read by one, read by another is blocked).

Sep 18 2024, 4:57 AM · gpgagent, scd, gnupg24, Bug Report

Sep 16 2024

gniibe claimed T7291: scdaemon randomly hangs when trying to access a token.
Sep 16 2024, 8:30 AM · scd

Sep 15 2024

werner triaged T7291: scdaemon randomly hangs when trying to access a token as Unbreak Now! priority.

Actually we have similar problems with the 2.4 branch - in particular on Windows. We can quite easy reproduce this when using Kleopatra. Thus the working hypothesis is a locking problem because Kleopatra uses several threads and the order of actions recently changed.

Sep 15 2024, 10:22 AM · scd

Sep 14 2024

gouttegd created T7291: scdaemon randomly hangs when trying to access a token.
Sep 14 2024, 1:17 PM · scd