Page MenuHome GnuPG

GPG segfault when sending signal in SPARC sunOS 5.8
Closed, ResolvedPublic

Description

Release: 1.4.1

Environment

Connecting remotely using X-Win32 from Windows XP. All commands run in xterm (Terminal) windows remotely through the CDE Window Manager.

Running uname -a gives me: "SunOS kappa 5.8 Generic_117350-15 sun4u sparc SUNW,Sun-Fire-480R"

Running gcc -v gives me:

"Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4/specs
"Configured with: ../configure 
"Thread model: posix
"gcc version 3.0.4"

Running gmake 3.79.1 built for sparc-sun-solaris2.8

Description

I compiled, built, and verified GPG with no errors. However, when running GPG it segfaults if I send a SIGINT (using Control-C) as soon as GPG starts (when run with no options).

I compiled GPG using configure --prefix=/home/8/kornel --enable-static-rnd=auto --disable-card-support --disable-nls --disable-regex --without-photo-viewer. I built it using gmake -j 2. The build complted with warnings but all tests (gmake check) completed with no errors.

I rebuilt it, giving the same options to configure along with "CFLAGS=-g" to turn on debugging (if it wasn't on already). I built with a few warnings bug no errors and checked OK. I ran GPG (with no command-line options) through the GDB debugger, sending it the SIGINT signal as soon as it prompted for input. Here's what I got when I sent the signal:

"Program received signal SIGSEGV, Segmentation fault.
"0xff3284ac in rl_redisplay () at ../display.c:514
"514 ../display.c: No such file or directory."

How To Repeat

Download & verify GPG 1.4.1
Unpack and run ./configure
Run gmake -j 2 to build
Run gmake check to verify
Run gmake install to install
Open new terminal window and run gpg. When prompted for input enter Control-C to send SIGINT (or you could also send SIGTERM).
At this point, GPG should have exited cleanly. Instead, GPG segfaulted.

Fix

Unknown

Event Timeline

Would you mind to rebuild it by adding the option
--with-readline=/nowhere
to the configure run. This should create a build without readline support.

What is your version of the readline library? Is that the standard GNU one or an reimplementation?

From: "A. Karl Kornel" <kornel.1@osu.edu>
To: bug-any@bugs.gnupg.org
Cc: gnupg-hackers@gnupg.org, gnats-admin@trithemius.gnupg.org, wk@gnupg.org
Subject: Re: gnupg/436
Date: Fri, 18 Mar 2005 15:06:13 -0500

On Mar 17, 2005, at 5:48 AM, wk@gnupg.org wrote:

Synopsis: GPG segfault when sending signal in SPARC sunOS 5.8

  • Comment added by werner on Thu, 17 Mar 2005 11:48:12 +0100 **** Would you mind to rebuild it by adding the option

--with-readline=/nowhere
to the configure run. This should create a build without readline
support.

What is your version of the readline library? Is that the standard
GNU one or an reimplementation?

I reconfigured with `CFLAGS=-g --prefix=/home/8/kornel --enable-

static-rnd=auto --disab
le-card-support --disable-nls --disable-regex --without-photo-viewer
--with-read
line=/nowhere` as requested. gmake and gmake check both
completed, though some warnings were generated during the build.
Unfortunately, I got the same error. Here's the transcript of my
running gpg through gdb:

% gdb ./gpg
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License,
and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) run
Starting program: /home/8/kornel/bin/./gpg
gpg: Go ahead and type your message ...
^C
Program received signal SIGINT, Interrupt.
0xff11e8ac in _read () from /usr/lib/libc.so.1
(gdb) signal SIGINT
Continuing with signal SIGINT.

Program received signal SIGSEGV, Segmentation fault.
0xff3284ac in rl_redisplay () at ../display.c:514
514 ../display.c: No such file or directory.
(gdb) q
The program is running. Exit anyway? (y or n) y

I am not sure which version of readline I have.  Running `man

readline` lists "GNU Readline 4.2" in the footer. The readline
header files have the GNU GPL included at the top of each header.

Alfred Karl Kornel
kornel.1@osu.edu

From: David Shaw <dshaw@jabberwocky.com>
To: "A. Karl Kornel" <kornel.1@osu.edu>
Cc: bug-any@bugs.gnupg.org, gnupg-hackers@gnupg.org,

gnats-admin@trithemius.gnupg.org, wk@gnupg.org

Subject: Re: gnupg/436
Date: Fri, 18 Mar 2005 16:20:07 -0500

On Fri, Mar 18, 2005 at 03:06:13PM -0500, A. Karl Kornel wrote:

On Mar 17, 2005, at 5:48 AM, wk@gnupg.org wrote:

Synopsis: GPG segfault when sending signal in SPARC sunOS 5.8

  • Comment added by werner on Thu, 17 Mar 2005 11:48:12 +0100 **** Would you mind to rebuild it by adding the option

--with-readline=/nowhere
to the configure run. This should create a build without readline
support.

What is your version of the readline library? Is that the standard
GNU one or an reimplementation?

I reconfigured with `CFLAGS=-g --prefix=/home/8/kornel --enable-

static-rnd=auto --disab
le-card-support --disable-nls --disable-regex --without-photo-viewer
--with-read
line=/nowhere` as requested. gmake and gmake check both
completed, though some warnings were generated during the build.
Unfortunately, I got the same error. Here's the transcript of my
running gpg through gdb:

Can you try the same test but use --without-readline instead of the
/nowhere path?

David

From: "A. Karl Kornel" <kornel.1@osu.edu>
To: David Shaw <dshaw@jabberwocky.com>
Cc: bug-any@bugs.gnupg.org, gnupg-hackers@gnupg.org,

gnats-admin@trithemius.gnupg.org, wk@gnupg.org

Subject: Re: gnupg/436
Date: Fri, 18 Mar 2005 23:53:24 -0500

On Mar 18, 2005, at 4:20 PM, David Shaw wrote:

On Fri, Mar 18, 2005 at 03:06:13PM -0500, A. Karl Kornel wrote:

<<<snip>>>

I reconfigured with `CFLAGS=-g --prefix=/home/8/kornel --enable-

static-rnd=auto --disab
le-card-support --disable-nls --disable-regex --without-photo-viewer
--with-read
line=/nowhere` as requested. gmake and gmake check both
completed, though some warnings were generated during the build.
Unfortunately, I got the same error. Here's the transcript of my
running gpg through gdb:

Can you try the same test but use --without-readline instead of the
/nowhere path?

Configured with options 'CFLAGS=-g --prefix=/home/8/kornel --

enable-static-rnd=auto --disable-card-support --disable-nls --disable-
regex --without-photo-viewer --without-readline'. Make and make
check ran as before (some warnings on make but no tests failed).

It worked this time.  On sending SIGINT GPG responded "gpg:

signal 2 caught ... exiting" and exited cleanly.

Alfred Karl Kornel
kornel.1@osu.edu

What is your version of the readline library? Is that the
standard GNU one or an reimplementation?

This was a readline problem. Workaround given.

werner removed a project: Info Needed.