Summary: | sys-devel/gdb-8.1 with sys-libs/ncurses-6.1-r1 - gdb -tui: segmentation fault in has_colors_sp at .../ncurses/base/lib_color.c:822 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dale Lukas Peterson <hazelnusse> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | herrtimson, pageexec, perfinion, quentin |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=651552 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 652080 | ||
Attachments: | gdb ncurses info |
Description
Dale Lukas Peterson
2018-03-06 05:08:22 UTC
Created attachment 522482 [details]
gdb ncurses info
I've the same issue. I tried to downgrade to =sys-libs/ncurses-6.0-r2 and everything works fine. Interestingly i dont get this, but i do get a very very similar stacktrace when mutt segfaults. mutt segfaults with both TERM=xterm-256color and =screen. any chance changing $TERM makes it work for you? I tried xterm-256color, screen, ansi, and unset. All result in a SIGSEV for me: [I] luke@airwolf ~> echo $TERM xterm-256color [I] luke@airwolf ~> gdb -tui fish: “gdb -tui” terminated by signal SIGSEGV (Address boundary error) [I] luke@airwolf ~> set -x TERM screen [I] luke@airwolf ~> echo $TERM screen [I] luke@airwolf ~> gdb -tui fish: “gdb -tui” terminated by signal SIGSEGV (Address boundary error) [I] luke@airwolf ~> set -x TERM ansi [I] luke@airwolf ~> echo $TERM ansi [I] luke@airwolf ~> gdb -tui fish: “gdb -tui” terminated by signal SIGSEGV (Address boundary error) [I] luke@airwolf ~> set -e TERM <W> fish: Could not set up terminal. <W> fish: TERM environment variable not set. <W> fish: Using fallback terminal type 'ansi'. [I] luke@airwolf ~> echo $TERM [I] luke@airwolf ~> gdb -tui Cannot enable the TUI: error opening terminal [TERM=<unset>] [I] luke@airwolf ~> Rather, all but unset result in SIGSEV; when unset tui mode doesn't work though. See https://bugs.gentoo.org/651552#c14 which applies to gdb too. (In reply to Quentin Minster from comment #6) > See https://bugs.gentoo.org/651552#c14 which applies to gdb too. OK if I understand this correctly, with ncurses[tinfo] two incompatible libraries get linked to and mixed up. Easiest workaround should be building ncurses without the tinfo useflag (which I have here, and gdb-8.1-r1 works just fine). This should be independent of gdb version by the way. Same problem, (gdb gdb; run; C-x a): (gdb) Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7ec0350 in _nc_setupscreen_sp () from /lib64/libncursesw.so.6 (gdb) bt #0 0x00007ffff7ec0350 in _nc_setupscreen_sp () from /lib64/libncursesw.so.6 #1 0x00007ffff7eba57e in newterm_sp () from /lib64/libncursesw.so.6 #2 0x00007ffff7ebaa08 in newterm () from /lib64/libncursesw.so.6 #3 0x00005555559e99c5 in tui_enable () at tui/tui.c:427 #4 0x00005555559e9c84 in tui_enable () at tui/tui.c:403 #5 tui_rl_switch_mode (notused1=<optimized out>, notused2=<optimized out>) at tui/tui.c:110 #6 0x00007ffff7f54d6e in _rl_dispatch_subseq () from /lib64/libreadline.so.7 #7 0x00007ffff7f557fa in _rl_dispatch_callback () from /lib64/libreadline.so.7 #8 0x00007ffff7f6cc97 in rl_callback_read_char () from /lib64/libreadline.so.7 #9 0x00005555557be76e in gdb_rl_callback_read_char_wrapper_noexcept () at event-top.c:175 #10 0x00005555557be7f9 in gdb_rl_callback_read_char_wrapper (client_data=<optimized out>) at event-top.c:191 #11 0x00005555557becb0 in stdin_event_handler (error=<optimized out>, client_data=0x555555f5d7f0) at event-top.c:511 #12 0x00005555557bd92d in gdb_wait_for_event (block=block@entry=1) at event-loop.c:859 #13 0x00005555557bdc33 in gdb_wait_for_event (block=1) at event-loop.c:755 #14 gdb_do_one_event () at event-loop.c:347 #15 0x00005555557bde99 in gdb_do_one_event () at event-loop.c:978 #16 start_event_loop () at event-loop.c:371 #17 0x0000555555873b7b in captured_command_loop () at main.c:330 #18 0x0000555555874c6d in captured_main (data=<optimized out>) at main.c:1173 #19 gdb_main (args=<optimized out>) at main.c:1189 #20 0x000055555564045b in main (argc=<optimized out>, argv=<optimized out>) at gdb.c:32 $TERM=rxvt-256color Workaround: mv /lib/libtinfo.so.6{,.backup} cp /lib/libtinfo{w,}.so.6 when gdb SIGSEGVs can you post output of: $ lddtree /usr/bin/gdb just to make sure both -w and non-w libraries link into gdb. quick note: I resolved this issue locally by rebuilding ncurses [-tinfo] and upgrading gdb from v8.1-r1 to v8.2-r1. ================================================================= Package Settings ================================================================= sys-devel/gdb-8.2-r1::gentoo was built with the following: USE="client lzma multitarget python server xml -nls -test -vanilla" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_6 -python2_7 -python3_4 -python3_5" PYTHON_TARGETS="python3_4 python3_6 -python2_7 -python3_5" sys-libs/ncurses-6.1-r2::gentoo was built with the following: USE="cxx gpm threads unicode -ada -debug -doc -minimal -profile -static-libs -test -tinfo -trace" ABI_X86="(64) -32 (-x32)" *** This bug has been marked as a duplicate of bug 669096 *** |