Closed Bug 849589 Opened 7 years ago Closed 6 years ago

Intermittent robocop PROCESS-CRASH | java-exception | java.lang.RuntimeException: Only ByteBufferInputStream is supported at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java:32)

Categories

(Firefox for Android :: General, defect, critical)

22 Branch
All
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 24
Tracking Status
firefox21 --- unaffected
firefox22 - wontfix
firefox23 - wontfix
firefox24 --- fixed
fennec - ---

People

(Reporter: RyanVM, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

(Keywords: crash, intermittent-failure, regression, Whiteboard: [native-crash][startupcrash])

Crash Data

Attachments

(3 files)

https://tbpl.mozilla.org/php/getParsedLog.php?id=20496559&tree=Mozilla-Inbound

Android 4.0 Panda mozilla-inbound opt test robocop-2 on 2013-03-09 15:10:16 PST for push 80f3b6ae39bb
slave: panda-0563

0 INFO SimpleTest START
1 INFO TEST-START | testAddonManager
waitForText timeout on ^Add-ons$
2 INFO TEST-PASS | testAddonManager | Page title is correct - Add-ons should equal Add-ons
3 INFO TEST-PASS | testAddonManager | Awesomebar URL typed properly - about:addons should equal about:addons
4 INFO TEST-PASS | testAddonManager | Page title is correct - Add-ons should equal Add-ons
5 INFO TEST-PASS | testAddonManager | The correct number of tabs are opened - 2 should equal 2
6 INFO TEST-PASS | testAddonManager | Page title is correct - Browser Blank Page 01 should equal Browser Blank Page 01
waitForText timeout on ^Add-ons$
7 INFO TEST-PASS | testAddonManager | The correct number of tabs are opened - 2 should equal 2
8 INFO TEST-END | testAddonManager | finished in 66096ms
9 INFO TEST-START | Shutdown
10 INFO Passed: 6
11 INFO Failed: 0
12 INFO Todo: 0
13 INFO SimpleTest FINISHED
INFO | automation.py | Application ran for: 0:01:11.338057
INFO | automation.py | Reading PID log: /tmp/tmpMqgf0ypidlog
PROCESS-CRASH | java-exception | java.lang.RuntimeException: Only ByteBufferInputStream is supported	at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java:32)
WARNING | automationutils.processLeakLog() | refcount logging is off, so leaks can't be detected!

INFO | runtests.py | Running tests: end.
OS: Windows 7 → Android
Hardware: x86_64 → All
Version: Trunk → Firefox 22
Severity: normal → critical
Crash Signature: [@ java.lang.RuntimeException: Only ByteBufferInputStream is supported at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java) ]
Keywords: crash, regression
Hardware: All → ARM
Whiteboard: [native-crash]
This doesn't make much sense.
glandium, I think this NativeZip exception might be caused when NativeZip.createInputStream() returns an InflaterInputStream instead of ByteBufferInputStream here:

https://hg.mozilla.org/mozilla-central/file/b0d842380959/mobile/android/base/mozglue/NativeZip.java#l76

