Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 696615

Summary: gcov stuck in infinite loop
Product: Red Hat Enterprise Linux 6 Reporter: Olle Liljenzin <olle>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED INSUFFICIENT_DATA QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: law, mpolacek, olle, ovasik, tlavigne
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-10 13:28:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1056252    
Attachments:
Description Flags
test case to reproduce the bug none

Description Olle Liljenzin 2011-04-14 12:43:53 UTC
Created attachment 492086 [details]
test case to reproduce the bug

Description of problem:
gcov hangs on some input files

Version-Release number of selected component (if applicable):
gcc-4.1.2-50.el5, gcc44-4.4.4-13.el5

How reproducible:
Always

Steps to Reproduce:
1. download and unpack the attached tar file
2. cd gcov-bug
3. gcov -a t.cpp

Actual results:
gcov loops in accumulate_line_counts

Expected results:
Should create the file t.E.gcov

Comment 1 Jeff Law 2013-11-26 20:19:16 UTC
This is not something we are going to try and fix at this stage in the RHEL 5 lifecycle.  However, this is still an issue for RHEL 6 and beyond, so I am moving this bug to the RHEL 6 product.

Comment 3 RHEL Program Management 2013-11-29 23:47:34 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Marek Polacek 2014-02-11 18:58:14 UTC
This is "fixed" in gcov in 4.7/4.8/4.9, but then it says:
t.gcno:version '401p', prefer '409e'

gcov: out of memory allocating 7020434128 bytes after a total of 135168 bytes

Comment 5 Jeff Law 2014-02-11 20:06:55 UTC
Presumably that's using t.gcno from the bug itself -- odds are the current tools aren't capable of interpreting the older gcov output file.

Does it work if you regenerate the .gcda/.gcno files?

Comment 8 Marek Polacek 2014-02-12 17:59:42 UTC
(In reply to Jeff Law from comment #5)
> Does it work if you regenerate the .gcda/.gcno files?

I'm afraid I can't do that, because for that I'd need to run the application, but the attached sources don't contain main () ...

Comment 10 Jeff Law 2014-03-12 20:28:57 UTC
Olle,

We really need the sources so that we can ensure this bug is fully addressed.  While we know that gcov isn't currently hanging with the data files you've provided, we still have concerns about whether or not this bug has really been fixed or has just gone latent.

The only way to be certain is to verify with both the data files you've already provided and with the original source files.

Comment 11 Olle Liljenzin 2014-03-13 08:36:11 UTC
I'm sorry but I have moved to a new employment and now I don't have access to the code I used when reporting the bug. I could ask someone still working there for help, but they have probably upgraded both the source code and the build machines it was produced on.

This problem showed up in one place in an application that was built from millions line of source code. I tried to scale it down to a small and isolated test case, but then the problem disappeared. That was the reason for providing a preprocessed source file that I can't reproduce now.

Comment 12 Jeff Law 2014-03-13 22:10:12 UTC
Thanks Olle.

I think I'll probably have someone dig deeper into the memory allocation failure to verify what's happening with that issue, but probably won't take it further than that.  Obviously if you run into another case where it hangs, definitely let us know.