If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

mozilla::dom::workers::FetchEventRunnable::ResumeRequest::Run crash

RESOLVED DUPLICATE of bug 1166504

Status

()

Core
DOM: Service Workers
RESOLVED DUPLICATE of bug 1166504
2 years ago
2 years ago

People

(Reporter: dougt, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
I enabled sw in a pull from today.  Crashes when I try to register a sw at https://johnme-gcm.appspot.com/chat/



Hit MOZ_CRASH(Input stream is not serializable!) at /Users/dougt/builds/gecko-dev/ipc/glue/InputStreamUtils.cpp:49
#01: mozilla::ipc::SerializeInputStream(nsIInputStream*, mozilla::ipc::InputStreamParams&, nsTArray<mozilla::ipc::FileDescriptor>&)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x8201b4]
#02: nsBufferedInputStream::Serialize(mozilla::ipc::InputStreamParams&, nsTArray<mozilla::ipc::FileDescriptor>&)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2c926b]
#03: non-virtual thunk to nsBufferedInputStream::Serialize(mozilla::ipc::InputStreamParams&, nsTArray<mozilla::ipc::FileDescriptor>&)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2c9357]
#04: mozilla::ipc::SerializeInputStream(nsIInputStream*, mozilla::ipc::InputStreamParams&, nsTArray<mozilla::ipc::FileDescriptor>&)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x8201e8]
#05: mozilla::ipc::SerializeInputStream(nsIInputStream*, mozilla::ipc::OptionalInputStreamParams&, nsTArray<mozilla::ipc::FileDescriptor>&)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x82028a]
#06: mozilla::net::HttpChannelChild::ContinueAsyncOpen()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x55692f]
#07: mozilla::net::HttpChannelChild::ResetInterception()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5599bf]
#08: mozilla::net::InterceptedChannelContent::ResetInterception()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x564d8e]
#09: mozilla::dom::workers::FetchEventRunnable::ResumeRequest::Run()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x369569a]
#10: nsThread::ProcessNextEvent(bool, bool*)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x196bfa]
#11: NS_ProcessPendingEvents(nsIThread*, unsigned int)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x1f2267]
#12: nsBaseAppShell::NativeEventCallback()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3934ec6]
#13: nsAppShell::ProcessGeckoEvents(void*)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x39b1d5d]
#14: __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x80a01]
#15: __CFRunLoopDoSources0[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x72b8d]
#16: __CFRunLoopRun[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x721bf]
#17: CFRunLoopRunSpecific[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x71bd8]
#18: RunCurrentEventLoopInMode[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x3256f]
#19: ReceiveNextEventCommon[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x322ea]
#20: _BlockUntilNextEventMatchingListInModeWithFilter[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x3212b]
#21: _DPSNextEvent[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x919bb]
#22: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x90f68]
#23: -[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x39b0887]
#24: -[NSApplication run][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x86bf3]
#25: nsAppShell::Run()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x39b272c]
#26: XRE_RunAppShell[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4982b0c]
#27: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x828f22]
#28: MessageLoop::RunInternal()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x79ce05]
#29: MessageLoop::RunHandler()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x79cd15]
#30: MessageLoop::Run()[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x79ccbd]
#31: XRE_InitChildProcess[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/XUL +0x498231e]
#32: content_process_main(int, char**)[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container +0x1eeb]
#33: main[/Users/dougt/builds/gecko-dev/obj-ff-dbg-no-opt/dist/NightlyDebug.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container +0x1fd2]
[Parent 41004] WARNING: 'NS_FAILED(rv)', file /Users/dougt/builds/gecko-dev/dom/indexedDB/ActorsParent.cpp, line 8665

###!!! [Parent][MessageChannel] Error: (msgtype=0x200078,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

Comment 1

2 years ago
So, this looks like a non-serializable stream (pipe?) is being passed as the upload stream.  This is dying here:

  https://dxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/HttpChannelChild.cpp#1608

I don't see any fetch event handler in the sw.js, though.  I assume we are still doing the interception, but just automatically trying to do the fetch with the Request we would have passed to the sw fetch event handler.

Josh, what do you think?  How is the upload stream created in this case?
Assignee: bkelly → nobody
Flags: needinfo?(josh)

Comment 2

2 years ago
I would say its probably a pipe from an NS_CloneInputStream(), but I don't understand why a pipe stream would be wrapped in BufferedInputStream().  I've only seen that happen when the pipe is immediately closed and therefore fails the NS_IsBufferedInputStream() check.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1166504

Updated

2 years ago
Flags: needinfo?(josh)
You need to log in before you can comment on or make changes to this bug.