Closed
Bug 1447191
Opened 4 years ago
Closed 4 years ago
Assertion failure: PermissionAvailable(prin, aType), at nsPermissionManager.cpp:2341 when loading FTP URLs on debug builds
Categories
(Core :: Permission Manager, defect)
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox-esr60 | --- | wontfix |
firefox60 | --- | wontfix |
firefox61 | --- | wontfix |
firefox62 | --- | fixed |
People
(Reporter: jld, Assigned: valentin)
References
()
Details
(Keywords: assertion)
Attachments
(1 file)
STR: with a debug build, navigate to an FTP URL like ftp://ftp.netbsd.org Result: [Child 3420, Main Thread] WARNING: This content process hasn't received the permissions for ftp://ftp.netbsd.org yet: file /home/jld/src/gecko-dev/extensions/cookie/nsPermissionManager.cpp, line 3405 Assertion failure: PermissionAvailable(prin, aType), at /home/jld/src/gecko-dev/extensions/cookie/nsPermissionManager.cpp:2341 I mentioned this in bug 1376106, but it was WORKSFORME'd after the assertion stopped showing up as an intermittent in CI, and it was originally filed about an HTTP document, so I'm thinking that this might be a different underlying bug, since it's FTP and it crashes every time I've tried it. Here's the stack trace from the assertion: #01: nsPermissionManager::TestPermissionFromPrincipal(nsIPrincipal*, char const*, unsigned int*) (/home/jld/src/gecko-dev/extensions/cookie/nsPermissionManager.cpp:2210) #02: TestSitePerm(nsIPrincipal*, char const*, unsigned int, bool) [clone .part.371] (/home/jld/src/gecko-dev/dom/base/nsContentUtils.cpp:3973) #03: nsContentUtils::AllowXULXBLForPrincipal(nsIPrincipal*) (/home/jld/src/gecko-dev/dom/base/nsContentUtils.cpp:7165) #04: TreatAsRemoteXUL (/home/jld/src/gecko-dev/dom/base/nsGlobalWindowOuter.cpp:1536) #05: nsDocumentViewer::InitInternal(nsIWidget*, nsISupports*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, bool, bool, bool) (/home/jld/src/gecko-dev/layout/base/nsDocumentViewer.cpp:933 (discriminator 3)) #06: nsDocumentViewer::Init(nsIWidget*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) (/home/jld/src/gecko-dev/layout/base/nsDocumentViewer.cpp:667) #07: nsDocShell::SetupNewViewer(nsIContentViewer*) (/home/jld/src/gecko-dev/docshell/base/nsDocShell.cpp:9114) #08: nsDocShell::Embed(nsIContentViewer*, char const*, nsISupports*) (/home/jld/src/gecko-dev/docshell/base/nsDocShell.cpp:6922) #09: nsDocShell::CreateContentViewer(nsTSubstring<char> const&, nsIRequest*, nsIStreamListener**) (/home/jld/src/gecko-dev/docshell/base/nsDocShell.cpp:8914) #10: nsDSURIContentListener::DoContent(nsTSubstring<char> const&, bool, nsIRequest*, nsIStreamListener**, bool*) (/home/jld/src/gecko-dev/docshell/base/nsDSURIContentListener.cpp:197) #11: nsDocumentOpenInfo::TryContentListener(nsIURIContentListener*, nsIChannel*) (/home/jld/src/gecko-dev/uriloader/base/nsURILoader.cpp:769) #12: nsDocumentOpenInfo::DispatchContent(nsIRequest*, nsISupports*) (/home/jld/src/gecko-dev/uriloader/base/nsURILoader.cpp:435) #13: nsDocumentOpenInfo::OnStartRequest(nsIRequest*, nsISupports*) (/home/jld/src/gecko-dev/uriloader/base/nsURILoader.cpp:315) #14: mozilla::net::FTPChannelChild::DoOnStartRequest(nsresult const&, long const&, nsTString<char> const&, long const&, nsTString<char> const&, mozilla::ipc::URIParams const&) (/home/jld/src/gecko-dev/netwerk/protocol/ftp/FTPChannelChild.cpp:346) #15: mozilla::net::FTPStartRequestEvent::Run() (/home/jld/src/gecko-dev/netwerk/protocol/ftp/FTPChannelChild.cpp:268) #16: mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) (/home/jld/src/obj.gecko-dev/obj-x86_64-pc-linux-gnu/dist/include/mozilla/net/ChannelEventQueue.h:215) #17: mozilla::net::FTPChannelChild::RecvOnStartRequest(nsresult const&, long const&, nsTString<char> const&, long const&, nsTString<char> const&, mozilla::ipc::URIParams const&) (/home/jld/src/gecko-dev/netwerk/protocol/ftp/FTPChannelChild.cpp:301) #18: mozilla::net::PFTPChannelChild::OnMessageReceived(IPC::Message const&) (/home/jld/src/obj.gecko-dev/obj-x86_64-pc-linux-gnu/ipc/ipdl/PFTPChannelChild.cpp:281)
Updated•4 years ago
|
Component: Networking: FTP → Permission Manager
Comment 1•4 years ago
|
||
Ah, thanks, I didn't see that comment in bug 1376106. I'm not entirely sure why that permission is "not available", is it because we're never actually setting allowXULXBL anywhere? In that case, wouldn't it make sense to just remove the getters? Is remote XUL still a thing? Nika probably knows.
Flags: needinfo?(nika)
![]() |
||
Comment 2•4 years ago
|
||
The reason we assert is the same as at [1]. The ftp channel is not marked as a document load (loadflags == 0), what makes us bypass sending the permissions down. Not sure how big a problem is this for FTP, but we may want to fix this.
![]() |
||
Comment 3•4 years ago
|
||
Note that we don't carry load flags of FTP channels from child to parent at all...
![]() |
||
Comment 4•4 years ago
|
||
FTPChannelOpenArgs should be extended.
![]() |
||
Comment 5•4 years ago
|
||
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1442784#c18
Comment hidden (mozreview-request) |
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → valentin.gosu
![]() |
||
Comment 7•4 years ago
|
||
mozreview-review |
Comment on attachment 8979376 [details] Bug 1447191 - Pass loadFlags when creating FTP IPDL channel https://reviewboard.mozilla.org/r/245534/#review251898 ::: commit-message-b9204:3 (Diff revision 1) > +Bug 1447191 - Pass loadFlags when creating FTP IPDL channel r=mayhemer > + > +This fixes the "Assertion failure: PermissionAvailable(prin, aType), at nsPermissionManager.cpp:2341 when loading FTP URLs on debug builds" would be good to explain how exactly assuming that we don't pass the LOAD_DOCUMENT flag correctly?
Attachment #8979376 -
Flags: review?(honzab.moz) → review+
Assignee | ||
Updated•4 years ago
|
Flags: needinfo?(nika)
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ab31d89c0164 Pass loadFlags when creating FTP IPDL channel r=mayhemer
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ab31d89c0164
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Updated•4 years ago
|
status-firefox60:
--- → wontfix
status-firefox-esr52:
--- → unaffected
status-firefox-esr60:
--- → wontfix
Keywords: assertion
You need to log in
before you can comment on or make changes to this bug.
Description
•