public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/27576] New: gmon.out not consistently created
@ 2021-03-13 19:07 wsnyder at wsnyder dot org
  2021-03-13 20:22 ` [Bug libc/27576] " wsnyder at wsnyder dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: wsnyder at wsnyder dot org @ 2021-03-13 19:07 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-04-28 17:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 19:07 [Bug libc/27576] New: gmon.out not consistently created wsnyder at wsnyder dot org
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

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).