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 870914

Summary: bash: xmalloc: ../bash/shell.c:1596: cannot allocate 5 bytes (0 bytes allocated) when running 32-bit programs on Ubuntu 12.04 with RHEL 6.3 x86_64 kernel
Product: Red Hat Enterprise Linux 6 Reporter: Vladimir Davydov <vdavydov>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED NOTABUG QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3CC: khorenko
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-02 12:48:36 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:
Attachments:
Description Flags
This simple program fails on Ubuntu 12.04 with RHEL6.3 kernel if compiled on CentOS 5 i386 as -static none

Description Vladimir Davydov 2012-10-29 07:36:24 UTC
Created attachment 634902 [details]
This simple program fails on Ubuntu 12.04 with RHEL6.3 kernel if compiled on CentOS 5 i386 as -static

Description of problem:
Executing a shell script randomly fails if executed from a 32-bit program compiled as static on 64-bit systems with RHEL6.3 x86_64 kernel and newer glibc (2.15).

Version-Release number of selected component (if applicable):
2.6.32-279.11.1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Compile fork_exec_bash.c (attached) as static on a 32 bit Linux (I used CentOS5 i386):
$ gcc fork_exec_bash.c -o fork_exec_bash -static
[binary is also attached]
2. Install Ubuntu 12.04 and an RHEL6.3 on it:
# alien -d kernel-2.6.32-279.11.1.el6.x86_64.rpm
# dpkg -i kernel_2.6.32-280.11_amd64.deb
# update-initramfs -c -k 2.6.32-279.11.1.el6.x86_64
# update-grub
3. Boot into the installed kernel and run the compiled program
  
Actual results:
/bin/bash
/bin/bash
bash: xmalloc: ../bash/shell.c:1596: cannot allocate 5 bytes (0 bytes allocated)
Parent exited

Expected results:
/bin/bash
/bin/bash
/bin/bash
/bin/bash
...
[forever]

Additional info:
The problem is connected with the way RHEL-based kernel look up for a exec vm areas. They do it using arch_get_unmapped_exec_area instead of traditional arch_get_unmapped_exec_area.

Comment 1 Vladimir Davydov 2012-10-29 07:40:56 UTC
> Additional info:
> The problem is connected with the way RHEL-based kernel look up for a exec
> vm areas. They do it using arch_get_unmapped_exec_area instead of
> traditional arch_get_unmapped_exec_area.

mistype here: instead of arch_get_unmapped_area_topdown of course

Comment 3 Prarit Bhargava 2012-11-02 12:48:36 UTC
A few things:

1.  We don't support running the RHEL kernel on another OS.
2.  We don't support custom built kernels.
3.  We don't support running a custom built kernel running on another OS.

P.