pyv8 on Fedora 14 x86_64: 100% cpu use on PyV8.JSContext() call

29 views
Skip to first unread message

smthmlk

unread,
Feb 9, 2011, 10:58:05 AM2/9/11
to PyV8
Versions:
- pyv8 revision 334
- v8 revision 6583 (6705 exhibits the same behavior)

I've been trying to get PyV8 to work correctly on Fedora 14 x86_64,
and am at a loss. I have v8 compiled with the correct arguments
(arch=x64, CXXFLAGS=-fPIC, etc) and pyv8 compiles fine. It even
imports correctly:

Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyV8
>>>


However, actually creating a context causes what appears to be an
infinite loop somewhere in pyv8 / v8:

>>> import PyV8
>>>
>>> c = PyV8.JSContext()

... this call never returns; the system cpu usage ramps up to 100% and
stays there for hours. I cannot cntrl-c or cntrl-d out of it, either--
I must cntrl-z (put to bg) and then `kill %1' it. Brutal.

Another potential hint is that when compiling V8 with the scons
argument "snapshot=on", the mksnapshot command that is run as part of
the build process for v8 also seems to go into an infinite loop.

Is this an issue with pyv8 compiled for Python 2.7? This is the
default version of python in Fedora 14. Let me know if there's
anything I can try. Thanks!

Flier Lu

unread,
Feb 13, 2011, 3:49:24 AM2/13/11
to PyV8
I have tried to reproduce the issue on a Fedora 14 x64, but no idea
why it doesn't work.

$ uname -a
Linux domU-12-31-39-16-91-C4 2.6.35.6-45.fc14.x86_64 #1 SMP Mon Oct 18
23:57:44 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

In fact, when I enable the snapshot, I can't build v8 at all. The
mksnapshot run at CPU 100% more than a half hour before I killed it,
but it could be done in 1 minutes on a Ubuntu 10 x86 system.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7627 flier 20 0 595m 3520 1624 R 100.8 0.0 38:53.43
mksnapshot

After I disabled the snapshot, the build could be finished, but the
system will be hang when import PyV8

I also test it on another Ubuntu 10.04 x64 system, it seems work very
well.

$ uname -a
Linux domU-12-31-39-09-3D-61 2.6.35-24-virtual #42-Ubuntu SMP Thu Dec
2 05:15:26 UTC 2010 x86_64 GNU/Linux

$ python PyV8.py -v
2011-02-13 08:41:56,763 INFO testing PyV8 module 1.0 with V8 v3.1.3
testBlock (__main__.TestAST) ... ok
...
Ran 48 tests in 2.091s

OK

I'm not familiar with Fedora, but I guess there are should some
security patches or special runtime library broke it.
Reply all
Reply to author
Forward
0 new messages