From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E49703851C0A; Sat, 13 Mar 2021 19:07:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E49703851C0A From: "wsnyder at wsnyder dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.31 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wsnyder at wsnyder dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Mar 2021 19:07:48 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27576 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=3D13307&action=3Ded= it Testcase =3D=3D 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 __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=3D99579 but appears the compil= er is creating reasonable code. =3D=3D gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 =3D=3D glibc verison glibc-source/focal-updates 2.31-0ubuntu9.2 all =3D=3D cat /etc/*release DISTRIB_DESCRIPTION=3D"Ubuntu 20.04 LTS" =3D=3D cat /proc/cpuinfo ... AMD Ryzen 9 3950X 16-Core --=20 You are receiving this mail because: You are on the CC list for the bug.=