Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault when opening org-file #1547

Open
hexmode opened this issue Oct 31, 2019 · 3 comments
Open

segfault when opening org-file #1547

hexmode opened this issue Oct 31, 2019 · 3 comments
Labels
Projects

Comments

@hexmode
Copy link
Contributor

hexmode commented Oct 31, 2019

Was able to produce under gdb:

Segfault:

Thread 1 "remacs" received signal SIGSEGV, Segmentation fault.
hash_lookup (h=0x3b92700, key=0x1585fd3 <bss_sbrk_buffer+450419>, hash=0x7fffffff7958)
    at fns.c:1835
1835	  for (i = HASH_INDEX (h, start_of_bucket); 0 <= i; i = HASH_NEXT (h, i))
(gdb) bt
#0  0x000000000055d346 in hash_lookup
    (h=0x3b92700, key=0x1585fd3 <bss_sbrk_buffer+450419>, hash=0x7fffffff7958) at fns.c:1835
#1  0x00000000006b4985 in remacs::hashtable::<impl remacs::lisp::ExternalPtr<remacs::remacs_sys::Lisp_Hash_Table>>::lookup (self=..., key=...) at src/hashtable.rs:108
#2  0x000000000071dcd5 in remacs::hashtable::gethash (key=..., hash_table=..., dflt=...)
    at src/hashtable.rs:259
#3  0x000000000071dc84 in Fgethash (key=..., hash_table=..., dflt=...)
    at src/hashtable.rs:257
#4  0x00000000005b5a4a in ftfont_lookup_cache
    (key=0x1585fd3 <bss_sbrk_buffer+450419>, cache_for=cache_for@entry=FTFONT_CACHE_FOR_FACE)
    at lisp.h:928
#5  0x00000000005b6b8e in ftfont_close (font=0x72262e0) at ftfont.c:1246
#6  0x0000000000540736 in cleanup_vector (vector=vector@entry=0x72262e0) at alloc.c:3129
#7  0x0000000000541b68 in sweep_vectors () at alloc.c:3176
#8  0x0000000000545414 in gc_sweep () at alloc.c:7013
#9  0x0000000000545414 in garbage_collect_1 (end=<optimized out>) at alloc.c:5868
#10 0x0000000000545414 in Fgarbage_collect () at alloc.c:6000
#11 0x0000000000707697 in remacs::eval::funcall (args=...) at src/eval.rs:1177
#12 0x00000000007073f2 in Ffuncall (nargs=2, args=0x3bd5e98) at src/eval.rs:1144
#13 0x00000000005886c0 in exec_byte_code
    (bytestr=<optimized out>, vector=0x65bf825, maxdepth=<optimized out>, args_template=args_template@entry=0x0, nargs=nargs@entry=0, args=<optimized out>, args@entry=0x0)
    at bytecode.c:621
#14 0x0000000000557f61 in funcall_lambda (fun=<optimized out>, 
    fun@entry=0x6aaddf5, nargs=nargs@entry=0, arg_vector=arg_vector@entry=0x7fffffff7f80)
    at lisp.h:1684
#15 0x0000000000558926 in apply_lambda
    (fun=0x6aaddf5, args=<optimized out>, count=count@entry=13) at eval.c:1776
#16 0x000000000055838d in eval_sub (form=<optimized out>) at eval.c:1427
#17 0x0000000000705907 in remacs::eval::eval (form=..., lexical=...) at src/eval.rs:621
#18 0x000000000070586b in Feval (form=..., lexical=...) at src/eval.rs:608
#19 0x00000000007077d8 in remacs::eval::funcall (args=...) at src/eval.rs:1191
#20 0x00000000007073f2 in Ffuncall (nargs=2, args=0x7fffffff8340) at src/eval.rs:1144
#21 0x00000000005560f2 in internal_condition_case_n (bfun=
    0x707380 <Ffuncall>, nargs=nargs@entry=2, args=args@entry=0x7fffffff8340, handlers=handlers@entry=0xc540, hfun=hfun@entry=0x441700 <safe_eval_handler>) at eval.c:707
#22 0x0000000000432d69 in safe__call
    (inhibit_quit=inhibit_quit@entry=true, nargs=nargs@entry=2, func=func@entry=0x53a0, ap=ap@entry=0x7fffffff83b8) at lisp.h:928
#23 0x0000000000432eb3 in safe__call1
    (inhibit_quit=inhibit_quit@entry=true, fn=fn@entry=0x53a0) at xdisp.c:2664
#24 0x000000000044eaee in safe__eval (sexpr=<optimized out>, inhibit_quit=true) at lisp.h:928
#25 0x000000000044eaee in display_mode_element (it=it@entry=0x7fffffff8670, depth=2, 
    depth@entry=1, field_width=0, precision=precision@entry=0, elt=0x6677853, props=props@entry=0x0, risky=false) at xdisp.c:23811
