Skip to content

Instantly share code, notes, and snippets.

@norcalli
Created December 24, 2019 16:17
Show Gist options
  • Save norcalli/90f12fe3f19754d07fe06c4222273e15 to your computer and use it in GitHub Desktop.
Save norcalli/90f12fe3f19754d07fe06c4222273e15 to your computer and use it in GitHub Desktop.
GNU gdb (GDB) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/ashkan/works/3rd/neovim/build/bin/nvim...
[New LWP 2684950]
[New LWP 2684951]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/home/ashkan/works/3rd/neovim/build/bin/nvim'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005614059fe945 in bufIsChanged (buf=0x0) at ../src/nvim/undo.c:2974
2974 return !bt_dontwrite(buf) && (buf->b_changed || file_ff_differs(buf, true));
[Current thread is 1 (Thread 0x7f30b5781780 (LWP 2684950))]
(gdb) #0 0x00005614059fe945 in bufIsChanged (buf=0x0) at ../src/nvim/undo.c:2974
No locals.
#1 0x0000561405827c77 in ex_win_close (forceit=1, win=0x561407e47710, tp=0x0) at ../src/nvim/ex_docmd.c:6389
need_hide = 32766
buf = 0x0
#2 0x000056140576547c in nvim_win_close (window=1002, force=true, err=0x7ffee30cd110) at ../src/nvim/api/window.c:563
win = 0x561407e47710
tabpage = 0x56140785b1a0
tstate = {current_exception = 0x0, private_msg_list = 0x0, msg_list = 0x7ffee30cd4a8, trylevel = 1, got_int = 0, need_rethrow = 0, did_emsg = 0}
#3 0x0000561405731381 in nlua_msgpack_nvim_win_close (lstate=0x40479378) at src/nvim/auto/msgpack_lua_c_bindings.generated.c:4816
err = {type = kErrorTypeNone, msg = 0x0}
arg2 = true
arg1 = 1002
#4 0x0000561405ab8a1b in lj_BC_FUNCC ()
No symbol table info available.
#5 0x0000561405aa4afa in lua_pcall (L=0x40479378, nargs=<optimized out>, nresults=0, errfunc=<optimized out>) at lj_api.c:1129
g = 0x404793b8
oldh = 0 '\000'
ef = <optimized out>
status = <optimized out>
__PRETTY_FUNCTION__ = "lua_pcall"
#6 0x000056140588f38b in executor_exec_lua_cb (ref=18, name=0x561405b0e4bb "detach", args=..., retval=false, err=0x0) at ../src/nvim/lua/executor.c:847
lstate = 0x40479378
#7 0x0000561405777020 in buf_updates_unregister_all (buf=0x561407e2c1d0) at ../src/nvim/buffer_updates.c:160
args = {items = 0x7ffee30cd2f0, size = 1, capacity = 0}
items = {{type = kObjectTypeBuffer, data = {boolean = 2, integer = 2, floating = 9.8813129168249309e-324, string = {data = 0x2 <error: Cannot access memory at address 0x2>, size = 0}, array = {items = 0x2, size = 0, capacity = 0}, dictionary = {items = 0x2, size = 0, capacity = 0}, luaref = 2}}}
cb = {on_lines = -2, on_changedtick = -2, on_detach = 18, utf_sizes = false}
i = 0
size = 0
#8 0x0000561405769ce2 in close_buffer (win=0x561407e47710, buf=0x561407e2c1d0, action=0, abort_if_last=true) at ../src/nvim/buffer.c:607
unload_buf = true
del_buf = true
wipe_buf = true
is_curwin = false
the_curwin = 0x561407855260
the_curtab = 0x56140785b1a0
bufref = {br_buf = 0x561407e2c1d0, br_fnum = 2, br_buf_free_count = 0}
nwindows = 1
is_curbuf = false
#9 0x0000561405a265a5 in win_close (win=0x561407e47710, free_buf=false) at ../src/nvim/window.c:2541
bufref = {br_buf = 0x561407857b00, br_fnum = 1, br_buf_free_count = 0}
wp = 0x3ea0588d9b0
other_buffer = 0
close_curwin = 0
dir = 126188288
help_window = false
prev_curtab = 0x56140785b1a0
win_frame = 0x0
had_diffmode = false
was_floating = true
#10 0x0000561405827c66 in ex_win_close (forceit=1, win=0x561407e47710, tp=0x0) at ../src/nvim/ex_docmd.c:6386
need_hide = 32766
buf = 0x561407e2c1d0
#11 0x000056140576547c in nvim_win_close (window=1002, force=true, err=0x7ffee30cd500) at ../src/nvim/api/window.c:563
win = 0x561407e47710
tabpage = 0x56140785b1a0
tstate = {current_exception = 0x0, private_msg_list = 0x0, msg_list = 0x0, trylevel = 0, got_int = 0, need_rethrow = 0, did_emsg = 0}
#12 0x0000561405731381 in nlua_msgpack_nvim_win_close (lstate=0x40479378) at src/nvim/auto/msgpack_lua_c_bindings.generated.c:4816
err = {type = kErrorTypeNone, msg = 0x0}
arg2 = true
arg1 = 1002
#13 0x0000561405ab8a1b in lj_BC_FUNCC ()
No symbol table info available.
#14 0x0000561405aa4afa in lua_pcall (L=0x40479378, nargs=<optimized out>, nresults=0, errfunc=<optimized out>) at lj_api.c:1129
g = 0x404793b8
oldh = 0 '\000'
ef = <optimized out>
status = <optimized out>
__PRETTY_FUNCTION__ = "lua_pcall"
#15 0x000056140588da0c in nlua_schedule_event (argv=0x7ffee30cd608) at ../src/nvim/lua/executor.c:224
cb = 11
lstate = 0x40479378
#16 0x00005614057f9bbe in multiqueue_process_events (this=0x5614078473b0) at ../src/nvim/event/multiqueue.c:157
event = {handler = 0x56140588d9b0 <nlua_schedule_event>, argv = {0xb, 0xb, 0x0, 0x41aae180, 0x0, 0x7ffeffffffff, 0x0, 0x5, 0x0, 0x2}}
__PRETTY_FUNCTION__ = "multiqueue_process_events"
#17 0x00005614058eec3e in nv_event (cap=0x7ffee30cd798) at ../src/nvim/normal.c:8049
may_restart = false
#18 0x00005614058df3ea in normal_execute (state=0x7ffee30cd710, key=-26365) at ../src/nvim/normal.c:1131
s = 0x7ffee30cd710
__PRETTY_FUNCTION__ = "normal_execute"
#19 0x00005614059beb81 in state_enter (s=0x7ffee30cd710) at ../src/nvim/state.c:69
check_result = 1
key = -26365
execute_result = 1
#20 0x00005614058dd6bf in normal_enter (cmdwin=false, noexmode=false) at ../src/nvim/normal.c:463
state = {state = {check = 0x5614058df878 <normal_check>, execute = 0x5614058dec57 <normal_execute>}, command_finished = false, ctrl_w = false, need_flushbuf = false, set_prevcount = false, previous_got_int = false, cmdwin = false, noexmode = false, toplevel = true, oa = {op_type = 0, regname = 0,
motion_type = kMTLineWise, motion_force = 0, use_reg_one = false, inclusive = false, end_adjusted = false, start = {lnum = 0, col = 0, coladd = 0}, end = {lnum = 0, col = 0, coladd = 0}, cursor_start = {lnum = 0, col = 0, coladd = 0}, line_count = 0, empty = false, is_VIsual = false, start_vcol = 0,
end_vcol = 0, prev_opcount = 0, prev_count0 = 0}, ca = {oap = 0x7ffee30cd728, prechar = 0, cmdchar = -26365, nchar = 0, ncharC1 = 0, ncharC2 = 0, extra_char = 0, opcount = 0, count0 = 0, count1 = 1, arg = 0, retval = 0, searchbuf = 0x0}, mapped_len = 0, old_mapped_len = 0, idx = 183, c = -26365,
old_col = 1, old_pos = {lnum = 17, col = 0, coladd = 0}}
#21 0x0000561405893fab in main (argc=1, argv=0x7ffee30cda98) at ../src/nvim/main.c:577
fname = 0x0
params = {argc = 1, argv = 0x7ffee30cda98, use_vimrc = 0x0, n_commands = 0, commands = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, cmds_tofree = "\000\000\000\000\000\000\000\000\000", n_pre_commands = 0, pre_commands = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, edit_type = 0,
tagname = 0x0, use_ef = 0x0, input_isatty = true, output_isatty = true, err_isatty = true, no_swap_file = 0, use_debug_break_level = -1, window_count = 1, window_layout = 0, diff_mode = 0, listen_addr = 0x0}
cwd = 0x0
__PRETTY_FUNCTION__ = "main"
use_remote_ui = false
use_builtin_ui = true
__func__ = "main"
(gdb) #0 0x00005614059fe945 in bufIsChanged (buf=0x0) at ../src/nvim/undo.c:2974
2974 return !bt_dontwrite(buf) && (buf->b_changed || file_ff_differs(buf, true));
(gdb) #1 0x0000561405827c77 in ex_win_close (forceit=1, win=0x561407e47710, tp=0x0) at ../src/nvim/ex_docmd.c:6389
6389 need_hide = (bufIsChanged(buf) && buf->b_nwindows <= 1);
(gdb) #2 0x000056140576547c in nvim_win_close (window=1002, force=true, err=0x7ffee30cd110) at ../src/nvim/api/window.c:563
563 ex_win_close(force, win, tabpage == curtab ? NULL : tabpage);
(gdb) #3 0x0000561405731381 in nlua_msgpack_nvim_win_close (lstate=0x40479378) at src/nvim/auto/msgpack_lua_c_bindings.generated.c:4816
4816 nvim_win_close(arg1, arg2, &err);
(gdb) #4 0x0000561405ab8a1b in lj_BC_FUNCC ()
(gdb) #5 0x0000561405aa4afa in lua_pcall (L=0x40479378, nargs=<optimized out>, nresults=0, errfunc=<optimized out>) at lj_api.c:1129
1129 status = lj_vm_pcall(L, api_call_base(L, nargs), nresults+1, ef);
(gdb) #6 0x000056140588f38b in executor_exec_lua_cb (ref=18, name=0x561405b0e4bb "detach", args=..., retval=false, err=0x0) at ../src/nvim/lua/executor.c:847
847 if (lua_pcall(lstate, (int)args.size+1, retval ? 1 : 0, 0)) {
(gdb) #7 0x0000561405777020 in buf_updates_unregister_all (buf=0x561407e2c1d0) at ../src/nvim/buffer_updates.c:160
160 executor_exec_lua_cb(cb.on_detach, "detach", args, false, NULL);
(gdb) #8 0x0000561405769ce2 in close_buffer (win=0x561407e47710, buf=0x561407e2c1d0, action=0, abort_if_last=true) at ../src/nvim/buffer.c:607
607 buf_updates_unregister_all(buf);
(gdb) #9 0x0000561405a265a5 in win_close (win=0x561407e47710, free_buf=false) at ../src/nvim/window.c:2541
2541 close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, true);
(gdb) #10 0x0000561405827c66 in ex_win_close (forceit=1, win=0x561407e47710, tp=0x0) at ../src/nvim/ex_docmd.c:6386
6386 win_close(win, false);
(gdb) #11 0x000056140576547c in nvim_win_close (window=1002, force=true, err=0x7ffee30cd500) at ../src/nvim/api/window.c:563
563 ex_win_close(force, win, tabpage == curtab ? NULL : tabpage);
(gdb) #12 0x0000561405731381 in nlua_msgpack_nvim_win_close (lstate=0x40479378) at src/nvim/auto/msgpack_lua_c_bindings.generated.c:4816
4816 nvim_win_close(arg1, arg2, &err);
(gdb) #13 0x0000561405ab8a1b in lj_BC_FUNCC ()
(gdb) #14 0x0000561405aa4afa in lua_pcall (L=0x40479378, nargs=<optimized out>, nresults=0, errfunc=<optimized out>) at lj_api.c:1129
1129 status = lj_vm_pcall(L, api_call_base(L, nargs), nresults+1, ef);
(gdb) #15 0x000056140588da0c in nlua_schedule_event (argv=0x7ffee30cd608) at ../src/nvim/lua/executor.c:224
224 if (lua_pcall(lstate, 0, 0, 0)) {
(gdb) quit
PID: 2684950 (nvim)
UID: 1000 (ashkan)
GID: 1000 (ashkan)
Signal: 11 (SEGV)
Timestamp: Tue 2019-12-24 08:15:09 PST (2min 49s ago)
Command Line: /home/ashkan/works/3rd/neovim/build/bin/nvim
Executable: /home/ashkan/works/3rd/neovim/build/bin/nvim
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
Session: 1
Owner UID: 1000 (ashkan)
Boot ID: e843938073b843adb1bb280bb692c347
Machine ID: 31f12102597b4dffb7b09d6c695b4971
Hostname: zephyr
Storage: /var/lib/systemd/coredump/core.nvim.1000.e843938073b843adb1bb280bb692c347.2684950.1577204109000000000000.lz4
Message: Process 2684950 (nvim) of user 1000 dumped core.
Stack trace of thread 2684950:
#0 0x00005614059fe945 n/a (/home/ashkan/works/3rd/neovim/build/bin/nvim + 0x364945)
#1 0x0000561405827c77 n/a (/home/ashkan/works/3rd/neovim/build/bin/nvim + 0x18dc77)
#2 0x000056140576547c n/a (/home/ashkan/works/3rd/neovim/build/bin/nvim + 0xcb47c)
#3 0x0000561405731381 n/a (/home/ashkan/works/3rd/neovim/build/bin/nvim + 0x97381)
#4 0x0000561405ab8a1b n/a (/home/ashkan/works/3rd/neovim/build/bin/nvim + 0x41ea1b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment