Re: [v8-users] Totally stumped with crash, potentially thread related

2016-03-10 Thread Jochen Eisinger
It's really difficult to even begin guessing what could cause this: without
the source, and more information about the crash like a call stack and
values of local variables, there's not much I can do.

In general, compiling the code with asan might provide additional insights
as to what corrupts the memory.

Best
Jochen

On Thu, Mar 10, 2016, 10:22 PM George Corney  wrote:

> Hey,
>
> I'm hoping someone with more experience than me can shed some light on my
> issue.
>
> v8 is being run on a separate thread to the main thread, all interactions
> with v8 occur on this thread
>
> The problem is that when an action (playing/pausing a film in android's
> MediaPlayer) occurs on the main thread, the app has a high chance of
> crashing either straight away or after a short period (can be as high as
> 600ms).
>
> The crash is always the same (with differing address(:
>
> signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x45524854
> Although occasionally SEGV_ACCERR might be SEGV_MAPERR.
>
> Stack frame #00 pc 0061d3ec  /[...]/lib/arm/libnative_webgl.so
> (v8::internal::AstValueFactory::Internalize(v8::internal::Isolate*)+56)
>
> SEGV_ACCERR and SEGV_MAPERR surely imply that the v8 thread is accessing
> data on another thread, but as far as my code is concerned, nothing
> interesting is happening when the crash occurs and if there are any calls
> to js land they're happening on the thread v8 was created with.
>
> The code for AstValueFactory::Internalize is
> void AstValueFactory::Internalize(Isolate* isolate) {
>   if (isolate_) {
> // Everything is already internalized.
> return;
>   }
>   // Strings need to be internalized before values, because values refer to
>   // strings.
>   for (int i = 0; i < strings_.length(); ++i) {
> strings_[i]->Internalize(isolate);
>   }
>   for (int i = 0; i < values_.length(); ++i) {
> values_[i]->Internalize(isolate);
>   }
>   isolate_ = isolate;
> }
>
>
> Do you have any thoughts about what could cause this? If the media player
> action is corrupting memory in some way, is there some reason that it
> always crashes on this particular function?
>
> I'm using v8 3.2.8 on Android (via NDK). (unfortunately upgrading to more
> recent v8 isn't an option).
>
> v8::Locker is used before every handle_scope, should I be doing something
> else to ensure thread safety?
>
> Been on this problem for a long time now, any insight someone might have
> will be useful.
>
> Thanks,
> George Corney
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Can v8::Isolate::GetCurrent() return null?

2016-03-10 Thread Jochen Eisinger
bit.ly/v8-api-changes mentions at the top that we're trying to get to a
state where the embedder always specifies the isolate to use and we don't
use TLS to store it internally.

At that point, Isolate::GetCurrent will no longer work.

This is, however, still in the not so near future, so I think marking the
API add deprecated is premature at this point.

OTOH, Yutaka was asking about usage in chromium, and I'd rather not
introduce more call sites there.

On Thu, Mar 10, 2016, 10:31 AM Bart van Heukelom  wrote:

> Where do you see that it's deprecated?
> http://v8.paulfryzel.com/docs/master/classv8_1_1_isolate.html#afd8c10d0f01e2ae43522c3ddf0bb053d
> does not mention it. Or has it been..undeprecated in the meantime?
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Totally stumped with crash, potentially thread related

2016-03-10 Thread George Corney
Hey,

I'm hoping someone with more experience than me can shed some light on my 
issue.

v8 is being run on a separate thread to the main thread, all interactions 
with v8 occur on this thread

The problem is that when an action (playing/pausing a film in android's 
MediaPlayer) occurs on the main thread, the app has a high chance of 
crashing either straight away or after a short period (can be as high as 
600ms).

The crash is always the same (with differing address(:

signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x45524854
Although occasionally SEGV_ACCERR might be SEGV_MAPERR.

Stack frame #00 pc 0061d3ec  /[...]/lib/arm/libnative_webgl.so 
(v8::internal::AstValueFactory::Internalize(v8::internal::Isolate*)+56)

SEGV_ACCERR and SEGV_MAPERR surely imply that the v8 thread is accessing 
data on another thread, but as far as my code is concerned, nothing 
interesting is happening when the crash occurs and if there are any calls 
to js land they're happening on the thread v8 was created with.

The code for AstValueFactory::Internalize is
void AstValueFactory::Internalize(Isolate* isolate) {
  if (isolate_) {
// Everything is already internalized.
return;
  }
  // Strings need to be internalized before values, because values refer to
  // strings.
  for (int i = 0; i < strings_.length(); ++i) {
strings_[i]->Internalize(isolate);
  }
  for (int i = 0; i < values_.length(); ++i) {
values_[i]->Internalize(isolate);
  }
  isolate_ = isolate;
}


Do you have any thoughts about what could cause this? If the media player 
action is corrupting memory in some way, is there some reason that it 
always crashes on this particular function?

I'm using v8 3.2.8 on Android (via NDK). (unfortunately upgrading to more 
recent v8 isn't an option).

v8::Locker is used before every handle_scope, should I be doing something 
else to ensure thread safety?

Been on this problem for a long time now, any insight someone might have 
will be useful.

Thanks,
George Corney

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Can v8::Isolate::GetCurrent() return null?

2016-03-10 Thread Bart van Heukelom
Where do you see that it's 
deprecated? 
http://v8.paulfryzel.com/docs/master/classv8_1_1_isolate.html#afd8c10d0f01e2ae43522c3ddf0bb053d
 
does not mention it. Or has it been..undeprecated in the meantime?

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: v8 Issue Tracker Migration

2016-03-10 Thread Michael Hablich
And to clarify further: There is no 'old issue list'. The issue IDs are 
still valid. So if you can't find the issue on Monorail it also never 
existed in our old tracker.

On Thursday, March 10, 2016 at 7:51:12 AM UTC+1, Jochen Eisinger wrote:
>
> This is a svn revision and has nothing to do with the issue tracker.
>
> Since we migrated from svn to git, there's sadly moi easy way to translate 
> svn links to git links, however, a quick search of the history leads to 
> https://chromium.googlesource.com/v8/v8/+/52c421956aac966a89f5d6158db50bad6b2c6d96
>
> On Thu, Mar 10, 2016, 6:26 AM Zaheer Ahmad  > wrote:
>
>> hi, May i know how i can access old issue list? e.g. 
>> https://bugs.chromium.org/p/v8/source/detail?r=17102 referred by 
>> https://chromiumcodereview.appspot.com/23477061 is not accessible.
>>
>> Thanks
>>
>> On Tue, Dec 8, 2015 at 1:02 PM, > 
>> wrote:
>>
>>> This is now complete!
>>>
>>> You can see the new tracker here: https://bugs.chromium.org/p/v8
>>>
>>> Links to the old tracker automatically redirect: 
>>> https://code.google.com/p/v8/issues/detail?id=160
>>>
>>> If you run into any issues, please let us know at 
>>> https://bugs.chromium.org/p/monorail
>>>
>>> Thanks!
>>>
>>> -- 
>>> -- 
>>> v8-users mailing list
>>> v8-u...@googlegroups.com 
>>> http://groups.google.com/group/v8-users
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "v8-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to v8-users+u...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> -- 
>> v8-users mailing list
>> v8-u...@googlegroups.com 
>> http://groups.google.com/group/v8-users
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "v8-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to v8-users+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.