Closed Bug 1817901 Opened 1 year ago Closed 9 months ago

Intermittent dom/tests/mochitest/fetch/test_readableStreams.html | application crashed [@ nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const]

Categories

(Core :: DOM: Networking, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1836607

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: crash, intermittent-failure, Whiteboard: [necko-triaged][necko-priority-review])

Crash Data

Filed by: smolnar [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=406327237&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/E6FSMsBiQv2O9_STEnYayA/runs/0/artifacts/public/logs/live_backing.log


INFO -  TEST-START | dom/tests/mochitest/fetch/test_readableStreams.html
[task 2023-02-21T01:20:01.325Z] 01:20:01     INFO -  wait for org.mozilla.geckoview.test_runner complete; top activity=com.android.launcher3
[task 2023-02-21T01:20:01.325Z] 01:20:01     INFO -  runtestsremote.py | Application ran for: 0:00:35.805753
[task 2023-02-21T01:20:01.400Z] 01:20:01     INFO -  mozcrash Copy/paste: /builds/worker/fetches/minidump-stackwalk/minidump-stackwalk --symbols-url=https://symbols.mozilla.org/ --cyborg=/tmp/tmp40a258rf/1ca801c2-06e8-91c8-9eee-a13e6f27b675.trace /tmp/tmppiw3lh98/1ca801c2-06e8-91c8-9eee-a13e6f27b675.dmp /builds/worker/workspace/build/symbols
[task 2023-02-21T01:20:06.662Z] 01:20:06     INFO -  mozcrash Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/1ca801c2-06e8-91c8-9eee-a13e6f27b675.dmp
[task 2023-02-21T01:20:06.662Z] 01:20:06     INFO -  mozcrash Saved app info as /builds/worker/workspace/build/blobber_upload_dir/1ca801c2-06e8-91c8-9eee-a13e6f27b675.extra
[task 2023-02-21T01:20:06.664Z] 01:20:06  WARNING -  PROCESS-CRASH | dom/tests/mochitest/fetch/test_readableStreams.html | application crashed [@ nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const]
[task 2023-02-21T01:20:06.664Z] 01:20:06     INFO -  Mozilla crash reason: FetchStreamReader not thread-safe
[task 2023-02-21T01:20:06.664Z] 01:20:06     INFO -  Crash dump filename: /tmp/tmppiw3lh98/1ca801c2-06e8-91c8-9eee-a13e6f27b675.dmp
[task 2023-02-21T01:20:06.664Z] 01:20:06     INFO -  Operating system: Android
[task 2023-02-21T01:20:06.664Z] 01:20:06     INFO -                    0.0.0 Linux 3.10.0+ #260 SMP PREEMPT Fri May 19 12:48:14 PDT 2017 x86_64
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -  CPU: amd64
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -       family 6 model 6 stepping 3
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -       4 CPUs
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -  Crash reason:  SIGSEGV / SEGV_MAPERR
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -  Crash address: 0x0
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -  Crashing instruction: `mov dword [0x0], 0x2b`
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -  Memory accessed by instruction:
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -    0. Address: 0x0000000000000000
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -       Size: 4
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -  Process uptime: not available
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -  Thread 34 StreamTrans #2 (crashed)
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -   0  libxul.so!MOZ_Crash(char const*, int, char const*) [Assertions.h:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 261]
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -      Found by: inlining
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -   1  libxul.so!nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const [nsISupportsImpl.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 43 + 0x1c]
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -       rax = 0x0000761db4226d60    rdx = 0x0000000000000004
[task 2023-02-21T01:20:06.665Z] 01:20:06     INFO -       rcx = 0x2db55a534da2bd7b    rbx = 0x0000761db04194d0
[task 2023-02-21T01:20:06.666Z] 01:20:06     INFO -       rsi = 0x0000761d9fe7c340    rdi = 0x000000000000001b
[task 2023-02-21T01:20:06.666Z] 01:20:06     INFO -       rbp = 0x0000761d9fe7ca00    rsp = 0x0000761d9fe7c9f0
[task 2023-02-21T01:20:06.666Z] 01:20:06     INFO -        r8 = 0x0000000000000000     r9 = 0x0000761dd2724090
[task 2023-02-21T01:20:06.666Z] 01:20:06     INFO -       r10 = 0x0000000000000017    r11 = 0x0000000000000246
[task 2023-02-21T01:20:06.666Z] 01:20:06     INFO -       r12 = 0x0000761d9fe7caf0    r13 = 0x0000761d9fe7caf8
INFO -       r14 = 0x0000761d9fdd2e88    r15 = 0x0000761d9fdcdf00
[task 2023-02-21T01:20:06.666Z] 01:20:06     INFO -       rip = 0x0000761da89a5f24
[task 2023-02-21T01:20:06.666Z] 01:20:06     INFO -      Found by: given as instruction pointer in context
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -   2  libxul.so!nsAutoOwningThread::AssertOwnership<34>(char const (&) [34]) const [nsISupportsImpl.h:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 60]
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -      Found by: inlining
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -   3  libxul.so!mozilla::dom::FetchStreamReader::Release() [FetchStreamReader.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 32 + 0xb]
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -       rbx = 0x0000761d9fdd2e80    rbp = 0x0000761d9fe7ca20
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -       rsp = 0x0000761d9fe7ca10    r12 = 0x0000761d9fe7caf0
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -       r13 = 0x0000761d9fe7caf8    r14 = 0x0000761d9fdd2e88
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -       r15 = 0x0000761d9fdcdf00    rip = 0x0000761daa93d844
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -      Found by: call frame info
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -   4  libxul.so!CallbackHolder::CallbackHolder(nsIAsyncOutputStream*, nsIOutputStreamCallback*, unsigned int, nsIEventTarget*)::{lambda()#1}::~{lambda()#1}() [nsPipe3.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 84 + 0x14]
[task 2023-02-21T01:20:06.667Z] 01:20:06     INFO -       rbx = 0x0000761d9f4f8688    rbp = 0x0000761d9fe7ca40
[task 2023-02-21T01:20:06.668Z] 01:20:06     INFO -       rsp = 0x0000761d9fe7ca30    r12 = 0x0000761d9fe7caf0
[task 2023-02-21T01:20:06.668Z] 01:20:06     INFO -       r13 = 0x0000761d9fe7caf8    r14 = 0x0000761d9f4f8650
[task 2023-02-21T01:20:06.668Z] 01:20:06     INFO -       r15 = 0x0000761d9fdcdf00    rip = 0x0000761da8a06831
[task 2023-02-21T01:20:06.668Z] 01:20:06     INFO -      Found by: call frame info
[task 2023-02-21T01:20:06.668Z] 01:20:06     INFO -   5  libxul.so!NS_NewCancelableRunnableFunction<CallbackHolder::CallbackHolder(nsIAsyncOutputStream*, nsIOutputStreamCallback*, unsigned int, nsIEventTarget*)::{lambda()#1}>(char const*, CallbackHolder::CallbackHolder(nsIAsyncOutputStream*, nsIOutputStreamCallback*, unsigned int, nsIEventTarget*)::{lambda()#1}&&)::FuncCancelableRunnable::~FuncCancelableRunnable() [nsThreadUtils.h:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 677]
[task 2023-02-21T01:20:06.668Z] 01:20:06     INFO -      Found by: inlining
[task 2023-02-21T01:20:06.669Z] 01:20:06     INFO -   6  libxul.so!NS_NewCancelableRunnableFunction<CallbackHolder::CallbackHolder(nsIAsyncOutputStream*, nsIOutputStreamCallback*, unsigned int, nsIEventTarget*)::{lambda()#1}>(char const*, CallbackHolder::CallbackHolder(nsIAsyncOutputStream*, nsIOutputStreamCallback*, unsigned int, nsIEventTarget*)::{lambda()#1}&&)::FuncCancelableRunnable::~FuncCancelableRunnable() [nsThreadUtils.h:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 677 + 0x8]
[task 2023-02-21T01:20:06.669Z] 01:20:06     INFO -       rbx = 0x0000761d9f4f8650    rbp = 0x0000761d9fe7ca60
[task 2023-02-21T01:20:06.669Z] 01:20:06     INFO -       rsp = 0x0000761d9fe7ca50    r12 = 0x0000761d9fe7caf0
[task 2023-02-21T01:20:06.669Z] 01:20:06     INFO -       r13 = 0x0000761d9fe7caf8    r14 = 0x0000761d9f4f8650
[task 2023-02-21T01:20:06.669Z] 01:20:06     INFO -       r15 = 0x0000761d9fdcdf00    rip = 0x0000761da8a069bb
[task 2023-02-21T01:20:06.669Z] 01:20:06     INFO -      Found by: call frame info
[task 2023-02-21T01:20:06.669Z] 01:20:06     INFO -   7  libxul.so!mozilla::Runnable::Release() [nsThreadUtils.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 63 + 0x8]
[task 2023-02-21T01:20:06.669Z] 01:20:06     INFO -       rbx = 0x0000000000000000    rbp = 0x0000761d9fe7ca80
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -       rsp = 0x0000761d9fe7ca70    r12 = 0x0000761d9fe7caf0
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -       r13 = 0x0000761d9fe7caf8    r14 = 0x0000761d9f4f8650
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -       r15 = 0x0000761d9fdcdf00    rip = 0x0000761da8a43adf
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -      Found by: call frame info
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -   8  libxul.so!mozilla::dom::(anonymous namespace)::ExternalRunnableWrapper::~ExternalRunnableWrapper() [WorkerPrivate.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 186]
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -      Found by: inlining
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -   9  libxul.so!mozilla::dom::(anonymous namespace)::ExternalRunnableWrapper::~ExternalRunnableWrapper() [WorkerPrivate.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 186 + 0x8]
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -       rbx = 0x0000761d9f4fb7c0    rbp = 0x0000761d9fe7caa0
[task 2023-02-21T01:20:06.670Z] 01:20:06     INFO -       rsp = 0x0000761d9fe7ca90    r12 = 0x0000761d9fe7caf0
[task 2023-02-21T01:20:06.671Z] 01:20:06     INFO -       r13 = 0x0000761d9fe7caf8    r14 = 0x0000761d9f4fb7c0
[task 2023-02-21T01:20:06.671Z] 01:20:06     INFO -       r15 = 0x0000761d9fdcdf00    rip = 0x0000761dab55258d
INFO -      Found by: call frame info
[task 2023-02-21T01:20:06.671Z] 01:20:06     INFO -  10  libxul.so!mozilla::dom::WorkerRunnable::Release() [WorkerRunnable.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 209 + 0x8]
[task 2023-02-21T01:20:06.671Z] 01:20:06     INFO -       rbx = 0x0000000000000000    rbp = 0x0000761d9fe7cac0
[task 2023-02-21T01:20:06.671Z] 01:20:06     INFO -       rsp = 0x0000761d9fe7cab0    r12 = 0x0000761d9fe7caf0
[task 2023-02-21T01:20:06.671Z] 01:20:06     INFO -       r13 = 0x0000761d9fe7caf8    r14 = 0x0000761d9f4fb7c0
[task 2023-02-21T01:20:06.671Z] 01:20:06     INFO -       r15 = 0x0000761d9fdcdf00    rip = 0x0000761dab54a0a2
[task 2023-02-21T01:20:06.671Z] 01:20:06     INFO -      Found by: call frame info
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -  11  libxul.so!mozilla::dom::(anonymous namespace)::ExternalRunnableWrapper::Release() [WorkerPrivate.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 183 + 0xe]
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -       rbx = 0x0000761d9f4fb7c0    rbp = 0x0000761d9fe7cae0
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -       rsp = 0x0000761d9fe7cad0    r12 = 0x0000761d9fe7caf0
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -       r13 = 0x0000761d9fe7caf8    r14 = 0x0000761d9fdcdf10
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -       r15 = 0x0000761d9fdcdf00    rip = 0x0000761dab5523e1
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -      Found by: call frame info
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -  12  libxul.so!mozilla::RefPtrTraits<mozilla::dom::WorkerRunnable>::Release(mozilla::dom::WorkerRunnable*) [RefPtr.h:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 50]
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -      Found by: inlining
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -  13  libxul.so!RefPtr<mozilla::dom::WorkerRunnable>::ConstRemovingRefPtrTraits<mozilla::dom::WorkerRunnable>::Release(mozilla::dom::WorkerRunnable*) [RefPtr.h:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 381]
[task 2023-02-21T01:20:06.672Z] 01:20:06     INFO -      Found by: inlining
[task 2023-02-21T01:20:06.673Z] 01:20:06     INFO -  14  libxul.so!RefPtr<mozilla::dom::WorkerRunnable>::~RefPtr() [RefPtr.h:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 81]
[task 2023-02-21T01:20:06.673Z] 01:20:06     INFO -      Found by: inlining
[task 2023-02-21T01:20:06.673Z] 01:20:06     INFO -  15  libxul.so!mozilla::dom::WorkerEventTarget::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) [WorkerEventTarget.cpp:e19436c4be608ac59a7ad9de87fcc4d5582a345b : 105 + 0xe]
[task 2023-02-21T01:20:06.673Z] 01:20:06     INFO -       rbx = 0x0000761d9fe7cb00    rbp = 0x0000761d9fe7cb40
<...>
Severity: -- → S2
Priority: -- → P2
Whiteboard: [necko-priority-review]

Is this related to bug 1351231?

Flags: needinfo?(echuang)

It looks like the FetchReadableStream is released on the unexpected thread.
According to the stack, the release is triggered by WorkerPrivate::MaybeWrapAsWorkerRunnable and dispatched to the worker thread. However, it has no enough information to tell where the FetchStreamReader was created.

Is this related to PFetch? Currently, I will say it seems not. As I know that PFetch creates the fetch response on the worker thread. If the response's readable stream is also released on the worker thread, it should be no problem since everything is on the worker thread.

To debug this assertion, we need to know where the FetchStreamReader is created.

Flags: needinfo?(echuang)

Now I am more confident this is not a regression of PFetch since we had haven some reports before PFetch landed. See bug 1777106 and bug 1802116.

Hi Edgul. Bug 1777106 and bug 1802116 reported the same crash stack. Should we set this bug and bug 1802116 as duplicates of bug 1777106?

Flags: needinfo?(edgul)
Duplicate of this bug: 1777106
Duplicate of this bug: 1802116

Looks like it to me, done. Thanks.

Flags: needinfo?(edgul)

Copying crash signatures from duplicate bugs.

Crash Signature: [@ nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const] → [@ nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const] [@ MOZ_Crash]

Since the crash volume is low (less than 15 per week), the severity is downgraded to S3. Feel free to change it back if you think the bug is still critical.

For more information, please visit auto_nag documentation.

Severity: S2 → S3

Copying crash signatures from duplicate bugs.

Crash Signature: [@ nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const] [@ MOZ_Crash] → [@ nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const] [@ MOZ_Crash] [@ split_config.x86_64.apk + 0x000000000029a832]

Looks like crashes have gone away, moving to monitor.

Crash Signature: [@ nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const] [@ MOZ_Crash] [@ split_config.x86_64.apk + 0x000000000029a832] → [@ nsAutoOwningThread::AssertCurrentThreadOwnsMe(char const*) const] [@ MOZ_Crash] [@ split_config.x86_64.apk + 0x000000000029a832]
Whiteboard: [necko-priority-review] → [necko-triaged] [necko-monitor]

Hi Eden,

Could you take a look?

Thanks.

Flags: needinfo?(echuang)
Whiteboard: [necko-triaged] [necko-monitor] → [necko-triaged]
Whiteboard: [necko-triaged] → [necko-triaged][necko-priority-review]

I thought this is a duplicate of bug 1836607.

Status: NEW → RESOLVED
Closed: 9 months ago
Duplicate of bug: 1836607
Flags: needinfo?(echuang)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.