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

Emacs crashes with Bibtex layer #8833

Closed
JonathanReeve opened this issue May 1, 2017 · 9 comments
Closed

Emacs crashes with Bibtex layer #8833

JonathanReeve opened this issue May 1, 2017 · 9 comments
Labels
stale marked as a stale issue/pr (usually by a bot)

Comments

@JonathanReeve
Copy link

JonathanReeve commented May 1, 2017

Description :octocat:

Bibtex layer causes emacs to crash when inserting a citation. It only seems to happen when I'm typing fast. When I type something slow into the bibtex helm, it's fine. I wish I knew how to get backtrace logs on my system, or I'd post them here.

Reproduction guide 🪲

  • Start Emacs
  • Open an org mode file
  • Initiate bibtex-helm insert citation prompt with SPC m i c
  • Start typing something at a normal pace
  • Notice it crashes everything

Observed behaviour: 👀 💔

  • Emacs crashes

Expected behaviour: ❤️ 😄

  • It doesn't crash

System Info 💻

  • OS: gnu/linux
  • Emacs: 25.2.1
  • Spacemacs: 0.200.9
  • Spacemacs branch: master (rev. 8e1af14)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(yaml html helm
      (auto-completion :variables spacemacs-default-company-backends
                       '(company-files company-capf ein:company-backend))
      emacs-lisp bibtex ipython-notebook
      (mu4e :variables mu4e-account-alist t)
      git markdown python org
      (shell :variables shell-default-height 30 shell-default-position 'bottom)
      themes-megapack spell-checking syntax-checking vinegar)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Backtrace 🐾

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x000000000053f0bc in re_search_2 ()
(gdb) bt
#0 0x000000000053f0bc in re_search_2 ()
#1 0x000000000053f76b in re_search ()
#2 0x0000000000532e91 in ()
#3 0x0000000000562377 in ()
#4 0x000000000059998b in ()
#5 0x000000000056219b in ()
#6 0x000000000059998b in ()
#7 0x0000000000561dad in ()
#8 0x000000000056219b in ()
#9 0x000000000059998b in ()
#10 0x0000000000561dad in ()
#11 0x000000000056219b in ()
#12 0x000000000059998b in ()
#13 0x0000000000561dad in ()
#14 0x000000000056219b in ()
#15 0x000000000059998b in ()
#16 0x000000000056219b in ()
#17 0x000000000059998b in ()
#18 0x0000000000561dad in ()
#19 0x000000000056219b in ()
#20 0x000000000059998b in ()
#21 0x0000000000561dad in ()
#22 0x000000000056219b in ()
#23 0x000000000059998b in ()
#24 0x0000000000561dad in ()
#25 0x000000000056219b in ()
#26 0x00000000005635f8 in ()
#27 0x0000000000562299 in ()
#28 0x000000000059998b in ()
#29 0x000000000056219b in ()
#30 0x000000000059998b in ()
#31 0x000000000056219b in ()
#32 0x000000000059998b in ()
#33 0x000000000056219b in ()
#34 0x000000000059998b in ()
#35 0x000000000056219b in ()
#36 0x000000000059998b in ()
#37 0x000000000056219b in ()
#38 0x000000000059998b in ()
#39 0x000000000056219b in ()
#40 0x000000000059998b in ()
#41 0x000000000056219b in ()
#42 0x00000000005635f8 in ()
#43 0x0000000000562299 in ()
#44 0x000000000059998b in ()
#45 0x000000000056219b in ()
#46 0x00000000005635f8 in ()
#47 0x0000000000562299 in ()
#48 0x000000000059998b in ()
---Type to continue, or q to quit---
#49 0x000000000056219b in ()
#50 0x000000000059998b in ()
#51 0x0000000000561dad in ()
#52 0x000000000056219b in ()
#53 0x000000000059998b in ()
#54 0x000000000056219b in ()
#55 0x000000000055dfda in ()
#56 0x0000000000562299 in ()
#57 0x000000000055e993 in ()
#58 0x0000000000562377 in ()
#59 0x000000000059998b in ()
#60 0x000000000056219b in ()
#61 0x000000000056249a in ()
#62 0x00000000004fd911 in ()
#63 0x0000000000560b02 in ()
#64 0x00000000004ef39c in ()
#65 0x0000000000560aa3 in ()
#66 0x00000000004ef359 in ()
#67 0x00000000004f3ae7 in ()
#68 0x00000000004f3e38 in ()
#69 0x0000000000418bae in ()
#70 0x00007fb284b98511 in __libc_start_main ()
at /usr/lib/libc.so.6
#71 0x000000000041973a in ()

@sdwolfz
Copy link
Collaborator

sdwolfz commented May 1, 2017

Here are the general steps to debug segfaults:

  1. Start emacs.
  2. In a terminal, find emacs's PID: ps aux | grep emacs | grep -v grep
  3. Start gdb with: gdb attach 12345 where 12345 is the PID of the emacs process from step 2.
  4. While inside gdb press c (short from continue) and then enter (RET)
  5. Go to emacs and trigger the crash.
  6. Return to the gdb terminal and it should tell you that it received SIGSEGV. Type bt (short from backtrace) and copy paste it in a message here, between lines that contain: ``` to display it as a block or in a bug report to the emacs mailing list.

@JonathanReeve
Copy link
Author

JonathanReeve commented May 1, 2017

The above instructions work, but with sudo gdb attach. Backtrace added. Sorry about all the issue references!

@sdwolfz
Copy link
Collaborator

sdwolfz commented May 1, 2017

Looks like your emacs was compiled without debug simbols... have you installed it manually from source or trough your package manager?

@JonathanReeve
Copy link
Author

Just through my package manager. sudo pacman -S emacs on Arch.

@JonathanReeve
Copy link
Author

Isn't there an emacs backtrace? I saw this which says to look in .xsession-errors, but there doesn't seem to be anything useful tehre.

@sdwolfz
Copy link
Collaborator

sdwolfz commented May 1, 2017

Well the backtrace you provided does not say much, only a bunch of memory adresses. You might need to compile emacs from source and trigger the crash again for the full backtrace. Here would be the steps for installing from source:

git clone https://github.com/emacs-mirror/emacs.git ~/emacs
cd ~/emacs
git checkout emacs-25.2
./autogen.sh
CFLAGS='-O0 -g3' ./configure --program-transform-name='s/^ctags$/ctags.emacs/'
make
sudo make install

The CFLAGS='-O0 -g3' part is the one that will help with the gdb backtrace output.

You might also need to install gcc, autoconf, texinfo and other tools. The output from the above commands will let you know what is missing.

I don't know about the .xsession-errors file or what it purpose is.

@JonathanReeve
Copy link
Author

I didn't build emacs from scratch, but I did install emacs 26 with the emacs-git AUR package. And now I can't reproduce the error. I guess it was specific to emacs 25?

@sdwolfz
Copy link
Collaborator

sdwolfz commented May 4, 2017

There's a good chance your problem was fixed by someone on the master branch of Emacs (which contains version 26). I am also using the master branch because it contains some fixes to problems I encountered.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

2 participants