GNU bug report logs - #20431
emacs-24.5 segfaults with gnutls-3.4.0

Previous Next

Package: emacs;

Reported by: Fernando de Oliveira <famobr <at> yahoo.com.br>

Date: Sun, 26 Apr 2015 17:27:02 UTC

Severity: normal

Done: Ted Zlatanov <tzz <at> lifelogs.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20431 in the body.
You can then email your comments to 20431 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#20431; Package emacs. (Sun, 26 Apr 2015 17:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fernando de Oliveira <famobr <at> yahoo.com.br>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 26 Apr 2015 17:27:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Fernando de Oliveira <famobr <at> yahoo.com.br>
To: Bug Emacs <bug-gnu-emacs <at> gnu.org>
Subject: emacs-24.5 segfaults with gnutls-3.4.0
Date: Sun, 26 Apr 2015 14:23:46 -0300
Hi,

I am having this segfault problem and could not solve by myself.

Used:

./configure --prefix=/usr --localstatedir=/var

make bootstrap

Build log tail with the error (I1ve replaced "Falha de segmentação" by
"Segmentation fault":

{{{
Loading /tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/uniquify.el
(source)...
Loading /tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/electric.el
(source)...
Loading /tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/tooltip.el
(source)...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
91123 pure bytes used
/bin/sh: line 7:  9509 Segmentation fault  ./temacs --batch --load
loadup bootstrap
Makefile:815: recipe for target 'bootstrap-emacs' failed
make[2]: *** [bootstrap-emacs] Error 1
make[2]: Leaving directory
'/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/src'
Makefile:387: recipe for target 'src' failed
make[1]: *** [src] Error 2
make[1]: Leaving directory '/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5'
Makefile:1099: recipe for target 'bootstrap' failed
make: *** [bootstrap] Error 2
}}}

Part of the gdb output (removed lines I thought to be repetitive, but
can send everything, if requested):

{{{
$ gdb temacs
GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from temacs...done.
warning: File
"/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/src/.gdbinit"
auto-loading has been declined by your `auto-load safe-path' set to
"$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path
/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/src/.gdbinit
line to your configuration file "/home/fernando/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/fernando/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the
shell:
	info "(gdb)Auto-loading safe path"
(gdb) set args --batch --load loadup bootstrap
(gdb) run
Starting program:
/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/src/temacs --batch
--load loadup bootstrap
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
process 17814 is executing new program:
/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/src/temacs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Loading loadup.el (source)...
Using load-path (/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp
/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/emacs-lisp
/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/language
/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/international
/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/textmodes
/tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/vc)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading international/mule (source)...
Loading international/mule-conf (source)...
Loading env (source)...
Loading format (source)...
Loading bindings (source)...
Loading cus-start (source)...
Loading window (source)...
Loading /tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/files.el
(source)...

... snip ..

Loading /tmp/porg-build-2015.04.26-12h00m39s/emacs-24.5/lisp/tooltip.el
(source)...
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
91123 pure bytes used

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0ef2f24 in free () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff0ef2f24 in free () from /lib/libc.so.6
#1  0x00007ffff168e84b in _gnutls_ext_deinit () at gnutls_extensions.c:399
#2  0x00007ffff1695a40 in _gnutls_global_deinit (destructor=1)
    at gnutls_global.c:385
#3  0x00007ffff7dea727 in _dl_fini () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff0eadd92 in __run_exit_handlers () from /lib/libc.so.6
#5  0x00007ffff0eadde5 in exit () from /lib/libc.so.6
#6  0x00000000004e7dec in Fkill_emacs (arg=<optimized out>) at emacs.c:1970
#7  0x0000000000557771 in eval_sub (form=<optimized out>) at eval.c:2181
#8  0x0000000000557b85 in Fprogn (body=140737238883328) at eval.c:462
#9  0x00000000005577c6 in eval_sub (form=<optimized out>) at eval.c:2131
#10 0x00000000005577c6 in eval_sub (form=form <at> entry=12540550) at eval.c:2131
#11 0x000000000057a4e3 in readevalloop (readcharfun=12398610,
stream=0xc06100,
    sourcename=12603889, printflag=false, unibyte=<optimized out>,
    readfun=12279666, start=12279666, end=12279666) at lread.c:1934
#12 0x000000000057b2ba in Fload (file=140737238883328, noerror=0,
    nomessage=12279666, nosuffix=12603889, must_suffix=0) at lread.c:1363
#13 0x0000000000557715 in eval_sub (form=form <at> entry=12540438) at eval.c:2195
#14 0x00000000005599d4 in Feval (form=12540438, lexical=<optimized out>)
    at eval.c:1996
#15 0x00000000005566a7 in internal_condition_case (
    bfun=bfun <at> entry=0x4e83a0 <top_level_2>, handlers=<optimized out>,
    hfun=hfun <at> entry=0x4ecb80 <cmd_error>) at eval.c:1348
#16 0x00000000004e8376 in top_level_1 (ignore=ignore <at> entry=12279666)
    at keyboard.c:1195
---Type <return> to continue, or q <return> to quit---
#17 0x000000000055658b in internal_catch (tag=12326946,
    func=func <at> entry=0x4e8310 <top_level_1>, arg=12279666) at eval.c:1112
#18 0x00000000004ec77f in command_loop () at keyboard.c:1156
#19 recursive_edit_1 () at keyboard.c:778
#20 0x00000000004ecab0 in Frecursive_edit () at keyboard.c:849
#21 0x00000000004199a9 in main (argc=12603633, argv=0x7fffffffdec8)
    at emacs.c:1642
}}}

-- 
[]s,
Fernando




Added indication that bug 20431 blocks19759 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 26 Apr 2015 17:30:08 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20431; Package emacs. (Mon, 04 May 2015 22:13:02 GMT) Full text and rfc822 format available.

Message #10 received at 20431 <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Fernando de Oliveira <famobr <at> yahoo.com.br>
Cc: 20431 <at> debbugs.gnu.org
Subject: Re: bug#20431: emacs-24.5 segfaults with gnutls-3.4.0
Date: Mon, 04 May 2015 18:13:01 -0400
On Sun, 26 Apr 2015 14:23:46 -0300 Fernando de Oliveira <famobr <at> yahoo.com.br> wrote: 

FdO> I am having this segfault problem and could not solve by myself.
...
FdO> Build log tail with the error (I1ve replaced "Falha de segmentação" by
FdO> "Segmentation fault":
...

Hi Fernando,

I don't know if the problem is in the GnuTLS integration from this stack
trace, but I'm definitely not seeing it here. Is it still happening for
you? Can you replicate it with the released 24.4? How about the latest
(Git master branch)?

Thanks
Ted

FdO> Program received signal SIGSEGV, Segmentation fault.
FdO> 0x00007ffff0ef2f24 in free () from /lib/libc.so.6
FdO> (gdb) bt
FdO> #0  0x00007ffff0ef2f24 in free () from /lib/libc.so.6
FdO> #1  0x00007ffff168e84b in _gnutls_ext_deinit () at gnutls_extensions.c:399
FdO> #2  0x00007ffff1695a40 in _gnutls_global_deinit (destructor=1)
FdO>     at gnutls_global.c:385
FdO> #3  0x00007ffff7dea727 in _dl_fini () from /lib64/ld-linux-x86-64.so.2
FdO> #4  0x00007ffff0eadd92 in __run_exit_handlers () from /lib/libc.so.6
FdO> #5  0x00007ffff0eadde5 in exit () from /lib/libc.so.6
FdO> #6  0x00000000004e7dec in Fkill_emacs (arg=<optimized out>) at emacs.c:1970
FdO> #7  0x0000000000557771 in eval_sub (form=<optimized out>) at eval.c:2181
FdO> #8  0x0000000000557b85 in Fprogn (body=140737238883328) at eval.c:462
FdO> #9  0x00000000005577c6 in eval_sub (form=<optimized out>) at eval.c:2131
FdO> #10 0x00000000005577c6 in eval_sub (form=form <at> entry=12540550) at eval.c:2131
FdO> #11 0x000000000057a4e3 in readevalloop (readcharfun=12398610,
FdO> stream=0xc06100,
FdO>     sourcename=12603889, printflag=false, unibyte=<optimized out>,
FdO>     readfun=12279666, start=12279666, end=12279666) at lread.c:1934
FdO> #12 0x000000000057b2ba in Fload (file=140737238883328, noerror=0,
FdO>     nomessage=12279666, nosuffix=12603889, must_suffix=0) at lread.c:1363
FdO> #13 0x0000000000557715 in eval_sub (form=form <at> entry=12540438) at eval.c:2195
FdO> #14 0x00000000005599d4 in Feval (form=12540438, lexical=<optimized out>)
FdO>     at eval.c:1996
FdO> #15 0x00000000005566a7 in internal_condition_case (
FdO>     bfun=bfun <at> entry=0x4e83a0 <top_level_2>, handlers=<optimized out>,
FdO>     hfun=hfun <at> entry=0x4ecb80 <cmd_error>) at eval.c:1348
FdO> #16 0x00000000004e8376 in top_level_1 (ignore=ignore <at> entry=12279666)
FdO>     at keyboard.c:1195
FdO> ---Type <return> to continue, or q <return> to quit---
FdO> #17 0x000000000055658b in internal_catch (tag=12326946,
FdO>     func=func <at> entry=0x4e8310 <top_level_1>, arg=12279666) at eval.c:1112
FdO> #18 0x00000000004ec77f in command_loop () at keyboard.c:1156
FdO> #19 recursive_edit_1 () at keyboard.c:778
FdO> #20 0x00000000004ecab0 in Frecursive_edit () at keyboard.c:849
FdO> #21 0x00000000004199a9 in main (argc=12603633, argv=0x7fffffffdec8)
FdO>     at emacs.c:1642




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20431; Package emacs. (Tue, 05 May 2015 12:40:04 GMT) Full text and rfc822 format available.

Message #13 received at 20431 <at> debbugs.gnu.org (full text, mbox):

From: Fernando de Oliveira <famobr <at> yahoo.com.br>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: 20431 <at> debbugs.gnu.org
Subject: Re: bug#20431: emacs-24.5 segfaults with gnutls-3.4.0
Date: Tue, 05 May 2015 09:39:33 -0300
Sorry, forgt to send to the bug report

On 04-05-2015 19:13, Ted Zlatanov wrote:
> On Sun, 26 Apr 2015 14:23:46 -0300 Fernando de Oliveira <famobr <at> yahoo.com.br> wrote: 
> 
> FdO> I am having this segfault problem and could not solve by myself.
> ...
> FdO> Build log tail with the error (I1ve replaced "Falha de segmentação" by
> FdO> "Segmentation fault":
> ...
> 
> Hi Fernando,
> 
> I don't know if the problem is in the GnuTLS integration from this stack
> trace, but I'm definitely not seeing it here. Is it still happening for
> you? Can you replicate it with the released 24.4? How about the latest
> (Git master branch)?

Hi Ted,

Thanks for your post.

System updated to gnutls-3.4.1.

FWIW:
gcc (GCC) 5.1.0 (but my first post was with gcc-4.9.2)
clang version 3.6.0 (tags/RELEASE_360/final)

Tested versions: 24.4, 24.5 (again), Git emacs-24 branch (24.5.50), and
Git master branch (25.0.50, also tried to use clang, for this one).

Unfortunately, still same issue:

{{{
$ cd emacs-25.0.50/src
$ gdb temacs
...
(gdb) set args --batch --load loadup bootstrap
(gdb) run
...

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff0ce8f24 in free () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff0ce8f24 in free () from /lib/libc.so.6
#1  0x00007ffff16a97ab in _gnutls_ext_deinit () at gnutls_extensions.c:399
#2  0x00007ffff16b0860 in _gnutls_global_deinit (destructor=1)
    at gnutls_global.c:385
#3  0x00007ffff7dea727 in _dl_fini () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff0ca3d92 in __run_exit_handlers () from /lib/libc.so.6
#5  0x00007ffff0ca3de5 in exit () from /lib/libc.so.6
#6  0x00000000004ea4ff in Fkill_emacs (arg=<optimized out>) at emacs.c:1952
#7  0x0000000000559541 in eval_sub (form=<optimized out>) at eval.c:2181
#8  0x00000000005597fd in Fprogn (body=18685187) at eval.c:445
#9  0x0000000000559471 in eval_sub (form=<optimized out>) at eval.c:2131
#10 0x0000000000559471 in eval_sub (form=form <at> entry=12492531) at eval.c:2131
#11 0x000000000057b8d8 in readevalloop
(readcharfun=readcharfun <at> entry=25536,
    stream=stream <at> entry=0xc2e040, sourcename=sourcename <at> entry=12769012,
    printflag=printflag <at> entry=false, unibyte=unibyte <at> entry=0,
    readfun=readfun <at> entry=0, start=0, end=0) at lread.c:1929
#12 0x000000000057bf6c in Fload (file=12768756, noerror=<optimized out>,
    nomessage=0, nosuffix=<optimized out>, must_suffix=<optimized out>)
    at lread.c:1326
#13 0x00000000005594e5 in eval_sub (form=form <at> entry=12698259) at eval.c:2195
#14 0x000000000055c831 in Feval (form=12698259, lexical=<optimized out>)
    at eval.c:1996
#15 0x0000000000558667 in internal_condition_case (
---Type <return> to continue, or q <return> to quit---
    bfun=bfun <at> entry=0x4eaa00 <top_level_2>, handlers=handlers <at> entry=19824,
    hfun=hfun <at> entry=0x4ef360 <cmd_error>) at eval.c:1348
#16 0x00000000004ed33c in top_level_1 (ignore=ignore <at> entry=0)
    at keyboard.c:1156
#17 0x0000000000558543 in internal_catch (tag=tag <at> entry=46992,
    func=func <at> entry=0x4ed2e0 <top_level_1>, arg=arg <at> entry=0) at eval.c:1108
#18 0x00000000004ea998 in command_loop () at keyboard.c:1117
#19 0x00000000004eef4b in recursive_edit_1 () at keyboard.c:728
#20 0x00000000004ef298 in Frecursive_edit () at keyboard.c:799
#21 0x0000000000419df7 in main (argc=5, argv=0x7fffffffdeb8) at emacs.c:1626
(gdb)
}}}

Adding possibly relevant info:

{{{
Configured for 'x86_64-unknown-linux-gnu'.

  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -g3 -O2
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK3
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use a png library?                           yes -lpng16
  Does Emacs use -lrsvg-2?                                yes
  Does Emacs use imagemagick?                             yes
  Does Emacs support sound?                               yes
  Does Emacs use -lgpm?                                   yes
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 yes
  Does Emacs use GSettings?                               yes
  Does Emacs use a file notification library?             yes -lgio (gfile)
  Does Emacs use access control lists?                    yes -lacl
  Does Emacs use -lselinux?                               no
  Does Emacs use -lgnutls?                                yes
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use -lm17n-flt?                              no
  Does Emacs use -lotf?                                   no
  Does Emacs use -lxft?                                   yes
  Does Emacs directly use zlib?                           yes
  Does Emacs use toolkit scroll bars?                     yes
}}}

Thanks again,

-- 
[]s,
Fernando





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20431; Package emacs. (Mon, 21 Dec 2015 17:47:02 GMT) Full text and rfc822 format available.

Message #16 received at 20431 <at> debbugs.gnu.org (full text, mbox):

From: Fernando de Oliveira <famobr <at> yahoo.com.br>
To: 20431 <at> debbugs.gnu.org
Subject: Re: bug#20431: emacs-24.5 segfaults with gnutls-3.4.0
Date: Mon, 21 Dec 2015 14:46:24 -0300
Em 05-05-2015 09:39, Fernando de Oliveira escreveu:
> Sorry, forgt to send to the bug report
> 
> On 04-05-2015 19:13, Ted Zlatanov wrote:
>> On Sun, 26 Apr 2015 14:23:46 -0300 Fernando de Oliveira <famobr <at> yahoo.com.br> wrote: 
>>
>> FdO> I am having this segfault problem and could not solve by myself.
>> ...
>> FdO> Build log tail with the error (I1ve replaced "Falha de segmentação" by
>> FdO> "Segmentation fault":
>> ...
>>
>> Hi Fernando,
>>
>> I don't know if the problem is in the GnuTLS integration from this stack
>> trace, but I'm definitely not seeing it here. Is it still happening for
>> you? Can you replicate it with the released 24.4? How about the latest
>> (Git master branch)?
> 
> Hi Ted,
> 
> Thanks for your post.
> 
> System updated to gnutls-3.4.1.
> 
> FWIW:
> gcc (GCC) 5.1.0 (but my first post was with gcc-4.9.2)
> clang version 3.6.0 (tags/RELEASE_360/final)
> 
> Tested versions: 24.4, 24.5 (again), Git emacs-24 branch (24.5.50), and
> Git master branch (25.0.50, also tried to use clang, for this one).
> 
> Unfortunately, still same issue:

Hi, Ted.

I've built a new system (Linux From Scratch SVN-20151002), without
stripping the tool-chain, for debugging purposes and tested this problem
today. To my surprise, the problem is gone.

Packages versions:
emacs-24.5
gcc-5.3.0
gnutls-3.4.7

Architecture:
x86_64

It may be some problem with the older system.

Please, do I need to do anything else to close this bug?

Thank you very much for the attention.

Apologies for not getting the problem solved in the other system.

-- 
[]s,
Fernando, aka Sísifo




Reply sent to Ted Zlatanov <tzz <at> lifelogs.com>:
You have taken responsibility. (Tue, 22 Dec 2015 15:18:02 GMT) Full text and rfc822 format available.

Notification sent to Fernando de Oliveira <famobr <at> yahoo.com.br>:
bug acknowledged by developer. (Tue, 22 Dec 2015 15:18:02 GMT) Full text and rfc822 format available.

Message #21 received at 20431-done <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Fernando de Oliveira <famobr <at> yahoo.com.br>
Cc: 20431-done <at> debbugs.gnu.org
Subject: Re: bug#20431: emacs-24.5 segfaults with gnutls-3.4.0
Date: Tue, 22 Dec 2015 10:17:28 -0500
On Mon, 21 Dec 2015 14:46:24 -0300 Fernando de Oliveira <famobr <at> yahoo.com.br> wrote: 

FdO> I've built a new system (Linux From Scratch SVN-20151002), without
FdO> stripping the tool-chain, for debugging purposes and tested this problem
FdO> today. To my surprise, the problem is gone.
...
FdO> It may be some problem with the older system.

FdO> Please, do I need to do anything else to close this bug?

I think it's closed by now, but doing it here explicitly since I'm
replying anyhow.

Thank you for the bug report, and I'm glad it's working for you now.

Ted




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 20 Jan 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.