Bug 835483

Summary: Make segfaults or hangs with RH patches applied
Product: Red Hat Enterprise Linux 6 Reporter: Jon Archer <jon>
Component: makeAssignee: Patsy Griffin <pfrankli>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: unspecified Docs Contact: Clayton Spicer <cspicer>
Priority: unspecified    
Version: 6.3CC: law, mcermak, mnewsome, pfrankli
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: make-3.81-23.el6 Doc Type: Release Note
Doc Text:
The *make* utility no longer terminates unexpectedly when processing `$$eval` commands or the `$(shell)` construct. Due to bugs in the _make_ package, the *make* utility sometimes terminated unexpectedly when processing files which contained `$$eval` commands or `$(shell)` processes. These bugs have been fixed, and *make* no longer crashes in these situations.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 21:13:59 UTC Type: Bug
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: 1271375    

Description Jon Archer 2012-06-26 10:20:33 UTC
Description of problem:
We are running a compilation and it seems that make either causes the system to hang, or segfaults. 
We have rebuild the version 3.81-20 RPM without patches 8,11 and 14 applied and this seems to allow our build to complete successfully, also using a compiled from vanilla source make binary allows the build to complete successfully.

We are still working on narrowing it down but it seems that patch 8 (rlimit patch) causes the freeze, while 11(fdleak) or 14 (copy-on-expand) cause the segfault.

For reference this build works successfully everytime on Debian or Ubuntu based systems, but we prefer to use RHEL. 

Also for reference the build process we are going through is a modified version of the Android Source tree.

Version-Release number of selected component (if applicable):
Redhat RPM 3.81-20
Vanilla source 3.81


How reproducible:
Every time

Steps to Reproduce:
1.use default make from RHEL
2.run build
3.Crash and/or segfault
  
Actual results:
Non completed build

Expected results:
completed build


Additional info:

Comment 2 Petr Machata 2012-06-26 12:12:55 UTC
Would you be so kind as to provide stack backtrace of the crash?  In the mean time I'll try to reproduce the problem with existing Android tree.  All the patches are there for a reason.  There might be unintended consequences, but we can't simply turn them off.

Comment 3 Jon Archer 2012-06-26 12:37:03 UTC
Hi,
As soon as we can provide any backtraces etc we will do,

Agreed about not turning them off, I guess this was more of a "work in progress/ we've found a bug has anyone else ticket"

Our main reason for disabling the patches was due to the fact this stuff compiles successfully on an Ubuntu box so we looked at the source used to generate their make package and found it to not contain said patches, running our compile with a version of make compiled from the debian sources was successful.

Comment 4 Petr Machata 2012-06-26 13:35:29 UTC
Am I missing something, or does that involve cross-compilation?

(In reply to comment #2)
> Would you be so kind as to provide stack backtrace of the crash?

Or better yet, core dump.

Comment 5 Petr Machata 2012-06-26 13:36:56 UTC
(In reply to comment #3)
> Our main reason for disabling the patches was due to the fact this stuff
> compiles successfully on an Ubuntu box so we looked at the source used to

Understood, thanks for the effort, at least now we know approximately where to look.

Comment 6 Jon Archer 2012-06-26 13:49:09 UTC
(In reply to comment #4)
> Am I missing something, or does that involve cross-compilation?
By this do you mean the Android build? yes it does involve cross compile, we have the relevant toolchains provided.

 
> (In reply to comment #2)
> > Would you be so kind as to provide stack backtrace of the crash?
> 
> Or better yet, core dump.
We don't seem to be getting a dump, it seems to be truncated.

Comment 7 Jon Archer 2012-07-04 10:47:08 UTC
So just an update on this:
I have re-rolled the make RPM without patch 8 applied (rlimit) and this seems to resolve the issues we are seeing.

Comment 8 Petr Machata 2012-07-09 11:10:11 UTC
(In reply to comment #7)
> I have re-rolled the make RPM without patch 8 applied (rlimit) and this
> seems to resolve the issues we are seeing.

Good, that messes with memory limits, so segmentation violations might occur.  Maybe we are somehow calling rlimit (to restore the original stack limit) from a context where there's a lot of stack used.  I'll take a look at code paths, but a stack trace might be useful.  Can you reproduce the failure from gdb?


(In reply to comment #6)
> > Or better yet, core dump.
> We don't seem to be getting a dump, it seems to be truncated.

Does 'ulimit -c unlimited' fix this by any chance?

Comment 9 Jon Archer 2012-07-09 11:14:35 UTC
Yeah, the problem does seem to be caused by limitations caused by that patch. Some of the process issues generally occur around java compile processes.

The ulimit command doesn't seem to have an effect as we are running these builds as users. even making changes to /etc/security/limits.conf doesn't seem to have an effect, although I haven't given it too much time/effort.

Comment 10 Jon Archer 2012-07-23 11:49:26 UTC
OK so the "Patch 8" fix seemed to be a smokescreen.

It seemed to resolve the issues we were seeing, but didn't realise it was causing issues elsewhere.

http://savannah.gnu.org/bugs/?24588#attached

Seems to have had a positive effect.

so we're now running from the original 3.81-20 make rpm(all rhel patches applied) with that patch applied.

Comment 11 Jon Archer 2012-07-25 10:42:30 UTC
Further to this:

So Patch 8 is still causing segfaults with java compilations.

The Savanah patch is required to resolve a different issue that we were seeing, but looked to be all one problem.

I have now re-rolled the Make RPM with patch 8 removed and the Savanah patch applied..

We haven't had a segfault yet and our builds seem to run to completion each time.

Comment 12 RHEL Program Management 2012-09-07 05:29:28 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 21 errata-xmlrpc 2016-05-10 21:13:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0827.html