Status: New
Owner: ----
New issue 3860 by [email protected]: [v8 3.30.33.0] A segment fault
within deoptimization caused maybe by multi-thread
https://code.google.com/p/v8/issues/detail?id=3860
When i run a javascript that in the attachment with D8, a segment
fault(sometimes a Bus error) happend.
And when i debug, i found that when everytime the segment fault happend, it
was doing deoptimization to a JS function, and the logic is going to
"Deoptimizer::DeoptimizeFunction(*function);"(shown as below).
Thinking maybe multi-thread process the same function caused the fault, i
comment the line "Deoptimizer::DeoptimizeFunction(*function);", and it
works ok now.
But i think it is not a correct way to process, could someone give me help?
Runtime_NotifyDeoptimized function:
RUNTIME_FUNCTION(Runtime_NotifyDeoptimized) {
......
if (!activations_finder.has_code_activations_) {
if (function->code() == *optimized_code) {
if (FLAG_trace_deopt) {
PrintF("[removing optimized code for: ");
function->PrintName();
PrintF("]\n");
}
function->ReplaceCode(function->shared()->code());
// Evict optimized code for this function from the cache so that it
// doesn't get used for new closures.
function->shared()->EvictFromOptimizedCodeMap(*optimized_code,
"notify deoptimized");
}
} else {
// TODO(titzer): we should probably do DeoptimizeCodeList(code)
// unconditionally if the code is not already marked for deoptimization.
// If there is an index by shared function info, all the better.
Deoptimizer::DeoptimizeFunction(*function);<=========the line=========
}
......
}
And i checked with gdb, below is the call stack when the fault happend:
(gdb) info th
Id Target Id Frame
6 Thread 0xb5bdd450 (LWP 6540) "OptimizingCompi" 0xb1337650 in
do_futex_wait () from /lib/libpthread.so.0
5 Thread 0xb5ddd450 (LWP 6539) "V8 WorkerThread" 0xb1337650 in
do_futex_wait () from /lib/libpthread.so.0
4 Thread 0xb5fdd450 (LWP 6538) "V8 WorkerThread" 0xb1337650 in
do_futex_wait () from /lib/libpthread.so.0
3 Thread 0xb61dd450 (LWP 6537) "V8 WorkerThread" 0xb1337650 in
do_futex_wait () from /lib/libpthread.so.0
2 Thread 0xb63dd450 (LWP 6536) "V8 WorkerThread" 0xb1337650 in
do_futex_wait () from /lib/libpthread.so.0
* 1 Thread 0xb63df000 (LWP 6534) "d8_org_print" 0x00090a78 in
v8::internal::Deoptimizer::VisitAllOptimizedFunctionsForContext(v8::internal::Context*,
v8::internal::OptimizedFunctionVisitor*) ()
(gdb) t 6
[Switching to thread 6 (Thread 0xb5bdd450 (LWP 6540))]
#0 0xb1337650 in do_futex_wait () from /lib/libpthread.so.0
(gdb) bt
#0 0xb1337650 in do_futex_wait () from /lib/libpthread.so.0
#1 0xb1337708 in sem_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
#2 0x004505e4 in v8::base::Semaphore::Wait() ()
#3 0x00239128 in v8::internal::OptimizingCompilerThread::Run() ()
#4 0x004518a4 in v8::base::ThreadEntry(void*) ()
#5 0xb132f1d8 in start_thread () from /lib/libpthread.so.0
#6 0xb1217e80 in ?? () from /lib/libc.so.6
#7 0xb1217e80 in ?? () from /lib/libc.so.6
Attachments:
box2d.js 646 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.