bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#71224: 30.0.50; SIGSEGV in start_display


From: Daniel Clemente
Subject: bug#71224: 30.0.50; SIGSEGV in start_display
Date: Thu, 30 May 2024 09:55:20 +0000

> Can you please reconfigure with --enable-checking='yes,glyphs' and
> with CFLAGS='-O0 -g3', then rebuild and try reproducing?  I'm curious
> if you get SIGABRT instead because some assertion is violated.  If so,
> the assertion could tell us where and how this calamity started.

I did a clean rebuild and am running with glyph debug. I found another
crash related to glyph matrices, reported as bug #71274.

But about this one:
Even with glyph debug it causes a SIGSEGV due to a no glyph matrix,
but this time it's the GLYPH_DEBUG code crashing early in
redisplay_window.


process server <955> no longer connected to pipe; closed it
process server <956> no longer connected to pipe; closed it
process server <957> no longer connected to pipe; closed it
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’
Garbage collecting...
Garbage collecting...done
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601
Lisp nesting exceeds ‘max-lisp-eval-depth’
Lisp nesting exceeds ‘max-lisp-eval-depth’
Lisp nesting exceeds ‘max-lisp-eval-depth’: 1601

Program received signal SIGSEGV, Segmentation fault.
0x00005555555d772f in redisplay_window (window=XIL(0x555556d13e05),
just_this_one_p=false) at xdisp.c:19961
19961     *w->desired_matrix->method = 0;

(gdb) pp window
#<window 411 on *scratch*>

(gdb) list 19961
19956
19957      SET_TEXT_POS (lpoint, PT, PT_BYTE);
19958      opoint = lpoint;
19959
19960    #ifdef GLYPH_DEBUG
19961      *w->desired_matrix->method = 0;
19962    #endif
19963
19964      if (!just_this_one_p && needs_no_redisplay (w))
19965        return;


Maybe we need more GLYPH_DEBUG assertions to catch null glyph matrices sooner?

I see similar checks in dispnew.c, e.g.:
eassert (current_matrix && desired_matrix);


I have reproduced this bug with emacs --fg-daemon -Q
No need for the 2 lines I mentioned earlier
(garbage-collection-messages, set-face-foreground).

A next step for me could be setting up a breakpoint (or message) in
the place where the glyph matrix is defined, to see if it's ever being
defined, vs. it's defined and then cleared. But I'm still learning
about glyph matrices and I don't know where they're expected vs. where
null.
I'm also trying to get better at gdb to detect when a variable (e.g.
w->desired_matrix) changes.

More debug info follows.

(gdb) p *w
$3 = {
  header = {
    size = 4611686018612097049
  },
  frame = XIL(0x555556b317a5),
  next = XIL(0x555556b31d5d),
  prev = XIL(0),
  parent = XIL(0),
  normal_lines = XIL(0x7ffff2ba7bf7),
  normal_cols = XIL(0x7ffff2ba7bef),
  new_total = make_fixnum(0),
  new_normal = make_fixnum(0),
  new_pixel = make_fixnum(0),
  contents = XIL(0x7ffff1ca065d),
  old_buffer = XIL(0),
  start = XIL(0x555556b31ccd),
  pointm = XIL(0x555556b31cfd),
  old_pointm = XIL(0x555556b31d2d),
  temslot = XIL(0),
  vertical_scroll_bar = XIL(0),
  vertical_scroll_bar_type = XIL(0x30),
  horizontal_scroll_bar = XIL(0),
  horizontal_scroll_bar_type = XIL(0x30),
  display_table = XIL(0),
  dedicated = XIL(0),
  combination_limit = XIL(0),
  window_parameters = XIL(0),
  cursor_type = XIL(0x30),
  mode_line_help_echo = XIL(0),
  current_matrix = 0x0,
  desired_matrix = 0x0,
  prev_buffers = XIL(0),
  next_buffers = XIL(0),
  use_time = 872,
  sequence_number = 533,
  change_stamp = 0,
  pixel_left = 0,
  pixel_top = 0,
  left_col = 0,
  top_line = 0,
--Type <RET> for more, q to quit, c to continue without paging--
  pixel_width = 80,
  pixel_height = 24,
  old_pixel_width = 0,
  old_pixel_height = 0,
  old_body_pixel_width = 0,
  old_body_pixel_height = 0,
  total_cols = 80,
  total_lines = 24,
  hscroll = 0,
  min_hscroll = 0,
  hscroll_whole = 0,
  last_modified = 0,
  last_overlay_modified = 0,
  last_point = 0,
  last_mark = 0,
  base_line_number = 0,
  base_line_pos = 0,
  column_number_displayed = -1,
  nrows_scale_factor = 1,
  ncols_scale_factor = 1,
  cursor = {
    x = 0,
    y = 0,
    hpos = 0,
    vpos = 0
  },
  phys_cursor = {
    x = 0,
    y = 0,
    hpos = 0,
    vpos = 0
  },
  output_cursor = {
    x = 0,
    y = 0,
    hpos = 0,
    vpos = 0
  },
  last_cursor_vpos = 0,
  left_fringe_width = -1,
--Type <RET> for more, q to quit, c to continue without paging--
  right_fringe_width = -1,
  left_margin_cols = 0,
  right_margin_cols = 0,
  scroll_bar_width = -1,
  scroll_bar_height = -1,
  mode_line_height = -1,
  header_line_height = -1,
  tab_line_height = -1,
  window_end_pos = 0,
  window_end_vpos = 0,
  mini = false,
  horizontal = false,
  update_mode_line = true,
  last_had_star = false,
  start_at_line_beg = false,
  force_start = false,
  optional_new_start = false,
  phys_cursor_on_p = false,
  cursor_off_p = false,
  last_cursor_off_p = false,
  must_be_updated_p = false,
  pseudo_window_p = false,
  fringes_outside_margins = false,
  fringes_persistent = false,
  scroll_bars_persistent = false,
  window_end_valid = false,
  redisplay = true,
  suspend_auto_hscroll = false,
  preserve_vscroll_p = false,
  vscroll = 0,
  window_end_bytepos = 0
}


