public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/30837] New: [gdb/symtab, index-cache] data race on current_inferior_ Date: Fri, 08 Sep 2023 14:27:01 +0000 [thread overview] Message-ID: <bug-30837-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=30837 Bug ID: 30837 Summary: [gdb/symtab, index-cache] data race on current_inferior_ Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- Created attachment 15106 --> https://sourceware.org/bugzilla/attachment.cgi?id=15106&action=edit gdb.log When building gdb with -fsanitize=threads and using soon to be submitted target board cc-with-index-cache, I run into a data race in test-case gdb.ada/non-ascii-utf-8.exp ... ==================^M ^[[1m^[[31mWARNING: ThreadSanitizer: data race (pid=25220)^M ^[[1m^[[0m^[[1m^[[34m Read of size 8 at 0x000003342928 by thread T12:^M ^[[1m^[[0m #0 gdb::ref_ptr<inferior, refcounted_object_ref_policy>::get() const /data/vries/gdb/src/gdb/../gdbsupport/gdb_ref_ptr.h:132 (gdb+0xa690b8)^M #1 current_inferior() /data/vries/gdb/src/gdb/inferior.c:57 (gdb+0xa63b74)^M #2 target_supports_terminal_ours() /data/vries/gdb/src/gdb/target.c:1121 (gdb+0xfaefd4)^M #3 vwarning(char const*, __va_list_tag*) /data/vries/gdb/src/gdb/utils.c:147 (gdb+0x10e54c5)^M #4 warning(char const*, ...) /data/vries/gdb/src/gdbsupport/errors.cc:34 (gdb+0x1dc04e4)^M #5 ada_encode_1 /data/vries/gdb/src/gdb/ada-lang.c:1000 (gdb+0x47d348)^M #6 ada_encode[abi:cxx11](char const*, bool) /data/vries/gdb/src/gdb/ada-lang.c:1159 (gdb+0x47dd12)^M #7 write_cooked_index /data/vries/gdb/src/gdb/dwarf2/index-write.c:1142 (gdb+0x832e42)^M #8 write_gdbindex /data/vries/gdb/src/gdb/dwarf2/index-write.c:1236 (gdb+0x83348b)^M ... ^M ^[[1m^[[34m Previous write of size 8 at 0x000003342928 by main thread:^M ^[[1m^[[0m #0 gdb::ref_ptr<inferior, refcounted_object_ref_policy>::reset(inferior*) /data/vries/gdb/src/gdb/../gdbsupport/gdb_ref_ptr.h:125 (gdb+0xa6a2bf)^M #1 gdb::ref_ptr<inferior, refcounted_object_ref_policy>::operator=(gdb::ref_ptr<inferior, refcounted_object_ref_policy>&&) /data/vries/gdb/src/gdb/../gdbsupport/gdb_ref_ptr.h:113 (gdb+0xa691cc)^M #2 set_current_inferior(inferior*) /data/vries/gdb/src/gdb/inferior.c:66 (gdb+0xa63bf6)^M #3 switch_to_inferior_no_thread(inferior*) /data/vries/gdb/src/gdb/inferior.c:714 (gdb+0xa66df9)^M #4 scoped_restore_current_thread::restore() /data/vries/gdb/src/gdb/thread.c:1397 (gdb+0xfe1f9b)^M #5 scoped_restore_current_thread::~scoped_restore_current_thread() /data/vries/gdb/src/gdb/thread.c:1415 (gdb+0xfe20c9)^M #6 scoped_restore_current_pspace_and_thread::~scoped_restore_current_pspace_and_thread() /data/vries/gdb/src/gdb/progspace-and-thread.h:29 (gdb+0x628ef7)^M #7 bp_loc_is_permanent /data/vries/gdb/src/gdb/breakpoint.c:8532 (gdb+0x609bed)^M #8 code_breakpoint::add_location(symtab_and_line const&) /data/vries/gdb/src/gdb/breakpoint.c:8509 (gdb+0x609acc)^M #9 internal_breakpoint::internal_breakpoint(gdbarch*, bptype, unsigned long) /data/vries/gdb/src/gdb/breakpoint.c:350 (gdb+0x6282a3)^M #10 create_internal_breakpoint /data/vries/gdb/src/gdb/breakpoint.c:3454 (gdb+0x5f71c0)^M #11 create_internal_breakpoint /data/vries/gdb/src/gdb/breakpoint.c:3485 (gdb+0x5f7346)^M #12 create_exception_master_breakpoint_hook /data/vries/gdb/src/gdb/breakpoint.c:3856 (gdb+0x5f86dc)^M #13 create_exception_master_breakpoint /data/vries/gdb/src/gdb/breakpoint.c:3882 (gdb+0x5f8899)^M #14 breakpoint_re_set() /data/vries/gdb/src/gdb/breakpoint.c:13262 (gdb+0x61c3f1)^M #15 symbol_file_command(char const*, int) /data/vries/gdb/src/gdb/symfile.c:1686 (gdb+0xf44c8d)^M #16 file_command /data/vries/gdb/src/gdb/exec.c:554 (gdb+0x94f99f)^M ... -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-09-08 14:27 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-08 14:27 vries at gcc dot gnu.org [this message] 2023-11-27 20:15 ` [Bug symtab/30837] " cvs-commit at gcc dot gnu.org 2023-11-27 23:28 ` tromey at sourceware dot org 2023-11-30 17:02 ` tromey at sourceware dot org 2023-12-02 0:23 ` tromey at sourceware dot org 2023-12-04 15:54 ` tromey at sourceware dot org 2024-01-19 16:35 ` tromey at sourceware dot org 2024-02-12 19:08 ` tromey at sourceware dot org 2024-02-13 21:04 ` tromey at sourceware dot org 2024-02-14 12:33 ` tromey at sourceware dot org 2024-03-12 14:41 ` tromey at sourceware dot org 2024-03-26 15:55 ` cvs-commit at gcc dot gnu.org 2024-03-26 15:56 ` tromey at sourceware dot org 2024-05-17 14:17 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-30837-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).