This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 835483 - Make segfaults or hangs with RH patches applied
Make segfaults or hangs with RH patches applied
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: make (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Patsy Franklin
Martin Cermak
Clayton Spicer
: Patch
Depends On:
Blocks: 1271375
  Show dependency treegraph
 
Reported: 2012-06-26 06:20 EDT by Jon Archer
Modified: 2016-05-10 17:13 EDT (History)
4 users (show)

See Also:
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 17:13:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jon Archer 2012-06-26 06:20:33 EDT
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 08:12:55 EDT
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 08:37:03 EDT
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 09:35:29 EDT
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 09:36:56 EDT
(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 09:49:09 EDT
(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 06:47:08 EDT
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 07:10:11 EDT
(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 07:14:35 EDT
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 07:49:26 EDT
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 06:42:30 EDT
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 Product and Program Management 2012-09-07 01:29:28 EDT
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 17:13:59 EDT
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

Note You need to log in before you can comment on or make changes to this bug.