On Jul 21, 5:52 pm, Micah <[email protected]> wrote:
> All that is in the log is garbage collection being done every so often
> (5-10 seconds apart).  It appears to be stalling in:
>
> Class.getDeclaredMethods(Class, boolean) line: not available [native
> method]
> ClassCache.getDeclaredPublicMethods() line: 166

There is a bug in Class.getDeclaredMethods that has caused a couple of
unrelated-looking issues:

  http://code.google.com/p/android/issues/detail?id=3005
  http://code.google.com/p/android/issues/detail?id=2812

The bug is that, while generating the list of declared methods, the VM
would initialize classes found in method arguments.  Those classes
shouldn't be getting initialized at that point, and initialization
ordering problems ensue.

I'm not sure why it would get stuck there.  (I'm trying to picture if
it's possible to deadlock on class init from here.)

> One thing of note in the log which may be of interest is:
> INFO/dalvikvm(721): WOW: somebody generated [Lcom/google/protobuf/
> Descriptors$FileDescriptor; simultaneously

That means two different threads tried to create the same array class
at the same time.  One won, one lost.  It gets a "WOW" log message
because it's extremely rare, which means the code is rarely exercised
and hence more likely to break.

Array classes are essentially created and initialized in one shot, on
demand, so I don't think the race is related to the getDeclaredMethods
bug.  But if you're seeing the WOW every time, then something a little
peculiar is happening to make the race condition that reliable.

If you have an APK that exhibits this problem repeatably, I'd be
interested in seeing if I can make it stall as well.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to