InflaterInputStream is not an instance of ByteBufferInputStream.
glandium, why does the NativeZip reject InputStreams that are not ByteBufferInputStream instances when NativeZip.createInputStream() can return an InflaterInputStream? Please see comment 11.
Flags: needinfo?(mh+mozilla)
(In reply to Chris Peterson (:cpeterson) from comment #13)
> glandium, why does the NativeZip reject InputStreams that are not
> ByteBufferInputStream instances when NativeZip.createInputStream() can
> return an InflaterInputStream? Please see comment 11.

Because while it can theoretically be supported, it's not necessary. Which is why I wrote comment 2. This error can theoretically not happen, because it would require the omni.ja to be deflated which it is not.
Flags: needinfo?(mh+mozilla)
Add more descriptive error messages to NativeZip exceptions. This patch does not fix the crash, but it adds more details about what's going wrong to the exception description that is logged.

I also removed the InflaterInputStream code because you said it should never happen (and if it *did*, the NativeZip constructor's `instanceof ByteBufferInputStream` would fail like it is now).

Here is an Android try build with these exceptions:

https://tbpl.mozilla.org/?tree=Try&rev=6442a9d8f192
Attachment #739333 - Flags: review?(mh+mozilla)
Whiteboard: [native-crash] → [native-crash][leave open]
Attachment #739333 - Flags: review?(mh+mozilla) → review+
Depends on: 864339
Duplicate of this bug: 864339
STR: Open a 'New Private Tab'

bp-9c146cdd-fcac-4ec7-8b64-a31422130422

--
Nightly (04/22)
LG Nexus 4 (Android 4.2.2)
Assignee: nobody → cpeterson
More reports also at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.IllegalArgumentException%3A+Got+class+java.util.zip.InflaterInputStream%2C+but+expected+ByteBufferInputStream!+at+org.mozilla.gecko.mozglue.NativeZip.%3Cinit%3E%28NativeZip.java%29
Crash Signature: [@ java.lang.RuntimeException: Only ByteBufferInputStream is supported at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java) ] → [@ java.lang.RuntimeException: Only ByteBufferInputStream is supported at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java) ] [@ java.lang.IllegalArgumentException: Got class java.util.zip.InflaterInputStream, but expected ByteBufferInputStream!…
Crash Signature: , but expected ByteBufferInputStream! at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java) ] → , but expected ByteBufferInputStream! at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java) ] [@ java.lang.IllegalArgumentException: Invalid path or invalid zip at org.mozilla.gecko.mozglue.NativeZip.getZip(Native Method) ]
Summary: Intermittent robocop PROCESS-CRASH | java-exception | java.lang.RuntimeException: Only ByteBufferInputStream is supported at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java:32) → Opening a "New Private Tab" crashes | Intermittent robocop PROCESS-CRASH | java-exception | java.lang.RuntimeException: Only ByteBufferInputStream is supported at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java:32)
Were the problems before landing the original patch about opening a "New Private Tab"?
(In reply to Mike Hommey [:glandium] from comment #21)
> Were the problems before landing the original patch about opening a "New
> Private Tab"?

No. The original problem was the intermittent robocop crash. I think I should back out all my NativeZip changes. Then we only have the robocop problems and no Private Browsing crashes.
(In reply to Chris Peterson (:cpeterson) from comment #22)
> (In reply to Mike Hommey [:glandium] from comment #21)
> > Were the problems before landing the original patch about opening a "New
> > Private Tab"?
> 
> No. The original problem was the intermittent robocop crash. I think I
> should back out all my NativeZip changes. Then we only have the robocop
> problems and no Private Browsing crashes.

Wasn't bug 849639 supposed to fix that? The remainder should be related to the original robocop crashes, but with a more accurate log, shouldn't it?
Yes, I spoke too soon. The crash report linked from comment 20 was in build 2013-04-25, which has the "New Private Tab" crash fix. (I just verified.) So that crash report must be for a different compressed resource. I don't know why these crashes would be intermittent.
Summary: Opening a "New Private Tab" crashes | Intermittent robocop PROCESS-CRASH | java-exception | java.lang.RuntimeException: Only ByteBufferInputStream is supported at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java:32) → Intermittent robocop PROCESS-CRASH | java-exception | java.lang.RuntimeException: Only ByteBufferInputStream is supported at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java:32)
Whiteboard: [native-crash][leave open] → [native-crash][startupcrash][leave open]
It's #7 top crasher in 22.0a2 and #23 in 23.0a1.
Keywords: topcrash
tracking-fennec: --- → ?
tracking for the regression
tracking-fennec: ? → 22+
Comment on attachment 754173 [details] [diff] [review]
Catch and log intermittent NativeZip exception. r=

Catch and log intermittent NativeZip exception. I still can't reproduce this intermittent exception locally, so this patch is a temporary band-aid, not a real fix. Since this is a topcrash in the field, I'd like to catch and ignore this exception in Aurora 23 and Beta 22.

For Nightly 24, I will post a follow-up patch that throws an exception with a more descriptive message for testing.
Attachment #754173 - Flags: review?(mh+mozilla)
Comment on attachment 754178 [details] [diff] [review]
Rethrow intermittent NativeZip exception with more debugging info. r=

Rethrow intermittent NativeZip exception with more debugging info. This band-aid patch is intended for Nightly only. It does not mask the NativeZip exception (like my other patch), but it includes the full jar:jar: URL of the problematic resource. This should make tracking down this intermittent exception easier.
Attachment #754178 - Flags: review?(mh+mozilla)
Attachment #754178 - Flags: review?(mh+mozilla) → review+
Attachment #754173 - Flags: review?(mh+mozilla) → review+
Comment on attachment 754173 [details] [diff] [review]
Catch and log intermittent NativeZip exception. r=

[Approval Request Comment]
Bug caused by (feature/regressing bug #): We don't know.
User impact if declined: Continued topcrash on Android.
Testing completed (on m-c, etc.): Locally.
Risk to taking this patch (and alternatives if risky): Low risk band-aid patch. This is not a complete fix! This patch just catches an intermittent exception and returns null, which is already a valid return value for this function. The caller code will just skip the loading of a resource image. We can then wait for any bug reports about missing resource images.
String or IDL/UUID changes made by this patch: N/A
Attachment #754173 - Flags: approval-mozilla-beta?
Attachment #754173 - Flags: approval-mozilla-aurora?
Comment on attachment 754178 [details] [diff] [review]
Rethrow intermittent NativeZip exception with more debugging info. r=

And just to be clear, this second patch ("Rethrow intermittent NativeZip exception") SHOULD NOT be uplifted because it is debugging code that will still throw (more informative) exceptions!
Attachment #754173 - Flags: approval-mozilla-beta?
Attachment #754173 - Flags: approval-mozilla-beta+
Attachment #754173 - Flags: approval-mozilla-aurora?
Attachment #754173 - Flags: approval-mozilla-aurora+
There are still crashes in 22.0b3: #27 crasher.
Here is a crash report with debug info: bp-86fb7a19-0fe3-40e6-badf-66cbd2130601.
(In reply to Scoobidiver from comment #40)
> Here is a crash report with debug info:
> bp-86fb7a19-0fe3-40e6-badf-66cbd2130601.

java.lang.IllegalArgumentException: !!! BUG 849589 !!! origUrl=jar:jar:file:///data/app/org.mozilla.fennec-2.apk!/omni.ja!/chrome/chrome/content/branding/favicon64.png
	at org.mozilla.gecko.util.GeckoJarReader.getStream(GeckoJarReader.java:115)
	at org.mozilla.gecko.util.GeckoJarReader.getBitmapDrawable(GeckoJarReader.java:43)
	at org.mozilla.gecko.util.GeckoJarReader.getBitmap(GeckoJarReader.java:30)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.downloadFavicon(Favicons.java:286)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:380)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:245)
	at org.mozilla.gecko.util.UiAsyncTask$BackgroundTaskRunnable.run(UiAsyncTask.java:48)
	at android.os.Handler.handleCallback(Handler.java:605)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:32)
