Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: emacs-24.3: test request



On Sun, Sep 08, 2013 at 11:59:51AM +0400, Valeriy E. Ushakov wrote:
> On Sat, Sep 07, 2013 at 18:15:40 +0200, Thomas Klausner wrote:
> 
> > On Thu, Aug 15, 2013 at 07:53:55PM +0200, Thomas Klausner wrote:
> > > On Wed, Aug 14, 2013 at 10:43:59PM +0200, Thomas Klausner wrote:
> > > > To confirm if an emacs24-compiled-with-gtk core dump I see is
> > > > NetBSD-specific or pkgsrc-specific or me-specific (or neither), I'm
> > > > looking for test results for the following:
> [...]
> > > > and then:
> > > > # emacs pkgsrc/doc/guide/files/options.xml
> > > > 
> > > > This emacs call dumps core for me on NetBSD-6.99.23/amd64 as soon as
> > > > the emacs window first gets shown (or gets focus, can't differentiate
> > > > it with my window manager), both with gtk2 and gtk3 toolkits.
> > > > 
> > > > This doesn't happen with 'emacs -nw'.
> > > 
> > > It also doesn't happen for me if I unset LC_CTYPE.
> > > I usually have it set to "LC_CTYPE=de_DE.UTF-8".
> > 
> > That was mostly random, it sometimes occurs even then.
> > 
> > I have found that increasing the stack size ulimit (from the default
> > 4MB to 20MB) stops it though.
> 
> I was installing a new VM, so I checked this and I can reproduce the
> problem.  Stack limit seems to have nothing to do with it.
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to LWP 1]
> 0x00007f7fec4fc474 in strncmp () from /usr/lib/libc.so.12
> (gdb) bt
> #0  0x00007f7fec4fc474 in strncmp () from /usr/lib/libc.so.12
> #1  0x00007f7fec4b2dee in __getenvslot () from /usr/lib/libc.so.12
> #2  0x00007f7fec4b2f42 in __findenvvar () from /usr/lib/libc.so.12
> #3  0x00007f7fec4b29e0 in getenv () from /usr/lib/libc.so.12
> #4  0x00007f7fec4ab594 in ?? () from /usr/lib/libc.so.12
> #5  0x00007f7fec4ab85f in __localtime_r50 () from /usr/lib/libc.so.12
> #6  0x000000000052f3a8 in format_time_string ()
> #7  0x000000000052fcbc in Fformat_time_string ()
> #8  0x0000000000534aaf in Ffuncall ()
> ...
> (gdb) x/i $rip
> => 0x7f7fec4fc474 <strncmp+20>: mov    (%rdi),%al
> (gdb) p/x $rdi
> $1 = 0x522c2a61
> (gdb) x/x $rdi
> 0x522c2a61:     Cannot access memory at address 0x522c2a61
> (gdb) x/s $rsi
> 0x7f7fec512123:  "TZ"
> (gdb) p/x $rdx
> $6 = 0x2
> 
> Which corresponds to lib/libc/stdlib/_env.c:266
> 
>   if (strncmp(environ[num_entries], name, l_name) == 0 &&
> 
> 
> Haven't you or someone else complained about problems with emacs24
> vs. environ a few months ago?

This is still the same issue I've been seeing and reporting for
months. There is a random element in the backtrace (sometimes it even
works! perhaps my stack limit test was a random success), but it
usually ends in getenv and below, trying some to find some language
environment stuff.

Today's backtrace is in the gtk code though. Basically, getenv
fails weirdly, that's why I thought the stack was overwritten.


#0  0x00007f7fed908a64 in strncmp () from /usr/lib/libc.so.12
#1  0x00007f7fed8b90ee in __getenvslot (allocate=<optimized out>, 
name=<optimized out>, l_name=<optimized out>, allocate=<optimized out>) at 
/archive/foreign/src/lib/libc/stdlib/_env.c:266
#2  __findenvvar (name=0x7f7ff2006332 "LANGUAGE", l_name=8) at 
/archive/foreign/src/lib/libc/stdlib/_env.c:333
#3  0x00007f7fed8b8b74 in getenv (name=0x7f7ff2006332 "LANGUAGE") at 
/archive/foreign/src/lib/libc/stdlib/getenv.c:74
#4  0x00007f7ff200367f in get_lang_env (category_name=0x7f7ff200639e 
"LC_MESSAGES") at /archive/foreign/src/lib/libintl/gettext.c:821
#5  dcngettext (domainname=<optimized out>, msgid1=0x7f7ff5b82a50 "A GdkPixbuf 
to display", msgid2=0x7f7ff5b82a50 "A GdkPixbuf to display", n=1, 
category=<optimized out>)
    at /archive/foreign/src/lib/libintl/gettext.c:883
