Yappi error "context not found"

k3xji sumerc at gmail.com
Wed Feb 23 13:58:34 CET 2011


On 10 Şubat, 08:38, Brian <dribna... at 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



More information about the Python-list mailing list