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 - 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
Summary: bash: xmalloc: ../bash/shell.c:1596: cannot allocate 5 bytes (0 bytes allocat...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-29 07:36 UTC by Vladimir Davydov
Modified: 2012-11-02 12:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-02 12:48:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
This simple program fails on Ubuntu 12.04 with RHEL6.3 kernel if compiled on CentOS 5 i386 as -static (262.25 KB, application/x-gzip)
2012-10-29 07:36 UTC, Vladimir Davydov
no flags Details

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.


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