Bug 1609504 - gdb is crashing on almost any backtrace
Summary: gdb is crashing on almost any backtrace
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Durigan Junior
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1609714 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-28 17:59 UTC by Tomasz Kłoczko
Modified: 2018-07-31 20:16 UTC (History)
7 users (show)

Fixed In Version: gdb-8.1.90.20180727-38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-31 20:15:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
autoconf generated conftest.c program which crashes gdb. (5.84 KB, text/x-csrc)
2018-07-29 14:18 UTC, Tomasz Kłoczko
no flags Details
dn.c (199 bytes, text/plain)
2018-07-30 16:55 UTC, Jan Kratochvil
no flags Details

Description Tomasz Kłoczko 2018-07-28 17:59:07 UTC
[New LWP 29301]
[New LWP 29314]
[New LWP 29312]
[New LWP 29313]
Reading symbols from /usr/libexec/gdb...Reading symbols from /usr/lib/debug/usr/libexec/gdb-8.1.90.20180724-36.fc29.x86_64.debug...done.
done.

warning: Ignoring non-absolute filename: <linux-vdso.so.1>
Missing separate debuginfo for linux-vdso.so.1
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/25/a234381710a07546e3ecb4c82aed2c150873a8

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments

warning: Loadable section ".note.gnu.property" outside of ELF segments
Core was generated by `gdb --batch -nx -iex set auto-load no -ex file /home/tkloczko/rpmbuild/BUILDROO'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	  return ret;
[Current thread is 1 (Thread 0x7fc1daa44e80 (LWP 29301))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007fc1db0c2565 in __GI_abort () at abort.c:79
#2  0x000056317aeb49cc in dump_core () at ../../gdb/utils.c:262
#3  0x000056317aeb8ded in internal_vproblem(internal_problem*, char const*, int, char const*, __va_list_tag*) () at ../../gdb/utils.c:472
#4  0x000056317aeb8f51 in internal_verror (file=<optimized out>, line=<optimized out>, fmt=<optimized out>, ap=ap@entry=0x7ffd2d738a80) at ../../gdb/utils.c:497
#5  0x000056317acfcc55 in internal_error (file=file@entry=0x56317b0c3a13 "../../gdb/dictionary.c", line=line@entry=690, fmt=<optimized out>)
    at ../../gdb/common/errors.c:55
#6  0x000056317ad210ac in insert_symbol_hashed (dict=<optimized out>, sym=<optimized out>) at ../../gdb/dictionary.c:695
#7  0x000056317ad21451 in dict_create_hashed (obstack=obstack@entry=0x56317d949670, language=<optimized out>, symbol_list=<optimized out>) at ../../gdb/dictionary.c:382
#8  0x000056317ace811e in finish_block_internal (symbol=symbol@entry=0x0, listhead=0x56317b48a9b0 <local_symbols>, old_blocks=0x0, static_link=static_link@entry=0x0, 
    start=873443, end=873534, is_global=0, expandable=0) at ../../gdb/buildsym.c:366
#9  0x000056317ace8e61 in finish_block (symbol=symbol@entry=0x0, listhead=<optimized out>, old_blocks=<optimized out>, static_link=static_link@entry=0x0, 
    start=<optimized out>, end=<optimized out>) at ../../gdb/buildsym.c:530
#10 0x000056317ad67b40 in read_lexical_block_scope (die=die@entry=0x56317d9ad1c0, cu=cu@entry=0x56317da61670) at ../../gdb/dwarf2read.c:13806
#11 0x000056317ad62fcd in process_die(die_info*, dwarf2_cu*) () at ../../gdb/dwarf2read.c:10526
#12 0x000056317ad62103 in read_func_scope(die_info*, dwarf2_cu*) () at ../../gdb/dwarf2read.c:13676
#13 0x000056317ad633fd in process_die(die_info*, dwarf2_cu*) () at ../../gdb/dwarf2read.c:10521
#14 0x000056317ad62c7c in read_file_scope (cu=0x56317da61670, die=0x56317da2d710) at ../../gdb/dwarf2read.c:11493
#15 process_die(die_info*, dwarf2_cu*) () at ../../gdb/dwarf2read.c:10514
#16 0x000056317ad67ff8 in process_full_comp_unit (pretend_language=<optimized out>, per_cu=<optimized out>) at ../../gdb/dwarf2read.c:10274
#17 process_queue (dwarf2_per_objfile=<optimized out>, dwarf2_per_objfile=<optimized out>) at ../../gdb/dwarf2read.c:9499
#18 dw2_do_instantiate_symtab(dwarf2_per_cu_data*, bool) () at ../../gdb/dwarf2read.c:2885
#19 0x000056317ad69557 in psymtab_to_symtab_1 (pst=pst@entry=0x56317e543030) at ../../gdb/dwarf2read.c:9559
#20 0x000056317ad6967f in dwarf2_read_symtab (self=0x56317e543030, objfile=0x56317d949610) at ../../gdb/dwarf2read.c:9365
#21 0x000056317ae065c7 in psymtab_to_symtab(objfile*, partial_symtab*) () at ../../gdb/psymtab.c:792
#22 0x000056317ae0a050 in psym_lookup_symbol(objfile*, int, char const*, domain_enum_tag) () at ../../gdb/psymtab.c:522
#23 0x000056317ae664dc in lookup_symbol_via_quick_fns (domain=VAR_DOMAIN, name=0x56317da62320 "main", block_index=0, objfile=0x56317d949610) at ../../gdb/symtab.c:2384
#24 lookup_symbol_in_objfile (objfile=0x56317d949610, block_index=block_index@entry=0, name=0x56317da62320 "main", domain=VAR_DOMAIN) at ../../gdb/symtab.c:2559
#25 0x000056317ae66653 in lookup_symbol_global_iterator_cb (objfile=<optimized out>, cb_data=0x7ffd2d739810) at ../../gdb/symtab.c:2641
#26 0x000056317adefaa1 in default_iterate_over_objfiles_in_search_order (gdbarch=<optimized out>, 
    cb=0x56317ae66630 <lookup_symbol_global_iterator_cb(objfile*, void*)>, cb_data=0x7ffd2d739810, current_objfile=<optimized out>) at ../../gdb/objfiles.c:1528
#27 0x000056317ae6bad1 in lookup_global_symbol (name=0x56317da62320 "main", block=<optimized out>, domain=VAR_DOMAIN) at ../../gdb/symtab.c:2686
#28 0x000056317ae6b6a7 in lookup_symbol_aux (name=0x56317da62320 "main", match_type=match_type@entry=symbol_name_match_type::FULL, block=block@entry=0x0, 
    domain=domain@entry=VAR_DOMAIN, language=language@entry=language_c, is_a_field_of_this=is_a_field_of_this@entry=0x0) at ../../gdb/symtab.c:2092
#29 0x000056317ae6b8e3 in lookup_symbol_in_language(char const*, block const*, domain_enum_tag, language, field_of_this_result*) () at ../../gdb/symtab.c:1885
#30 0x000056317ae6b976 in lookup_symbol (name=<optimized out>, block=block@entry=0x0, domain=domain@entry=VAR_DOMAIN, is_a_field_of_this=is_a_field_of_this@entry=0x0)
    at ../../gdb/symtab.c:1898
#31 0x000056317ae58496 in set_initial_language () at ../../gdb/symfile.c:1622
#32 0x000056317ae5daa4 in symbol_file_add_main_1 (args=args@entry=0x56317d93f260 "/home/tkloczko/rpmbuild/BUILDROOT/lftp-4.8.3-5.fc29.x86_64/usr/bin/lftp", 
    add_flags=..., add_flags@entry=..., flags=..., flags@entry=..., reloff=<optimized out>) at ../../gdb/symfile.c:1249
--Type <RET> for more, q to quit, c to continue without paging--
#33 0x000056317ae5dc7c in symbol_file_command(char const*, int) () at ../../gdb/symfile.c:1599
#34 0x000056317ac8d6be in file_command (arg=0x7ffd2d73c07f "/home/tkloczko/rpmbuild/BUILDROOT/lftp-4.8.3-5.fc29.x86_64/usr/bin/lftp", from_tty=0)
    at ../../gdb/exec.c:461
#35 0x000056317abf704a in cmd_func(cmd_list_element*, char const*, int) () at ../../gdb/cli/cli-decode.c:1857
#36 0x000056317ae9935a in execute_command(char const*, int) () at ../../gdb/top.c:630
#37 0x000056317add8558 in catch_command_errors(void (*)(char const*, int), char const*, int) () at ../../gdb/main.c:380
#38 0x000056317add9952 in captured_main_1 (python_script=<synthetic pointer>: <optimized out>, context=0x7ffd2d739c90) at ../../gdb/main.c:1207
#39 captured_main (data=0x7ffd2d739c90) at ../../gdb/main.c:1231
#40 gdb_main(captured_main_args*) () at ../../gdb/main.c:1269
#41 0x000056317ab2baff in main (argc=<optimized out>, argv=<optimized out>) at ../../gdb/gdb.c:40
(gdb) 

If you want I can attach core file.

Comment 1 Jan Kratochvil 2018-07-28 18:26:42 UTC
It is Bug 1560010 which is already backported to F-28 but F-29/Rawhide still does not have the fix.

Comment 2 Sergio Durigan Junior 2018-07-28 19:54:55 UTC
(In reply to Jan Kratochvil from comment #1)
> It is Bug 1560010 which is already backported to F-28 but F-29/Rawhide still
> does not have the fix.

You're right, when I backported gdb-8.1.90.20180724 I should have double-checked that the fix was included.  I've now just release Fedora GDB 8.1.90.20170727, which does have the fix.

Tomasz, could you please give it a try with this new GDB?

https://koji.fedoraproject.org/koji/taskinfo?taskID=28674201

Thanks.

Comment 3 Tomasz Kłoczko 2018-07-29 13:54:13 UTC
>Tomasz, could you please give it a try with this new GDB?

> https://koji.fedoraproject.org/koji/taskinfo?taskID=28674201

With pleasure.
Just downloaded gdb and gdb-headless from the links provided in koji build log.

Comment 4 Tomasz Kłoczko 2018-07-29 14:14:52 UTC
Seems it works without crashing.

However I found another issue with gdb.
I'm trying to build lftp ad I found that one of the autoconf tests crashes with core.
I've extracted from config.log source code of the conftest.c and after compile it crashes as same as during configure script execution however seems it crashes as well gdb.

[tkloczko@domek lftp-4.8.3]$ gcc -o conftest -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Os -flto -Wall  -Wl,-z,relro   -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--as-needed -flto -fuse-linker-plugin conftest.c
conftest.c: In function ‘main’:
conftest.c:219:57: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]
   if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
conftest.c:221:14: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]
       |count != 4)
        ~~~~~~^~~~


[tkloczko@domek lftp-4.8.3]$ ./conftest 
*** %n in writable segment detected ***
Aborted (core dumped)
[tkloczko@domek lftp-4.8.3]$ gdb ./conftest 
GNU gdb (GDB) Fedora 8.1.90.20180727-37.fc29
Copyright (C) 2018 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-redhat-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 ./conftest...done.
(gdb) r
Starting program: /home/tkloczko/rpmbuild/BUILD/lftp-4.8.3/conftest 
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.27.9000-40.fc29.x86_64
*** %n in writable segment detected ***

Program received signal SIGABRT, Aborted.
0x00007ffff7e1e19f in raise () from /lib64/libc.so.6
(gdb) bt
terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'
Aborted (core dumped)
[tkloczko@domek lftp-4.8.3]$

Comment 5 Tomasz Kłoczko 2018-07-29 14:18:11 UTC
Created attachment 1471370 [details]
autoconf generated conftest.c program which crashes gdb.

autoconf generated conftest.c program which crashes gdb.

Comment 6 Tomasz Kłoczko 2018-07-29 14:24:11 UTC
After installing glibc debuginfo package.

(gdb) r
Starting program: /home/tkloczko/rpmbuild/BUILD/lftp-4.8.3/conftest 
warning: Loadable section ".note.gnu.property" outside of ELF segments
*** %n in writable segment detected ***

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	  return ret;
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7e08565 in __GI_abort () at abort.c:79
#2  0x00007ffff7e612a7 in __libc_message (action=action@entry=(do_abort | do_backtrace), fmt=fmt@entry=0x7ffff7f6de97 "%s") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff7e6136a in __GI___libc_fatal (message=message@entry=0x7ffff7f6f400 "*** %n in writable segment detected ***\n") at ../sysdeps/posix/libc_fatal.c:191
#4  0x00007ffff7e392ce in _IO_vfprintf_internal (s=s@entry=0x7fffffffdd80, format=format@entry=0x5555555580a8 <fmtstring> "%d %n", ap=ap@entry=0x7fffffffdec0)
    at vfprintf.c:1637
terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'
Aborted (core dumped)

Comment 7 Tomasz Kłoczko 2018-07-29 14:33:46 UTC
Just in case if it is not obvious what I'm trying to do with lftp ..

I'm trying to build it with LTO and seems lftp is OK however that is quite possible that LTO options which I'm passing to the CFLAGS, CXXFLAGS and LDFLAGS may be causing that simple test program is core dumping and additionally core file generated out of executable with such option is crashing gdb as well.

In other words here it may be not one but two bugs.
Should I raise second ticket against gcc?

Comment 8 Jan Kratochvil 2018-07-30 16:55:44 UTC
Created attachment 1471593 [details]
dn.c

gcc -o dn dn.c -Wall -O2;gdb -q -ex r -ex bt ./dn

...
#4  0x00007ffff7e472ce in _IO_vfprintf_internal (s=s@entry=0x7fffffffceb0, format=format@entry=0x4052d0 "%n", 
    ap=ap@entry=0x7fffffffcff0) at vfprintf.c:1637
terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'
Aborted

Comment 9 Jan Kratochvil 2018-07-30 17:27:22 UTC
As GDB cannot backtrace even the crashed GDB on Rawhide:
gcc -o dn dn.c -Wall -O2;gdb -q -ex r -ex bt --args gdb -q -ex r -ex bt ./dn
...
terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'
...
terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'

One can get a backtrace by:
dnf copr enable jankratochvil/lldb;dnf install lldb-experimental;gcc -o dn dn.c -Wall -O2;lldb-experimental gdb -o 'r -q -ex r -ex bt ./dn'
* thread #1, name = 'gdb', stop reason = signal SIGABRT
  * frame #0: 0x00007ffff737219f libc.so.6`__GI_raise(sig=6) at raise.c:51
    frame #1: 0x00007ffff735c565 libc.so.6`__GI_abort at abort.c:79
    frame #2: 0x00007ffff75a89eb libstdc++.so.6`__gnu_cxx::__verbose_terminate_handler() (.cold.1) at vterminate.cc:95
    frame #3: 0x00007ffff75aee4c libstdc++.so.6`__cxxabiv1::__terminate(void (*)()) at eh_terminate.cc:47
    frame #4: 0x00007ffff75aeea7 libstdc++.so.6`std::terminate() at eh_terminate.cc:57
    frame #5: 0x00007ffff75af108 libstdc++.so.6`__cxxabiv1::__cxa_throw(obj=<unavailable>, tinfo=<unavailable>, dest=<unavailable>)(void *)) at eh_throw.cc:95
    frame #6: 0x000055555587b682 gdb`::throw_exception_cxx(exception=<unavailable>) at common-exceptions.c:303
    frame #7: 0x000055555587b6ef gdb`::throw_it(return_reason, errors, const char *, typedef __va_list_tag __va_list_tag *) [inlined] throw_exception(exception=<unavailable>) at common-exceptions.c:317
    frame #8: 0x000055555587b6e4 gdb`::throw_it(reason=<unavailable>, error=<unavailable>, fmt=<unavailable>, ap=<unavailable>) at common-exceptions.c:373
    frame #9: 0x000055555587b92c gdb`throw_verror(error=<unavailable>, fmt=<unavailable>, ap=<unavailable>) at common-exceptions.c:379
    frame #10: 0x000055555587b9ea gdb`throw_error(error=<unavailable>, fmt=<unavailable>) at common-exceptions.c:394
    frame #11: 0x00005555558bbe9d gdb`dwarf_expr_reg_to_entry_parameter(frame_info*, call_site_parameter_kind, call_site_parameter_u, dwarf2_per_cu_data**) at dwarf2loc.c:1296
    frame #12: 0x00005555558bc0bc gdb`::value_of_dwarf_reg_entry(type=0x0000555556fee670, frame=0x0000555556fd7190, kind=CALL_SITE_PARAMETER_DWARF_REG, kind_u=<unavailable>) at dwarf2loc.c:1417
    frame #13: 0x00005555558bc1db gdb`::value_of_dwarf_block_entry(type=0x0000555556fee670, frame=0x0000555556fd7190, block="U\x1d", block_len=<unavailable>) at dwarf2loc.c:1465
    frame #14: 0x00005555558bc2fb gdb`::loclist_read_variable_at_entry(symbol=0x0000555556ff69a0, frame=0x0000555556fd7190) at dwarf2loc.c:4528
    frame #15: 0x00005555559d2a18 gdb`read_frame_arg(symbol*, frame_info*, frame_arg*, frame_arg*) at stack.c:370
    frame #16: 0x00005555559d3493 gdb`::print_frame_args(func=<unavailable>, frame=0x0000555556fd7190, num=-1, stream=0x0000555556959f20) at stack.c:681
    frame #17: 0x00005555559d3eb1 gdb`print_frame_info(frame_info*, int, print_what, int, int) at stack.c:1203
    frame #18: 0x00005555559d4b00 gdb`backtrace_command(char const*, int) at stack.c:1790
    frame #19: 0x000055555577705a gdb`cmd_func(cmd_list_element*, char const*, int) at cli-decode.c:1857
    frame #20: 0x0000555555a1940a gdb`execute_command(char const*, int) at top.c:630
    frame #21: 0x0000555555958608 gdb`catch_command_errors(void (*)(char const*, int), char const*, int) at main.c:380
    frame #22: 0x0000555555959a02 gdb`gdb_main(captured_main_args*) at main.c:1207
    frame #23: 0x00005555556abaff gdb`main(argc=<unavailable>, argv=<unavailable>) at gdb.c:40
    frame #24: 0x00007ffff735e0e3 libc.so.6`__libc_start_main(main=(gdb`main at gdb.c:29), argc=7, argv=0x00007fffffffd1b8, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffd1a8) at libc-start.c:308
    frame #25: 0x00005555556af46a gdb`_start + 42

