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 607404 - UV support: makedumpfile: output files filling ramdisk
Summary: UV support: makedumpfile: output files filling ramdisk
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kexec-tools
Version: 6.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 6.0
Assignee: Cong Wang
QA Contact: Han Pingtian
URL:
Whiteboard:
Depends On:
Blocks: 555548
TreeView+ depends on / blocked
 
Reported: 2010-06-24 02:24 UTC by George Beshers
Modified: 2013-09-30 02:18 UTC (History)
6 users (show)

Fixed In Version: kexec-tools-2_0_0-108_el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-15 14:29:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description George Beshers 2010-06-24 02:24:49 UTC
David,
Again the patches are upstream and may already be in the RHEL
packages - I have not checked.

George


Description:

A fix for the makedumpfile command is needed to make dumps work on UV.

makedumpfile's path FILENAME_BITMAP "/tmp/..." causes it to try to write
bitmap files to the ramdisk.  These can be very large if the machine has
lots of memory, and so writing the file can fail.

A TMPDIR environment variable is set in the script
/lib/mkinitrd/scripts/boot-kdump.sh. So this patch assumes that
the FILENAME_BITMAP path should be based at TMPDIR.

The patch looks like this:

Index: makedumpfile-1.3.5/makedumpfile.c
===================================================================
--- makedumpfile-1.3.5.orig/makedumpfile.c
+++ makedumpfile-1.3.5/makedumpfile.c
@@ -933,14 +933,21 @@ int
 open_dump_bitmap(void)
 {
        int i, fd;
+       char *tmpname;

-       if ((info->name_bitmap
-           = (char *)malloc(sizeof(FILENAME_BITMAP))) == NULL) {
+       tmpname = getenv("TMPDIR");
+       if (!tmpname)
+               tmpname = "/tmp";
+
+       if ((info->name_bitmap = (char *)malloc(sizeof(FILENAME_BITMAP) +
+                                               strlen(tmpname) + 1)) == NULL) {
                ERRMSG("Can't allocate memory for the filename. %s\n",
                    strerror(errno));
                return FALSE;
        }
-       strcpy(info->name_bitmap, FILENAME_BITMAP);
+       strcpy(info->name_bitmap, tmpname);
+       strcat(info->name_bitmap, "/");
+       strcat(info->name_bitmap, FILENAME_BITMAP);
        if ((fd = mkstemp(info->name_bitmap)) < 0) {
                ERRMSG("Can't open the bitmap file(%s). %s\n",
                    info->name_bitmap, strerror(errno));
Index: makedumpfile-1.3.5/makedumpfile.h
===================================================================
--- makedumpfile-1.3.5.orig/makedumpfile.h
+++ makedumpfile-1.3.5/makedumpfile.h
@@ -230,7 +230,7 @@ do { \
 #define BUFSIZE_FGETS          (1500)
 #define BUFSIZE_BITMAP         (4096)
 #define PFN_BUFBITMAP          (BITPERBYTE*BUFSIZE_BITMAP)
-#define FILENAME_BITMAP                "/tmp/kdump_bitmapXXXXXX"
+#define FILENAME_BITMAP                "kdump_bitmapXXXXXX"
 #define FILENAME_STDOUT                "STDOUT"

 /*
@@ -449,7 +449,7 @@ do { \
 #define KVER_MIN_SHIFT 16
 #define KERNEL_VERSION(x,y,z) (((x) << KVER_MAJ_SHIFT) | ((y) << KVER_MIN_SHIFT) | (z))
 #define OLDEST_VERSION         KERNEL_VERSION(2, 6, 15)/* linux-2.6.15 */
-#define LATEST_VERSION         KERNEL_VERSION(2, 6, 31)/* linux-2.6.31 */
+#define LATEST_VERSION         KERNEL_VERSION(2, 6, 32)/* linux-2.6.32 */

 /*
  * vmcoreinfo in /proc/vmcore


This patch is now upstream.  The original patch was separated into 2 patches
at Masayuki's request.  Both are applied.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Program Management 2010-06-24 02:52:53 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Marizol Martinez 2010-07-08 15:31:44 UTC
George -- Per your comment in the description, please verify and update this BZ
accordingly. Thanks!

Comment 5 Cong Wang 2010-07-09 07:37:15 UTC
Please don't copy and paste the patch into BZ. Attach it as a patch please.

Comment 7 releng-rhel@redhat.com 2010-11-15 14:29:13 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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