Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 01-18-05, 02:45 AM   #1
filiga
FX 5700
 
Join Date: May 2003
Posts: 8
Unhappy Opengl + mlockall = system crash (SUSE 9.2, 6629)

Hello.

I have found that if an application first locks its memory and then tries to run OpenGL code the whole system will halt.

I have put a small sample program to the web for testing (you need SDL to compile it): http://www.tml.hut.fi/~tilmonen/gltest/

The app can be run with "./sdl-test" (test the app) or "./sdl-test --mlockall" (to produce a crash).

The killer source line is: mlockall(MCL_CURRENT | MCL_FUTURE)

Once that line is executed the OpenGL initialization will lead to system crash. This does not depend on SDL, an app built with Qt exhibits the same behavior. And my app needs to lock the memory to achieve low latencies (=never swap).

System:

SUSE Professional 9.2, AMD Athlon, GeForce FX 5700, NVidia drivers 66.29.
filiga is offline   Reply With Quote
Old 01-18-05, 12:25 PM   #2
number7
Registered User
 
Join Date: Jan 2005
Posts: 6
Default Re: Opengl + mlockall = system crash (SUSE 9.2, 6629)

Interesting. . .

Is this the cause of everyone's headaches?

111
number7 is offline   Reply With Quote
Old 01-18-05, 12:38 PM   #3
chunkey
#!/?*
 
Join Date: Oct 2004
Posts: 662
Default Re: Opengl + mlockall = system crash (SUSE 9.2, 6629)

No, works nice here w & w/o --mlockall...

hmm even in x86_64...
chunkey is offline   Reply With Quote
Old 01-20-05, 05:11 AM   #4
zmoelnig
Registered User
 
Join Date: Jan 2005
Posts: 1
Default Re: Opengl + mlockall = system crash (SUSE 9.2, 6629)

i can confirm the lock-up behaviour on debian/unstable with kernel-2.6.9 and nvidia-drivers 66.29

this is very annoying...
zmoelnig is offline   Reply With Quote
Old 01-20-05, 08:23 AM   #5
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: Opengl + mlockall = system crash (SUSE 9.2, 6629)

The lockup problem is essentially the same as the one which was causing lockups with current NVIDIA driver releases and some Linux 2.6.10 pre-release kernels (see http://www.nvnews.net/vbulletin/show...3&postcount=24), with the exception that it isn't NVIDIA driver specific: the kernel calls make_pages_present() for VMA's tagged with VM_LOCKED, without checking for VM_IO; a call to mlockall(MCL_FUTURE) will result in VM_LOCKED being set on VMA's corresponding to I/O memory mappings. This problem is fixed in Linux 2.6.10 and later kernels. I attached Hugh Dickins's patch if you'd like to patch and use an older Linux 2.6 kernel.
Attached Files
File Type: txt memory.c@1.199.diff.txt (288 Bytes, 92 views)
zander is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Xorg crash and system freeze l_r_mcglashan NVIDIA Linux 0 05-17-12 04:01 AM
SMP system hangs with OpenGL chazmati NVIDIA Linux 9 08-26-02 09:28 AM
Option "NvAGP" "0" causes crash w/ OpenGL. mujtaba NVIDIA Linux 5 08-25-02 12:16 PM

All times are GMT -5. The time now is 09:44 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.