Open eukreign opened 10 years ago
From flier...@gmail.com on May 05, 2013 05:03:33
Status: Accepted
From artlo...@gmail.com on May 16, 2013 22:32:58
The latest commit ( r519 ) along with v8 3.18.5.5 seems to have resolved this issue for me. I can't say if it's totally resolved.
From artlo...@gmail.com on May 19, 2013 07:15:43
Actually, the the problem still seems to exist, it just appears to be less apt to happen. Please let me know if there's anything I can do to help accelerate a fix.
From artlo...@gmail.com on May 01, 2013 23:59:27
Forgive me for not creating a minimal example of the problem yet. Here's a rough explanation.
I'm creating dicts in Python and then pushing the dicts into a JavaScript array. Something like this:
data = []; for (n = 0; n < itemlen; n++) { item = pyfunc(n); data.push(item); }
Later on I return data back to python by calling JSON.stringify(data)
In recent builds, on Mac OS (I haven't tested Windows), PyV8 crashes with a segmentation fault. Interestingly, when I loop through data, passing each item back to Python, the crash doesn't happen.
Please let me know what I can do to help resolve this problem.
Here's the relevant part of the crash info:
Process: Python [54082] Path: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 2.7.4 (2.7.4) Code Type: X86-64 (Native) Parent Process: bash [62168] User ID: 501
Date/Time: 2013-05-01 23:56:37.232 -0400 OS Version: Mac OS X 10.8.2 (12C2034) Report Version: 10
Interval Since Last Report: 285252 sec Crashes Since Last Report: 28 Per-App Interval Since Last Report: 626 sec Per-App Crashes Since Last Report: 24 Anonymous UUID: 4E302A2E-F17C-8944-CFBD-D3F305073F4F
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000098
VM Regions Near 0x98: --> __TEXT 0000000100000000-0000000100001000 [ 4K] r-x/rwx SM=COW /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Application Specific Information: Performing @selector(clickedAction:) from sender wxNSMenuItem 0x109753510
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 org.python.python 0x00000001000545c1 dict_dealloc + 33 1 _PyV8.so 0x000000010860993a ObjectTracer::~ObjectTracer() + 154 2 PyV8.so 0x0000000108609ba9 ObjectTracer::WeakCallback(v8::Persistentv8::Value, void) + 25 3 PyV8.so 0x000000010872e96d v8::internal::GlobalHandles::Node::PostGarbageCollectionProcessing(v8::internal::Isolate, v8::internal::GlobalHandles_) + 301 4 PyV8.so 0x000000010872dd03 v8::internal::GlobalHandles::PostGarbageCollectionProcessing(v8::internal::GarbageCollector, v8::internal::GCTracer) + 115 5 PyV8.so 0x000000010874a289 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GCTracer) + 1817 6 PyV8.so 0x0000000108749a9c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollector, char const, char const) + 428 7 _PyV8.so 0x0000000108713443 v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) + 131 8 _PyV8.so 0x000000010888ec79 v8::internal::BasicJsonStringifier::Extend() + 281 9 _PyV8.so 0x000000010888f1de v8::internal::BasicJsonStringifier::SerializeString(v8::internal::Handlev8::internal::String) + 910 10 PyV8.so 0x00000001088cd48b v8::internal::BasicJsonStringifier::Result v8::internal::BasicJsonStringifier::Serialize(v8::internal::Handlev8::internal::Object, bool, v8::internal::Handlev8::internal::Object) + 667
11 PyV8.so 0x00000001088cce3f v8::internal::BasicJsonStringifier::Result v8::internal::BasicJsonStringifier::Serialize(v8::internal::Handlev8::internal::Object, bool, v8::internal::Handlev8::internal::Object) + 3791
12 PyV8.so 0x00000001088cd9ae v8::internal::BasicJsonStringifier::Result v8::internal::BasicJsonStringifier::Serialize(v8::internal::Handlev8::internal::Object, bool, v8::internal::Handlev8::internal::Object) + 1982
13 PyV8.so 0x00000001088cce3f v8::internal::BasicJsonStringifier::Result v8::internal::BasicJsonStringifier::Serialize(v8::internal::Handlev8::internal::Object, bool, v8::internal::Handlev8::internal::Object) + 3791
14 _PyV8.so 0x000000010888e440 v8::internal::BasicJsonStringifier::Stringify(v8::internal::Handlev8::internal::Object) + 32
15 _PyV8.so 0x00000001088a3431 v8::internal::Runtime_BasicJSONStringify(int, v8::internal::Object , v8::internal::Isolate) + 225
16 ??? 0x0000023b6e80616e 0 + 2454280233326
17 ??? 0x0000023b6e839bfb 0 + 2454280444923
18 ??? 0x0000023b6e80bb14 0 + 2454280256276
19 ??? 0x0000023b6e832e4c 0 + 2454280416844
20 ??? 0x0000023b6e825b64 0 + 2454280362852
21 ??? 0x0000023b6e8077f7 0 + 2454280239095
22 PyV8.so 0x000000010870a91c v8::internal::Invoke(bool, v8::internal::Handlev8::internal::JSFunction, v8::internal::Handlev8::internal::Object, int, v8::internal::Handlev8::internal::Object, bool_) + 396
23 _PyV8.so 0x0000000108697e8a v8::Script::Run() + 490
24 _PyV8.so 0x00000001085e256b CEngine::ExecuteScript(v8::Handlev8::Script) + 235
25 _PyV8.so 0x00000001085e26e5 CScript::Run() + 53
26 _PyV8.so 0x00000001085d74aa CContext::EvaluateW(std::basic_string<wchar_t, std::char_traits, std::allocator > const&, std::basic_string<wchar_t, std::char_traits, std::allocator >, int, int, boost::python::api::object) + 250
27 _PyV8.so 0x00000001085df353 boost::python::detail::caller_arity<6u>::impl<boost::python::api::object (CContext::*)(std::basic_string<wchar_t, std::char_traits, std::allocator > const&, std::basic_string<wchar_t, std::char_traits, std::allocator >, int, int, boost::python::api::object), boost::python::default_call_policies, boost::mpl::vector7<boost::python::api::object, CContext&, std::basic_string<wchar_t, std::char_traits, std::allocator > const&, std::basic_string<wchar_t, std::char_traits, std::allocator >, int, int, boost::python::api::object> >::operator()(object, object) + 1155
28 libboost_python-mt.dylib 0x00000001069d237e boost::python::objects::function::call(object, object) const + 766
29 libboost_python-mt.dylib 0x00000001069d447a boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) + 26
30 libboost_python-mt.dylib 0x00000001069da65c boost::function0::operator()() const + 28
31 libboost...
Original issue: http://code.google.com/p/pyv8/issues/detail?id=174