#6  0x00007f7ff5974e97 in ?? () from /usr/pkg/lib/libgtk-3.so.0
#7  0x00007f7ff282ab51 in g_type_class_ref () from 
/usr/pkg/lib/libgobject-2.0.so.0
#8  0x00007f7ff2815211 in g_object_newv () from /usr/pkg/lib/libgobject-2.0.so.0
#9  0x00007f7ff28156de in g_object_new () from /usr/pkg/lib/libgobject-2.0.so.0
#10 0x00007f7ff5a5db2e in ?? () from /usr/pkg/lib/libgtk-3.so.0
#11 0x00007f7ff282cb15 in g_type_create_instance () from 
/usr/pkg/lib/libgobject-2.0.so.0
#12 0x00007f7ff281386b in g_object_constructor () from 
/usr/pkg/lib/libgobject-2.0.so.0
#13 0x00007f7ff28151a8 in g_object_newv () from /usr/pkg/lib/libgobject-2.0.so.0
#14 0x00007f7ff28156de in g_object_new () from /usr/pkg/lib/libgobject-2.0.so.0
#15 0x00007f7ff5a5f4aa in ?? () from /usr/pkg/lib/libgtk-3.so.0
#16 0x00007f7ff598ff5a in gtk_main_do_event () from /usr/pkg/lib/libgtk-3.so.0
#17 0x00007f7ff544bf1f in ?? () from /usr/pkg/lib/libgdk-3.so.0
#18 0x00007f7ff24439d9 in g_main_context_dispatch () from 
/usr/pkg/lib/libglib-2.0.so.0
#19 0x00007f7ff2443cbf in g_main_context_iterate.clone.5 () from 
/usr/pkg/lib/libglib-2.0.so.0
#20 0x00007f7ff2443d8e in g_main_context_iteration () from 
/usr/pkg/lib/libglib-2.0.so.0
#21 0x00007f7ff598f786 in gtk_main_iteration () from /usr/pkg/lib/libgtk-3.so.0
#22 0x0000000000505eb6 in XTread_socket (terminal=0x11f0ce8, 
hold_quit=0x7f7fffff85b0) at xterm.c:7178
#23 0x0000000000547be0 in gobble_input () at keyboard.c:6767
#24 0x0000000000548464 in handle_async_input () at keyboard.c:7080
#25 0x0000000000548480 in process_pending_signals () at keyboard.c:7094
#26 0x00000000005d62e0 in Ffuncall (nargs=3, args=0x7f7fffff8718) at eval.c:2711
#27 0x000000000061caac in exec_byte_code (bytestr=13993121, vector=28648757, 
maxdepth=28, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#28 0x00000000005d700d in funcall_lambda (fun=28648869, nargs=2, 
arg_vector=0x1b52535) at eval.c:3010
#29 0x00000000005d680d in Ffuncall (nargs=3, args=0x7f7fffff8bf8) at eval.c:2827
#30 0x000000000061caac in exec_byte_code (bytestr=21859105, vector=22693645, 
maxdepth=16, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#31 0x00000000005d700d in funcall_lambda (fun=22693709, nargs=1, 
arg_vector=0x15a470d) at eval.c:3010
#32 0x00000000005d680d in Ffuncall (nargs=2, args=0x7f7fffff90c8) at eval.c:2827
#33 0x000000000061caac in exec_byte_code (bytestr=25486753, vector=29364229, 
maxdepth=24, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#34 0x00000000005d700d in funcall_lambda (fun=22667181, nargs=0, 
arg_vector=0x1c01005) at eval.c:3010
#35 0x00000000005d680d in Ffuncall (nargs=1, args=0x7f7fffff95a8) at eval.c:2827
#36 0x000000000061caac in exec_byte_code (bytestr=25754625, vector=22666709, 
maxdepth=12, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#37 0x00000000005d700d in funcall_lambda (fun=22666885, nargs=1, 
arg_vector=0x159ddd5) at eval.c:3010
#38 0x00000000005d680d in Ffuncall (nargs=2, args=0x7f7fffff9a68) at eval.c:2827
#39 0x000000000061caac in exec_byte_code (bytestr=26094113, vector=22666405, 
maxdepth=20, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#40 0x00000000005d700d in funcall_lambda (fun=22666653, nargs=0, 
arg_vector=0x159dca5) at eval.c:3010
#41 0x00000000005d680d in Ffuncall (nargs=1, args=0x7f7fffff9f38) at eval.c:2827
#42 0x000000000061caac in exec_byte_code (bytestr=26265185, vector=22971901, 
maxdepth=64, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#43 0x00000000005d700d in funcall_lambda (fun=22972277, nargs=1, 
arg_vector=0x15e85fd) at eval.c:3010
#44 0x00000000005d680d in Ffuncall (nargs=2, args=0x7f7fffffa468) at eval.c:2827
#45 0x000000000061caac in exec_byte_code (bytestr=26375681, vector=22971213, 
maxdepth=28, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#46 0x00000000005d700d in funcall_lambda (fun=22971357, nargs=0, 
arg_vector=0x15e834d) at eval.c:3010
#47 0x00000000005d680d in Ffuncall (nargs=1, args=0x7f7fffffa950) at eval.c:2827
#48 0x00000000005d5022 in eval_sub (form=25837206) at eval.c:2115
#49 0x00000000005d324f in internal_lisp_condition_case (var=16529346, 
bodyform=25837206, handlers=25858326) at eval.c:1243
#50 0x000000000061d9b2 in exec_byte_code (bytestr=27705537, vector=22971541, 
maxdepth=12, args_template=12845106, nargs=0, args=0x0) at bytecode.c:1096
#51 0x00000000005d700d in funcall_lambda (fun=22971621, nargs=0, 
arg_vector=0x15e8495) at eval.c:3010
#52 0x00000000005d680d in Ffuncall (nargs=1, args=0x7f7fffffb0c8) at eval.c:2827
#53 0x000000000061caac in exec_byte_code (bytestr=27601057, vector=22970949, 
maxdepth=4, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#54 0x00000000005d700d in funcall_lambda (fun=22971013, nargs=1, 
arg_vector=0x15e8245) at eval.c:3010
#55 0x00000000005d680d in Ffuncall (nargs=2, args=0x7f7fffffb6b0) at eval.c:2827
#56 0x00000000005d5664 in Fapply (nargs=2, args=0x7f7fffffb6b0) at eval.c:2259
#57 0x00000000005d64f0 in Ffuncall (nargs=3, args=0x7f7fffffb6a8) at eval.c:2759
#58 0x000000000061caac in exec_byte_code (bytestr=10682905, vector=10682957, 
maxdepth=16, args_template=12845106, nargs=0, args=0x0) at bytecode.c:900
#59 0x000000000061bea3 in Fbyte_code (bytestr=10682905, vector=10682957, 
maxdepth=16) at bytecode.c:475
#60 0x00000000005d517e in eval_sub (form=10682878) at eval.c:2149
#61 0x00000000005d324f in internal_lisp_condition_case (var=12845106, 
bodyform=10682878, handlers=9455390) at eval.c:1243
#62 0x000000000061d9b2 in exec_byte_code (bytestr=10682617, vector=10682653, 
maxdepth=20, args_template=12845106, nargs=0, args=0x0) at bytecode.c:1096
#63 0x00000000005d700d in funcall_lambda (fun=10682565, nargs=1, 
arg_vector=0xa3011d) at eval.c:3010
#64 0x00000000005d680d in Ffuncall (nargs=2, args=0x7f7fffffc220) at eval.c:2827
#65 0x00000000005d5fab in call1 (fn=12882402, arg1=29132717) at eval.c:2572
#66 0x0000000000543833 in timer_check_2 (timers=28159830, idle_timers=28159782) 
at keyboard.c:4387
#67 0x0000000000543991 in timer_check () at keyboard.c:4454
#68 0x00000000005415e4 in readable_events (flags=1) at keyboard.c:3351
#69 0x0000000000547a42 in get_input_pending (flags=1) at keyboard.c:6680
#70 0x000000000054ea0a in detect_input_pending_run_timers (do_display=true) at 
keyboard.c:10273
#71 0x0000000000628af2 in wait_reading_process_output (time_limit=0, nsecs=0, 
read_kbd=-1, do_display=true, wait_for_cell=12845106, wait_proc=0x0, 
just_wait_proc=0) at process.c:4743
#72 0x0000000000542293 in kbd_buffer_get_event (kbp=0x7f7fffffc880, 
used_mouse_menu=0x7f7fffffcd37, end_time=0x0) at keyboard.c:3803
#73 0x000000000053ff43 in read_char (commandflag=1, nmaps=6, 
maps=0x7f7fffffcb30, prev_event=12845106, used_mouse_menu=0x7f7fffffcd37, 
end_time=0x0) at keyboard.c:2769
#74 0x000000000054c642 in read_key_sequence (keybuf=0x7f7fffffcfb0, bufsize=30, 
prompt=12845106, dont_downcase_last=false, can_return_switch_frame=true, 
fix_current_buffer=true) at keyboard.c:9231
#75 0x000000000053d4b4 in command_loop_1 () at keyboard.c:1459
#76 0x00000000005d33b9 in internal_condition_case (bfun=0x53d0c9 
<command_loop_1>, handlers=12899074, hfun=0x53c9d4 <cmd_error>) at eval.c:1289
#77 0x000000000053cde4 in command_loop_2 (ignore=12845106) at keyboard.c:1168
#78 0x00000000005d2d91 in internal_catch (tag=12895170, func=0x53cdbe 
<command_loop_2>, arg=12845106) at eval.c:1060
#79 0x000000000053cd96 in command_loop () at keyboard.c:1147
#80 0x000000000053c522 in recursive_edit_1 () at keyboard.c:779
#81 0x000000000053c6c8 in Frecursive_edit () at keyboard.c:843
#82 0x000000000053a7d2 in main (argc=2, argv=0x7f7fffffd500) at emacs.c:1528

