GNU bug report logs - #24204
temacs crashes on invocation with new GLIBC 2.24

Previous Next

Package: emacs;

Reported by: jpbion <at> jfwest.com

Date: Thu, 11 Aug 2016 15:52:01 UTC

Severity: normal

Tags: patch

Merged with 23760, 24033

Found in version 25.0.95

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 24204 in the body.
You can then email your comments to 24204 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#24204; Package emacs. (Thu, 11 Aug 2016 15:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to jpbion <at> jfwest.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 11 Aug 2016 15:52:01 GMT) Full text and rfc822 format available.

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

From: jpbion <at> jfwest.com
To: bug-gnu-emacs <at> gnu.org
Subject: temacs crashes on invocation with new GLIBC 2.24
Date: Thu, 11 Aug 2016 08:30:57 -0700
Using the new glibc, v2.24, and GCC 6.1

Any attempt to run 'temacs' fails with a segment fault. It appears that 
the call to 'malloc' inside the 'calloc' function in Emacs' gmalloc.c 
file starts to recurse, and eventually hits a segment fault after 
recursing 10,000+ times. Here is the stack trace at the beginning of 
this nested recursion hell.

I don't know why the call to malloc is turning into a call for the 
calloc in gmalloc.c, but I think whatever is doing that is causing this 
problem.

Any thoughts? Anything else needed?

commands to get this far:

./autogen.sh
./configure --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var 
--with-x-t\
oolkit=no --without-x --without-gif
make bootstrap

src/config.h lines, that contain the word 'malloc':

4 matches in 12 lines for "malloc" in buffer: config.h
     26:   intended to work with other packages as well (like gmalloc.c)
    108:/* Define to 1 if the system memory allocator is Doug Lea style, 
with m\
alloc
    109:   hooks and malloc_set_state. */
    110:/* #undef DOUG_LEA_MALLOC */
    232:#define GNU_MALLOC 1
    234:/* Define to set the G_SLICE environment variable to 
"always-malloc" at
    236:/* #undef G_SLICE_ALWAYS_MALLOC */
    774:/* Define to 1 if you have the <malloc/malloc.h> header file. */
    775:/* #undef HAVE_MALLOC_MALLOC_H */
   1446:/* #undef SYSTEM_MALLOC */
   1599:/* Define this to check for malloc buffer overrun. */
   1600:/* #undef XMALLOC_OVERRUN_CHECK */

stack track of temacs at beginning of recursive loop:

#0  0x08133c63 in backtrace_top () at eval.c:206
#1  0xffffffff in <function called from gdb> ()
#2  0x08133c63 in backtrace_top () at eval.c:206
#3  0xffffffff in <function called from gdb> ()
#4  0x0818a4a0 in calloc (nmemb=508, size=1) at gmalloc.c:1519
#5  0x0818a4cb in calloc (nmemb=508, size=1) at gmalloc.c:1529
#6  0x0818a4cb in calloc (nmemb=1, size=508) at gmalloc.c:1529
#7  0xffffffff in g_malloc0 (n_bytes=508) at gmem.c:124
#8  0xffffffff in g_malloc0_n (n_blocks=127, n_block_bytes=4) at 
gmem.c:355
#9  0xffffffff in g_slice_init_nomessage () at gslice.c:440
#10 0xffffffff in g_slice_alloc () at gslice.c:515
#11 0xffffffff in g_slice_alloc (mem_size=56) at gslice.c:1003
#12 0xffffffff in g_hash_table_new_full (hash_func=0xb78c6320 
<g_str_hash>, key\
_equal_func=0xb78c62f0 <g_str_equal>, key_destroy_func=0x0, 
value_destroy_func=\
0x0) at ghash.c:711
#13 0xffffffff in g_hash_table_new (hash_func=0xb78c6320 <g_str_hash>, 
key_equa\
l_func=0xb78c62f0 <g_str_equal>) at ghash.c:674
#14 0xffffffff in g_quark_init () at gquark.c:61
#15 0xffffffff in glib_init_ctor () at glib-init.c:243
#16 0xffffffff in glib_init_ctor () at glib-init.c:301
#17 0xffffffff in call_init (l=<optimized out>, argc=argc <at> entry=1, 
argv=argv <at> en\
try=0xbffffd94, env=0xbffffd9c) at dl-init.c:72
#18 0xffffffff in _dl_init (env=0xbffffd9c, argv=0xbffffd94, argc=1, 
l=<optimiz\
ed out>) at dl-init.c:30
#19 0xffffffff in _dl_init (main_map=<optimized out>, argc=1, 
argv=0xbffffd94, \
env=0xbffffd9c) at dl-init.c:120
#20 0xffffffff in _dl_start_user () at /lib/ld-linux.so.2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24204; Package emacs. (Thu, 11 Aug 2016 16:46:01 GMT) Full text and rfc822 format available.

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

