Closed
      
        Bug 870782
      
      
        Opened 12 years ago
          Closed 12 years ago
      
        
    
  
Nightly-only crash in nsXPCWrappedJS::CallMethod   
    Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox22 unaffected, firefox23+ unaffected, firefox24 fixed)
        RESOLVED
        FIXED
        
    
  
        
            Firefox 24
        
    
  
| Tracking | Status | |
|---|---|---|
| firefox22 | --- | unaffected | 
| firefox23 | + | unaffected | 
| firefox24 | --- | fixed | 
People
(Reporter: aaronmt, Unassigned)
References
Details
(4 keywords, Whiteboard: [native-crash])
Crash Data
Attachments
(1 file, 1 obsolete file)
| 
        
        
         5.80 KB,
          patch         
       | 
      
           vladan
 :
              
              review+
           | 
      Details | Diff | Splinter Review | 
This bug was filed from the Socorro interface and is 
report bp-0becae4f-6337-4ccf-b959-016142130510 .
============================================================= 
I seem to get this crash just idling my device on any site including about:home
--
Nightly (05/10)
LG Nexus 4 (Android 4.2.2)
| Reporter | ||
          Updated•12 years ago
           
         | 
      
Whiteboard: [native-crash]
          Comment 1•12 years ago
           
         | 
      ||
Seeing this as a perma-crash on Firefox for Android nightlies - mozilla-central closed as a result:
https://tbpl.mozilla.org/?rev=08be63954b6b&jobname=Android
Example logs:
https://tbpl.mozilla.org/php/getParsedLog.php?id=22818518&tree=Mozilla-Central
https://tbpl.mozilla.org/php/getParsedLog.php?id=22818146&tree=Mozilla-Central
https://tbpl.mozilla.org/php/getParsedLog.php?id=22818534&tree=Mozilla-Central
Is affecting Android 2.2 (ARM + x86) and Android 4.0 (ARM).
          Comment 2•12 years ago
           
         | 
      ||
Initial regression range:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ea059733677c&tochange=08be63954b6b
          Updated•12 years ago
           
         | 
      
Summary: Crash in nsXPCWrappedJS::CallMethod → Nightly-only crash in nsXPCWrappedJS::CallMethod
          Updated•12 years ago
           
         | 
      
Keywords: regression, 
          
            regressionwindow-wanted
          Comment 3•12 years ago
           
         | 
      ||
Firefox for Android Nightly update snippets have been pulled as of 8 mins ago.
          Updated•12 years ago
           
         | 
      
Severity: critical → blocker
          Comment 4•12 years ago
           
         | 
      ||
--enable-profiling bites us (again)?
          Comment 5•12 years ago
           
         | 
      ||
This was caused by the off-main-thread XPCWrappedJS changes in bug 770840. The stack shown is confusing, so I can't quite tell what we're actually doing that causes us to use a wrapped object, unless we are implementing some kind of directory provider in JS on Android. If we are, it looks like we shouldn't.
          Comment 6•12 years ago
           
         | 
      ||
          Comment 7•12 years ago
           
         | 
      ||
nsFetchTelemetryData runs on a non-main thread and uses NS_GetSpecialDirectory which activates the directory service providers, causing badness.
          Comment 8•12 years ago
           
         | 
      ||
The easiest fix is probably to modify ReadLateWritesStacks (http://hg.mozilla.org/mozilla-central/annotate/08be63954b6b/toolkit/components/telemetry/Telemetry.cpp#l1717) and nsFetchTelemtryData such that the profile directory path is obtained by the runnable's constructor on the main thread.
          Updated•12 years ago
           
         | 
      
Blocks: 770840
tracking-fennec: --- → ?
          status-firefox22:
          --- → unaffected
          status-firefox23:
          --- → unaffected
          tracking-firefox23:
          --- → ?
Keywords: regressionwindow-wanted → topcrash
          Comment 9•12 years ago
           
         | 
      ||
I think this should fixup the issue.
        Attachment #748008 -
        Flags: review?(vdjeric)
          Comment 10•12 years ago
           
         | 
      ||
Better patch.
        Attachment #748008 -
        Attachment is obsolete: true
        Attachment #748008 -
        Flags: review?(vdjeric)
        Attachment #748012 -
        Flags: review?(vdjeric)
          Comment 11•12 years ago
           
         | 
      ||
Comment on attachment 748012 [details] [diff] [review]
call NS_GetSpecialDirectory on the main thread rather than off-mainthread in telemetry
> nsresult
>-GetFailedProfileLockFile(nsIFile* *aFile, nsIFile* aProfileDir = nullptr)
>+GetFailedProfileLockFile(nsIFile* *aFile, nsIFile* aProfileDir)
> {
>-  nsresult rv;
>-  if (aProfileDir) {
>-    rv = aProfileDir->Clone(aFile);
>-  } else {
>-    rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, aFile);
>-  }
>+  nsresult rv = aProfileDir->Clone(aFile);
>   NS_ENSURE_SUCCESS(rv, rv);
> 
>   (*aFile)->AppendNative(NS_LITERAL_CSTRING("Telemetry.FailedProfileLocks.txt"));
>   return NS_OK;
> }
NS_ENSURE_ARG_POINTER(aProfileDir)
        Attachment #748012 -
        Flags: review?(vdjeric) → review+
          Updated•12 years ago
           
         | 
      
| Reporter | ||
          Updated•12 years ago
           
         | 
      
          status-firefox24:
          --- → affected
| Reporter | ||
          Updated•12 years ago
           
         | 
      
          status-firefox24:
          affected → ---
          Updated•12 years ago
           
         | 
      
Severity: blocker → critical
          Comment 12•12 years ago
           
         | 
      ||
This looks to affect Fx 23. QA would like this fixed on Aurora before turning on updates for Android.
          Comment 13•12 years ago
           
         | 
      ||
It has been fixed by the backout of bug 770840.
It stays open to fix the underlying issue once the patch of bug 770840 lands again.
          Comment 14•12 years ago
           
         | 
      ||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
          Updated•12 years ago
           
         | 
      
| Assignee | ||
          Updated•4 years ago
           
         | 
      
Product: Firefox for Android → Firefox for Android Graveyard
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•