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

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-22-09, 02:20 PM   #1
Mike Playle
Registered User
 
Join Date: Sep 2005
Posts: 26
Default nvLock: client timed out, taking the lock

I've been seeing this problem once in a blue moon since I got my current laptop (GeForce Go 7600).

The symptom is that X freezes completely for ~10-20 seconds when opening or moving a window. Eventually it unfreezes and I see the message "nvLock: client timed out, taking the lock" appear in the X log file.

This looks to me like one of those "if you see this, please file a bug" kind of messages, so here's a bug report log file. If it would help I can try to cut down my code to a standalone example; would this be worth it? The bug only occurs very rarely - often I have to run my application for several hours before it shows up.
Mike Playle is offline   Reply With Quote
Old 04-22-09, 02:34 PM   #2
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: nvLock: client timed out, taking the lock

What else are you running when you see this message? This typically means that a direct-rendering OpenGL client stopped responding while it held one of our locks, and the X server gave up waiting for it.
AaronP is offline   Reply With Quote
Old 04-22-09, 05:50 PM   #3
Mike Playle
Registered User
 
Join Date: Sep 2005
Posts: 26
Default Re: nvLock: client timed out, taking the lock

(I can't see an attachment on my previous post! I thought I attached this nvidia-bug-report.log but obviously something went wrong. I'll have another go.)

I get this error while trying to run an OpenGL/XvMC application I've been developing. Up until today I've only ever seen it while I've been using it in live situations - in a stripped down configuration with nothing else running other than the X server and a couple of xterms, syslogd/klogd, basic system stuff like that.

Today I managed to catch it in a more normal desktop configuration where I also had Firefox, Thunderbird and XEmacs running. I don't think there were any other OpenGL clients running at the time.

The app itself has 3 threads, one of which calls OpenGL functions, one calls XvMC functions, and the third runs the user interface (GTK) which as far as I know doesn't touch OpenGL at all.

Edited to add: I don't see any kind of instability or other problems associated with this message. Forcibly breaking a lock is risky, but it doesn't seem to be having any long-term harmful effects on my app. Certainly none of my threads are locking up permanently.
Attached Files
File Type: gz nvidia-bug-report.log.gz (21.9 KB, 88 views)
Mike Playle is offline   Reply With Quote
Old 04-22-09, 06:48 PM   #4
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: nvLock: client timed out, taking the lock

Does your app ever spend a lot of time in a signal handler, or could be somehow suspending the OpenGL thread while it's executing code in libGL? Also, are you rendering to pbuffers with the XvMC thread? It would be very helpful if you could break into your app and the X server during one of these hangs and get backtraces from all four threads.
AaronP is offline   Reply With Quote
Old 04-23-09, 01:00 AM   #5
Mike Playle
Registered User
 
Join Date: Sep 2005
Posts: 26
Default Re: nvLock: client timed out, taking the lock

Quote:
Originally Posted by AaronP View Post
Does your app ever spend a lot of time in a signal handler, or could be somehow suspending the OpenGL thread while it's executing code in libGL?
Not from my code. I try to avoid using signals. It's possible that GTK or Python might be setting up signal handlers that I don't know about though.

Quote:
Originally Posted by AaronP View Post
Also, are you rendering to pbuffers with the XvMC thread?
Yes.

Quote:
Originally Posted by AaronP View Post
It would be very helpful if you could break into your app and the X server during one of these hangs and get backtraces from all four threads.
Unfortunately this problem is very intermittent - if I could repeat it on demand I could try to do this, but often I have to run it for several hours to see the problem!

Maybe I can think of some automated way to do this.
Mike Playle is offline   Reply With Quote
Old 04-23-09, 02:28 AM   #6
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: nvLock: client timed out, taking the lock

Thanks. The XvMC pbuffer thing does add to the lock contention. Is there any chance you could send us your app?
AaronP is offline   Reply With Quote
Old 04-23-09, 02:42 AM   #7
Mike Playle
Registered User
 
Join Date: Sep 2005
Posts: 26
Default Re: nvLock: client timed out, taking the lock

Sure. I'm working towards releasing it as open source anyway, so this won't be a problem at all. I'll package something up for you later today.
Mike Playle is offline   Reply With Quote
Old 04-23-09, 12:37 PM   #8
Mike Playle
Registered User
 
Join Date: Sep 2005
Posts: 26
Default Re: nvLock: client timed out, taking the lock

Actually it looks like this won't be necessary.

I realised that when I caught the bug yesterday, I didn't actually have any video files playing (ie no XvMC pbuffer rendering going on) and so there wasn't any reason not to re-test it with the latest driver.

It's now been running for about 3 hours with driver 180.53 and a test script randomly moving windows around, and I haven't seen the lock message once. So I think it's very likely that the problem has already been fixed in the latest driver.

Sorry to waste your time!

Unfortunately 180.53 isn't much use to me in practice because of the memory leak I reported a few weeks ago - but since this lock problem isn't a major show stopper I'm happy to keep using 177.70.29 for now.
Mike Playle 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


All times are GMT -5. The time now is 02:16 PM.


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