Closed Bug 1576171 Opened 5 years ago Closed 5 years ago

Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))) || rv == NS_ERROR_NOT_AVAILABLE, at /builds/worker/workspace/build/src/netwerk/protocol/ftp/FTPChannelParent.cpp:626

Categories

(Core Graveyard :: Networking: FTP, defect, P2)

defect

Tracking

(firefox-esr60 unaffected, firefox-esr68 unaffected, firefox69 unaffected, firefox70 wontfix, firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox69 --- unaffected
firefox70 --- wontfix
firefox71 --- fixed

People

(Reporter: jkratzer, Assigned: kershaw)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: assertion, regression, testcase, Whiteboard: [necko-triaged])

Attachments

(2 files)

Attached file testcase.html

Testcase found while fuzzing mozilla-central rev 5df00af5913e.

Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))) || rv == NS_ERROR_NOT_AVAILABLE, at /builds/worker/workspace/build/src/netwerk/protocol/ftp/FTPChannelParent.cpp:626

rax = 0x000055dc18de01a0   rdx = 0x0000000000000000
rcx = 0x00007f1dddd75069   rbx = 0x00007f1db74f3040
rsi = 0x00007f1de99de8b0   rdi = 0x00007f1de99dd680
rbp = 0x00007ffd5c1dd590   rsp = 0x00007ffd5c1dd550
r8 = 0x00007f1de99de8b0    r9 = 0x00007f1deab48780
r10 = 0x0000000000000000   r11 = 0x0000000000000000
r12 = 0x00007ffd5c1dd558   r13 = 0x00007f1db74f30a8
r14 = 0x00007ffd5c1dd560   r15 = 0x00007f1dbc453708
rip = 0x00007f1dd893ea96
OS|Linux|0.0.0 Linux 4.18.0-25-generic #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019 x86_64
CPU|amd64|family 6 model 94 stepping 3|1
GPU|||
Crash|SIGSEGV|0x0|0
0|0|libxul.so|mozilla::net::FTPChannelParent::SuspendForDiversion()|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/ftp/FTPChannelParent.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|598|0x2f
0|1|libxul.so|mozilla::net::ChannelDiverterParent::Init(mozilla::net::ChannelDiverterArgs const&)|hg:hg.mozilla.org/mozilla-central:netwerk/base/ChannelDiverterParent.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|41|0x11
0|2|libxul.so|mozilla::net::NeckoParent::RecvPChannelDiverterConstructor(mozilla::net::PChannelDiverterParent*, mozilla::net::ChannelDiverterArgs const&)|hg:hg.mozilla.org/mozilla-central:netwerk/ipc/NeckoParent.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|651|0x5
0|3|libxul.so|mozilla::net::PNeckoParent::OnMessageReceived(IPC::Message const&)|s3:gecko-generated-sources:0422b6d1a61a9b7b725ecbda964dc4d113bb5ccfa51ccca0597f4378c5e5bb44546336099c4b7afb4c91661e982fd83489ff44ffccdf1701a874d7a6ea7c1c9b/ipc/ipdl/PNeckoParent.cpp:|2821|0x6
0|4|libxul.so|mozilla::dom::PContentParent::OnMessageReceived(IPC::Message const&)|s3:gecko-generated-sources:133726420c0eb754a0813c5b685e5730d2ab7523f5ea81fc7a41c0c2db336396785b9cf8e2b7490ce865db9a3f87ebd07fdae844113e30544350b4c079533ee9/ipc/ipdl/PContentParent.cpp:|5794|0x15
0|5|libxul.so|mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessageChannel.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|2184|0x6
0|6|libxul.so|mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessageChannel.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|2108|0xb
0|7|libxul.so|mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessageChannel.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|1955|0xb
0|8|libxul.so|mozilla::ipc::MessageChannel::MessageTask::Run()|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessageChannel.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|1986|0xc
0|9|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|1225|0x15
0|10|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThreadUtils.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|486|0x11
0|11|libxul.so|mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|88|0xa
0|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|315|0x17
0|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|290|0x8
0|14|libxul.so|nsBaseAppShell::Run()|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|137|0xd
0|15|libxul.so|nsAppStartup::Run()|hg:hg.mozilla.org/mozilla-central:toolkit/components/startup/nsAppStartup.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|276|0xe
0|16|libxul.so|XREMain::XRE_mainRun()|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|4569|0x11
0|17|libxul.so|XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|4707|0x8
0|18|libxul.so|XRE_main(int, char**, mozilla::BootstrapConfig const&)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|4788|0x5
0|19|firefox-bin|do_main|hg:hg.mozilla.org/mozilla-central:browser/app/nsBrowserApp.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|213|0x22
0|20|firefox-bin|main|hg:hg.mozilla.org/mozilla-central:browser/app/nsBrowserApp.cpp:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|295|0xf
0|21|libc-2.27.so||||0x21b97
0|22|firefox-bin|MOZ_ReportCrash|hg:hg.mozilla.org/mozilla-central:mfbt/Assertions.h:5df00af5913e90ba7c60411e1e6cb78c2f7c46e0|184|0x5
Flags: in-testsuite?

Testcase bisects to the following range:

Start: eff8c62bdeb71f78dbf0e2324b31d094355cf3dc (20190813215212)
End: d3deef805f92d4a899d7b6de76b347328f33e54b (20190814040917)
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=eff8c62bdeb71f78dbf0e2324b31d094355cf3dc&tochange=d3deef805f92d4a899d7b6de76b347328f33e54b

