Mailing List Archive

Error Generating ElGamal Key
I get the following error when attempting to generate a 2048 El Gamal Key
running under Red Hat Linux 5.1 (kernel 2.0.35). I get the same problem
when I attempt to genereate a key of size 1024. I am running gnupg0.9.3
with just the standard compile options. Any Ideas?


We need to generate a lot of random bytes. It is a good idea to perform
some other action (work in another window, move the mouse, utilize the
network and the disks) during the prime generation; this gives the random
number generator a better chance to gain enough entropy.
.........+++++................+++++.........................+++++...+++++
...+++++...+++++.......+++++.....+++++............+++++...+++++.+++++.....
....+++++.+++++..........+++++.....+++++..+++++..+++++...................+
++++..+++++......++++++++++........+++++...................++++++++++...++
+++.........+++++..+++++.+++++..+++++.....+++++>..+++++....+++++.........+
++++.......+++++>+++++>..+++++>........+++++....+++++^^^^^


gpg: waiting for lock (hold by 21285 - probably dead) ...
gpg: waiting for lock (hold by 21285 - probably dead) ...
gpg: waiting for lock (hold by 21285 - probably dead) ...
gpg: waiting for lock (hold by 21285 - probably dead) ...
gpg: waiting for lock (hold by 21285 - probably dead) ...
gpg: waiting for lock (hold by 21285 - probably dead) ...



Matthew M. Copeland
copeland@eagle.cc.ukans.edu
matthewc@rdl.designlab.ukans.edu
Re: Error Generating ElGamal Key [ In reply to ]
On Tue, Feb 23, 1999 at 02:10:31AM -0600, Matthew M. Copeland wrote:
>
> I get the following error when attempting to generate a 2048 El Gamal Key
> running under Red Hat Linux 5.1 (kernel 2.0.35). I get the same problem
> when I attempt to genereate a key of size 1024. I am running gnupg0.9.3
> with just the standard compile options. Any Ideas?
>
> We need to generate a lot of random bytes. It is a good idea to perform
> some other action (work in another window, move the mouse, utilize the
> network and the disks) during the prime generation; this gives the random
> number generator a better chance to gain enough entropy.
> .........+++++................+++++.........................+++++...+++++
[...]
>
> gpg: waiting for lock (hold by 21285 - probably dead) ...
> gpg: waiting for lock (hold by 21285 - probably dead) ...
[...]

Try playing with "lock-once" in ~/.gnupg/options.
Mine is commented-out and I don't have this problem.

--
Rémi <rguyom@mail.dotcom.fr> | Don't waste your computer's time :
PGP-encrypt anything important: | http://www.distributed.net/
www.gnupg.org - KeyID:0x85BD8B1B | http://www.distributed.net/cores/
Re: Error Generating ElGamal Key [ In reply to ]
I tried commenting out lock-once in the options file, but it still has the
problem.

Matthew
dyelar@rdl.designlab.ukans.edu


On Tue, 23 Feb 1999, Remi Guyomarch wrote:

> On Tue, Feb 23, 1999 at 02:10:31AM -0600, Matthew M. Copeland wrote:
> >
> > I get the following error when attempting to generate a 2048 El Gamal Key
> > running under Red Hat Linux 5.1 (kernel 2.0.35). I get the same problem
> > when I attempt to genereate a key of size 1024. I am running gnupg0.9.3
> > with just the standard compile options. Any Ideas?
> >
> > We need to generate a lot of random bytes. It is a good idea to perform
> > some other action (work in another window, move the mouse, utilize the
> > network and the disks) during the prime generation; this gives the random
> > number generator a better chance to gain enough entropy.
> > .........+++++................+++++.........................+++++...+++++
> [...]
> >
> > gpg: waiting for lock (hold by 21285 - probably dead) ...
> > gpg: waiting for lock (hold by 21285 - probably dead) ...
> [...]
>
> Try playing with "lock-once" in ~/.gnupg/options.
> Mine is commented-out and I don't have this problem.
>
> --
> Rémi <rguyom@mail.dotcom.fr> | Don't waste your computer's time :
> PGP-encrypt anything important: | http://www.distributed.net/
> www.gnupg.org - KeyID:0x85BD8B1B | http://www.distributed.net/cores/
Re: Error Generating ElGamal Key [ In reply to ]
Hi,

"Matthew M. Copeland" <dyelar@rdl.designlab.ukans.edu> writes:

> I tried commenting out lock-once in the options file, but it still has the
> problem.
>

I had the same problem.
The problem had gone when I deleted ~/.gnupg directory.
Because I'm a very new user, I safely deleted ~/.gnupg directory
without any loss of important data.

There may be something inefficient in gpg cleanup mechanism.

--
****************************************
Koichi Inoue Ricoh co. ltd.
Information and Communication R&D Center
e-mail: kinoue@ic.rdc.ricoh.co.jp
Re: Error Generating ElGamal Key [ In reply to ]
"Matthew M. Copeland" <dyelar@rdl.designlab.ukans.edu> writes:

> gpg: waiting for lock (hold by 21285 - probably dead) ...

Can you please try to figure out what process 21285 used to be and
have a look at the timestamps of ~/.gnupg/* - ist the lockfile too
old.

If you don't have a NFS installation you can simply delete the
lockfile. (look for ~/.gnupg/*.lock with this pid in it)


Werner



--
ceterum censeo RSA esse delendam
Re: Error Generating ElGamal Key [ In reply to ]
Ahh..., the deletiion of the lockfile fixed all of the problems.

Thank You
Matthew
Re: Error Generating ElGamal Key [ In reply to ]
Matthew Copeland wrote:

MC > gpg: waiting for lock (hold by 21285 - probably dead) ...

Werner Koch replied:

WK > Can you please try to figure out what process 21285 used
WK > to be and have a look at the timestamps of ~/.gnupg/* -
WK > is the lockfile too old.

I've run into the same bug many times when trying to edit two or more
keys in succession. Each time, a lock was left on my public keyring
(pubring.gpg.lock) after editing the first key.

As best I could tell, the PID named in this lock file (while running
the second "gpg --edit-key" command) was the PID of the first "gpg
--edit-key" command.

Presumably, the key editing code is neglecting to remove the lock in
certain situations.

Also, the code that checks for stale lock files -- make_dotlock() in
util/dotlock.c -- tests for a dead process and inserts "probably dead"
into the "waiting for lock" message, but the stale lock is not removed.

In case it matters, I'm running on a FreeBSD 2.2.8 system.

Rich Wales richw@webcom.com http://www.webcom.com/richw/
See http://www.webcom.com/richw/pgp/ for my PGP key and fingerprint info
*** NOTE: any key generated by me before 1997-09-18 has been REVOKED ***