Bug 494218 - mkdir/chdir loop lockups kernel and/or triggers OOM. [NEEDINFO]
mkdir/chdir loop lockups kernel and/or triggers OOM.
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: fs-maint
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-05 13:15 EDT by Vitaly Mayatskikh
Modified: 2014-06-03 08:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-03 08:37:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
pm-rhel: needinfo? (vmayatsk)


Attachments (Terms of Use)

  None (edit)
Description Vitaly Mayatskikh 2009-04-05 13:15:31 EDT
Compile and run:

#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

#define DIRNAME "dcache-test-dir"

int main(void) {
        int i = 0;
        char dir[1024];
        
        getcwd(dir, sizeof(dir));
        
        while (1) {
                if (mkdir(DIRNAME, S_IRWXU) < 0) {
                        perror("Can't mkdir");
                        break;
                }
                if (chdir(DIRNAME) < 0) {
                        perror("Can't chdir");
                        break;
                }
                i++;
        }

        printf("Created/entered into %d directories!\n", i);
        /* Cleanup */
        chdir(dir);
        system("rm -rf " DIRNAME);
        return 1;
}

I've seen CPU soft lockup message first, and several minutes after that - OOM handler has started to kill random processes. Tested on kernels 2.6.9-78.0.17.el4 and 2.6.18-137.el5.
Comment 2 Eric Sandeen 2013-05-24 17:28:37 EDT
Confirmed this still happens.  Not unique to any particular filesystem.
Comment 3 RHEL Product and Program Management 2014-03-07 08:32:59 EST
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.
Comment 4 RHEL Product and Program Management 2014-06-03 08:37:19 EDT
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).

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