http://bugzilla.suse.com/show_bug.cgi?id=1127220 Bug ID: 1127220 Summary: [libgpgme] gpgme_op_import issue when signal is received (e.g. CTRL-C in zypper) Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: ma@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 798296 --> http://bugzilla.suse.com/attachment.cgi?id=798296&action=edit GOOD case importing 8 keys. Applies to libgpgme 1.10.0 (SLE15*) as well as 1.11 (TW) You may be able to trigger the error by running 'zypper ref' and hitting CTRL-C once and fast:
$ zypper ref ^C
Note: The rpm database seems to contain old V3 version gpg keys which are meanwhile obsolete and considered insecure:
gpg-pubkey-1abd1afb-54176598 ... The reported V3 keys are wrong. In fact zypp checks which keys were not imported into the keyring, and assumes that these are V3. We can most probably work around this in zypp, but nevertheless it seems to be a bug in libgpgme (maybe missing EINTR handling).
Zypp writes the ASCII armored gpg keys found in the rpm DB into a file. The file is then read using
gpgme_data_new_from_file( &buffer, file, 1 ); gpgme_op_import( ctx, buffer );
The signal is most probably received and handled while gpgme_op_import is running. The function then returns without error, but checking gpgme_op_import_result reveals that the stats are incomplete (8 keys have been offered in the file, but 0 considered keys are reported though 1 is in the imports list (DA400A68):
[zypp::gpg] KeyManager.cc(importKey):411 ------------------------------------ [zypper] main.cc(signal_handler):23 OOOOPS [zypp::gpg] KeyManager.cc(importKey):418 gpgme_op_import_result { [zypp::gpg] KeyManager.cc(importKey):418 0 The total number of considered keys. [zypp::gpg] KeyManager.cc(importKey):418 0 The number of keys without user ID. [zypp::gpg] KeyManager.cc(importKey):418 0 The total number of imported keys. [zypp::gpg] KeyManager.cc(importKey):418 0 imported RSA keys. [zypp::gpg] KeyManager.cc(importKey):418 0 unchanged keys. [zypp::gpg] KeyManager.cc(importKey):418 0 new user IDs. [zypp::gpg] KeyManager.cc(importKey):418 0 new sub keys. [zypp::gpg] KeyManager.cc(importKey):418 0 new signatures. [zypp::gpg] KeyManager.cc(importKey):418 0 new revocations. [zypp::gpg] KeyManager.cc(importKey):418 0 secret keys read. [zypp::gpg] KeyManager.cc(importKey):418 0 imported secret keys. [zypp::gpg] KeyManager.cc(importKey):418 0 unchanged secret keys. [zypp::gpg] KeyManager.cc(importKey):418 0 keys not imported. [zypp::gpg] KeyManager.cc(importKey):418 - 0DA7D5EB3C7C38E18E55F555C24F66DEDA400A68: 0 [zypp::gpg] KeyManager.cc(importKey):418 }
This is how it looks like without signal:
[zypp::gpg] KeyManager.cc(importKey):411 ------------------------------------ [zypp::gpg] KeyManager.cc(importKey):418 gpgme_op_import_result { [zypp::gpg] KeyManager.cc(importKey):418 8 The total number of considered keys. [zypp::gpg] KeyManager.cc(importKey):418 0 The number of keys without user ID. [zypp::gpg] KeyManager.cc(importKey):418 8 The total number of imported keys. [zypp::gpg] KeyManager.cc(importKey):418 0 imported RSA keys. [zypp::gpg] KeyManager.cc(importKey):418 0 unchanged keys. [zypp::gpg] KeyManager.cc(importKey):418 0 new user IDs. [zypp::gpg] KeyManager.cc(importKey):418 0 new sub keys. [zypp::gpg] KeyManager.cc(importKey):418 0 new signatures. [zypp::gpg] KeyManager.cc(importKey):418 0 new revocations. [zypp::gpg] KeyManager.cc(importKey):418 0 secret keys read. [zypp::gpg] KeyManager.cc(importKey):418 0 imported secret keys. [zypp::gpg] KeyManager.cc(importKey):418 0 unchanged secret keys. [zypp::gpg] KeyManager.cc(importKey):418 0 keys not imported. [zypp::gpg] KeyManager.cc(importKey):418 - 0DA7D5EB3C7C38E18E55F555C24F66DEDA400A68: 0 [zypp::gpg] KeyManager.cc(importKey):418 - F8875B880D518B6B8C530D1345A1D0671ABD1AFB: 0 [zypp::gpg] KeyManager.cc(importKey):418 - 22C07BA534178CD02EFE22AAB88B2FD43DBDC284: 0 [zypp::gpg] KeyManager.cc(importKey):418 - EAAAB2461DA8429EF152BE23AF92960D7C99E700: 0 [zypp::gpg] KeyManager.cc(importKey):418 - 1D4A7EC7023D0D3EDEACE106F8648C9409CA02B0: 0 [zypp::gpg] KeyManager.cc(importKey):418 - FCADAFC81273B9E7F184F2B0826659A9013E5B65: 0 [zypp::gpg] KeyManager.cc(importKey):418 - FEAB502539D846DB2C0961CA70AF9E8139DB7C82: 0 [zypp::gpg] KeyManager.cc(importKey):418 - 428E4E348405CE7900DB99C230A8343A498D5A23: 0 [zypp::gpg] KeyManager.cc(importKey):418 }
I'll also attach GOODgpgme.log and FAILgpgme.log created by GPGME_DEBUG=9 for the above two cases. -- You are receiving this mail because: You are on the CC list for the bug.