public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "wsnyder at wsnyder dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/27576] New: gmon.out not consistently created
Date: Sat, 13 Mar 2021 19:07:47 +0000	[thread overview]
Message-ID: <bug-27576-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27576

            Bug ID: 27576
           Summary: gmon.out not consistently created
           Product: glibc
           Version: 2.31
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: wsnyder at wsnyder dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 13307
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13307&action=edit
Testcase

== Description

Type "make" in this tarball's directory.

This will show (extra lines omitted):

  g++  -pg -O0  -c -o Vt_case_huge_prof__main.o Vt_case_huge_prof__main.ii
  @@@@@ Did we get a gmon?
  make: [Makefile:15: x] Error 1 (ignored)

  g++  -pg -Os  -c -o Vt_case_huge_prof__main.o Vt_case_huge_prof__main.ii
  @@@@@ Did we get a gmon?
    4554816     28 -rw-rw-r--   1 user  user     26943 Mar 13 11:33 ./gmon.out

  g++  -pg -O0  -c -o Vt_case_huge_prof__main.o Vt_case_huge_prof__main__ok.ii
  @@@@@ Did we get a gmon?
    4554816    884 -rw-rw-r--   1 user  user    897414 Mar 13 11:33 ./gmon.out


In short gcc -pg with -O0 is not reliably creating a gmon.

The problem goes away using -Os.

The problem goes away if line 60549 of ~/d/case/Vt_case_huge_prof__main.ii

    std::array<CData , 16384> __Vtablechg1;

is changed into

    CData __Vtablechg1[16384];

Others have reported the problem appears timing related and sometimes gmon.out
will get produced but on my system it is completely reliably broken.

Experiments show clang++ (with same glibc on same system) gives same
misbehavior.

While this "feels" like a memory corruption sort of bug, the program is
sanitizer and warning clean. This was originally reported as GCC bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99579 but appears the compiler is
creating reasonable code.

== gcc --version

gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

== glibc verison

glibc-source/focal-updates 2.31-0ubuntu9.2 all

== cat /etc/*release

DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"

== cat /proc/cpuinfo

... AMD Ryzen 9 3950X 16-Core

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-03-13 19:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13 19:07 wsnyder at wsnyder dot org [this message]
2021-03-13 20:22 ` [Bug libc/27576] " wsnyder at wsnyder dot org
2022-08-03 19:58 ` leo at yuriev dot ru
2022-12-16 19:56 ` pinskia at gcc dot gnu.org
2022-12-16 19:57 ` pinskia at gcc dot gnu.org
2022-12-16 19:57 ` pinskia at gcc dot gnu.org
2023-02-10 10:56 ` skissane at gmail dot com
2023-02-11  9:15 ` skissane at gmail dot com
2023-02-23  2:01 ` cvs-commit at gcc dot gnu.org
2023-04-28 12:13 ` cvs-commit at gcc dot gnu.org
2023-04-28 14:35 ` cvs-commit at gcc dot gnu.org
2023-04-28 14:35 ` cvs-commit at gcc dot gnu.org
2023-04-28 17:23 ` cvs-commit 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-27576-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@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: 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).