#0  0x00005555555d772f in redisplay_window (window=XIL(0x555556b31ac5),
    just_this_one_p=false) at xdisp.c:19961
#1  0x00005555555d0991 in redisplay_window_0 (window=XIL(0x555556b31ac5))
    at xdisp.c:18016
#2  0x000055555576c7b0 in internal_condition_case_1 (
    bfun=0x5555555d094f <redisplay_window_0>, arg=XIL(0x555556b31ac5),
    handlers=XIL(0x7ffff1f56cdb), hfun=0x5555555d082d <redisplay_window_error>)
    at eval.c:1637
#3  0x00005555555d0803 in redisplay_windows (window=XIL(0x555556b31ac5))
    at xdisp.c:17985
#4  0x00005555555cf382 in redisplay_internal () at xdisp.c:17384
#5  0x00005555555cfec8 in redisplay_preserve_echo_area (from_where=2)
    at xdisp.c:17743
#6  0x0000555555594fe2 in Fredisplay (force=XIL(0)) at dispnew.c:6352
#7  0x00007ffff17a4e3d in F7369742d666f72_sit_for_0 ()
   from 
/opt/dc/emacs/bin/../lib/emacs/30.0.50/native-lisp/30.0.50-3670981c/preloaded/subr-13adf6a6-0e73955f.eln
#8  0x0000555555770850 in funcall_subr (subr=0x7ffff18f3a10, numargs=1,
    args=0x7fffffb6e068) at eval.c:3163
#9  0x00005555557701f0 in funcall_general (fun=XIL(0x7ffff18f3a15), numargs=1,
    args=0x7fffffb6e068) at eval.c:3040
#10 0x00005555557704f9 in Ffuncall (nargs=2, args=0x7fffffb6e060) at eval.c:3093
#11 0x00007ffff1070163 in
F7365727665722d72657475726e2d6572726f72_server_return_error_0 ()
   from 
/home/dc/.emacs.d/eln-cache/30.0.50-3670981c/server-0cc44189-48d76bed.eln
[…]
#12745 0x00005555556a67ff in read_key_sequence (keybuf=0x7fffffffd8e0,
    prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true,
    fix_current_buffer=true, prevent_redisplay=false,
    disable_text_conversion_p=false) at keyboard.c:10728
#12746 0x0000555555690ee7 in command_loop_1 () at keyboard.c:1429
#12747 0x000055555576c6cf in internal_condition_case (
    bfun=0x555555690ab8 <command_loop_1>, handlers=XIL(0x90),
    hfun=0x55555568ff63 <cmd_error>) at eval.c:1613
#12748 0x0000555555690696 in command_loop_2 (handlers=XIL(0x90))
    at keyboard.c:1168
#12749 0x000055555576bafc in internal_catch (tag=XIL(0xfc60),
    func=0x55555569066c <command_loop_2>, arg=XIL(0x90)) at eval.c:1292
#12750 0x0000555555690628 in command_loop () at keyboard.c:1146
#12751 0x000055555568fa05 in recursive_edit_1 () at keyboard.c:754
#12752 0x000055555568fc31 in Frecursive_edit () at keyboard.c:837
#12753 0x000055555568b698 in main (argc=3, argv=0x7fffffffdf08) at emacs.c:2621





reply via email to

[Prev in Thread] Current Thread [Next in Thread]