Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Yappi error "context not found" (http://www.velocityreviews.com/forums/t743356-yappi-error-context-not-found.html)

Brian 02-10-2011 01:38 PM

Yappi error "context not found"
 
I'm posting here because I can't find a Yappi specific mailing list.

I've been using the rather brilliant Yappi from http://code.google.com/p/yappi/
It works well for small programs with a few threads. However, when
trying to run it over large programs with several hundred threads I've
been getting the error "context not found".

The most basic example I can come up with which illustrates the
problem is below. Changing the number of threads started from 25 down
to, say, 10, works fine. Any more than ~25 and the error keeps
appearing. This is using Python 2.6.5 and Ubuntu Linux 10.04. I don't
have another box to try this out on at the moment.

I've tested a similar script using thread.start_new_thread() and that
doesn't seem to have the problem. So is there some issue with Yappi
and inheriting from threading.Thread?

import yappi
import time
import threading

class MyThread(threading.Thread):
def run(self):
time.sleep(1)

yappi.start()

for i in range(0,25):
c = MyThread()
c.start()
time.sleep(1)

yappi.print_stats()
yappi.stop()


Running the above gives:[*] [yappi-err] context not found.[*] [yappi-err] context not found.[*] [yappi-err] context not found.[*] [yappi-err] context not found.
....

Any help appreciated.

k3xji 02-23-2011 12:58 PM

Re: Yappi error "context not found"
 
On 10 ┼×ubat, 08:38, Brian <dribna...@gmail.com> wrote:
> I'm posting here because I can't find a Yappi specific mailing list.
>
> I've been using the rather brilliant Yappi fromhttp://code.google.com/p/yappi/
> It works well for small programs with a few threads. However, when
> trying to run it over large programs with several hundred threads I've
> been getting the error "context not found".
>
> The most basic example I can come up with which illustrates the
> problem is below. Changing the number of threads started from 25 down
> to, say, 10, works fine. Any more than ~25 and the error keeps
> appearing. This is using Python 2.6.5 and Ubuntu Linux 10.04. I don't
> have another box to try this out on at the moment.
>
> I've tested a similar script using thread.start_new_thread() and that
> doesn't seem to have the problem. So is there some issue with Yappi
> and inheriting from threading.Thread?
>
> import yappi
> import time
> import threading
>
> class MyThread(threading.Thread):
> ┬* ┬* def run(self):
> ┬* ┬* ┬* ┬* time.sleep(1)
>
> yappi.start()
>
> for i in range(0,25):
> ┬* ┬* c = MyThread()
> ┬* ┬* c.start()
> time.sleep(1)
>
> yappi.print_stats()
> yappi.stop()
>
> Running the above gives:
>[*] ┬* ┬* [yappi-err] ┬* ┬* context not found.
>[*] ┬* ┬* [yappi-err] ┬* ┬* context not found.
>[*] ┬* ┬* [yappi-err] ┬* ┬* context not found.
>[*] ┬* ┬* [yappi-err] ┬* ┬* context not found.
> ...
>
> Any help appreciated.


Can you open a ticket against this? This error is because yappi cannot
seem to determine the actual created threads by the Python VM. This
may be due to several things, but in our tests we have successully
profiled more than 1000 threads simultaneously. You can open and
follow an issue here:
http://code.google.com/p/yappi/issues/list

Brian 02-25-2011 03:10 PM

Re: Yappi error "context not found"
 
Thanks - I've opened a ticket at
http://code.google.com/p/yappi/issues/detail?id=21



All times are GMT. The time now is 08:45 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.