Closed Bug 782400 Opened 12 years ago Closed 12 years ago

Crash when trying to login on Marketplace with BrowserID/Persona

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED WORKSFORME
blocking-basecamp +

People

(Reporter: gerard-majax, Unassigned)

References

Details

B2G crashes when trying to login on Marketplace, right after clicking the "Connect/Register" button that should open a BrowserID window.

Here is what I get in logcat:
E/libEGL  (  349): eglQuerySurface:466 error 300d (EGL_BAD_SURFACE)
E/libEGL  (  349): eglQuerySurface:466 error 300d (EGL_BAD_SURFACE)
I/Gecko   (  349): ###!!! ABORT: failed to construct LayersChild: file /home/alex/codaz/B2G/gecko/widget/xpwidgets/nsBaseWidget.cpp, line 902
F/libc    (  349): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)

Device is Nexus S, code if built from 11th, August.
This smells to me like us trying to create a new toplevel widget and failing.  Apparently the marketplace app is blacklisted from OOP :/.

Some questions for the folks CC'd
 - do we hook window.open for same-process content?
 - does gaia implement window.open for apps?
 - does anyone know the browserID UI is implemented for b2g?
After pull and rebuild of the system, it now crashed at boot ... You can see it is the same error.

--------- beginning of /dev/log/main
I/DEBUG   (   80): debuggerd: Aug 13 2012 21:29:41
--------- beginning of /dev/log/system
I/Vold    (   73): Vold 2.1 (the revenge) firing up
D/Vold    (   73): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
I/Netd    (   79): Netd 1.0 starting
D/Vold    (   73): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/Vold    (   73): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
W/Vold    (   73): Duplicate state (1)
W/Vold    (   73): Duplicate state (1)
W/Vold    (   73): Duplicate state (1)
W/Vold    (   73): Duplicate state (1)
I/        (   82): ServiceManager: 0x1c90910
I/        (   83): ServiceManager: 0xf88958
I/AudioFlinger(   83): Loaded primary audio interface from LEGACY Audio HW HAL (audio)
I/AudioFlinger(   83): Using 'LEGACY Audio HW HAL' (audio.primary) as the primary audio interface
I/AudioFlinger(   83): Loaded a2dp audio interface from A2DP Audio HW HAL (audio)
D/AudioHardwareInterface(   83): setMode(NORMAL)
I/CameraService(   83): CameraService started (pid=83)
I/AudioFlinger(   83): AudioFlinger's thread 0xf899a0 ready to run
W/AudioFlinger(   83): Thread AudioOut_1 cannot connect to the power manager service
D/AudioHardware(   83): AudioStreamOutALSA::setParameters() routing=2
D/AudioHardware(   83): ### setVoiceVolume_l
I/AudioPolicyService(   83): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)
E/profiler(   77): Registering start signal
I/Gonk    (   77): Socket open for RIL
I/VolumeManager(   77): changing state from 'Uninitialized' to 'Starting'
I/VolumeManager(   77): Connected to vold
I/VolumeManager(   77): Volume sdcard: changing state from Init to Idle (1 observers)
I/VolumeManager(   77): changing state from 'Starting' to 'Volumes Ready'
I/nsVolumeService(   77): UpdateVolumeIOThread: Volume 'sdcard' state Idle mount '/mnt/sdcard'
D/VoldCmdListener(   73): volume list
I/AutoMounter(   77): UpdateState: umsAvail:1 umsEnabled:1 mode:0 usbCablePluggedIn:1 tryToShare:0
I/AutoMounter(   77): UpdateState: Volume sdcard is Idle and inserted
I/VolumeManager(   77): Volume sdcard: changing state from Idle to Checking (3 observers)
I/nsVolumeService(   77): UpdateVolumeIOThread: Volume 'sdcard' state Checking mount '/mnt/sdcard'
D/VoldCmdListener(   73): volume mount sdcard
I/Vold    (   73): /dev/block/vold/179:3 being considered for volume sdcard
D/Vold    (   73): Volume sdcard state changing 1 (Idle-Unmounted) -> 3 (Checking)
W/Vold    (   73): Skipping fs checks
I/VolumeManager(   77): Volume sdcard: changing state from Checking to Mounted (3 observers)
I/nsVolumeService(   77): UpdateVolumeIOThread: Volume 'sdcard' state Mounted mount '/mnt/sdcard'
I/Vold    (   73): Device /dev/block/vold/179:3, target /mnt/sdcard mounted @ /mnt/secure/staging
D/Vold    (   73): Volume sdcard state changing 3 (Checking) -> 4 (Mounted)
I/AutoMounter(   77): UpdateState: umsAvail:1 umsEnabled:1 mode:0 usbCablePluggedIn:1 tryToShare:0
I/AutoMounter(   77): UpdateState: Volume sdcard is Mounted and inserted
I/power   (   77): *** set_screen_state 1
D/EventHub(   77): No input device configuration file found for device 'cypress-touchkey'.
I/EventHub(   77): New device: id=1, fd=59, path='/dev/input/event5', name='cypress-touchkey', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/cypress-touchkey.kl', keyCharacterMap='/system/usr/keychars/cypress-touchkey.kcm', builtinKeyboard=false
D/EventHub(   77): No input device configuration file found for device 'lightsensor-level'.
D/EventHub(   77): No input device configuration file found for device 'proximity'.
D/EventHub(   77): No input device configuration file found for device 'herring-keypad'.
I/EventHub(   77): New device: id=4, fd=63, path='/dev/input/event2', name='herring-keypad', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/herring-keypad.kl', keyCharacterMap='/system/usr/keychars/herring-keypad.kcm', builtinKeyboard=false
D/EventHub(   77): No input device configuration file found for device 'gyro'.
I/EventHub(   77): New device: id=6, fd=68, path='/dev/input/event0', name='mxt224_ts_input', classes=0x14, configuration='/system/usr/idc/mxt224_ts_input.idc', keyLayout='', keyCharacterMap='', builtinKeyboard=false
I/InputReader(   77): Device reconfigured: id=6, name='mxt224_ts_input', surface size is now 480x800, mode is 1
I/InputReader(   77): Device added: id=6, name='mxt224_ts_input', sources=0x00001002
I/InputReader(   77): Device added: id=4, name='herring-keypad', sources=0x00000101
I/InputReader(   77): Device added: id=1, name='cypress-touchkey', sources=0x00000101
D/EventHub(   77): No input device configuration file found for device 'compass'.
E/AKMD2   (   77): libkam : Unable to load settings file, using defaults.
I/ServiceManager(   77): Waiting for service batteryinfo...
I/nsVolumeService(   77): UpdateVolumeRunnable::Run 'sdcard' state Idle
I/nsVolumeService(   77): UpdateVolumeRunnable::Run 'sdcard' state Checking
I/nsVolumeService(   77): UpdateVolumeRunnable::Run 'sdcard' state Mounted
I/ServiceManager(   77): Waiting for service batteryinfo...
I/Gecko   (   77): Logging GL tracing output to /system/b2g/firefox.trace
I/Gecko   (   77): Attempting load of /data/local/egltrace.so
I/Gecko   (   77): Attempting load of libEGL.so
D/libEGL  (   77): loaded /system/lib/egl/libGLES_android.so
D/libEGL  (   77): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
D/libEGL  (   77): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
D/libEGL  (   77): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
E/GeckoConsole(   77): OpenGL LayerManager Initialized Succesfully.
E/GeckoConsole(   77): Version: OpenGL ES 2.0 build 1.8@785978
E/GeckoConsole(   77): Vendor: Imagination Technologies
E/GeckoConsole(   77): Renderer: PowerVR SGX 540
E/GeckoConsole(   77): FBO Texture Target: TEXTURE_2D
I/GeckoDump(   77): Opened socket on 9999
I/ServiceManager(   77): Waiting for service batteryinfo...
W/AudioFlinger(   83): Thread AudioOut_1 cannot connect to the power manager service
D/AudioHardware(   83): AudioStreamOutALSA::setParameters() routing=2
D/AudioHardware(   83): ### setVoiceVolume_l
---------------8<---------------8<---------------8<---------------8<---------------8<---------------
E/libEGL  (   77): eglQuerySurface:466 error 300d (EGL_BAD_SURFACE)
E/libEGL  (   77): eglQuerySurface:466 error 300d (EGL_BAD_SURFACE)
I/Gecko   (   77): ###!!! ABORT: failed to construct LayersChild: file /home/alex/codaz/B2G/gecko/widget/xpwidgets/nsBaseWidget.cpp, line 902
F/libc    (   77): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
---------------8<---------------8<---------------8<---------------8<---------------8<---------------
I/DEBUG   (   80): debuggerd committing suicide to free the zombie!
I/ServiceManager(   72): service 'media.audio_flinger' died
I/ServiceManager(   72): service 'media.player' died
I/ServiceManager(   72): service 'media.camera' died
I/ServiceManager(   72): service 'media.audio_policy' died
I/DEBUG   (  159): debuggerd: Aug 13 2012 21:29:41
E/profiler(  158): Registering start signal
I/        (  157): ServiceManager: 0xf06958
I/AudioFlinger(  157): Loaded primary audio interface from LEGACY Audio HW HAL (audio)
I/AudioFlinger(  157): Using 'LEGACY Audio HW HAL' (audio.primary) as the primary audio interface
I/AudioFlinger(  157): Loaded a2dp audio interface from A2DP Audio HW HAL (audio)
D/AudioHardwareInterface(  157): setMode(NORMAL)
I/CameraService(  157): CameraService started (pid=157)
I/AudioFlinger(  157): AudioFlinger's thread 0xf07958 ready to run
W/AudioFlinger(  157): Thread AudioOut_1 cannot connect to the power manager service
D/AudioHardware(  157): AudioStreamOutALSA::setParameters() routing=2
D/AudioHardware(  157): ### setVoiceVolume_l
I/AudioPolicyService(  157): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)
I/Gonk    (  158): Socket open for RIL
I/VolumeManager(  158): changing state from 'Uninitialized' to 'Starting'
I/VolumeManager(  158): Connected to vold
I/VolumeManager(  158): Volume sdcard: changing state from Init to Mounted (1 observers)
I/VolumeManager(  158): changing state from 'Starting' to 'Volumes Ready'
I/nsVolumeService(  158): UpdateVolumeIOThread: Volume 'sdcard' state Mounted mount '/mnt/sdcard'
D/VoldCmdListener(   73): volume list
I/AutoMounter(  158): UpdateState: umsAvail:1 umsEnabled:1 mode:0 usbCablePluggedIn:1 tryToShare:0
I/AutoMounter(  158): UpdateState: Volume sdcard is Mounted and inserted
I/power   (  158): *** set_screen_state 1
D/EventHub(  158): No input device configuration file found for device 'cypress-touchkey'.
I/EventHub(  158): New device: id=1, fd=59, path='/dev/input/event5', name='cypress-touchkey', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/cypress-touchkey.kl', keyCharacterMap='/system/usr/keychars/cypress-touchkey.kcm', builtinKeyboard=false
D/EventHub(  158): No input device configuration file found for device 'lightsensor-level'.
D/EventHub(  158): No input device configuration file found for device 'proximity'.
D/EventHub(  158): No input device configuration file found for device 'herring-keypad'.
I/EventHub(  158): New device: id=4, fd=64, path='/dev/input/event2', name='herring-keypad', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/herring-keypad.kl', keyCharacterMap='/system/usr/keychars/herring-keypad.kcm', builtinKeyboard=false
D/EventHub(  158): No input device configuration file found for device 'gyro'.
E/AKMD2   (  158): libkam : Unable to load settings file, using defaults.
I/EventHub(  158): New device: id=6, fd=68, path='/dev/input/event0', name='mxt224_ts_input', classes=0x14, configuration='/system/usr/idc/mxt224_ts_input.idc', keyLayout='', keyCharacterMap='', builtinKeyboard=false
I/InputReader(  158): Device reconfigured: id=6, name='mxt224_ts_input', surface size is now 480x800, mode is 1
I/InputReader(  158): Device added: id=6, name='mxt224_ts_input', sources=0x00001002
I/InputReader(  158): Device added: id=4, name='herring-keypad', sources=0x00000101
I/InputReader(  158): Device added: id=1, name='cypress-touchkey', sources=0x00000101
D/EventHub(  158): No input device configuration file found for device 'compass'.
I/ServiceManager(  158): Waiting for service batteryinfo...
> - do we hook window.open for same-process content?