Possibly a regression from bug 1560699 (https://hg.mozilla.org/mozilla-central/rev/29e52be56fee)

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

(In reply to Jason Kratzer [:jkratzer] from comment #1)

Testcase bisects to the following range:

Start: eff8c62bdeb71f78dbf0e2324b31d094355cf3dc (20190813215212)
End: d3deef805f92d4a899d7b6de76b347328f33e54b (20190814040917)
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=eff8c62bdeb71f78dbf0e2324b31d094355cf3dc&tochange=d3deef805f92d4a899d7b6de76b347328f33e54b

Possibly a regression from bug 1560699 (https://hg.mozilla.org/mozilla-central/rev/29e52be56fee)

Hi Jan, could you take a look?
Thanks.

Flags: needinfo?(jan)

Is there someone to address this, please?

Flags: needinfo?(nhnguyen)

I can take this.

Assignee: nobody → kershaw
Flags: needinfo?(nhnguyen)
Flags: needinfo?(jan)
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e7a5b2a6ec28
Send ftp channel status via OnStartRequest r=valentin
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

Is this something we should consider for Beta uplift?

Flags: needinfo?(kershaw)
Flags: in-testsuite?
Flags: in-testsuite-
Regressed by: 1560699

(In reply to Ryan VanderMeulen [:RyanVM] from comment #9)

Is this something we should consider for Beta uplift?

I think we don't have to uplift this.
Without this patch, the release build won't crash. It shows a popup dialog which says that the file can not be saved.

Flags: needinfo?(kershaw)
See Also: → 1582966

I still hit this with self-debug-build linux nightly with load ftp://ftp.de.debian.org/debian/README

Flags: needinfo?(kershaw)

(In reply to Junior [:junior] from comment #11)

I still hit this with self-debug-build linux nightly with load ftp://ftp.de.debian.org/debian/README

The root cause is different than this bug. The log shows that FTPChannelParent::OnStopReques happened before FTPChannelChild::DivertToParent, so mPumpingData was already false at this point. nsFtpChannel::SuspendInternal returned NS_ERROR_NOT_INITIALIZED and we hit this assertion again.

I'll file another bug to fix this.

[Parent 21814: Main Thread]: D/nsFtp FTPChannelParent::OnStartRequest [this=0x13e8fdd00]
[Parent 21814: Main Thread]: D/nsFtp FTPChannelParent::OnDataAvailable [this=0x13e8fdd00]
[Parent 21814: Main Thread]: D/nsFtp FTP:(0x13ee06090) close [80470002]
[Parent 21814: Main Thread]: I/nsFtp FTP:(0x13ee06090) nsFtpState stopping
[Parent 21814: Main Thread]: D/nsFtp FTP:(0x13ee05dc0) wait data [listener=0x0]
[Parent 21814: Main Thread]: I/nsFtp FTP:(0x13ee05dc0) CC disconnecting (804b0002)
[Parent 21814: Main Thread]: I/nsFtp FTP:CC destroyed @0x13ee05dc0
[Parent 21814: Main Thread]: D/nsFtp FTP:(0x13ee06090) close [80470002]
[Child 21816: Main Thread]: D/nsFtp FTPChannelChild::RecvOnStartRequest [this=0x1340f5800]
[Child 21816: Main Thread]: D/nsFtp FTPChannelChild::DoOnStartRequest [this=0x1340f5800]
[Parent 21814: Main Thread]: D/nsFtp FTPChannelParent::OnStopRequest: [this=0x13e8fdd00 status=0]
[Parent 21814: Main Thread]: I/nsFtp FTP:(0x13ee06090) nsFtpState destroyed
[Child 21816: Main Thread]: D/nsFtp FTPChannelChild::DivertToParent [this=0x1340f5800]
[Child 21816: Main Thread]: D/nsFtp FTPChannelChild::Suspend [this=0x1340f5800]
[Child 21816: Main Thread]: D/nsFtp FTPChannelChild::RecvOnDataAvailable [this=0x1340f5800]
[Child 21816: Main Thread]: D/nsFtp FTPChannelChild::RecvOnStopRequest [this=0x1340f5800 status=0]
[Parent 21814: Main Thread]: D/nsFtp nsFtpChannel::Suspend [this=0x12a2fa600]
[Parent 21814: Main Thread]: D/nsFtp nsFtpChannel::SuspendInternal [this=0x12a2fa600]
[Parent 21814, Main Thread] WARNING: NS_ENSURE_TRUE(mPumpingData) failed: file /Users/changkershaw/work/gecko/netwerk/base/nsBaseChannel.cpp, line 409
[Parent 21814: Main Thread]: D/nsFtp nsFtpChannel::SuspendInternal [this=0x12a2fa600]
[Parent 21814, Main Thread] WARNING: NS_ENSURE_TRUE(mPumpingData) failed: file /Users/changkershaw/work/gecko/netwerk/base/nsBaseChannel.cpp, line 409
Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))) || rv == NS_ERROR_NOT_AVAILABLE, at /Users/changkershaw/work/gecko/netwerk/protocol/ftp/FTPChannelParent.cpp:632
Flags: needinfo?(kershaw)
Has Regression Range: --- → yes
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: