Bug 494218 - mkdir/chdir loop lockups kernel and/or triggers OOM.
Summary: mkdir/chdir loop lockups kernel and/or triggers OOM.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: fs-maint
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-05 17:15 UTC by Vitaly Mayatskikh
Modified: 2023-09-14 01:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-03 12:37:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vitaly Mayatskikh 2009-04-05 17:15:31 UTC
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 21:28:37 UTC
Confirmed this still happens.  Not unique to any particular filesystem.

Comment 3 RHEL Program Management 2014-03-07 13:32:59 UTC
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 Program Management 2014-06-03 12:37:19 UTC
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).

Comment 5 Red Hat Bugzilla 2023-09-14 01:15:52 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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