Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Yappi error "context not found"

Reply
Thread Tools

Yappi error "context not found"

 
 
Brian
Guest
Posts: n/a
 
      02-10-2011
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.
 
Reply With Quote
 
 
 
 
k3xji
Guest
Posts: n/a
 
      02-23-2011
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
 
Reply With Quote
 
 
 
 
Brian
Guest
Posts: n/a
 
      02-25-2011
Thanks - I've opened a ticket at
http://code.google.com/p/yappi/issues/detail?id=21

 
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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
yappi v0.42 released k3xji Python 0 03-07-2010 03:51 AM
yappi v0.3 k3xji Python 0 11-22-2009 10:44 AM
[ANN]: yappi v0.2 beta Oktaka Com Python 2 10-29-2009 11:33 PM
ANN: yappi 0.1 beta : Yet Another Python Profiler Sümer Cip Python 0 10-11-2009 07:59 AM
ANN: yappi 0.1 beta : Yet Another Python Profiler k3xji Python 0 10-10-2009 10:58 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57