public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slyfox at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/97461] allocate_gcov_kvp() deadlocks in firefox LTO+PGO build (overridden malloc() recursion)
Date: Fri, 16 Oct 2020 15:09:03 +0000	[thread overview]
Message-ID: <bug-97461-4-0lWoeXvJWn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97461-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97461

--- Comment #2 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Original firefox lockup is slightly more complicated: malloc() call happens in
a constructor of external library (at _gpg_err_init()).

(gdb) bt
#0  __lll_lock_wait (futex=0x5591defd9720 <gInitLock>, private=0) at
lowlevellock.c:52
#1  0x00007f6e72d23305 in __GI___pthread_mutex_lock (mutex=0x5591defd9720
<gInitLock>) at ../nptl/pthread_mutex_lock.c:135
#2  0x00005591deeb60a1 in malloc_init_hard() ()
#3  0x00005591deebf75e in calloc ()
#4  0x00005591defa70df in allocate_gcov_kvp () at
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/libgcc/libgcov.h:441
#5  gcov_topn_add_value (count=1, use_atomic=1, increment_total=1, value=4096,
counters=0x5591df011520 <__gcov3._ZL16malloc_init_hardv>)
    at
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/libgcc/libgcov.h:489
#6  __gcov_topn_values_profiler_body (use_atomic=1, value=4096,
counters=0x5591df011520 <__gcov3._ZL16malloc_init_hardv>)
    at
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/libgcc/libgcov-profiler.c:103
#7  __gcov_topn_values_profiler_atomic (counters=0x5591df011520
<__gcov3._ZL16malloc_init_hardv>, value=4096)
    at
/var/tmp/portage/sys-devel/gcc-11.0.0_pre9999/work/gcc-11.0.0_pre9999/libgcc/libgcov-profiler.c:128
#8  0x00005591deeb6121 in malloc_init_hard() ()
#9  0x00005591deec052e in malloc ()
#10 0x00007f6e5c5ecddf in set_binding_values (domainname=0x7f6e58451245
"libgpg-error", dirnamep=0x7fffd54f39c8, codesetp=0x0) at bindtextdom.c:202
#11 0x00007f6e5c5ed071 in set_binding_values (codesetp=0x0,
dirnamep=0x7fffd54f39c8, domainname=<optimized out>) at bindtextdom.c:82
#12 __bindtextdomain (domainname=<optimized out>, dirname=<optimized out>) at
bindtextdom.c:320
#13 0x00007f6e5843cbc7 in _gpg_err_init () at /usr/lib64/libgpg-error.so.0
#14 0x00007f6e72d94cfe in call_init (l=<optimized out>, argc=argc@entry=3,
argv=argv@entry=0x7fffd54f3a68, env=env@entry=0x7fffd54f3a88) at dl-init.c:74
#15 0x00007f6e72d94de0 in call_init (env=0x7fffd54f3a88, argv=0x7fffd54f3a68,
argc=3, l=<optimized out>) at dl-init.c:37
#16 _dl_init (main_map=0x7f6e72db11a0, argc=3, argv=0x7fffd54f3a68,
env=0x7fffd54f3a88) at dl-init.c:121
#17 0x00007f6e72d8608a in _dl_start_user () at /lib64/ld-linux-x86-64.so.2
#18 0x0000000000000003 in  ()
#19 0x00007fffd54f4a83 in  ()
#20 0x00007fffd54f4a9c in  ()
#21 0x00007fffd54f4b15 in  ()
#22 0x0000000000000000 in  ()

  parent reply	other threads:[~2020-10-16 15:09 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 15:03 [Bug gcov-profile/97461] New: " slyfox at gcc dot gnu.org
2020-10-16 15:05 ` [Bug gcov-profile/97461] " slyfox at gcc dot gnu.org
2020-10-16 15:09 ` slyfox at gcc dot gnu.org [this message]
2020-10-16 15:16 ` slyfox at gcc dot gnu.org
2020-10-19  7:12 ` [Bug gcov-profile/97461] [11 Regression] " marxin at gcc dot gnu.org
2020-10-19  7:15 ` rguenth at gcc dot gnu.org
2020-10-19 13:42 ` marxin at gcc dot gnu.org
2020-10-19 13:46   ` Jan Hubicka
2020-10-19 13:46 ` hubicka at ucw dot cz
2020-10-19 14:15 ` marxin at gcc dot gnu.org
2020-10-19 14:51   ` Jan Hubicka
2020-10-19 14:52 ` hubicka at ucw dot cz
2020-10-19 14:58 ` marxin at gcc dot gnu.org
2020-10-27 10:50 ` cvs-commit at gcc dot gnu.org
2020-10-27 10:50 ` marxin at gcc dot gnu.org
2020-10-27 22:18 ` slyfox at gcc dot gnu.org
2020-10-29 10:19 ` marxin at gcc dot gnu.org
2020-10-29 14:53 ` slyfox at gcc dot gnu.org
2020-10-29 15:00 ` marxin at gcc dot gnu.org
2020-10-29 15:05 ` marxin at gcc dot gnu.org
2020-10-29 18:54 ` marxin at gcc dot gnu.org
2020-10-29 19:11 ` jakub at gcc dot gnu.org
2020-10-30  8:45 ` slyfox at gcc dot gnu.org
2020-10-30 23:37 ` slyfox at gcc dot gnu.org
2020-11-06 13:47 ` cvs-commit at gcc dot gnu.org
2020-11-06 13:49 ` marxin at gcc dot gnu.org
2020-11-09  9:57 ` marxin at gcc dot gnu.org
2020-12-04  7:01 ` marxin at gcc dot gnu.org
2021-01-21  9:26 ` rguenth at gcc dot gnu.org
2021-01-26 11:51 ` marxin at gcc dot gnu.org
2021-03-03 13:22 ` cvs-commit at gcc dot gnu.org
2021-03-03 13:27 ` marxin at gcc dot gnu.org
2021-03-03 13:31 ` jakub at gcc dot gnu.org
2021-03-03 14:49 ` marxin at gcc dot gnu.org
2021-03-03 15:14 ` lh_mouse at 126 dot com
2021-03-05 18:11 ` slyfox at gcc dot gnu.org
2021-03-06  8:19 ` marxin at gcc dot gnu.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-97461-4-0lWoeXvJWn@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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: link
Be 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).