Yes.

>  - does gaia implement window.open for apps?

Doesn't matter; if Gaia didn't implement window.open, the popup should be blocked.  We shouldn't crash.
That's an unrelated problem.  mwu and I are investigating.
blocking-basecamp: --- → ?
blocking-basecamp: ? → +
> B2G crashes when trying to login on Marketplace, right after clicking the "Connect/Register" button 
> that should open a BrowserID window.

Can you reproduce on a desktop build?  I just tried with a fresh build of Gecko and Gaia, and I do not see a crash.  Instead, the spinner spins forever when I click the "Log in / Register" button, and nothing else happens.
(In reply to Justin Lebar [:jlebar] from comment #5)
> > B2G crashes when trying to login on Marketplace, right after clicking the "Connect/Register" button 
> > that should open a BrowserID window.
> 
> Can you reproduce on a desktop build?  I just tried with a fresh build of
> Gecko and Gaia, and I do not see a crash.  Instead, the spinner spins
> forever when I click the "Log in / Register" button, and nothing else
> happens.

Unfortunately, I don't have a B2G desktop build ...
cjones on IRC talked to me about Marketplace OOP blacklist, https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/window_manager.js#L443

I don't reproduce the behavior described in bug 776086, and now, after removing oop blacklist for Marketplace, no more crash. However, browserid shows errors in logcat:
E/GeckoConsole(  892): [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]" {file: "https://browserid.org/include.js" line: 8}]
E/GeckoConsole(  805): [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]" {file: "https://browserid.org/include.js" line: 8}]
E/GeckoConsole(  892): [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]" {file: "https://browserid.org/include.js" line: 8}]
> and now, after removing oop blacklist for Marketplace, no more crash.

Okay, but we still need to understand why it was crashing in-process, because a number of key apps run in-process.

> Unfortunately, I don't have a B2G desktop build ...

You can even download one so you don't have to build it yourself.

http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/

But I guess you're asking me to spin a build and see if I can reproduce on my phone.  I'll do that and get back to you, but it'll take some hours...
> I'll do that and get back to you, but it'll take some hours...

Well, the good news is, my build finished quickly.  The bad news is, my screen doesn't turn on at all with the build.

Would definitely appreciate some help here to determine if this is only reproducible on the device.
>  However, browserid shows errors in logcat:
> E/GeckoConsole(  892): [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 
> 0x80004005 (NS_ERROR_FAILURE) [nsIDOMJSWindow.open]" {file: "https://browserid.org/include.js" line: 
> 8}]