Comment 10 Jan Kratochvil 2018-07-30 17:47:15 UTC
*** Bug 1609714 has been marked as a duplicate of this bug. ***

Comment 11 Sergio Durigan Junior 2018-07-30 19:42:41 UTC
Would it be possible for you guys to test this scratch build:

https://koji.fedoraproject.org/koji/taskinfo?taskID=28721550

?  I can reproduce the issue with the GDB that's installed via dnf on rawhide, but I cannot reproduce the issue with this scratch build.

Comment 12 Sergio Durigan Junior 2018-07-30 20:04:19 UTC
After some investigation, Jan and I have tracked down the problem to Bug 1609577.  I have now triggered a new GDB build on Rawhide which should fix the problem.  I'm still leaving the needinfo flag just to make sure that this new build will work for Tomasz and Severin.

Comment 13 Severin Gehwolf 2018-07-31 08:08:26 UTC
(In reply to Sergio Durigan Junior from comment #12)
> After some investigation, Jan and I have tracked down the problem to Bug
> 1609577.  I have now triggered a new GDB build on Rawhide which should fix
> the problem.  I'm still leaving the needinfo flag just to make sure that
> this new build will work for Tomasz and Severin.

8.1.90.20180727-38.fc29 seems to work for us. Thanks! java-1.8.0-openjdk builds work in rawhide. Note, that they perform some bt check in %check of our spec[1]:
https://apps.fedoraproject.org/koschei/package/java-1.8.0-openjdk?collection=f29
https://koji.fedoraproject.org/koji/taskinfo?taskID=28726317

[1] https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/blob/master/f/java-1.8.0-openjdk.spec#_1893

Comment 14 Tomasz Kłoczko 2018-07-31 08:34:05 UTC
Looks like new gdb is not crashing.

What about second thing related to segv of the autoconf contest test program?
glibc or gcc issue?

[tkloczko@domek SPECS]$ gdb conftest 
GNU gdb (GDB) Fedora 8.1.90.20180727-38.fc29
Copyright (C) 2018 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-redhat-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 conftest...done.
(gdb) r
Starting program: /home/tkloczko/rpmbuild/SPECS/conftest 
warning: Loadable section ".note.gnu.property" outside of ELF segments
*** %n in writable segment detected ***

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	  return ret;
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7e08565 in __GI_abort () at abort.c:79
#2  0x00007ffff7e612a7 in __libc_message (action=action@entry=(do_abort | do_backtrace), fmt=fmt@entry=0x7ffff7f6de97 "%s") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff7e6136a in __GI___libc_fatal (message=message@entry=0x7ffff7f6f400 "*** %n in writable segment detected ***\n") at ../sysdeps/posix/libc_fatal.c:191
#4  0x00007ffff7e392ce in _IO_vfprintf_internal (s=s@entry=0x7fffffffdda0, format=format@entry=0x5555555580a8 <fmtstring> "%d %n", ap=ap@entry=0x7fffffffdee0)
    at vfprintf.c:1637
#5  0x00007ffff7ef1d73 in ___vsprintf_chk (s=0x555555558040 <buf> "123 ", flags=1, slen=100, format=0x5555555580a8 <fmtstring> "%d %n", args=args@entry=0x7fffffffdee0)
    at vsprintf_chk.c:83
#6  0x00007ffff7ef1c9e in ___sprintf_chk (s=<optimized out>, flags=<optimized out>, slen=<optimized out>, format=<optimized out>) at sprintf_chk.c:31
#7  0x00005555555550e5 in sprintf (__fmt=0x5555555580a8 <fmtstring> "%d %n", __s=0x555555558040 <buf> "123 ") at /usr/include/bits/stdio2.h:36
#8  main () at conftest.c:219
(gdb)

Comment 15 Sergio Durigan Junior 2018-07-31 20:15:40 UTC
(In reply to Tomasz Kłoczko from comment #14)
> Looks like new gdb is not crashing.

Thanks for testing.  I am closing this bug then.

> What about second thing related to segv of the autoconf contest test program?
> glibc or gcc issue?

This is a different issue.  Does this program crash only inside GDB?

Comment 16 Sergio Durigan Junior 2018-07-31 20:16:15 UTC
(In reply to Severin Gehwolf from comment #13)
> (In reply to Sergio Durigan Junior from comment #12)
> > After some investigation, Jan and I have tracked down the problem to Bug
> > 1609577.  I have now triggered a new GDB build on Rawhide which should fix
> > the problem.  I'm still leaving the needinfo flag just to make sure that
> > this new build will work for Tomasz and Severin.
> 
> 8.1.90.20180727-38.fc29 seems to work for us. Thanks! java-1.8.0-openjdk
> builds work in rawhide. Note, that they perform some bt check in %check of
> our spec[1]:
> https://apps.fedoraproject.org/koschei/package/java-1.8.0-
> openjdk?collection=f29
> https://koji.fedoraproject.org/koji/taskinfo?taskID=28726317
> 
> [1]
> https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/blob/master/f/java-1.8.
> 0-openjdk.spec#_1893

Thanks for testing, Severin.  I closed the bug.


Note You need to log in before you can comment on or make changes to this bug.