(In reply to Scoobidiver from comment #38)
> There are still crashes in 22.0b3: #27 crasher.

We may untrack given the latest crash volume. Does this qualify as a topcrash on any branch at this point?
(In reply to Alex Keybl [:akeybl] from comment #42)
> We may untrack given the latest crash volume. Does this qualify as a
> topcrash on any branch at this point?
With combined signatures (comment 38 was for one signature at the beginning of 22.0b3), it's #13 crasher in 22.0b3 (#12 unfixed) so technically not a top crasher but very close to the Android threshold.
Crash Signature: , but expected ByteBufferInputStream! at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java) ] [@ java.lang.IllegalArgumentException: Invalid path or invalid zip at org.mozilla.gecko.mozglue.NativeZip.getZip(Native Method) ] → , but expected ByteBufferInputStream! at org.mozilla.gecko.mozglue.NativeZip.<init>(NativeZip.java) ] [@ java.lang.IllegalArgumentException: Invalid path or invalid zip at org.mozilla.gecko.mozglue.NativeZip.getZip(Native Method) ] [@ java.lang.IllegalA…
Hardware: ARM → All
Blocks: 881564
not a top crash, moving to a minus
tracking-fennec: 22+ → -
It's #5 top crasher in 22.0 and #55 in 23.0a2.
tracking-fennec: - → ?
Keywords: topcrash
so not a top crasher for anything but release
tracking-fennec: ? → -
(In reply to Brad Lassey [:blassey] (use needinfo?) from comment #46)
> so not a top crasher for anything but release
Some kinds of startup crashes behave that way either a top crasher in the first regressing version or a top crasher only for Release and Beta (23.0b1 is not yet released).
You assumed the first assumption. If it's the second, I'll ask again a tracking.
We'll wait to hear back on b1 and comment 47 before making a decision on tracking
Please renom if this continues to be a top crash for FF23.
It's only #178 crasher in 23.0b1.
Assignee: cpeterson → nobody
Status: ASSIGNED → NEW
It's not a top crasher for any current channels: #59 in 23.0 for instance.
Keywords: topcrash
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [native-crash][startupcrash][leave open] → [native-crash][startupcrash]
Assignee: nobody → cpeterson
Target Milestone: --- → Firefox 24
Blocks: 1513870
You need to log in before you can comment on or make changes to this bug.