Bug 123817 - OS freezes.....
Summary: OS freezes.....
Status: CLOSED DUPLICATE of bug 73733
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel   
(Show other bugs)
Version: 3.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-05-20 18:17 UTC by Need Real Name
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 19:03:23 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Need Real Name 2004-05-20 18:17:29 UTC
Description of problem:
Our in-house C code calls mlockall(MCL_CURRENT | MCL_FUTURE) to lock 
all current and future memory pages into RAM. When this routine gets 
executed it hangs the OS. Below (or on next page) is a sample C++ 
programme to demonstrate thi happening. It requires the nVidia 1.0-
4496 driver to be installed on the test machine.

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

How reproducible: Every time

Steps to Reproduce:
1. Install nVidia driver v1.0-4496
2. Compile the above/enclosed C++ code - compile line is shown in the 
top lines of comments
3. Run the compiled executable
Actual results:
OS seems to freeze....

Expected results: Should open a glx

Additional info: We are using machines based on the Intel E7505 
chipset fitted with an nVidia FX3000 AGP card, 2 x 3.06G Xeons and 1G 

Comment 1 Need Real Name 2004-05-20 18:18:49 UTC
This is the C++ code - it should be executed as root.

// Sample prog locks out scheduler when run as root
// g++ -g -Wall -W -g -Wno-unused-parameter -L/usr/X11R6/lib  -lglut -
lGL -lGLU -lglut glx.cpp -o glx  -lXi -lXmu

#include <stdio.h>
#include <sys/mman.h>
#include <iostream>
#include <string>
#include <GL/glx.h>
using namespace std;

Window                  win;
Display                 *dpy;
GLXWindow               gwin;
GLXContext              cx;

GLint                   AttributeList12[] = { GLX_RGBA, 
Bool                    WaitForNotify(Display *d, XEvent *e, char 

int main(int argc, char *argv[])
        XEvent                  event;
        XVisualInfo             *vi;
        Colormap                cmap;
        XSetWindowAttributes    swa;

        cerr << "MLockall\n";

// Comment out this to stop locking

// get a connection
        cerr << "XOpenDisplay\n";
        dpy = XOpenDisplay(0);

// Find a FBConfig that uses RGBA.  Note that no attribute list is
// needed since GLX_RGBA_BIT is a default attribute.

        cerr << "Create Visual\n";
        vi = glXChooseVisual(dpy, DefaultScreen(dpy), 
        cx = glXCreateContext(dpy, vi, 0, GL_TRUE);
        cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen),vi-
>visual, AllocNone);

        cerr << "Create Window\n";
        swa.colormap = cmap;
        swa.border_pixel = 0;
        swa.event_mask = 
        win = XCreateWindow(dpy, RootWindow(dpy, vi->screen), 0, 0, 
720, 576, 0, vi->depth, InputOutput,
        vi->visual, CWBorderPixel|CWColormap|CWEventMask, &swa);
        XMapWindow(dpy, win);
        XIfEvent(dpy, &event, WaitForNotify, (XPointer)win);
        glXMakeCurrent(dpy, win, cx);

        cerr << "Visual ID Created - now exiting: " << hex << vi-
>visualid << "\n";


Bool WaitForNotify(Display *d, XEvent *e, char *arg)
        return (e->type == MapNotify) && (e->xmap.window == (Window)

Comment 2 Jakub Jelinek 2004-05-20 19:25:29 UTC
This has nothing to do with glibc.

Comment 3 Arjan van de Ven 2004-07-07 07:53:56 UTC

*** This bug has been marked as a duplicate of 73733 ***

Comment 4 Red Hat Bugzilla 2006-02-21 19:03:23 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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