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.
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); }
This has nothing to do with glibc.
*** This bug has been marked as a duplicate of 73733 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.