#26 0x000000000044ec67 in display_mode_element (it=it@entry=0x7fffffff8670, depth=1, 
--Type <RET> for more, q to quit, c to continue without paging--
    ry=0, field_width=field_width@entry=0, precision=precision@entry=0, elt=<optimized out>, 
    elt@entry=0x6677843, props=props@entry=0x0, risky=<optimized out>) at lisp.h:1291
#27 0x000000000044fc46 in display_mode_line (w=w@entry=0x3b92290, face_id=MODE_LINE_FACE_ID, format=0x6677843)
    at lisp.h:928
#28 0x000000000044fe3b in display_mode_lines (w=w@entry=0x3b92290) at lisp.h:1241
#29 0x0000000000467e8a in redisplay_window (window=0x3b92295, just_this_one_p=just_this_one_p@entry=false)
    at xdisp.c:17531
#30 0x000000000046c03b in redisplay_window_0 (window=window@entry=0x3b92295) at xdisp.c:14911
#31 0x0000000000555fb6 in internal_condition_case_1
    (bfun=bfun@entry=0x46c010 <redisplay_window_0>, arg=0x3b92295, handlers=<optimized out>, hfun=hfun@entry=0x431930 <redisplay_window_error>) at eval.c:651
#32 0x00000000004364b2 in redisplay_windows (window=0x3b92295) at xdisp.c:14891
#33 0x00000000004364bd in redisplay_windows (window=0x6685805) at xdisp.c:14885
#34 0x0000000000458b8d in redisplay_internal () at xdisp.c:14374
#35 0x000000000045aac5 in redisplay () at xdisp.c:13586
#36 0x00000000004fb6a3 in read_char
    (commandflag=commandflag@entry=1, map=map@entry=0x71e36e3, prev_event=0x0, used_mouse_menu=used_mouse_menu@entry=0x7fffffffdc2b, end_time=end_time@entry=0x0) at keyboard.c:2347
#37 0x00000000004fe5a3 in read_key_sequence
    (keybuf=keybuf@entry=0x7fffffffdd20, prompt=prompt@entry=0x0, dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, bufsize=30) at keyboard.c:8933
#38 0x00000000004ffcec in command_loop_1 () at lisp.h:928
#39 0x0000000000555f1e in internal_condition_case
    (bfun=bfun@entry=0x4ffb10 <command_loop_1>, handlers=handlers@entry=0x5280, hfun=hfun@entry=0x4f4d90 <cmd_error>)
    at eval.c:627
#40 0x00000000004f1fc4 in command_loop_2 (ignore=ignore@entry=0x0) at lisp.h:928
#41 0x0000000000555e8d in internal_catch
    (tag=tag@entry=0xcba0, func=func@entry=0x4f1fa0 <command_loop_2>, arg=arg@entry=0x0) at eval.c:444
#42 0x00000000004f1f5b in command_loop () at lisp.h:928
#43 0x00000000004f4a33 in recursive_edit_1 () at keyboard.c:690
#44 0x0000000000716318 in remacs::keyboard::recursive_edit () at src/keyboard.rs:260
#45 0x00000000007161d9 in Frecursive_edit () at src/keyboard.rs:228
#46 0x000000000041e851 in main (argc=<optimized out>, argv=0x7fffffffe118) at emacs.c:1652
@shaleh
Copy link
Collaborator

shaleh commented Oct 31, 2019

Excellent stack trace.

Can you reproduce it when you load remacs with -Q? That way there are no local customizations at play? If you cannot, please binary search your config to identify what is helping trigger this.

Thank you.

@hexmode
Copy link
Contributor Author

hexmode commented Oct 31, 2019

Attempting to load it with -Q and C-x C-f just hung. Trying again with the menu worked.

@hexmode
Copy link
Contributor Author

hexmode commented Nov 1, 2019

Ok, I think I've got a minimal init.el:

(eval-when-compile
  (require 'use-package))
(use-package spaceline)
(use-package spaceline-all-the-icons
  :config
  (spaceline-all-the-icons-theme))

and this tmp.org:

test
* this is a test

Then running remacs tmp.org results in the segfault.

More helpful info:

$ echo ~/.emacs.d/elpa/spaceline-* ~/.emacs.d/elpa/use-package*
/home/mah/.emacs.d/elpa/spaceline-2.0.1 /home/mah/.emacs.d/elpa/spaceline-all-the-icons-1.4.0 /home/mah/.emacs.d/elpa/use-package-2.4

@agraven agraven added the bug label Aug 9, 2020
@agraven agraven added this to Needs triage in Bugs via automation Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Bugs
  
Needs triage
Development

No branches or pull requests

3 participants