This may be fixed by bug 776129.
The crash in-process may also be fixed by bug 776129, although maybe not.
(In reply to Justin Lebar [:jlebar] from comment #8)
> > and now, after removing oop blacklist for Marketplace, no more crash.
> 
> Okay, but we still need to understand why it was crashing in-process,
> because a number of key apps run in-process.
> 
> > Unfortunately, I don't have a B2G desktop build ...
> 
> You can even download one so you don't have to build it yourself.
> 
> http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/
> 
> But I guess you're asking me to spin a build and see if I can reproduce on
> my phone.  I'll do that and get back to you, but it'll take some hours...

Nope, I was really saying that I only had a b2g for my phone and didn't knew there was some desktop builds. I'll give it a try, but not today unfortunately, probably this week-end ...
I've updated my gecko, it contains the fix for bug 776129, but I still get crash of Marketplace when trying to launch the BrowserID login.
(In reply to Alexandre LISSY from comment #13)
> I've updated my gecko, it contains the fix for bug 776129, but I still get
> crash of Marketplace when trying to launch the BrowserID login.

Would you mind checking whether you can reproduce this crash with a desktop build?

With the patches in bug 783644, I can log in just fine on my desktop.  Working on getting a mobile build...
And I just tested on mobile with the patches from bug 78644; no crash here, I can log in with no problems.
Actually, I take that back.  I can't /actually/ log in just fine because the browserid popup is displayed over the virtual keyboard.  So showing the browserid popup is as far as I can get.  :)
When I run the marketplace app OOP and click log in, I get a message from browser-id saying that we don't support cookies.  Which is interesting, but still not this bug.

I'm going to close this as WFM.  Please re-open if you have STR you think I should try.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
(In reply to Justin Lebar [:jlebar] from comment #14)
> (In reply to Alexandre LISSY from comment #13)
> > I've updated my gecko, it contains the fix for bug 776129, but I still get
> > crash of Marketplace when trying to launch the BrowserID login.
> 
> Would you mind checking whether you can reproduce this crash with a desktop
> build?
> 
> With the patches in bug 783644, I can log in just fine on my desktop. 
> Working on getting a mobile build...

I just tested with today's b2g desktop on linux and no crash. No more crash when running on Nexus S, but still no BrowserID popup :(
Okay, with updated gecko, I get BrowserID :)
You need to log in before you can comment on or make changes to this bug.