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

nvim segfaults on exit in void-linux/armv6-muslc #3799

Closed
equalsraf opened this Issue Dec 7, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@equalsraf
Contributor

equalsraf commented Dec 7, 2015

void-linux has a muslc based variant, when Neovim is built against muslc (in armv6) it segfaults on exit, the following command is enough to reproduce

bin/nvim -c ":q" -u NONE

Here's a backtrace

Program received signal SIGSEGV, Segmentation fault.
0x001f9328 in je_tcache_dalloc_small (binind=<optimized out>, ptr=0x283b70, tcache=0xb6a0b000, 
    tsd=<optimized out>) at include/jemalloc/internal/tcache.h:380
380             tbin->avail[tbin->ncached] = ptr;

#0  0x001f9328 in je_tcache_dalloc_small (binind=<optimized out>, ptr=0x283b70, 
    tcache=0xb6a0b000, tsd=<optimized out>) at include/jemalloc/internal/tcache.h:380
#1  je_arena_dalloc (tcache=0xb6a0b000, ptr=0x283b70, tsd=<optimized out>)
    at include/jemalloc/internal/arena.h:1271
#2  je_idalloctm (is_metadata=false, tcache=0xb6a0b000, ptr=0x283b70, tsd=<optimized out>)
    at include/jemalloc/internal/jemalloc_internal.h:1005
#3  je_iqalloc (tcache=0xb6a0b000, ptr=0x283b70, tsd=<optimized out>)
    at include/jemalloc/internal/jemalloc_internal.h:1029
#4  ifree (tsd=<optimized out>, tcache=0xb6a0b000, ptr=0x283b70) at src/jemalloc.c:1745
#5  free (ptr=0x283b70) at src/jemalloc.c:1839
#6  0x001c6244 in uv__free (ptr=<optimized out>)
    at /home/raf/Code/neovim/.deps/build/src/libuv/src/uv-common.c:78
#7  uv_fs_scandir_next (req=req@entry=0xbeffede0, ent=ent@entry=0xbeffef08)
    at /home/raf/Code/neovim/.deps/build/src/libuv/src/uv-common.c:499
#8  0x001b2690 in os_scandir_next (dir=0xbeffede0)
    at /home/raf/Code/neovim/src/nvim/os/fs.c:441
#9  0x00125580 in scandir_next_with_dots (dir=dir@entry=0xbeffedd8)
    at /home/raf/Code/neovim/src/nvim/path.c:537
#10 0x001269fc in do_path_expand (gap=0xb6a33280, gap@entry=0xbeffef58, 
    path=path@entry=0x2815dc <NameBuff> "/tmp/nvimDFbMIC/*", wildoff=wildoff@entry=0, flags=0, 
    flags@entry=35, didstar=didstar@entry=false) at /home/raf/Code/neovim/src/nvim/path.c:661
#11 0x00126ac4 in path_expand (gap=gap@entry=0xbeffef58, 
    path=path@entry=0x2815dc <NameBuff> "/tmp/nvimDFbMIC/*", flags=flags@entry=35)
    at /home/raf/Code/neovim/src/nvim/path.c:522
#12 0x00127ebc in gen_expand_wildcards (num_pat=num_pat@entry=1, pat=0xbeffefb0, 
    pat@entry=0xbeffefa8, num_file=0x0, num_file@entry=0xbeffefa4, file=0x0, 
    file@entry=0xbeffefa0, flags=flags@entry=35) at /home/raf/Code/neovim/src/nvim/path.c:1205
#13 0x0019ea3c in vim_deltempdir () at /home/raf/Code/neovim/src/nvim/tempfile.c:70
#14 0x000e9604 in ml_close_all (del_file=del_file@entry=1)
    at /home/raf/Code/neovim/src/nvim/memline.c:597
#15 0x001247b0 in mch_exit (r=r@entry=0) at /home/raf/Code/neovim/src/nvim/os_unix.c:178
#16 0x000da800 in getout (exitval=exitval@entry=0) at /home/raf/Code/neovim/src/nvim/main.c:622
#17 0x00098058 in ex_quit (eap=0xbefff068) at /home/raf/Code/neovim/src/nvim/ex_docmd.c:5625
#18 0x0009c2b4 in do_one_cmd (cmdlinep=0xbefff144, cmdlinep@entry=0xbefff13c, sourcing=695564, 
    sourcing@entry=0, cstack=0x1, cstack@entry=0xbefff198, fgetline=0x0, 
    fgetline@entry=0x282f8c <je_arena_bin_info+280>, cookie=cookie@entry=0x0)
    at /home/raf/Code/neovim/src/nvim/ex_docmd.c:2185
#19 0x0009cc8c in do_cmdline (cmdline=cmdline@entry=0x0, fgetline=0xa9d0c <getexline>, 
    cookie=cookie@entry=0x0, flags=0) at /home/raf/Code/neovim/src/nvim/ex_docmd.c:611
#20 0x0010336c in nv_colon (cap=0xbefff568) at /home/raf/Code/neovim/src/nvim/normal.c:4422
#21 0x0010dc6c in normal_execute (state=0xbefff4fc, key=<optimized out>)
    at /home/raf/Code/neovim/src/nvim/normal.c:1153
#22 0x0018dea4 in state_enter (s=0xbefff4fc, s@entry=0xbefff4f4)
    at /home/raf/Code/neovim/src/nvim/state.c:55
#23 0x00104ca8 in normal_enter (cmdwin=cmdwin@entry=false, noexmode=noexmode@entry=false)
    at /home/raf/Code/neovim/src/nvim/normal.c:470
#24 0x000db6c8 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/raf/Code/neovim/src/nvim/main.c:537

A quick workaround that worked for me was to disable the use of jemalloc (-DENABLE_JEMALLOC=OFF) but I've been unable to reproduce with a simple test case for jemalloc, so its unclear where the fault lies at.

@equalsraf equalsraf changed the title from nvim segfaults on exit in void-linux when built with muslc to nvim segfaults on exit in void-linux/muslc Dec 7, 2015

@equalsraf equalsraf changed the title from nvim segfaults on exit in void-linux/muslc to nvim segfaults on exit in void-linux/armv6-muslc Dec 7, 2015

@justinmk justinmk added the bug label Dec 7, 2015

@justinmk justinmk added this to the todo milestone Dec 7, 2015

@justinmk justinmk added the bug-crash label Sep 3, 2016

@justinmk

This comment has been minimized.

Member

justinmk commented Feb 14, 2017

@equalsraf Any change here after upgrading musl? Another musl-related crash: #4664

@justinmk

This comment has been minimized.

Member

justinmk commented Jun 10, 2018

Closing this because:

  • Nvim works on alpine linux which also uses musl.
  • We've upgraded jemalloc since this was reported.
  • Nvim works on ARM.

Will re-open if anyone has info to the contrary.

@justinmk justinmk closed this Jun 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment