Bug 123817 - OS freezes.....
OS freezes.....
Status: CLOSED DUPLICATE of bug 73733
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-20 14:17 EDT by Need Real Name
Modified: 2007-11-30 17:07 EST (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2004-05-20 14:17:29 EDT
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): 
glibc-2.3.2-95.6:

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 
RAM.
Comment 1 Need Real Name 2004-05-20 14:18:49 EDT
This is the C++ code - it should be executed as root.

// Sample prog locks out scheduler when run as root
// COMPILE
// 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, 
GLX_DOUBLEBUFFER, True, None};
Bool                    WaitForNotify(Display *d, XEvent *e, char 
*arg);

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

        cerr << "MLockall\n";

// Comment out this to stop locking
        mlockall(MCL_FUTURE|MCL_CURRENT);

// 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), 
AttributeList12);
        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 = 
ExposureMask|StructureNotifyMask|KeyPressMask;
        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";

        exit(0);
}

/***************************************************/
Bool WaitForNotify(Display *d, XEvent *e, char *arg)
{
        return (e->type == MapNotify) && (e->xmap.window == (Window)
arg);
}
Comment 2 Jakub Jelinek 2004-05-20 15:25:29 EDT
This has nothing to do with glibc.
Comment 3 Arjan van de Ven 2004-07-07 03:53:56 EDT

*** This bug has been marked as a duplicate of 73733 ***
Comment 4 Red Hat Bugzilla 2006-02-21 14:03:23 EST
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.