From: jpbion <at> jfwest.com
To: 24204 <at> debbugs.gnu.org
Subject: This bug does NOT exist in Emacs 25.1-rc1
Date: Thu, 11 Aug 2016 09:45:23 -0700
Note - I just tried, and this bug does NOT exist in building Emacs 
25.1-rc1. Therefore it may be uninteresting for people to fix. I just 
wanted to let folks know!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24204; Package emacs. (Thu, 11 Aug 2016 16:47:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: jpbion <at> jfwest.com
Cc: 24204 <at> debbugs.gnu.org
Subject: Re: bug#24204: temacs crashes on invocation with new GLIBC 2.24
Date: Thu, 11 Aug 2016 19:46:38 +0300
> Date: Thu, 11 Aug 2016 08:30:57 -0700
> From: jpbion <at> jfwest.com
> 
> Using the new glibc, v2.24, and GCC 6.1
> 
> Any attempt to run 'temacs' fails with a segment fault. It appears that 
> the call to 'malloc' inside the 'calloc' function in Emacs' gmalloc.c 
> file starts to recurse, and eventually hits a segment fault after 
> recursing 10,000+ times. Here is the stack trace at the beginning of 
> this nested recursion hell.
> 
> I don't know why the call to malloc is turning into a call for the 
> calloc in gmalloc.c, but I think whatever is doing that is causing this 
> problem.
> 
> Any thoughts? Anything else needed?

You don't say what version of Emacs you tried to build.  I think this
is already fixed in the development sources.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24204; Package emacs. (Thu, 11 Aug 2016 16:50:02 GMT) Full text and rfc822 format available.

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

From: jpbion <at> jfwest.com
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24204 <at> debbugs.gnu.org
Subject: Re: bug#24204: temacs crashes on invocation with new GLIBC 2.24
Date: Thu, 11 Aug 2016 09:48:34 -0700
Hi, Eli! This was 24.5 - but not just 10 minutes ago I posted that 
pre-release 25.1-rc1 built correctly. So this bug can most certainly be 
marked as resolved I guess :)

On 2016-08-11 09:46, Eli Zaretskii wrote:
>> Date: Thu, 11 Aug 2016 08:30:57 -0700
>> From: jpbion <at> jfwest.com
>> 
>> Using the new glibc, v2.24, and GCC 6.1
>> 
>> Any attempt to run 'temacs' fails with a segment fault. It appears 
>> that
>> the call to 'malloc' inside the 'calloc' function in Emacs' gmalloc.c
>> file starts to recurse, and eventually hits a segment fault after
>> recursing 10,000+ times. Here is the stack trace at the beginning of
>> this nested recursion hell.
>> 
>> I don't know why the call to malloc is turning into a call for the
>> calloc in gmalloc.c, but I think whatever is doing that is causing 
>> this
>> problem.
>> 
>> Any thoughts? Anything else needed?
> 
> You don't say what version of Emacs you tried to build.  I think this
> is already fixed in the development sources.




Forcibly Merged 23760 24033 24204. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 11 Aug 2016 16:52:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 Sep 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 287 days ago.

Previous Next


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