A few tries later:
(gdb) bt
#0  0x00007f7fed908a64 in strncmp () from /usr/lib/libc.so.12
#1  0x00007f7fed8b90ee in __getenvslot (allocate=<optimized out>, 
name=<optimized out>, l_name=<optimized out>, allocate=<optimized out>) at 
/archive/foreign/src/lib/libc/stdlib/_env.c:266
#2  __findenvvar (name=0x7f7ff2006332 "LANGUAGE", l_name=8) at 
/archive/foreign/src/lib/libc/stdlib/_env.c:333
#3  0x00007f7fed8b8b74 in getenv (name=0x7f7ff2006332 "LANGUAGE") at 
/archive/foreign/src/lib/libc/stdlib/getenv.c:74
#4  0x00007f7ff200367f in get_lang_env (category_name=0x7f7ff200639e 
"LC_MESSAGES") at /archive/foreign/src/lib/libintl/gettext.c:821
#5  dcngettext (domainname=<optimized out>, msgid1=0x7f7fffff7d10 "Stock 
label\004_New", msgid2=0x7f7fffff7d10 "Stock label\004_New", n=1, 
category=<optimized out>)
    at /archive/foreign/src/lib/libintl/gettext.c:883
#6  0x00007f7ff2434374 in g_dpgettext2 () from /usr/pkg/lib/libglib-2.0.so.0
#7  0x00007f7ff5a04e02 in gtk_stock_lookup () from /usr/pkg/lib/libgtk-3.so.0
#8  0x000000000052c24c in update_frame_tool_bar (f=0x1250c60) at gtkutil.c:4750
#9  0x000000000044d1ff in redisplay_tool_bar (f=0x1250c60) at xdisp.c:11962
#10 0x0000000000458ff7 in redisplay_window (window=19209317, just_this_one_p=0) 
at xdisp.c:16256
#11 0x00000000004516a5 in redisplay_window_0 (window=19209317) at xdisp.c:13934
#12 0x00000000005d3534 in internal_condition_case_1 (bfun=0x451663 
<redisplay_window_0>, arg=19209317, handlers=12816726, hfun=0x451632 
<redisplay_window_error>) at eval.c:1327
#13 0x0000000000451613 in redisplay_windows (window=19209317) at xdisp.c:13914
#14 0x0000000000450611 in redisplay_internal () at xdisp.c:13493
#15 0x0000000000450e82 in redisplay_preserve_echo_area (from_where=11) at 
xdisp.c:13754
#16 0x00000000006287cf in wait_reading_process_output (time_limit=0, nsecs=0, 
read_kbd=-1, do_display=true, wait_for_cell=12845106, wait_proc=0x0, 
just_wait_proc=0) at process.c:4578
#17 0x0000000000542293 in kbd_buffer_get_event (kbp=0x7f7fffffc880, 
used_mouse_menu=0x7f7fffffcd37, end_time=0x0) at keyboard.c:3803
#18 0x000000000053ff43 in read_char (commandflag=1, nmaps=6, 
maps=0x7f7fffffcb30, prev_event=12845106, used_mouse_menu=0x7f7fffffcd37, 
end_time=0x0) at keyboard.c:2769
#19 0x000000000054c642 in read_key_sequence (keybuf=0x7f7fffffcfb0, bufsize=30, 
prompt=12845106, dont_downcase_last=false, can_return_switch_frame=true, 
fix_current_buffer=true) at keyboard.c:9231
#20 0x000000000053d4b4 in command_loop_1 () at keyboard.c:1459
#21 0x00000000005d33b9 in internal_condition_case (bfun=0x53d0c9 
<command_loop_1>, handlers=12899074, hfun=0x53c9d4 <cmd_error>) at eval.c:1289
#22 0x000000000053cde4 in command_loop_2 (ignore=12845106) at keyboard.c:1168
#23 0x00000000005d2d91 in internal_catch (tag=12895170, func=0x53cdbe 
<command_loop_2>, arg=12845106) at eval.c:1060
#24 0x000000000053cd96 in command_loop () at keyboard.c:1147
#25 0x000000000053c522 in recursive_edit_1 () at keyboard.c:779
#26 0x000000000053c6c8 in Frecursive_edit () at keyboard.c:843
#27 0x000000000053a7d2 in main (argc=2, argv=0x7f7fffffd500) at emacs.c:1528

