Your message dated Tue, 06 Dec 2016 10:20:51 -0500
with message-id <[email protected]>
and subject line upstream fixed the backgrounded gpg process hang after cancel
has caused the Debian Bug report #301429,
regarding [gpgme/1415] libgpgme11: gpgme_cancel() does not stop gpg process 
from finishing asynchronous call
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
301429: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=301429
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libgpgme11
Version: 1.0.2-1
Severity: important

Starting asynchronouse call and then canceling it with gpgme_cancel do cause
gpgme_wait() return Canceled error but leaves gpg process working and
finishing the call.

Attached is a slightly modified t-genkey test from the gpgme source showing
the problem.

Igor

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11
Locale: LANG=C, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)

Versions of packages libgpgme11 depends on:
ii  gnupg                       1.4.0-3      GNU privacy guard - a free PGP rep
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libgpg-error0               1.0-1        library for common error values an

-- no debconf information
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <gpgme.h>

#include "t-support.h"


/* True if progress function printed something on the screen.  */
static int progress_called;

static void
progress (void *self, const char *what, int type, int current, int total)
{
  printf ("%c", type);
  fflush (stdout);
  progress_called++;
}


int 
main (int argc, char **argv)
{
  gpgme_ctx_t ctx;
  gpgme_error_t err;
  const char *parms = "<GnupgKeyParms format=\"internal\">\n"
    "Key-Type: DSA\n"
    "Key-Length: 1024\n"
    "Subkey-Type: ELG-E\n"
    "Subkey-Length: 4096\n"
    "Name-Real: Joe Tester\n"
    "Name-Comment: (pp=abc)\n"
    "Name-Email: [email protected]\n"
    "Expire-Date: 0\n"
    "Passphrase: abc\n"
    "</GnupgKeyParms>\n";
  gpgme_genkey_result_t result;

  if (argc != 2) {
    fprintf(stderr, "Usage: %s <sync|async>\n", argv[0]);
    exit(1);
  }

  init_gpgme (GPGME_PROTOCOL_OpenPGP);

  err = gpgme_new (&ctx);
  fail_if_err (err);

  gpgme_set_progress_cb (ctx, progress, NULL);

  if (argv[1][0] == 'a' || argv[1][0] == '0') {
  err = gpgme_op_genkey_start (ctx, parms, NULL, NULL);
  fail_if_err (err);

  err = 0xFFFF;
  progress_called = 0;
  do {
    if (progress_called > 100) {
      gpgme_cancel(ctx);
      printf ("(Cancel is called)\n");
      fflush(stdout);
    }
    gpgme_wait(ctx, &err, 0);
  } while (err == 0xFFFF);

  if (err != 0xFFFF)
    fail_if_err (err);
  } else {
  err = gpgme_op_genkey (ctx, parms, NULL, NULL);
  fail_if_err (err);
  }

  result = gpgme_op_genkey_result (ctx);
  if (!result)
    {
      fprintf (stderr, "%s:%d: gpgme_op_genkey_result returns NULL\n",
	       __FILE__, __LINE__);
      exit (1);
    }
  if (progress_called)
    printf ("\n");

  printf ("Generated key: %s (%s)\n", result->fpr ? result->fpr : "none",
	  result->primary ? (result->sub ? "primary, sub" : "primary")
	  : (result->sub ? "sub" : "none"));

  gpgme_release (ctx);
  return 0;
}

--- End Message ---
--- Begin Message ---
Version: 1.7.1-1

In upstream gpgme version 1.7.1, they implemented a fix to clean up
backgrounded gpg processes (see
https://bugs.g10code.com/gnupg/issue1415).  This should resolve
https://bugs.debian.org/301429 in every subsequent version.

          --dkg

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to