(that's the most common one)
(gdb) fr 2
#2  __findenvvar (name=0x7f7ff2006332 "LANGUAGE", l_name=8) at 
/archive/foreign/src/lib/libc/stdlib/_env.c:333
333             offset = __getenvslot(name, l_name, false);
(gdb) l
328     char *
329     __findenvvar(const char *name, size_t l_name)
330     {
331             ssize_t offset;
332
333             offset = __getenvslot(name, l_name, false);
334             return (offset != -1) ? environ[offset] + l_name + 1 : NULL;
335     }
336
337     /* Compatibility interface, do *not* call this function. */
(gdb) p environ
$5 = (char **) 0xcd0200
(gdb) p *environ
$6 = 0xa <Address 0xa out of bounds>
(gdb) fr 1
#1  0x00007f7fed8b90ee in __getenvslot (allocate=<optimized out>, 
name=<optimized out>, l_name=<optimized out>, allocate=<optimized out>) at 
/archive/foreign/src/lib/libc/stdlib/_env.c:266
266                     if (strncmp(environ[num_entries], name, l_name) == 0 &&
(gdb) l
261                     __scrubenv();
262
263             /* Search for an existing environment variable of the given 
name. */
264             num_entries = 0;
265             while (environ[num_entries] != NULL) {
266                     if (strncmp(environ[num_entries], name, l_name) == 0 &&
267                         environ[num_entries][l_name] == '=') {
268                             /* We found a match. */
269                             return num_entries;
270                     }

Is this a useful value for environ?
(gdb) p environ[0]
$20 = 0xa <Address 0xa out of bounds>
(gdb) p environ[1]
$21 = 0x0
(gdb) p environ[2]
$22 = 0x0
(gdb) p environ[3]
$23 = 0x0
(gdb) p environ[4]
$24 = 0xffffff ""

These don't look good in my eyes, especially the first.
 Thomas


Home | Main Index | Thread Index | Old Index