From 8fb154fe7a5a43516b60d22823dfe3e56edd2a71 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 10 Aug 2021 12:24:29 -0700 Subject: [PATCH 001/137] Ignore IDE settings in .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index b96ec0eee..d01d95720 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,7 @@ coverage/ # NPM server/frontend/node_modules server/frontend/dist + +# IDE / Editor +.vscode/ +.idea/ From 9ad4d0a69d47e7b103975f5d2496df4e263067cd Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 10 Aug 2021 10:37:34 -0700 Subject: [PATCH 002/137] mypy does not like to deal with dashes in folder names --- misc/{afl-libfuzzer => afl_libfuzzer}/S3Manager.py | 0 misc/{afl-libfuzzer => afl_libfuzzer}/__init__.py | 0 misc/{afl-libfuzzer => afl_libfuzzer}/afl-libfuzzer-daemon.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename misc/{afl-libfuzzer => afl_libfuzzer}/S3Manager.py (100%) rename misc/{afl-libfuzzer => afl_libfuzzer}/__init__.py (100%) rename misc/{afl-libfuzzer => afl_libfuzzer}/afl-libfuzzer-daemon.py (100%) diff --git a/misc/afl-libfuzzer/S3Manager.py b/misc/afl_libfuzzer/S3Manager.py similarity index 100% rename from misc/afl-libfuzzer/S3Manager.py rename to misc/afl_libfuzzer/S3Manager.py diff --git a/misc/afl-libfuzzer/__init__.py b/misc/afl_libfuzzer/__init__.py similarity index 100% rename from misc/afl-libfuzzer/__init__.py rename to misc/afl_libfuzzer/__init__.py diff --git a/misc/afl-libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py similarity index 100% rename from misc/afl-libfuzzer/afl-libfuzzer-daemon.py rename to misc/afl_libfuzzer/afl-libfuzzer-daemon.py From d413fda6c710b29425527a7990d59b5276aeded7 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 10 Aug 2021 10:37:57 -0700 Subject: [PATCH 003/137] Fix mypy complaint about missing __init__.py file --- server/covmanager/tests/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 server/covmanager/tests/__init__.py diff --git a/server/covmanager/tests/__init__.py b/server/covmanager/tests/__init__.py new file mode 100644 index 000000000..e69de29bb From 5baf4c0319d90a6110144d8eef39b94ca4e89fe7 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 10 Aug 2021 10:39:52 -0700 Subject: [PATCH 004/137] Add mypy config file adapted from Lithium --- pyproject.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..f36c1ec98 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[tool.mypy] +files = [ + "Collector/**/*.py", + "CovReporter/**/*.py", + "EC2Reporter/**/*.py", + "FTB/**/*.py", + "Reporter/**/*.py", + "TaskStatusReporter/**/*.py", + "misc/**/*.py", + "server/**/*.py", +] +strict = true +ignore_missing_imports = true +show_error_codes = true From c9807f001772f7bd004867723a1fa29d07122854 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 10 Aug 2021 10:40:39 -0700 Subject: [PATCH 005/137] Add mypy and other related types packages to Python 3 server requirements --- server/requirements3.0.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/requirements3.0.txt b/server/requirements3.0.txt index 1de1b48b2..37c60b06f 100644 --- a/server/requirements3.0.txt +++ b/server/requirements3.0.txt @@ -31,6 +31,7 @@ mccabe>=0.6.1,<0.7 mock==2.0.0; python_version == '2.7' monotonic==1.5 more-itertools>=4.2.0,<4.4 +mypy==0.910 pluggy>=0.7.0,<0.8 py>=1.5.3 pycodestyle>=2.5,<2.6 @@ -50,6 +51,13 @@ singledispatch>=3.4.0.3,<3.4.1; python_version == '2.7' six>=1.12.0 # fuzzing-decision is only needed for the taskmanager module (requires python 3) #git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision +types-boto==0.1.4 +types-mock==0.1.5 +types-PyYAML==5.4.6 +types-python-dateutil==0.1.6 +types-redis==3.5.6 +types-requests==2.25.6 +types-six==0.1.9 urllib3>=1.22,<2 vine>=1.1.4,<1.2 whitenoise==5.2.0 From a0e50ae228c88060dc35dbcc0c739f31ae7de3ef Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 10 Aug 2021 12:23:23 -0700 Subject: [PATCH 006/137] Functions that do not return anything should "-> None" --- Collector/Collector.py | 2 +- CovReporter/tests/test_CovReporter.py | 6 +- FTB/Running/GDB.py | 2 +- FTB/Running/PersistentApplication.py | 8 +- FTB/Running/StreamCollector.py | 2 +- FTB/Running/WaitpidMonitor.py | 2 +- FTB/Running/tests/test_shell.py | 6 +- FTB/Signatures/CrashInfo.py | 2 +- FTB/Signatures/tests/test_CrashInfo.py | 208 +++++++++--------- FTB/Signatures/tests/test_CrashSignature.py | 38 ++-- FTB/tests/test_AssertionHelper.py | 32 +-- FTB/tests/test_CoverageHelper.py | 10 +- misc/afl_libfuzzer/S3Manager.py | 2 +- misc/afl_libfuzzer/afl-libfuzzer-daemon.py | 6 +- misc/ec2prices/simulator.py | 2 +- misc/libfuzzer/libfuzzer.py | 2 +- misc/update_prices.py | 2 +- server/conftest.py | 2 +- server/contrib/create_user.py | 2 +- server/contrib/fuzzmanager_setup_helper.py | 4 +- .../GITSourceCodeProvider.py | 2 +- .../HGSourceCodeProvider.py | 2 +- .../SourceCodeProvider/SourceCodeProvider.py | 2 +- .../tests/test_sourcecodeprovider.py | 4 +- server/covmanager/cron.py | 2 +- server/covmanager/models.py | 2 +- .../tests/test_mgmt_setup_repository.py | 10 +- server/crashmanager/Bugtracker/Provider.py | 2 +- server/crashmanager/cron.py | 10 +- server/crashmanager/management/common.py | 6 +- server/crashmanager/models.py | 6 +- server/crashmanager/tests/__init__.py | 4 +- .../tests/test_mgmt_add_permission.py | 10 +- .../tests/test_mgmt_bug_update_status.py | 4 +- .../tests/test_mgmt_cleanup_old_crashes.py | 4 +- .../tests/test_mgmt_export_signatures.py | 6 +- .../tests/test_mgmt_get_auth_token.py | 4 +- .../tests/test_mgmt_triage_new_crashes.py | 8 +- .../CloudProvider/CloudProvider.py | 4 +- .../CloudProvider/EC2SpotCloudProvider.py | 2 +- .../CloudProvider/GCECloudProvider.py | 2 +- server/ec2spotmanager/cron.py | 6 +- server/ec2spotmanager/models.py | 4 +- server/ec2spotmanager/tests/__init__.py | 2 +- .../ec2spotmanager/tests/test_task_status.py | 4 +- server/ec2spotmanager/tests/test_tasks.py | 6 +- server/taskmanager/cron.py | 4 +- server/taskmanager/tasks.py | 2 +- 48 files changed, 232 insertions(+), 232 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index c44e43494..2fa10677a 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -45,7 +45,7 @@ class Collector(Reporter): @remote_checks @signature_checks - def refresh(self): + def refresh(self) -> None: ''' Refresh signatures by contacting the server, downloading new signatures and invalidating old ones. diff --git a/CovReporter/tests/test_CovReporter.py b/CovReporter/tests/test_CovReporter.py index fa7b22eff..86d6438e6 100644 --- a/CovReporter/tests/test_CovReporter.py +++ b/CovReporter/tests/test_CovReporter.py @@ -47,13 +47,13 @@ }""") # noqa -def test_CovReporterCoverallsVersionData(): +def test_CovReporterCoverallsVersionData() -> None: ret = CovReporter.version_info_from_coverage_data(coverallsData) assert ret["revision"] == "1a0d9545b9805f50a70de703a3c04fc0d22e3839" assert ret["branch"] == "master" -def test_CovReporterPreprocessData(): +def test_CovReporterPreprocessData() -> None: result = CovReporter.preprocess_coverage_data(coverallsData) children = "children" @@ -111,7 +111,7 @@ def test_CovReporterPreprocessData(): assert result[children]["topdir1"][children]["subdir1"][children]["file1.c"][coverage][0] == -1 -def test_CovReporterMergeData(): +def test_CovReporterMergeData() -> None: #result = CovReporter.preprocess_coverage_data(coverallsData) #result2 = CovReporter.preprocess_coverage_data(coverallsAddData) diff --git a/FTB/Running/GDB.py b/FTB/Running/GDB.py index 77376ad78..c4f2bb5f7 100644 --- a/FTB/Running/GDB.py +++ b/FTB/Running/GDB.py @@ -43,7 +43,7 @@ def regAsRaw(reg): return str(gdb.parse_and_eval("$" + reg)) # noqa @UndefinedVariable -def printImportantRegisters(): +def printImportantRegisters() -> None: if is64bit(): regs = "rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 rip".split(" ") elif isARM(): diff --git a/FTB/Running/PersistentApplication.py b/FTB/Running/PersistentApplication.py index 1de0d8c42..af5578c5b 100644 --- a/FTB/Running/PersistentApplication.py +++ b/FTB/Running/PersistentApplication.py @@ -115,13 +115,13 @@ def __init__(self, binary, args=None, env=None, cwd=None, persistentMode=Persist def start(self, test=None): pass - def stop(self): + def stop(self) -> None: pass def runTest(self, test): pass - def status(self): + def status(self) -> None: pass def _crashed(self): @@ -281,7 +281,7 @@ def start(self, test=None): return ret - def stop(self): + def stop(self) -> None: self._terminateProcess() # Ensure we leave no dangling threads when stopping @@ -370,7 +370,7 @@ def runTest(self, test): return ApplicationStatus.OK - def _terminateProcess(self): + def _terminateProcess(self) -> None: if self.process: if self.process.poll() is None: # Try to terminate the process gracefully first diff --git a/FTB/Running/StreamCollector.py b/FTB/Running/StreamCollector.py index c67eb02f2..9e1fb74a8 100644 --- a/FTB/Running/StreamCollector.py +++ b/FTB/Running/StreamCollector.py @@ -35,7 +35,7 @@ def __init__(self, fd, responseQueue, logResponses=False, maxBacklog=None): self.logResponses = logResponses self.maxBacklog = maxBacklog - def run(self): + def run(self) -> None: while True: line = self.fd.readline(4096) diff --git a/FTB/Running/WaitpidMonitor.py b/FTB/Running/WaitpidMonitor.py index 102c72747..14640bb26 100644 --- a/FTB/Running/WaitpidMonitor.py +++ b/FTB/Running/WaitpidMonitor.py @@ -31,6 +31,6 @@ def __init__(self, pid, options): self.childPid = None self.childExit = None - def run(self): + def run(self) -> None: while not self.childPid: (self.childPid, self.childExit) = os.waitpid(self.pid, self.options) diff --git a/FTB/Running/tests/test_shell.py b/FTB/Running/tests/test_shell.py index ddfa2feb0..3f4e6d692 100644 --- a/FTB/Running/tests/test_shell.py +++ b/FTB/Running/tests/test_shell.py @@ -21,19 +21,19 @@ import time -def crash(): +def crash() -> None: import ctypes # Causes a NULL deref ctypes.string_at(0) -def hang(): +def hang() -> None: while True: time.sleep(1) -def stop(): +def stop() -> None: os.kill(os.getpid(), signal.SIGSTOP) diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 4dbf5b348..4cb907329 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -124,7 +124,7 @@ class CrashInfo(object): Abstract base class that provides a method to instantiate the right sub class. It also supports generating a CrashSignature based on the stored information. ''' - def __init__(self): + def __init__(self) -> None: # Store the raw data self.rawStdout = [] self.rawStderr = [] diff --git a/FTB/Signatures/tests/test_CrashInfo.py b/FTB/Signatures/tests/test_CrashInfo.py index 05c0f99ae..b25ca8c7f 100644 --- a/FTB/Signatures/tests/test_CrashInfo.py +++ b/FTB/Signatures/tests/test_CrashInfo.py @@ -852,7 +852,7 @@ """ -def test_ASanParserTestAccessViolation(): +def test_ASanParserTestAccessViolation() -> None: config = ProgramConfiguration("test", "x86-64", "windows") crashInfo = ASanCrashInfo([], asanTraceAV.splitlines(), config) @@ -867,7 +867,7 @@ def test_ASanParserTestAccessViolation(): assert crashInfo.registers["bp"] == 0x00f9915f0a20 -def test_ASanParserTestCrash(): +def test_ASanParserTestCrash() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = ASanCrashInfo([], asanTraceCrash.splitlines(), config) @@ -885,7 +885,7 @@ def test_ASanParserTestCrash(): assert crashInfo.registers["bp"] == 0xffc57f18 -def test_ASanParserTestCrashWithWarning(): +def test_ASanParserTestCrashWithWarning() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = ASanCrashInfo([], asanTraceCrashWithWarning.splitlines(), config) @@ -900,7 +900,7 @@ def test_ASanParserTestCrashWithWarning(): assert crashInfo.registers["bp"] == 0xffc57f18 -def test_ASanParserTestFailedAlloc(): +def test_ASanParserTestFailedAlloc() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanTraceFailedAlloc.splitlines(), config) @@ -916,7 +916,7 @@ def test_ASanParserTestFailedAlloc(): crashInfo.createShortSignature()) -def test_ASanParserTestAllocSize(): +def test_ASanParserTestAllocSize() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanTraceAllocSize.splitlines(), config) @@ -931,7 +931,7 @@ def test_ASanParserTestAllocSize(): crashInfo.createShortSignature()) -def test_ASanParserTestHeapCrash(): +def test_ASanParserTestHeapCrash() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = ASanCrashInfo([], asanTraceHeapCrash.splitlines(), config) @@ -945,7 +945,7 @@ def test_ASanParserTestHeapCrash(): assert crashInfo.createShortSignature() == "[@ ??]" -def test_ASanParserTestUAF(): +def test_ASanParserTestUAF() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanTraceUAF.splitlines(), config) @@ -959,7 +959,7 @@ def test_ASanParserTestUAF(): "with READ of size 6143520") == crashInfo.createShortSignature()) -def test_ASanParserTestInvalidFree(): +def test_ASanParserTestInvalidFree() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanTraceInvalidFree.splitlines(), config) @@ -972,7 +972,7 @@ def test_ASanParserTestInvalidFree(): "[@ __interceptor_free]") == crashInfo.createShortSignature()) -def test_ASanParserTestOOM(): +def test_ASanParserTestOOM() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanTraceOOM.splitlines(), config) @@ -992,7 +992,7 @@ def test_ASanParserTestOOM(): "[@ operator new]") == crashInfo.createShortSignature()) -def test_ASanParserTestDebugAssertion(): +def test_ASanParserTestDebugAssertion() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanTraceDebugAssertion.splitlines(), config) @@ -1025,7 +1025,7 @@ def test_ASanDetectionTest(stderr, crashdata): assert isinstance(crashInfo, ASanCrashInfo) -def test_ASanParserTestParamOverlap(): +def test_ASanParserTestParamOverlap() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanTraceMemcpyParamOverlap.splitlines(), config) @@ -1044,7 +1044,7 @@ def test_ASanParserTestParamOverlap(): crashInfo.createShortSignature()) -def test_ASanParserTestMultiTrace(): +def test_ASanParserTestMultiTrace() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanMultiTrace.splitlines(), config) @@ -1055,7 +1055,7 @@ def test_ASanParserTestMultiTrace(): assert "[@ mozilla::ipc::Shmem::OpenExisting]" == crashInfo.createShortSignature() -def test_ASanParserTestTruncatedTrace(): +def test_ASanParserTestTruncatedTrace() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = ASanCrashInfo([], asanTruncatedTrace.splitlines(), config) @@ -1070,7 +1070,7 @@ def test_ASanParserTestTruncatedTrace(): assert "Insufficient data" in crashInfo.failureReason -def test_GDBParserTestCrash(): +def test_GDBParserTestCrash() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = GDBCrashInfo([], gdbSampleTrace1.splitlines(), config) @@ -1084,7 +1084,7 @@ def test_GDBParserTestCrash(): assert crashInfo.registers["eip"] == 0x818bc33 -def test_GDBParserTestCrashAddress(): +def test_GDBParserTestCrashAddress() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo1 = GDBCrashInfo([], gdbCrashAddress1.splitlines(), config) @@ -1100,7 +1100,7 @@ def test_GDBParserTestCrashAddress(): assert crashInfo5.crashAddress == 0x87afa014 -def test_GDBParserTestCrashAddressSimple(): +def test_GDBParserTestCrashAddressSimple() -> None: registerMap64 = {} registerMap64["rax"] = 0x0 registerMap64["rbx"] = -1 @@ -1137,7 +1137,7 @@ def test_GDBParserTestCrashAddressSimple(): 0x7ffff66ffffe) -def test_GDBParserTestRegression1(): +def test_GDBParserTestRegression1() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo1 = GDBCrashInfo([], gdbRegressionTrace1.splitlines(), config) @@ -1146,7 +1146,7 @@ def test_GDBParserTestRegression1(): assert crashInfo1.backtrace[1] == "js::SetPropertyIgnoringNamedGetter" -def test_GDBParserTestCrashAddressRegression2(): +def test_GDBParserTestCrashAddressRegression2() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo2 = GDBCrashInfo([], gdbRegressionTrace2.splitlines(), config) @@ -1154,7 +1154,7 @@ def test_GDBParserTestCrashAddressRegression2(): assert crashInfo2.crashAddress == 0xfffd579c -def test_GDBParserTestCrashAddressRegression3(): +def test_GDBParserTestCrashAddressRegression3() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo3 = GDBCrashInfo([], gdbRegressionTrace3.splitlines(), config) @@ -1162,7 +1162,7 @@ def test_GDBParserTestCrashAddressRegression3(): assert crashInfo3.crashAddress == 0x7fffffffffff -def test_GDBParserTestCrashAddressRegression4(): +def test_GDBParserTestCrashAddressRegression4() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo4 = GDBCrashInfo([], gdbRegressionTrace4.splitlines(), config) @@ -1170,7 +1170,7 @@ def test_GDBParserTestCrashAddressRegression4(): assert crashInfo4.crashAddress == 0x0 -def test_GDBParserTestCrashAddressRegression5(): +def test_GDBParserTestCrashAddressRegression5() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo5 = GDBCrashInfo([], gdbRegressionTrace5.splitlines(), config) @@ -1178,7 +1178,7 @@ def test_GDBParserTestCrashAddressRegression5(): assert crashInfo5.crashAddress == 0xfffd573c -def test_GDBParserTestCrashAddressRegression6(): +def test_GDBParserTestCrashAddressRegression6() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo6 = GDBCrashInfo([], gdbRegressionTrace6.splitlines(), config) @@ -1186,7 +1186,7 @@ def test_GDBParserTestCrashAddressRegression6(): assert crashInfo6.crashAddress == 0xf7673132 -def test_GDBParserTestCrashAddressRegression7(): +def test_GDBParserTestCrashAddressRegression7() -> None: config = ProgramConfiguration("test", "x86", "linux") # This used to fail because CrashInfo.fromRawCrashData fails to detect a GDB trace @@ -1195,7 +1195,7 @@ def test_GDBParserTestCrashAddressRegression7(): assert crashInfo7.backtrace[1] == "js::ScopeIter::settle" -def test_GDBParserTestCrashAddressRegression8(): +def test_GDBParserTestCrashAddressRegression8() -> None: config = ProgramConfiguration("test", "x86", "linux") # This used to fail because CrashInfo.fromRawCrashData fails to detect a GDB trace @@ -1207,14 +1207,14 @@ def test_GDBParserTestCrashAddressRegression8(): assert crashInfo8.backtrace[5] == "js::jit::CheckICacheLocked" -def test_GDBParserTestCrashAddressRegression9(): +def test_GDBParserTestCrashAddressRegression9() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo9 = CrashInfo.fromRawCrashData([], [], config, gdbRegressionTrace9.splitlines()) assert crashInfo9.crashInstruction == "call 0x8120ca0" -def test_GDBParserTestCrashAddressRegression10(): +def test_GDBParserTestCrashAddressRegression10() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo10 = CrashInfo.fromRawCrashData([], [], config, gdbRegressionTrace10.splitlines()) @@ -1222,7 +1222,7 @@ def test_GDBParserTestCrashAddressRegression10(): assert crashInfo10.crashAddress == 0x7ff7f20c1f81 -def test_GDBParserTestCrashAddressRegression11(): +def test_GDBParserTestCrashAddressRegression11() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo11 = CrashInfo.fromRawCrashData([], [], config, gdbRegressionTrace11.splitlines()) @@ -1230,7 +1230,7 @@ def test_GDBParserTestCrashAddressRegression11(): assert crashInfo11.crashAddress == 0x7ff7f2091032 -def test_GDBParserTestCrashAddressRegression12(): +def test_GDBParserTestCrashAddressRegression12() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo12 = CrashInfo.fromRawCrashData([], [], config, gdbRegressionTrace12.splitlines()) @@ -1240,7 +1240,7 @@ def test_GDBParserTestCrashAddressRegression12(): assert crashInfo12.backtrace[3] == "CaptureStack" -def test_GDBParserTestCrashAddressRegression13(): +def test_GDBParserTestCrashAddressRegression13() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo13 = CrashInfo.fromRawCrashData([], [], config, gdbRegressionTrace13.splitlines()) @@ -1253,7 +1253,7 @@ def test_GDBParserTestCrashAddressRegression13(): assert crashInfo13.crashAddress == 0xe5e5e5f5 -def test_CrashSignatureOutputTest(): +def test_CrashSignatureOutputTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashSignature1 = '{ "symptoms" : [ { "type" : "output", "value" : "test" } ] }' @@ -1293,7 +1293,7 @@ def test_CrashSignatureOutputTest(): assert outputSignature2.matches(crashInfo) -def test_CrashSignatureAddressTest(): +def test_CrashSignatureAddressTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashSignature1 = '{ "symptoms" : [ { "type" : "crashAddress", "address" : "< 0x1000" } ] }' @@ -1314,7 +1314,7 @@ def test_CrashSignatureAddressTest(): assert not addressSig1Neg.matches(crashInfo3) -def test_CrashSignatureRegisterTest(): +def test_CrashSignatureRegisterTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashSignature1 = '{ "symptoms" : [ { "type" : "instruction", "registerNames" : ["r14"] } ] }' @@ -1356,7 +1356,7 @@ def test_CrashSignatureRegisterTest(): assert not instructionSig3.matches(crashInfo3) -def test_CrashSignatureStackFrameTest(): +def test_CrashSignatureStackFrameTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashSignature1 = '{ "symptoms" : [ { "type" : "stackFrame", "functionName" : "internalAppend" } ] }' @@ -1384,7 +1384,7 @@ def test_CrashSignatureStackFrameTest(): assert not stackFrameSig2Neg.matches(crashInfo1) -def test_CrashSignatureStackSizeTest(): +def test_CrashSignatureStackSizeTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashSignature1 = '{ "symptoms" : [ { "type" : "stackSize", "size" : 8 } ] }' @@ -1410,7 +1410,7 @@ def test_CrashSignatureStackSizeTest(): assert not stackSizeSig2Neg.matches(crashInfo1) -def test_RegisterHelperValueTest(): +def test_RegisterHelperValueTest() -> None: registerMap = {"rax": 0xfffffffffffffe00, "rbx": 0x7ffff79a7640} assert RegisterHelper.getRegisterValue("rax", registerMap) == 0xfffffffffffffe00 @@ -1426,7 +1426,7 @@ def test_RegisterHelperValueTest(): assert RegisterHelper.getRegisterValue("bl", registerMap) == 0x40 -def test_MinidumpParserTestCrash(): +def test_MinidumpParserTestCrash() -> None: config = ProgramConfiguration("test", "x86", "linux") with open(os.path.join(CWD, 'resources', 'minidump-example.txt'), 'r') as f: @@ -1441,7 +1441,7 @@ def test_MinidumpParserTestCrash(): assert crashInfo.crashAddress == 0x3e800006acb -def test_MinidumpSelectorTest(): +def test_MinidumpSelectorTest() -> None: config = ProgramConfiguration("test", "x86", "linux") with open(os.path.join(CWD, 'resources', 'minidump-example.txt'), 'r') as f: @@ -1451,7 +1451,7 @@ def test_MinidumpSelectorTest(): assert crashInfo.crashAddress == 0x3e800006acb -def test_MinidumpFromMacOSTest(): +def test_MinidumpFromMacOSTest() -> None: config = ProgramConfiguration("test", "x86-64", "macosx") crashInfo = CrashInfo.fromRawCrashData([], [], config, minidumpMacOS.splitlines()) @@ -1463,7 +1463,7 @@ def test_MinidumpFromMacOSTest(): assert crashInfo.crashAddress == 0 -def test_AppleParserTestCrash(): +def test_AppleParserTestCrash() -> None: config = ProgramConfiguration("test", "x86-64", "macosx") with open(os.path.join(CWD, 'resources', 'apple-crash-report-example.txt'), 'r') as f: @@ -1483,7 +1483,7 @@ def test_AppleParserTestCrash(): assert crashInfo.crashAddress == 0x00007fff5f3fff98 -def test_AppleSelectorTest(): +def test_AppleSelectorTest() -> None: config = ProgramConfiguration("test", "x86-64", "macosx") with open(os.path.join(CWD, 'resources', 'apple-crash-report-example.txt'), 'r') as f: @@ -1493,7 +1493,7 @@ def test_AppleSelectorTest(): assert crashInfo.crashAddress == 0x00007fff5f3fff98 -def test_AppleLionParserTestCrash(): +def test_AppleLionParserTestCrash() -> None: config = ProgramConfiguration("test", "x86-64", "macosx64") with open(os.path.join(CWD, 'resources', 'apple-10-7-crash-report-example.txt'), 'r') as f: @@ -1518,7 +1518,7 @@ def test_AppleLionParserTestCrash(): assert crashInfo.crashAddress == 0x0000000000000000 -def test_AppleLionSelectorTest(): +def test_AppleLionSelectorTest() -> None: config = ProgramConfiguration("test", "x86-64", "macosx64") with open(os.path.join(CWD, 'resources', 'apple-10-7-crash-report-example.txt'), 'r') as f: @@ -1531,7 +1531,7 @@ def test_AppleLionSelectorTest(): # Test 1a is for Win7 with 32-bit js debug deterministic shell hitting the assertion failure: # js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength # 01814577 cc int 3 -def test_CDBParserTestCrash1a(): +def test_CDBParserTestCrash1a() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-1a-crashlog.txt'), 'r') as f: @@ -1566,7 +1566,7 @@ def test_CDBParserTestCrash1a(): assert crashInfo.crashAddress == 0x01814577 -def test_CDBSelectorTest1a(): +def test_CDBSelectorTest1a() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-1a-crashlog.txt'), 'r') as f: @@ -1579,7 +1579,7 @@ def test_CDBSelectorTest1a(): # Test 1b is for Win10 with 32-bit js debug deterministic shell hitting the assertion failure: # js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 # 01344577 cc int 3 -def test_CDBParserTestCrash1b(): +def test_CDBParserTestCrash1b() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-1b-crashlog.txt'), 'r') as f: @@ -1614,7 +1614,7 @@ def test_CDBParserTestCrash1b(): assert crashInfo.crashAddress == 0x01344577 -def test_CDBSelectorTest1b(): +def test_CDBSelectorTest1b() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-1b-crashlog.txt'), 'r') as f: @@ -1627,7 +1627,7 @@ def test_CDBSelectorTest1b(): # Test 2a is for Win7 with 64-bit js debug deterministic shell hitting the assertion failure: # js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength # 00000001`40144e62 cc int 3 -def test_CDBParserTestCrash2a(): +def test_CDBParserTestCrash2a() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-2a-crashlog.txt'), 'r') as f: @@ -1682,7 +1682,7 @@ def test_CDBParserTestCrash2a(): assert crashInfo.crashAddress == 0x0000000140144e62 -def test_CDBSelectorTest2a(): +def test_CDBSelectorTest2a() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-2a-crashlog.txt'), 'r') as f: @@ -1695,7 +1695,7 @@ def test_CDBSelectorTest2a(): # Test 2b is for Win10 with 64-bit js debug deterministic shell hitting the assertion failure: # js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 # 00007ff7`1e424e62 cc int 3 -def test_CDBParserTestCrash2b(): +def test_CDBParserTestCrash2b() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-2b-crashlog.txt'), 'r') as f: @@ -1750,7 +1750,7 @@ def test_CDBParserTestCrash2b(): assert crashInfo.crashAddress == 0x00007ff71e424e62 -def test_CDBSelectorTest2b(): +def test_CDBSelectorTest2b() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-2b-crashlog.txt'), 'r') as f: @@ -1763,7 +1763,7 @@ def test_CDBSelectorTest2b(): # Test 3a is for Win7 with 32-bit js debug deterministic shell crashing: # js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena # 00f36a63 8b00 mov eax,dword ptr [eax] -def test_CDBParserTestCrash3a(): +def test_CDBParserTestCrash3a() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-3a-crashlog.txt'), 'r') as f: @@ -1821,7 +1821,7 @@ def test_CDBParserTestCrash3a(): assert crashInfo.crashAddress == 0x00f36a63 -def test_CDBSelectorTest3a(): +def test_CDBSelectorTest3a() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-3a-crashlog.txt'), 'r') as f: @@ -1834,7 +1834,7 @@ def test_CDBSelectorTest3a(): # Test 3b is for Win10 with 32-bit js debug deterministic shell crashing: # js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 # 00ed6a63 8b00 mov eax,dword ptr [eax] -def test_CDBParserTestCrash3b(): +def test_CDBParserTestCrash3b() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-3b-crashlog.txt'), 'r') as f: @@ -1892,7 +1892,7 @@ def test_CDBParserTestCrash3b(): assert crashInfo.crashAddress == 0x00ed6a63 -def test_CDBSelectorTest3b(): +def test_CDBSelectorTest3b() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-3b-crashlog.txt'), 'r') as f: @@ -1905,7 +1905,7 @@ def test_CDBSelectorTest3b(): # Test 4a is for Win7 with 32-bit js opt deterministic shell crashing: # js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure # 00d44c59 8b39 mov edi,dword ptr [ecx] -def test_CDBParserTestCrash4a(): +def test_CDBParserTestCrash4a() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-4a-crashlog.txt'), 'r') as f: @@ -1981,7 +1981,7 @@ def test_CDBParserTestCrash4a(): assert crashInfo.crashAddress == 0x00d44c59 -def test_CDBSelectorTest4a(): +def test_CDBSelectorTest4a() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-4a-crashlog.txt'), 'r') as f: @@ -1994,7 +1994,7 @@ def test_CDBSelectorTest4a(): # Test 4b is for Win10 with 32-bit js opt deterministic shell crashing: # js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 # 00404c59 8b39 mov edi,dword ptr [ecx] -def test_CDBParserTestCrash4b(): +def test_CDBParserTestCrash4b() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-4b-crashlog.txt'), 'r') as f: @@ -2054,7 +2054,7 @@ def test_CDBParserTestCrash4b(): assert crashInfo.crashAddress == 0x00404c59 -def test_CDBSelectorTest4b(): +def test_CDBSelectorTest4b() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-4b-crashlog.txt'), 'r') as f: @@ -2067,7 +2067,7 @@ def test_CDBSelectorTest4b(): # Test 5a is for Win7 with 64-bit js debug deterministic shell crashing: # js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery # 00000001`3f4975db 8b11 mov edx,dword ptr [rcx] -def test_CDBParserTestCrash5a(): +def test_CDBParserTestCrash5a() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-5a-crashlog.txt'), 'r') as f: @@ -2131,7 +2131,7 @@ def test_CDBParserTestCrash5a(): assert crashInfo.crashAddress == 0x000000013f4975db -def test_CDBSelectorTest5a(): +def test_CDBSelectorTest5a() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-5a-crashlog.txt'), 'r') as f: @@ -2144,7 +2144,7 @@ def test_CDBSelectorTest5a(): # Test 5b is for Win10 with 64-bit js debug deterministic shell crashing: # js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b # 00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] -def test_CDBParserTestCrash5b(): +def test_CDBParserTestCrash5b() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-5b-crashlog.txt'), 'r') as f: @@ -2208,7 +2208,7 @@ def test_CDBParserTestCrash5b(): assert crashInfo.crashAddress == 0x00007ff71dcf75db -def test_CDBSelectorTest5b(): +def test_CDBSelectorTest5b() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-5b-crashlog.txt'), 'r') as f: @@ -2221,7 +2221,7 @@ def test_CDBSelectorTest5b(): # Test 6a is for Win7 with 64-bit js opt deterministic shell crashing: # js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure # 00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] -def test_CDBParserTestCrash6a(): +def test_CDBParserTestCrash6a() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-6a-crashlog.txt'), 'r') as f: @@ -2309,7 +2309,7 @@ def test_CDBParserTestCrash6a(): assert crashInfo.crashAddress == 0x000000013f869ff3 -def test_CDBSelectorTest6a(): +def test_CDBSelectorTest6a() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-6a-crashlog.txt'), 'r') as f: @@ -2322,7 +2322,7 @@ def test_CDBSelectorTest6a(): # Test 6b is for Win10 with 64-bit js opt deterministic shell crashing: # js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 # 00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] -def test_CDBParserTestCrash6b(): +def test_CDBParserTestCrash6b() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-6b-crashlog.txt'), 'r') as f: @@ -2410,7 +2410,7 @@ def test_CDBParserTestCrash6b(): assert crashInfo.crashAddress == 0x00007ff74d469ff3 -def test_CDBSelectorTest6b(): +def test_CDBSelectorTest6b() -> None: config = ProgramConfiguration("test", "x86-64", "windows") with open(os.path.join(CWD, 'resources', 'cdb-6b-crashlog.txt'), 'r') as f: @@ -2423,7 +2423,7 @@ def test_CDBSelectorTest6b(): # Test 7 is for Windows Server 2012 R2 with 32-bit js debug deterministic shell: # +205 # 25d80b01 cc int 3 -def test_CDBParserTestCrash7(): +def test_CDBParserTestCrash7() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-7c-crashlog.txt'), 'r') as f: @@ -2491,7 +2491,7 @@ def test_CDBParserTestCrash7(): assert crashInfo.crashAddress == 0x25d80b01 -def test_CDBSelectorTest7(): +def test_CDBSelectorTest7() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-7c-crashlog.txt'), 'r') as f: @@ -2505,7 +2505,7 @@ def test_CDBSelectorTest7(): # js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+3d [ # c:\users\administrator\trees\mozilla-central\js\src\jit\rangeanalysis.h @ 578] # 0142865d cc int 3 -def test_CDBParserTestCrash8(): +def test_CDBParserTestCrash8() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-8c-crashlog.txt'), 'r') as f: @@ -2528,7 +2528,7 @@ def test_CDBParserTestCrash8(): assert crashInfo.crashAddress == 0x0142865d -def test_CDBSelectorTest8(): +def test_CDBSelectorTest8() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-8c-crashlog.txt'), 'r') as f: @@ -2541,7 +2541,7 @@ def test_CDBSelectorTest8(): # Test 9 is for Windows Server 2012 R2 with 32-bit js opt profiling shell: # +1d8 # 0f2bb4f3 cc int 3 -def test_CDBParserTestCrash9(): +def test_CDBParserTestCrash9() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-9c-crashlog.txt'), 'r') as f: @@ -2607,7 +2607,7 @@ def test_CDBParserTestCrash9(): assert crashInfo.crashAddress == 0x0f2bb4f3 -def test_CDBSelectorTest9(): +def test_CDBSelectorTest9() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-9c-crashlog.txt'), 'r') as f: @@ -2620,7 +2620,7 @@ def test_CDBSelectorTest9(): # Test 10 is for Windows Server 2012 R2 with 32-bit js opt profiling shell: # +82 # 1c2fbbb0 cc int 3 -def test_CDBParserTestCrash10(): +def test_CDBParserTestCrash10() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-10c-crashlog.txt'), 'r') as f: @@ -2647,7 +2647,7 @@ def test_CDBParserTestCrash10(): assert crashInfo.crashAddress == 0x1c2fbbb0 -def test_CDBSelectorTest10(): +def test_CDBSelectorTest10() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-10c-crashlog.txt'), 'r') as f: @@ -2661,7 +2661,7 @@ def test_CDBSelectorTest10(): # js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+3d [ # c:\users\administrator\trees\mozilla-central\js\src\jit\rangeanalysis.h @ 578] # 0156865d cc int 3 -def test_CDBParserTestCrash11(): +def test_CDBParserTestCrash11() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-11c-crashlog.txt'), 'r') as f: @@ -2684,7 +2684,7 @@ def test_CDBParserTestCrash11(): assert crashInfo.crashAddress == 0x0156865d -def test_CDBSelectorTest11(): +def test_CDBSelectorTest11() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-11c-crashlog.txt'), 'r') as f: @@ -2697,7 +2697,7 @@ def test_CDBSelectorTest11(): # Test 12 is for Windows Server 2012 R2 with 32-bit js opt profiling deterministic shell: # +1d8 # 1fa0b7f8 cc int 3 -def test_CDBParserTestCrash12(): +def test_CDBParserTestCrash12() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-12c-crashlog.txt'), 'r') as f: @@ -2723,7 +2723,7 @@ def test_CDBParserTestCrash12(): assert crashInfo.crashAddress == 0x1fa0b7f8 -def test_CDBSelectorTest12(): +def test_CDBSelectorTest12() -> None: config = ProgramConfiguration("test", "x86", "windows") with open(os.path.join(CWD, 'resources', 'cdb-12c-crashlog.txt'), 'r') as f: @@ -2733,7 +2733,7 @@ def test_CDBSelectorTest12(): assert crashInfo.crashAddress == 0x1fa0b7f8 -def test_UBSanParserTestCrash1(): +def test_UBSanParserTestCrash1() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, ubsanTraceSignedIntOverflow.splitlines()) assert crashInfo.createShortSignature() == ("UndefinedBehaviorSanitizer: " @@ -2747,7 +2747,7 @@ def test_UBSanParserTestCrash1(): assert crashInfo.crashAddress is None -def test_UBSanParserTestCrash2(): +def test_UBSanParserTestCrash2() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, ubsanTraceDivByZero.splitlines()) assert crashInfo.createShortSignature() == ("UndefinedBehaviorSanitizer: src/opus_demo.c:870:40: " @@ -2757,7 +2757,7 @@ def test_UBSanParserTestCrash2(): assert crashInfo.crashAddress is None -def test_UBSanParserTestCrash3(): +def test_UBSanParserTestCrash3() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, ubsanTraceMissingPattern.splitlines()) assert crashInfo.createShortSignature() == "No crash detected" @@ -2765,7 +2765,7 @@ def test_UBSanParserTestCrash3(): assert crashInfo.crashAddress is None -def test_UBSanParserTestCrash4(): +def test_UBSanParserTestCrash4() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, ubsanTraceGenericCrash.splitlines()) assert crashInfo.createShortSignature() == ("[@ mozilla::dom::ToJSValue]") @@ -2779,7 +2779,7 @@ def test_UBSanParserTestCrash4(): assert crashInfo.registers["sp"] == 0x7f0662600680 -def test_RustParserTests1(): +def test_RustParserTests1() -> None: """test RUST_BACKTRACE=1 is parsed correctly""" config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, rustSampleTrace1.splitlines()) @@ -2797,7 +2797,7 @@ def test_RustParserTests1(): assert crashInfo.crashAddress == 0 -def test_RustParserTests2(): +def test_RustParserTests2() -> None: """test RUST_BACKTRACE=full is parsed correctly""" config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, rustSampleTrace2.splitlines()) @@ -2826,7 +2826,7 @@ def test_RustParserTests2(): assert crashInfo.crashAddress == 0 -def test_RustParserTests3(): +def test_RustParserTests3() -> None: """test rust backtraces are weakly found, ie. minidump output wins even if it comes after""" config = ProgramConfiguration("test", "x86-64", "win") crashInfo = CrashInfo.fromRawCrashData([], [], config, rustSampleTrace4.splitlines()) @@ -2843,7 +2843,7 @@ def test_RustParserTests3(): assert crashInfo.crashAddress == 0x7ffc41f2f276 -def test_RustParserTests4(): +def test_RustParserTests4() -> None: """test another rust backtrace""" config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, rustSampleTrace5.splitlines()) @@ -2858,7 +2858,7 @@ def test_RustParserTests4(): assert crashInfo.crashAddress == 0 -def test_RustParserTests5(): +def test_RustParserTests5() -> None: """test multi-line with minidump trace in sterror rust backtrace""" auxData = ["OS|Linux|0.0.0 Linux ... x86_64", "CPU|amd64|family 6 model 63 stepping 2|8", @@ -2881,7 +2881,7 @@ def test_RustParserTests5(): assert crashInfo.crashAddress == 0 -def test_RustParserTests6(): +def test_RustParserTests6() -> None: """test parsing rust assertion failure backtrace""" config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], rustSampleTrace6.splitlines(), config, []) @@ -2892,7 +2892,7 @@ def test_RustParserTests6(): assert crashInfo.crashAddress == 0 -def test_MinidumpModuleInStackTest(): +def test_MinidumpModuleInStackTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, minidumpSwrast.splitlines()) @@ -2900,7 +2900,7 @@ def test_MinidumpModuleInStackTest(): assert crashInfo.backtrace[1] == "swrast_dri.so+0x470ecc" -def test_LSanParserTestLeakDetected(): +def test_LSanParserTestLeakDetected() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, lsanTraceLeakDetected.splitlines()) @@ -2913,7 +2913,7 @@ def test_LSanParserTestLeakDetected(): assert crashInfo.crashAddress is None -def test_TSanParserSimpleLeakTest(): +def test_TSanParserSimpleLeakTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, 'resources', 'tsan-simple-leak-report.txt'), 'r') as f: @@ -2929,7 +2929,7 @@ def test_TSanParserSimpleLeakTest(): assert crashInfo.crashAddress is None -def test_TSanParserSimpleRaceTest(): +def test_TSanParserSimpleRaceTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") for fn in ['tsan-simple-race-report.txt', 'tsan-simple-race-report-swapped.txt']: @@ -2949,7 +2949,7 @@ def test_TSanParserSimpleRaceTest(): assert crashInfo.crashAddress is None -def test_TSanParserLockReportTest(): +def test_TSanParserLockReportTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, 'resources', 'tsan-lock-report.txt'), 'r') as f: @@ -2969,7 +2969,7 @@ def test_TSanParserLockReportTest(): assert crashInfo.crashAddress is None -def test_TSanParserTestCrash(): +def test_TSanParserTestCrash() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, tsanTraceCrash.splitlines()) @@ -2988,7 +2988,7 @@ def test_TSanParserTestCrash(): assert crashInfo.registers["sp"] == 0x7fe1a51bcf00 -def test_TSanParserTest(): +def test_TSanParserTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, 'resources', 'tsan-report.txt'), 'r') as f: @@ -3007,7 +3007,7 @@ def test_TSanParserTest(): assert crashInfo.crashAddress is None -def test_ValgrindCJMParser(): +def test_ValgrindCJMParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-cjm-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) @@ -3037,7 +3037,7 @@ def test_ValgrindCJMParser(): assert crashInfo.crashAddress is None -def test_ValgrindIRWParser(): +def test_ValgrindIRWParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-ir-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) @@ -3072,7 +3072,7 @@ def test_ValgrindIRWParser(): assert crashInfo.crashAddress == 0x41414141 -def test_ValgrindUUVParser(): +def test_ValgrindUUVParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-uuv-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) @@ -3087,7 +3087,7 @@ def test_ValgrindUUVParser(): assert crashInfo.crashAddress is None -def test_ValgrindIFParser(): +def test_ValgrindIFParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-if-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) @@ -3124,7 +3124,7 @@ def test_ValgrindIFParser(): assert crashInfo.crashAddress == 0xbadf00d -def test_ValgrindSDOParser(): +def test_ValgrindSDOParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-sdo-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) @@ -3137,7 +3137,7 @@ def test_ValgrindSDOParser(): assert crashInfo.crashAddress is None -def test_ValgrindSCParser(): +def test_ValgrindSCParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-sc-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) @@ -3165,7 +3165,7 @@ def test_ValgrindSCParser(): assert crashInfo.crashAddress == 0x5e7b6b4 -def test_ValgrindNMParser(): +def test_ValgrindNMParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-nm-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) @@ -3179,7 +3179,7 @@ def test_ValgrindNMParser(): assert crashInfo.crashAddress is None -def test_ValgrindPTParser(): +def test_ValgrindPTParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-pt-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) @@ -3193,7 +3193,7 @@ def test_ValgrindPTParser(): assert crashInfo.crashAddress is None -def test_ValgrindLeakParser(): +def test_ValgrindLeakParser() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, "resources", "valgrind-leak-01.txt"), "r") as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, f.read().splitlines()) diff --git a/FTB/Signatures/tests/test_CrashSignature.py b/FTB/Signatures/tests/test_CrashSignature.py index f9df59921..108ee0f57 100644 --- a/FTB/Signatures/tests/test_CrashSignature.py +++ b/FTB/Signatures/tests/test_CrashSignature.py @@ -458,7 +458,7 @@ testAssertionPathBwSlashes = r'Assertion failure: false, at c:\srv\repos\mozilla-central\js\src\vm\SelfHosting.cpp:362' -def test_SignatureCreateTest(): +def test_SignatureCreateTest() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTrace1.splitlines()) @@ -480,7 +480,7 @@ def test_SignatureCreateTest(): assert json.loads(str(crashSig3)) == json.loads(testSignature3) -def test_SignatureTestCaseMatchTest(): +def test_SignatureTestCaseMatchTest() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTrace1.splitlines()) @@ -510,7 +510,7 @@ def test_SignatureTestCaseMatchTest(): assert not testSig6.matches(crashInfo) -def test_SignatureStackFramesTest(): +def test_SignatureStackFramesTest() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTrace1.splitlines()) @@ -528,7 +528,7 @@ def test_SignatureStackFramesTest(): assert not testSig5.matches(crashInfo) -def test_SignatureStackFramesAlgorithmsTest(): +def test_SignatureStackFramesAlgorithmsTest() -> None: # Do some direct matcher tests on edge cases assert StackFramesSymptom._match([], [StringMatch('???')]) assert not StackFramesSymptom._match([], [StringMatch('???'), StringMatch('a')]) @@ -552,7 +552,7 @@ def test_SignatureStackFramesAlgorithmsTest(): assert expectedSig == [str(x) for x in actualSig] -def test_SignaturePCREShortTest(): +def test_SignaturePCREShortTest() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTrace1.splitlines()) @@ -564,7 +564,7 @@ def test_SignaturePCREShortTest(): assert not testSig2.matches(crashInfo) -def test_SignatureStackFramesWildcardTailTest(): +def test_SignatureStackFramesWildcardTailTest() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTrace2.splitlines()) @@ -578,7 +578,7 @@ def test_SignatureStackFramesWildcardTailTest(): assert len(testSig.symptoms[0].functionNames) == 7 -def test_SignatureStackFramesRegressionTest(): +def test_SignatureStackFramesRegressionTest() -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfoNeg = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTraceHeapWithCrashAddress.splitlines()) @@ -591,7 +591,7 @@ def test_SignatureStackFramesRegressionTest(): assert not testSigEmptyCrashAddress.matches(crashInfoNeg) -def test_SignatureStackFramesAuxMessagesTest(): +def test_SignatureStackFramesAuxMessagesTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTraceWithAuxMessage.splitlines()) crashInfoNeg = CrashInfo.fromRawCrashData([], [], config, @@ -614,7 +614,7 @@ def test_SignatureStackFramesAuxMessagesTest(): assert crashSignatureNeg.matches(crashInfoNeg) -def test_SignatureStackFramesNegativeSizeParamTest(): +def test_SignatureStackFramesNegativeSizeParamTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTraceNegativeSizeParam.splitlines()) @@ -625,7 +625,7 @@ def test_SignatureStackFramesNegativeSizeParamTest(): assert isinstance(testSig.symptoms[1], StackFramesSymptom) -def test_SignatureAsanStackOverflowTest(): +def test_SignatureAsanStackOverflowTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanStackOverflow.splitlines()) @@ -635,7 +635,7 @@ def test_SignatureAsanStackOverflowTest(): assert testSig.matches(crashInfoPos) -def test_SignatureAsanAccessViolationTest(): +def test_SignatureAsanAccessViolationTest() -> None: config = ProgramConfiguration("test", "x86-64", "windows") crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanAccessViolation.splitlines()) @@ -646,7 +646,7 @@ def test_SignatureAsanAccessViolationTest(): assert isinstance(testSig.symptoms[0], StackFramesSymptom) -def test_SignatureStackSizeTest(): +def test_SignatureStackSizeTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanLongTrace.splitlines()) @@ -656,7 +656,7 @@ def test_SignatureStackSizeTest(): assert testSig.matches(crashInfoPos) -def test_SignatureAsanFailedAllocTest(): +def test_SignatureAsanFailedAllocTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanFailedAlloc.splitlines()) @@ -666,7 +666,7 @@ def test_SignatureAsanFailedAllocTest(): assert isinstance(testSig.symptoms[1], StackFramesSymptom) -def test_SignatureGenerationTSanLeakTest(): +def test_SignatureGenerationTSanLeakTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, 'resources', 'tsan-simple-leak-report.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) @@ -683,7 +683,7 @@ def test_SignatureGenerationTSanLeakTest(): assert found, "Expected correct OutputSymptom in signature" -def test_SignatureGenerationTSanRaceTest(): +def test_SignatureGenerationTSanRaceTest() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, 'resources', 'tsan-simple-race-report.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) @@ -714,7 +714,7 @@ def test_SignatureGenerationTSanRaceTest(): assert found, "Couldn't find OutputSymptom with value '%s'" % stringMatchVal -def test_SignatureGenerationTSanRaceTestComplex1(): +def test_SignatureGenerationTSanRaceTestComplex1() -> None: config = ProgramConfiguration("test", "x86-64", "linux") with open(os.path.join(CWD, 'resources', 'tsan-report2.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) @@ -745,7 +745,7 @@ def test_SignatureGenerationTSanRaceTestComplex1(): assert found, "Couldn't find OutputSymptom with value '%s'" % stringMatchVal -def test_SignatureGenerationTSanRaceTestAtomic(): +def test_SignatureGenerationTSanRaceTestAtomic() -> None: config = ProgramConfiguration("test", "x86-64", "linux") for fn in ['tsan-report-atomic.txt', 'tsan-report-atomic-swapped.txt']: with open(os.path.join(CWD, 'resources', fn), 'r') as f: @@ -780,14 +780,14 @@ def test_SignatureGenerationTSanRaceTestAtomic(): assert found, "Couldn't find OutputSymptom with value '%s'" % stringMatchVal -def test_SignatureMatchWithUnicode(): +def test_SignatureMatchWithUnicode() -> None: config = ProgramConfiguration('test', 'x86-64', 'linux') crashInfo = CrashInfo.fromRawCrashData(["(«f => (generator.throw(f))», «undefined»)"], [], config) testSignature = CrashSignature('{"symptoms": [{"src": "stdout", "type": "output", "value": "x"}]}') assert not testSignature.matches(crashInfo) -def test_SignatureMatchAssertionSlashes(): +def test_SignatureMatchAssertionSlashes() -> None: # test that a forward slash assertion signature matches a backwards slash crash, but only on windows cfg_linux = ProgramConfiguration('test', 'x86-64', 'linux') cfg_windows = ProgramConfiguration('test', 'x86-64', 'windows') diff --git a/FTB/tests/test_AssertionHelper.py b/FTB/tests/test_AssertionHelper.py index aa6f28160..fd468940e 100644 --- a/FTB/tests/test_AssertionHelper.py +++ b/FTB/tests/test_AssertionHelper.py @@ -114,14 +114,14 @@ def _check_regex_matches(error_lines, sanitized_message): raise AssertionError("sanitized message did not match input: %r" % (sanitized_message,)) -def test_AssertionHelperTestASanFFAbort(): +def test_AssertionHelperTestASanFFAbort() -> None: err = asanFFAbort.splitlines() assert AssertionHelper.getAssertion(err) is None assert AssertionHelper.getAuxiliaryAbortMessage(err) is None -def test_AssertionHelperTestASanNegativeSize(): +def test_AssertionHelperTestASanNegativeSize() -> None: err = asanNegativeSize.splitlines() assert AssertionHelper.getAssertion(err) is None @@ -130,7 +130,7 @@ def test_AssertionHelperTestASanNegativeSize(): assert assertMsg == expectedAssertMsg -def test_AssertionHelperTestASanStackOverflow(): +def test_AssertionHelperTestASanStackOverflow() -> None: err = asanStackOverflow.splitlines() assert AssertionHelper.getAssertion(err) is None @@ -139,7 +139,7 @@ def test_AssertionHelperTestASanStackOverflow(): assert assertMsg == expectedAssertMsg -def test_AssertionHelperTestMozCrash(): +def test_AssertionHelperTestMozCrash() -> None: err = jsshellMozCrash.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) @@ -149,7 +149,7 @@ def test_AssertionHelperTestMozCrash(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestMozCrashMultiLine(): +def test_AssertionHelperTestMozCrashMultiLine() -> None: err = mozCrashMultiLine.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) @@ -160,7 +160,7 @@ def test_AssertionHelperTestMozCrashMultiLine(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestMozCrashWithPath(): +def test_AssertionHelperTestMozCrashWithPath() -> None: err = mozCrashWithPath.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) @@ -170,7 +170,7 @@ def test_AssertionHelperTestMozCrashWithPath(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestMultiMozCrash(): +def test_AssertionHelperTestMultiMozCrash() -> None: err = multiMozCrash.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) @@ -180,7 +180,7 @@ def test_AssertionHelperTestMultiMozCrash(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestJSSelfHosted(): +def test_AssertionHelperTestJSSelfHosted() -> None: err = jsSelfHostedAssert.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) @@ -191,7 +191,7 @@ def test_AssertionHelperTestJSSelfHosted(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestV8Abort(): +def test_AssertionHelperTestV8Abort() -> None: err = v8Abort.splitlines() sanitizedMsgs = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) @@ -208,7 +208,7 @@ def test_AssertionHelperTestV8Abort(): _check_regex_matches(err, sanitizedMsgs) -def test_AssertionHelperTestChakraAssert(): +def test_AssertionHelperTestChakraAssert() -> None: err = chakraAssert.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) @@ -219,7 +219,7 @@ def test_AssertionHelperTestChakraAssert(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestWindowsPathSanitizing(): +def test_AssertionHelperTestWindowsPathSanitizing() -> None: err1 = windowsPathAssertFwdSlashes.splitlines() err2 = windowsPathAssertBwSlashes.splitlines() @@ -245,7 +245,7 @@ def test_AssertionHelperTestWindowsPathSanitizing(): #_check_regex_matches(err2, sanitizedMsg2) -def test_AssertionHelperTestAuxiliaryAbortASan(): +def test_AssertionHelperTestAuxiliaryAbortASan() -> None: err = asanOverflow.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAuxiliaryAbortMessage(err)) @@ -258,7 +258,7 @@ def test_AssertionHelperTestAuxiliaryAbortASan(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestCPPUnhandledException(): +def test_AssertionHelperTestCPPUnhandledException() -> None: err = cppUnhandledException.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) @@ -268,7 +268,7 @@ def test_AssertionHelperTestCPPUnhandledException(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestRustPanic01(): +def test_AssertionHelperTestRustPanic01() -> None: err = rustPanic1.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) expectedMsg = (r"thread 'StyleThread#[0-9]+' panicked at 'assertion failed: self\.get_data\(\)\.is_some\(\)', " @@ -278,7 +278,7 @@ def test_AssertionHelperTestRustPanic01(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestRustPanic02(): +def test_AssertionHelperTestRustPanic02() -> None: err = rustPanic2.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) expectedMsg = (r"thread 'RenderBackend' panicked at 'called `Option::unwrap\(\)` on a `None` value', " @@ -288,7 +288,7 @@ def test_AssertionHelperTestRustPanic02(): _check_regex_matches(err, sanitizedMsg) -def test_AssertionHelperTestRustPanic03(): +def test_AssertionHelperTestRustPanic03() -> None: err = rustPanic3.splitlines() sanitizedMsg = AssertionHelper.getSanitizedAssertionPattern(AssertionHelper.getAssertion(err)) diff --git a/FTB/tests/test_CoverageHelper.py b/FTB/tests/test_CoverageHelper.py index 176bc2a31..85b59492f 100644 --- a/FTB/tests/test_CoverageHelper.py +++ b/FTB/tests/test_CoverageHelper.py @@ -147,7 +147,7 @@ """ # noqa -def test_CoverageHelperFlattenNames(): +def test_CoverageHelperFlattenNames() -> None: node = json.loads(covdata) result = CoverageHelper.get_flattened_names(node, prefix="") @@ -166,7 +166,7 @@ def test_CoverageHelperFlattenNames(): assert result == set(expected_names) -def test_CoverageHelperApplyDirectivesMixed(): +def test_CoverageHelperApplyDirectivesMixed() -> None: node = json.loads(covdata) # Check that mixed directives work properly (exclude multiple paths, include some back) @@ -191,7 +191,7 @@ def test_CoverageHelperApplyDirectivesMixed(): assert result == set(expected_names) -def test_CoverageHelperApplyDirectivesPrune(): +def test_CoverageHelperApplyDirectivesPrune() -> None: node = json.loads(covdata) # Check that any empty childs are pruned (empty childs are not useful) @@ -210,7 +210,7 @@ def test_CoverageHelperApplyDirectivesPrune(): assert result == set(expected_names) -def test_CoverageHelperApplyDirectivesExcludeAll(): +def test_CoverageHelperApplyDirectivesExcludeAll() -> None: node = json.loads(covdata) # Check that excluding all paths works (specialized case) @@ -229,7 +229,7 @@ def test_CoverageHelperApplyDirectivesExcludeAll(): assert result == set(expected_names) -def test_CoverageHelperApplyDirectivesMakeEmpty(): +def test_CoverageHelperApplyDirectivesMakeEmpty() -> None: node = json.loads(covdata) # Check that making the set entirely empty doesn't crash things (tsmith mode) diff --git a/misc/afl_libfuzzer/S3Manager.py b/misc/afl_libfuzzer/S3Manager.py index 77fa24f05..ba07d601b 100644 --- a/misc/afl_libfuzzer/S3Manager.py +++ b/misc/afl_libfuzzer/S3Manager.py @@ -231,7 +231,7 @@ def download_queue_dirs(self, work_dir): os.rename(tmp_file, os.path.join(download_dir, hash_name)) - def clean_queue_dirs(self): + def clean_queue_dirs(self) -> None: ''' Delete all closed remote queues. ''' diff --git a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py index 3e378b2db..0ad5bc458 100755 --- a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py +++ b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py @@ -83,7 +83,7 @@ def __init__(self, process, killOnOOM=True, mid=None, mqueue=None): # Store potential exceptions self.exc = None - def run(self): + def run(self) -> None: assert(not self.hitThreadLimit) assert(not self.hadOOM) @@ -167,7 +167,7 @@ def getTestcase(self): def getStderr(self): return list(self.stderr) - def terminate(self): + def terminate(self) -> None: print("[Job %s] Received terminate request..." % self.mid, file=sys.stderr) # Avoid sending anything through the queue when the run() loop exits @@ -799,7 +799,7 @@ def main(argv=None): help="Deprecated, use --stats instead", metavar="FILE") aflGroup.add_argument('rargs', nargs=argparse.REMAINDER) - def warn_local(): + def warn_local() -> None: if not opts.fuzzmanager and not opts.local: # User didn't specify --fuzzmanager but also didn't specify --local explicitly, so we should warn them # that their crash results won't end up anywhere except on the local machine. This method is called for diff --git a/misc/ec2prices/simulator.py b/misc/ec2prices/simulator.py index 37a96f6fc..bc6677083 100644 --- a/misc/ec2prices/simulator.py +++ b/misc/ec2prices/simulator.py @@ -158,7 +158,7 @@ def getSectionMap(self, section): return ret -def main(): +def main() -> None: '''Command line options.''' # setup argparser diff --git a/misc/libfuzzer/libfuzzer.py b/misc/libfuzzer/libfuzzer.py index 3b31c7d12..8451bd36f 100755 --- a/misc/libfuzzer/libfuzzer.py +++ b/misc/libfuzzer/libfuzzer.py @@ -42,7 +42,7 @@ def __init__(self, fd): self.inTrace = False self.testcase = None - def run(self): + def run(self) -> None: while True: line = self.fd.readline(4096) diff --git a/misc/update_prices.py b/misc/update_prices.py index db015aea9..d55ea73f0 100644 --- a/misc/update_prices.py +++ b/misc/update_prices.py @@ -135,7 +135,7 @@ def get_instance_types(regions=True, index_json=None): return instance_types -def main(): +def main() -> None: index_json = None if len(sys.argv) > 1: with open(sys.argv[1]) as data_fp: diff --git a/server/conftest.py b/server/conftest.py index afbf36d73..981d311b2 100644 --- a/server/conftest.py +++ b/server/conftest.py @@ -75,7 +75,7 @@ def __init__(self, _from, _to): # Reverse to the original migration executor.migrate(_from) - def __call__(self): + def __call__(self) -> None: # Run the migration to test executor = MigrationExecutor(connection) executor.loader.build_graph() # reload. diff --git a/server/contrib/create_user.py b/server/contrib/create_user.py index 3a15cd89b..4b2f2a7fc 100644 --- a/server/contrib/create_user.py +++ b/server/contrib/create_user.py @@ -9,7 +9,7 @@ import django -def main(): +def main() -> None: parser = argparse.ArgumentParser() parser.add_argument('--username', dest='username', type=str, required=True) parser.add_argument('--email', dest='email', type=str, required=True) diff --git a/server/contrib/fuzzmanager_setup_helper.py b/server/contrib/fuzzmanager_setup_helper.py index 4ef061b1e..ddcd1fc7a 100644 --- a/server/contrib/fuzzmanager_setup_helper.py +++ b/server/contrib/fuzzmanager_setup_helper.py @@ -10,7 +10,7 @@ from six.moves import input -def create_fuzzmanager(): +def create_fuzzmanager() -> None: # This is a throw away password, that is soon reset to the auth_token for fuzzmanager password = ''.join(random.sample(string.letters, 20)) print('[+] Creating fuzzmanager user account.') @@ -62,7 +62,7 @@ def create_fuzzmanager(): print('Something went wrong creating the fuzzmanager account') -def main(): +def main() -> None: os.environ.setdefault("DJANGO_SETTINGS_MODULE", "server.settings") from django.contrib.auth.models import User diff --git a/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py b/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py index 7113b3f8b..cec673546 100644 --- a/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py @@ -43,7 +43,7 @@ def testRevision(self, revision): return False return True - def update(self): + def update(self) -> None: # TODO: This will fail without remotes subprocess.check_call(["git", "fetch"], cwd=self.location) diff --git a/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py b/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py index c690351b8..fe082dfae 100644 --- a/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py @@ -51,7 +51,7 @@ def testRevision(self, revision): return False return True - def update(self): + def update(self) -> None: # TODO: This will fail without remotes subprocess.check_call(["hg", "pull"], cwd=self.location) diff --git a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py index 8a232ca1d..bbce01b23 100644 --- a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py @@ -67,7 +67,7 @@ def testRevision(self, revision): return @abstractmethod - def update(self): + def update(self) -> None: """ Update the resource associated with this provider. diff --git a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py index af3298334..17a4b13ab 100644 --- a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py +++ b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py @@ -93,14 +93,14 @@ def test_HGSourceCodeProvider(hg_repo): @pytest.mark.skipif(not os.path.isdir("/home/decoder/Mozilla/repos/mozilla-central-fm"), reason="not decoder") -def test_HGDiff(): +def test_HGDiff() -> None: provider = HGSourceCodeProvider("/home/decoder/Mozilla/repos/mozilla-central-fm") diff = provider.getUnifiedDiff("4f8e0cb21016") print(Utils.getDiffLocations(diff)) -def test_HGRevisionEquivalence(): +def test_HGRevisionEquivalence() -> None: provider = HGSourceCodeProvider("") # Simple equality for short and long revision formats diff --git a/server/covmanager/cron.py b/server/covmanager/cron.py index 0db9d5ded..c79e5ba9a 100644 --- a/server/covmanager/cron.py +++ b/server/covmanager/cron.py @@ -65,7 +65,7 @@ def create_weekly_report_mc(revision): @app.task(ignore_result=True) -def create_current_weekly_report_mc(): +def create_current_weekly_report_mc() -> None: COVERAGE_REVISION_URL = getattr(settings, 'COVERAGE_REVISION_URL', None) if not COVERAGE_REVISION_URL: diff --git a/server/covmanager/models.py b/server/covmanager/models.py index 90e38e63b..45543570b 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -65,7 +65,7 @@ def __init__(self, *args, **kwargs): super(Collection, self).__init__(*args, **kwargs) - def loadCoverage(self): + def loadCoverage(self) -> None: self.coverage.file.open(mode='rb') self.content = json.load(codecs.getreader('utf-8')(self.coverage.file)) self.coverage.file.close() diff --git a/server/covmanager/tests/test_mgmt_setup_repository.py b/server/covmanager/tests/test_mgmt_setup_repository.py index c79c3271c..1035ee0e7 100644 --- a/server/covmanager/tests/test_mgmt_setup_repository.py +++ b/server/covmanager/tests/test_mgmt_setup_repository.py @@ -18,7 +18,7 @@ pytestmark = pytest.mark.django_db() # pylint: disable=invalid-name -def test_bad_args(): +def test_bad_args() -> None: with pytest.raises(CommandError, match=r"Error: .*? arguments"): call_command("setup_repository") @@ -41,18 +41,18 @@ def test_bad_args(): call_command("setup_repository", "", "", "", "") -def test_repo_exists(): +def test_repo_exists() -> None: Repository.objects.create(name="test") with pytest.raises(CommandError, match=r"Error: repository with name '.*' already exists!"): call_command("setup_repository", "test", "", "") -def test_bad_provider(): +def test_bad_provider() -> None: with pytest.raises(CommandError, match=r"Error: 'bad' is not a valid source code provider!"): call_command("setup_repository", "test", "bad", ".") -def test_git_create(): +def test_git_create() -> None: call_command("setup_repository", "test", "git", ".") repo = Repository.objects.get(name="test") assert repo.classname == "GITSourceCodeProvider" @@ -64,7 +64,7 @@ def test_git_create(): assert repo.location == os.path.realpath(".") -def test_hg_create(): +def test_hg_create() -> None: call_command("setup_repository", "test", "hg", ".") repo = Repository.objects.get(name="test") assert repo.classname == "HGSourceCodeProvider" diff --git a/server/crashmanager/Bugtracker/Provider.py b/server/crashmanager/Bugtracker/Provider.py index b38e01c51..45cb01453 100644 --- a/server/crashmanager/Bugtracker/Provider.py +++ b/server/crashmanager/Bugtracker/Provider.py @@ -31,7 +31,7 @@ def __init__(self, pk, hostname): self.hostname = hostname @abstractmethod - def getTemplateList(self): + def getTemplateList(self) -> None: return @abstractmethod diff --git a/server/crashmanager/cron.py b/server/crashmanager/cron.py index ec8f0bc07..f46cf878e 100644 --- a/server/crashmanager/cron.py +++ b/server/crashmanager/cron.py @@ -11,22 +11,22 @@ @app.task(ignore_result=True) -def bug_update_status(): +def bug_update_status() -> None: call_command('bug_update_status') @app.task(ignore_result=True) -def cleanup_old_crashes(): +def cleanup_old_crashes() -> None: call_command('cleanup_old_crashes') @app.task(ignore_result=True) -def triage_new_crashes(): +def triage_new_crashes() -> None: call_command('triage_new_crashes') @app.task(ignore_result=True) -def export_signatures(): +def export_signatures() -> None: fd, tmpf = mkstemp(prefix="fm-sigs-", suffix=".zip") os.close(fd) try: @@ -38,5 +38,5 @@ def export_signatures(): @app.task(ignore_result=True) -def notify_by_email(): +def notify_by_email() -> None: call_command('notify_by_email') diff --git a/server/crashmanager/management/common.py b/server/crashmanager/management/common.py index ec1c37c30..05c552848 100644 --- a/server/crashmanager/management/common.py +++ b/server/crashmanager/management/common.py @@ -12,10 +12,10 @@ class ManagementLock(object): - def __init__(self): + def __init__(self) -> None: self.lock = None - def acquire(self): + def acquire(self) -> None: self.lock = InterProcessLock(LOCK_PATH) # Attempt to obtain a lock, retry every 10 seconds. Wait at most 5 minutes. @@ -31,7 +31,7 @@ def acquire(self): self.lock = None raise RuntimeError("Failed to acquire lock.") - def release(self): + def release(self) -> None: if self.lock is not None: self.lock.release() diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index c2d73e723..67f48b362 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -60,12 +60,12 @@ def __init__(self, *args, **kwargs): super(TestCase, self).__init__(*args, **kwargs) - def loadTest(self): + def loadTest(self) -> None: self.test.open(mode='rb') self.content = self.test.read() self.test.close() - def storeTestAndSave(self): + def storeTestAndSave(self) -> None: self.size = len(self.content) self.test.open(mode='w') self.test.write(self.content) @@ -379,7 +379,7 @@ def sanitize_utf8(s): super().save(*args, **kwargs) - def deserializeFields(self): + def deserializeFields(self) -> None: if self.args: self.argsList = json.loads(self.args) diff --git a/server/crashmanager/tests/__init__.py b/server/crashmanager/tests/__init__.py index b4b736867..99f67cc60 100644 --- a/server/crashmanager/tests/__init__.py +++ b/server/crashmanager/tests/__init__.py @@ -18,7 +18,7 @@ def assert_contains(response, text): class _(DjangoTestCase): - def runTest(self): + def runTest(self) -> None: pass _().assertContains(response, text) @@ -30,7 +30,7 @@ def assert_not_contains(response, text): class _(DjangoTestCase): - def runTest(self): + def runTest(self) -> None: pass _().assertNotContains(response, text) diff --git a/server/crashmanager/tests/test_mgmt_add_permission.py b/server/crashmanager/tests/test_mgmt_add_permission.py index b6dd98675..f19dc77aa 100644 --- a/server/crashmanager/tests/test_mgmt_add_permission.py +++ b/server/crashmanager/tests/test_mgmt_add_permission.py @@ -17,30 +17,30 @@ pytestmark = pytest.mark.django_db() # pylint: disable=invalid-name -def test_args(): +def test_args() -> None: with pytest.raises(CommandError, match=r"Error: .*arguments.*"): call_command("add_permission") -def test_no_such_user(): +def test_no_such_user() -> None: with pytest.raises(User.DoesNotExist): call_command("add_permission", "test@example.com", "crashmanager.models.User:view_crashmanager") -def test_no_perms(): +def test_no_perms() -> None: User.objects.create_user("test", "test@example.com", "test") with pytest.raises(CommandError, match=r"Error: .*arguments.*"): call_command("add_permission", "test") -def test_one_perm(): +def test_one_perm() -> None: user = User.objects.create_user("test", "test@example.com", "test") user.user_permissions.clear() # clear any default permissions call_command("add_permission", "test", "crashmanager.models.User:view_crashmanager") assert set(user.get_all_permissions()) == {'crashmanager.view_crashmanager'} -def test_two_perms(): +def test_two_perms() -> None: user = User.objects.create_user("test", "test@example.com", "test") user.user_permissions.clear() # clear any default permissions call_command("add_permission", "test", "crashmanager.models.User:view_crashmanager", diff --git a/server/crashmanager/tests/test_mgmt_bug_update_status.py b/server/crashmanager/tests/test_mgmt_bug_update_status.py index 034be805f..86697564d 100644 --- a/server/crashmanager/tests/test_mgmt_bug_update_status.py +++ b/server/crashmanager/tests/test_mgmt_bug_update_status.py @@ -26,12 +26,12 @@ pytestmark = pytest.mark.usefixtures("crashmanager_test") -def test_args(): +def test_args() -> None: with pytest.raises(CommandError, match=r"Error: unrecognized arguments: "): call_command("bug_update_status", "") -def test_none(): +def test_none() -> None: call_command("bug_update_status") diff --git a/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py b/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py index 4676783fd..0cb79610c 100644 --- a/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py +++ b/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py @@ -29,12 +29,12 @@ def _crashentry_create(**kwds): return CrashEntry.objects.create(**defaults) -def test_args(): +def test_args() -> None: with pytest.raises(CommandError, match=r"Error: unrecognized arguments: "): call_command("cleanup_old_crashes", "") -def test_bug_cleanup(): +def test_bug_cleanup() -> None: prov = BugProvider.objects.create() Bug.objects.create(externalType=prov) call_command("cleanup_old_crashes") diff --git a/server/crashmanager/tests/test_mgmt_export_signatures.py b/server/crashmanager/tests/test_mgmt_export_signatures.py index 3f7f5831c..c5b874c96 100644 --- a/server/crashmanager/tests/test_mgmt_export_signatures.py +++ b/server/crashmanager/tests/test_mgmt_export_signatures.py @@ -23,12 +23,12 @@ pytestmark = pytest.mark.django_db() # pylint: disable=invalid-name -def test_args(): +def test_args() -> None: with pytest.raises(CommandError, match=r"Error: .* arguments"): call_command("export_signatures") -def test_none(): +def test_none() -> None: fd, tmpf = tempfile.mkstemp() os.close(fd) try: @@ -40,7 +40,7 @@ def test_none(): os.unlink(tmpf) -def test_some(): +def test_some() -> None: sig1 = Bucket.objects.create(signature='sig1', frequent=True) sig2 = Bucket.objects.create(signature='sig2', shortDescription="desc") members = set() diff --git a/server/crashmanager/tests/test_mgmt_get_auth_token.py b/server/crashmanager/tests/test_mgmt_get_auth_token.py index 9c6153b50..bc5662e9d 100644 --- a/server/crashmanager/tests/test_mgmt_get_auth_token.py +++ b/server/crashmanager/tests/test_mgmt_get_auth_token.py @@ -19,12 +19,12 @@ pytestmark = pytest.mark.django_db() # pylint: disable=invalid-name -def test_args(): +def test_args() -> None: with pytest.raises(CommandError, match=r"Error: Enter at least one label."): call_command("get_auth_token") -def test_no_such_user(): +def test_no_such_user() -> None: with pytest.raises(User.DoesNotExist): call_command("get_auth_token", "user") diff --git a/server/crashmanager/tests/test_mgmt_triage_new_crashes.py b/server/crashmanager/tests/test_mgmt_triage_new_crashes.py index d617735c7..377ce0472 100644 --- a/server/crashmanager/tests/test_mgmt_triage_new_crashes.py +++ b/server/crashmanager/tests/test_mgmt_triage_new_crashes.py @@ -22,16 +22,16 @@ pytestmark = pytest.mark.usefixtures("crashmanager_test") -def test_args(): +def test_args() -> None: with pytest.raises(CommandError, match=r"Error: unrecognized arguments: "): call_command("triage_new_crashes", "") -def test_none(): +def test_none() -> None: call_command("triage_new_crashes") -def test_some(): +def test_some() -> None: buckets = [Bucket.objects.create(signature=json.dumps({"symptoms": [ {'src': 'stderr', 'type': 'output', @@ -63,7 +63,7 @@ def test_some(): assert crashes[2].bucket is None -def test_some_with_notification(): +def test_some_with_notification() -> None: buckets = [Bucket.objects.create(signature=json.dumps({"symptoms": [ {'src': 'stderr', 'type': 'output', diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index 4282e9d9c..bafdf428b 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -192,7 +192,7 @@ def get_image(self, region, config): @staticmethod @abstractmethod - def get_cores_per_instance(): + def get_cores_per_instance() -> None: ''' returns dictionary of instance types and their number of cores @@ -273,7 +273,7 @@ def get_tags(config): @staticmethod @abstractmethod - def get_name(): + def get_name() -> None: ''' used to return name of cloud provider diff --git a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py index b900ae57b..3994978a5 100644 --- a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py @@ -15,7 +15,7 @@ class EC2SpotCloudProvider(CloudProvider): - def __init__(self): + def __init__(self) -> None: self.logger = logging.getLogger("ec2spotmanager") self.cluster = None self.connected_region = None diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index 82633da7c..93e7e1b31 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -73,7 +73,7 @@ class GCECloudProvider(CloudProvider): "UNKNOWN": INSTANCE_STATE["pending"], } - def __init__(self): + def __init__(self) -> None: self.logger = logging.getLogger("ec2spotmanager.gce") self.cluster = None diff --git a/server/ec2spotmanager/cron.py b/server/ec2spotmanager/cron.py index 7b0f78c77..a740aca5a 100644 --- a/server/ec2spotmanager/cron.py +++ b/server/ec2spotmanager/cron.py @@ -24,7 +24,7 @@ @app.task(ignore_result=True) -def update_stats(): +def update_stats() -> None: from .models import PoolUptimeDetailedEntry, PoolUptimeAccumulatedEntry, InstancePool, Instance instance_pools = InstancePool.objects.all() @@ -115,7 +115,7 @@ def _release_lock(lock_key): @app.task(ignore_result=True) -def check_instance_pools(): +def check_instance_pools() -> None: """EC2SpotManager daemon. - checks all instance pools @@ -241,7 +241,7 @@ def check_instance_pools(): @app.task(ignore_result=True) -def update_prices(): +def update_prices() -> None: """Periodically refresh spot price history and store it in redis to be consumed when spot instances are created. Prices are stored in redis, with keys like: diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index 520cdd84b..b5b08f12b 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -234,7 +234,7 @@ def save(self, *args, **kwargs): super(PoolConfiguration, self).save(*args, **kwargs) - def deserializeFields(self): + def deserializeFields(self) -> None: for field in self.dict_config_fields: sobj = getattr(self, field) or '' setattr(self, field + '_override', sobj.startswith('!')) @@ -254,7 +254,7 @@ def deserializeFields(self): self.ec2_userdata = self.ec2_userdata_file.read() self.ec2_userdata_file.close() - def storeTestAndSave(self): + def storeTestAndSave(self) -> None: if self.ec2_userdata: # Save the file using save() to avoid problems when initially # creating the directory. We use os.path.split to keep the diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index 8829736d5..68077d930 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -30,7 +30,7 @@ def assert_contains(response, text): class _(DjangoTestCase): - def runTest(self): + def runTest(self) -> None: pass _().assertContains(response, text) diff --git a/server/ec2spotmanager/tests/test_task_status.py b/server/ec2spotmanager/tests/test_task_status.py index 8be628321..24c4edb9d 100644 --- a/server/ec2spotmanager/tests/test_task_status.py +++ b/server/ec2spotmanager/tests/test_task_status.py @@ -19,7 +19,7 @@ pytestmark = pytest.mark.usefixtures('ec2spotmanager_test') # pylint: disable=invalid-name -def test_update_pool_status(): +def test_update_pool_status() -> None: """test that update_pool_status utility function works""" config = create_config(name='config #1', size=4, cycle_interval=3600, ec2_key_name='fredsRefurbishedSshKey', ec2_security_groups='mostlysecure', ec2_instance_types=['80286'], ec2_image_name='os/2', @@ -32,7 +32,7 @@ def test_update_pool_status(): assert not entry.isCritical -def test_update_provider_status(): +def test_update_provider_status() -> None: """test that update_provider_status utility function works""" _update_provider_status('EC2Spot', 'price-too-low', 'testing') entry = ProviderStatusEntry.objects.get() diff --git a/server/ec2spotmanager/tests/test_tasks.py b/server/ec2spotmanager/tests/test_tasks.py index 24fab1f7f..69b5653d9 100644 --- a/server/ec2spotmanager/tests/test_tasks.py +++ b/server/ec2spotmanager/tests/test_tasks.py @@ -29,7 +29,7 @@ @pytest.mark.usefixtures('mock_provider') -def test_nothing_to_do(): +def test_nothing_to_do() -> None: """nothing is done if no pools are enabled""" config = create_config(name='config #1', size=1, cycle_interval=1, ec2_key_name='a', ec2_image_name='a', @@ -41,7 +41,7 @@ def test_nothing_to_do(): assert not Instance.objects.exists() -def test_bad_config(): +def test_bad_config() -> None: """invalid configs create a pool status entry""" config = create_config(name='config #1') pool = create_pool(config=config) @@ -391,7 +391,7 @@ def test_pool_disabled(mocker): mock_term_request.delay.assert_called_once_with('EC2Spot', 'redmond', ['r-456']) -def test_pool_trim(): +def test_pool_trim() -> None: """check that pool down-size trims older instances until we meet the requirement""" # create database state config = create_config(name='config #1', size=4, cycle_interval=3600, ec2_key_name='fredsRefurbishedSshKey', diff --git a/server/taskmanager/cron.py b/server/taskmanager/cron.py index fe897638a..4dfff9c07 100644 --- a/server/taskmanager/cron.py +++ b/server/taskmanager/cron.py @@ -12,7 +12,7 @@ @app.task(ignore_result=True) -def update_tasks(): +def update_tasks() -> None: import taskcluster from .models import Task from .tasks import update_task @@ -60,7 +60,7 @@ def _update_task_run(task_id, run_id): @app.task(ignore_result=True) -def delete_expired(): +def delete_expired() -> None: from .models import Task # if the tasks no longer exist, or are expired, remove them from our DB too diff --git a/server/taskmanager/tasks.py b/server/taskmanager/tasks.py index 5ab375739..02cf2994c 100644 --- a/server/taskmanager/tasks.py +++ b/server/taskmanager/tasks.py @@ -42,7 +42,7 @@ def get_or_create_pool(worker_type): @app.task(ignore_result=True) -def update_pool_defns(): +def update_pool_defns() -> None: from fuzzing_decision.common.pool import PoolConfigLoader from .models import Pool, Task From 4d8582dfaae20f64ce3bf9a818910950b5096145 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 10 Aug 2021 12:32:20 -0700 Subject: [PATCH 007/137] Ignore gdb being undefined, for mypy --- FTB/Running/GDB.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FTB/Running/GDB.py b/FTB/Running/GDB.py index c4f2bb5f7..16701725a 100644 --- a/FTB/Running/GDB.py +++ b/FTB/Running/GDB.py @@ -16,15 +16,15 @@ def is64bit(): - return not str(gdb.parse_and_eval("$rax")) == "void" # noqa @UndefinedVariable + return not str(gdb.parse_and_eval("$rax")) == "void" # type: ignore[name-defined] # noqa @UndefinedVariable def isARM(): - return not str(gdb.parse_and_eval("$r0")) == "void" # noqa @UndefinedVariable + return not str(gdb.parse_and_eval("$r0")) == "void" # type: ignore[name-defined] # noqa @UndefinedVariable def isARM64(): - return not str(gdb.parse_and_eval("$x0")) == "void" # noqa @UndefinedVariable + return not str(gdb.parse_and_eval("$x0")) == "void" # type: ignore[name-defined] # noqa @UndefinedVariable def regAsHexStr(reg): @@ -32,15 +32,15 @@ def regAsHexStr(reg): mask = 0xffffffffffffffff else: mask = 0xffffffff - return "0x%x" % (int(str(gdb.parse_and_eval("$" + reg)), 0) & mask) # noqa @UndefinedVariable + return "0x%x" % (int(str(gdb.parse_and_eval("$" + reg)), 0) & mask) # type: ignore[name-defined] # noqa @UndefinedVariable def regAsIntStr(reg): - return str(int(str(gdb.parse_and_eval("$" + reg)), 0)) # noqa @UndefinedVariable + return str(int(str(gdb.parse_and_eval("$" + reg)), 0)) # type: ignore[name-defined] # noqa @UndefinedVariable def regAsRaw(reg): - return str(gdb.parse_and_eval("$" + reg)) # noqa @UndefinedVariable + return str(gdb.parse_and_eval("$" + reg)) # type: ignore[name-defined] # noqa @UndefinedVariable def printImportantRegisters() -> None: From 8ef0b7c335bc402881afbba3ac5c4db8c9ed9eba Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 11 Aug 2021 23:12:23 -0700 Subject: [PATCH 008/137] "mypy ." should work in root FuzzManager directory even if we do not specify exact files --- pyproject.toml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f36c1ec98..d388d28f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,4 @@ [tool.mypy] -files = [ - "Collector/**/*.py", - "CovReporter/**/*.py", - "EC2Reporter/**/*.py", - "FTB/**/*.py", - "Reporter/**/*.py", - "TaskStatusReporter/**/*.py", - "misc/**/*.py", - "server/**/*.py", -] strict = true ignore_missing_imports = true show_error_codes = true From 818cb82019d153477eb36dae2daf0cdb21486d7a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 11 Aug 2021 23:26:12 -0700 Subject: [PATCH 009/137] Convert 3 functions in Collector/Collector.py to be typed --- Collector/Collector.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index 2fa10677a..475e95465 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -28,6 +28,8 @@ import shutil import sys from tempfile import mkstemp +from typing import Generator +from typing import Tuple from zipfile import ZipFile from FTB.ProgramConfiguration import ProgramConfiguration # noqa @@ -259,14 +261,11 @@ def download(self, crashId): return (local_filename, resp_json) @remote_checks - def download_all(self, bucketId): + def download_all(self, bucketId: int) -> Generator[str]: ''' Download all testcases for the specified bucketId. - @type bucketId: int @param bucketId: ID of the requested bucket on the server side - - @rtype: generator @return: generator of filenames where tests were stored. ''' params = { @@ -305,16 +304,12 @@ def download_all(self, bucketId): yield local_filename - def __store_signature_hashed(self, signature): + def __store_signature_hashed(self, signature: CrashSignature) -> str: ''' Store a signature, using the sha1 hash hex representation as filename. - @type signature: CrashSignature @param signature: CrashSignature to store - - @rtype: string @return: Name of the file that the signature was written to - ''' h = hashlib.new('sha1') if str is bytes: @@ -328,16 +323,12 @@ def __store_signature_hashed(self, signature): return sigfile @staticmethod - def read_testcase(testCase): + def read_testcase(testCase: str) -> Tuple[str, bool]: ''' Read a testcase file, return the content and indicate if it is binary or not. - @type testCase: string @param testCase: Filename of the file to open - - @rtype: tuple(string, bool) @return: Tuple containing the file contents and a boolean indicating if the content is binary - ''' with open(testCase, 'rb') as f: testCaseData = f.read() From 6ce7f4886875702497494a4f99dfdcce649fac28 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 15 Aug 2021 23:38:13 -0700 Subject: [PATCH 010/137] Fix another 24 mypy issues by declaring proper type information --- FTB/AssertionHelper.py | 5 +---- FTB/Running/GDB.py | 12 ++++++------ FTB/Running/tests/test_shell.py | 2 +- FTB/Signatures/CrashInfo.py | 6 ++---- FTB/Signatures/RegisterHelper.py | 2 +- server/covmanager/tests/conftest.py | 4 ++-- .../CloudProvider/EC2SpotCloudProvider.py | 4 ++-- .../ec2spotmanager/CloudProvider/GCECloudProvider.py | 4 ++-- 8 files changed, 17 insertions(+), 22 deletions(-) diff --git a/FTB/AssertionHelper.py b/FTB/AssertionHelper.py index 7e68896c9..caacf3b7f 100644 --- a/FTB/AssertionHelper.py +++ b/FTB/AssertionHelper.py @@ -302,15 +302,12 @@ def _handleMatch(match): return sanitizedMsgs -def escapePattern(msg): +def escapePattern(msg: str) -> str: ''' This method escapes regular expression characters in the string. And no, this is not re.escape, which would escape many more characters. - @type msg: string @param msg: String that needs to be quoted - - @rtype: string @return: Escaped string for use in regular expressions ''' diff --git a/FTB/Running/GDB.py b/FTB/Running/GDB.py index 16701725a..59c284eb3 100644 --- a/FTB/Running/GDB.py +++ b/FTB/Running/GDB.py @@ -15,19 +15,19 @@ from __future__ import print_function -def is64bit(): +def is64bit() -> bool: return not str(gdb.parse_and_eval("$rax")) == "void" # type: ignore[name-defined] # noqa @UndefinedVariable -def isARM(): +def isARM() -> bool: return not str(gdb.parse_and_eval("$r0")) == "void" # type: ignore[name-defined] # noqa @UndefinedVariable -def isARM64(): +def isARM64() -> bool: return not str(gdb.parse_and_eval("$x0")) == "void" # type: ignore[name-defined] # noqa @UndefinedVariable -def regAsHexStr(reg): +def regAsHexStr(reg: str) -> str: if is64bit(): mask = 0xffffffffffffffff else: @@ -35,11 +35,11 @@ def regAsHexStr(reg): return "0x%x" % (int(str(gdb.parse_and_eval("$" + reg)), 0) & mask) # type: ignore[name-defined] # noqa @UndefinedVariable -def regAsIntStr(reg): +def regAsIntStr(reg: str) -> str: return str(int(str(gdb.parse_and_eval("$" + reg)), 0)) # type: ignore[name-defined] # noqa @UndefinedVariable -def regAsRaw(reg): +def regAsRaw(reg: str) -> str: return str(gdb.parse_and_eval("$" + reg)) # type: ignore[name-defined] # noqa @UndefinedVariable diff --git a/FTB/Running/tests/test_shell.py b/FTB/Running/tests/test_shell.py index 3f4e6d692..2007a0abc 100644 --- a/FTB/Running/tests/test_shell.py +++ b/FTB/Running/tests/test_shell.py @@ -94,7 +94,7 @@ def processInput(mode, inputFd): sys.exit(0) -def main(): +def main() -> int: if len(sys.argv) < 2: print("Need at least one argument (mode)", file=sys.stderr) sys.exit(1) diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 4cb907329..2e6c01948 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -1789,9 +1789,8 @@ def __init__(self, stdout, stderr, configuration, crashData=None): self.tsanIndexZero.append(backtrace[0]) self.backtrace.extend(backtrace) - def createShortSignature(self): + def createShortSignature(self) -> str: ''' - @rtype: String @return: A string representing this crash (short signature) ''' if self.tsanWarnLine: @@ -1893,9 +1892,8 @@ def __init__(self, stdout, stderr, configuration, crashData=None): # done parsing break - def createShortSignature(self): + def createShortSignature(self) -> str: ''' - @rtype: String @return: A string representing this crash (short signature) ''' diff --git a/FTB/Signatures/RegisterHelper.py b/FTB/Signatures/RegisterHelper.py index a57e798ef..84fdbca18 100644 --- a/FTB/Signatures/RegisterHelper.py +++ b/FTB/Signatures/RegisterHelper.py @@ -33,7 +33,7 @@ } -def getRegisterPattern(): +def getRegisterPattern() -> str: ''' Return a pattern including all register names that are considered valid ''' diff --git a/server/covmanager/tests/conftest.py b/server/covmanager/tests/conftest.py index 398e529db..c9b3f0f91 100644 --- a/server/covmanager/tests/conftest.py +++ b/server/covmanager/tests/conftest.py @@ -24,7 +24,7 @@ LOG = logging.getLogger("fm.covmanager.tests") -def _check_git(): +def _check_git() -> bool: try: proc = subprocess.Popen(["git"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = proc.communicate() @@ -35,7 +35,7 @@ def _check_git(): return False -def _check_hg(): +def _check_hg() -> bool: try: proc = subprocess.Popen(["hg"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = proc.communicate() diff --git a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py index 3994978a5..4b5e6d7e7 100644 --- a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py @@ -198,7 +198,7 @@ def get_image(self, region, config): return ami @staticmethod - def get_cores_per_instance(): + def get_cores_per_instance() -> int: return CORES_PER_INSTANCE @staticmethod @@ -222,7 +222,7 @@ def get_tags(config): return config.instance_tags @staticmethod - def get_name(): + def get_name() -> str: return 'EC2Spot' @staticmethod diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index 93e7e1b31..282b9271a 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -232,7 +232,7 @@ def get_image(self, region, config): return config.gce_image_name @staticmethod - def get_cores_per_instance(): + def get_cores_per_instance() -> int: return CORES_PER_INSTANCE @staticmethod @@ -256,7 +256,7 @@ def get_tags(config): return config.instance_tags @staticmethod - def get_name(): + def get_name() -> str: return 'GCE' @staticmethod From 50137407eab6808747dafeb57efe742966cbc3c9 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 21 Aug 2021 03:04:43 -0700 Subject: [PATCH 011/137] More type information --- Collector/Collector.py | 5 +++-- Reporter/Reporter.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index 475e95465..0c1f8e309 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -29,6 +29,7 @@ import sys from tempfile import mkstemp from typing import Generator +from typing import List from typing import Tuple from zipfile import ZipFile @@ -66,7 +67,7 @@ def refresh(self) -> None: os.remove(zipFileName) @signature_checks - def refreshFromZip(self, zipFileName): + def refreshFromZip(self, zipFileName: str) -> None: ''' Refresh signatures from a local zip file, adding new signatures and invalidating old ones. (This is a non-standard use case; @@ -340,7 +341,7 @@ def read_testcase(testCase: str) -> Tuple[str, bool]: return (testCaseData, isBinary) -def main(args=None): +def main(args=None) -> int: '''Command line options.''' # setup argparser diff --git a/Reporter/Reporter.py b/Reporter/Reporter.py index b3e16c2e6..ab37332c1 100644 --- a/Reporter/Reporter.py +++ b/Reporter/Reporter.py @@ -193,6 +193,6 @@ def patch(self, *args, **kwds): return requests_retry(self._session.patch)(*args, **kwds) @staticmethod - def serverError(response): + def serverError(response) -> RuntimeError: return RuntimeError("Server unexpectedly responded with status code %s: %s" % (response.status_code, response.text)) From 100a107e72d3734e0639385197f9a4b7eded9405 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 31 Aug 2021 12:14:25 -0700 Subject: [PATCH 012/137] Remove unused import for now --- Collector/Collector.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index 0c1f8e309..72ee470ad 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -29,7 +29,6 @@ import sys from tempfile import mkstemp from typing import Generator -from typing import List from typing import Tuple from zipfile import ZipFile From da87ca6c354c5a10aa2615b94c1663fcde12aaa7 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 1 Sep 2021 00:47:51 -0700 Subject: [PATCH 013/137] Use annotations from __future__, which will require Python 3.7+ --- Collector/Collector.py | 3 +-- Collector/__main__.py | 3 +++ Collector/tests/test_Collector.py | 4 +++- CovReporter/CovReporter.py | 3 +-- CovReporter/__main__.py | 3 +++ CovReporter/tests/test_CovReporter.py | 3 +++ EC2Reporter/EC2Reporter.py | 3 +-- EC2Reporter/__main__.py | 3 +++ EC2Reporter/tests/test_EC2Reporter.py | 2 +- FTB/AssertionHelper.py | 2 ++ FTB/ConfigurationFiles.py | 4 ++-- FTB/CoverageHelper.py | 3 +-- FTB/ProgramConfiguration.py | 4 ++-- FTB/Running/AutoRunner.py | 3 +-- FTB/Running/GDB.py | 3 ++- FTB/Running/PersistentApplication.py | 3 +-- FTB/Running/StreamCollector.py | 3 +-- FTB/Running/WaitpidMonitor.py | 3 +-- FTB/Running/tests/test_persistent.py | 4 +++- FTB/Running/tests/test_shell.py | 3 +-- FTB/Signatures/CrashInfo.py | 3 +-- FTB/Signatures/CrashSignature.py | 2 ++ FTB/Signatures/JSONHelper.py | 2 ++ FTB/Signatures/Matchers.py | 3 +-- FTB/Signatures/RegisterHelper.py | 2 ++ FTB/Signatures/Symptom.py | 3 +-- FTB/Signatures/tests/test_CrashInfo.py | 3 +++ FTB/Signatures/tests/test_CrashSignature.py | 3 +++ FTB/tests/test_AssertionHelper.py | 3 +++ FTB/tests/test_CoverageHelper.py | 3 +++ Reporter/Reporter.py | 3 +-- TaskStatusReporter/TaskStatusReporter.py | 3 +-- TaskStatusReporter/__main__.py | 3 +++ TaskStatusReporter/tests/test_TaskStatusReporter.py | 2 +- misc/afl_libfuzzer/S3Manager.py | 3 +-- misc/afl_libfuzzer/afl-libfuzzer-daemon.py | 3 +-- misc/ec2prices/simulations/best_every_n_hours.py | 3 +-- misc/ec2prices/simulations/choose_once.py | 3 +-- misc/ec2prices/simulations/common.py | 3 ++- misc/ec2prices/simulator.py | 3 +-- misc/libfuzzer/libfuzzer.py | 3 +-- misc/update_prices.py | 3 ++- server/celeryconf.py | 2 +- server/conftest.py | 3 +++ server/contrib/create_user.py | 2 +- server/contrib/fuzzmanager_setup_helper.py | 2 +- server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py | 3 +-- server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py | 3 +-- server/covmanager/SourceCodeProvider/SourceCodeProvider.py | 3 +-- .../SourceCodeProvider/tests/test_sourcecodeprovider.py | 3 +++ server/covmanager/cron.py | 2 ++ server/covmanager/management/commands/setup_repository.py | 4 ++-- server/covmanager/migrations/0001_initial.py | 3 ++- .../migrations/0002_increase_collection_filename_length.py | 3 ++- server/covmanager/migrations/0003_collection_file_optional.py | 3 ++- .../migrations/0004_reportconfiguration_reportsummary.py | 3 ++- server/covmanager/migrations/0005_report.py | 3 ++- server/covmanager/migrations/0006_auto_20210429_0908.py | 2 ++ server/covmanager/models.py | 2 ++ server/covmanager/serializers.py | 2 ++ server/covmanager/tasks.py | 2 ++ server/covmanager/templatetags/recurseroot.py | 2 ++ server/covmanager/tests/conftest.py | 3 +++ server/covmanager/tests/test_collections.py | 3 +++ server/covmanager/tests/test_collections_rest.py | 3 +++ server/covmanager/tests/test_covmanager.py | 3 +++ server/covmanager/tests/test_mgmt_setup_repository.py | 3 +++ server/covmanager/tests/test_repositories.py | 3 +++ server/covmanager/tests/test_repositories_rest.py | 2 ++ server/covmanager/urls.py | 2 ++ server/covmanager/views.py | 2 ++ server/crashmanager/Bugtracker/BugzillaProvider.py | 3 +-- server/crashmanager/Bugtracker/BugzillaREST.py | 3 +-- server/crashmanager/Bugtracker/Provider.py | 3 +-- server/crashmanager/__init__.py | 2 ++ server/crashmanager/admin.py | 2 ++ server/crashmanager/cron.py | 2 ++ server/crashmanager/forms.py | 2 ++ server/crashmanager/management/commands/add_permission.py | 2 +- server/crashmanager/management/commands/bug_update_status.py | 2 ++ .../crashmanager/management/commands/cleanup_old_crashes.py | 2 ++ server/crashmanager/management/commands/export_signatures.py | 2 ++ server/crashmanager/management/commands/get_auth_token.py | 2 +- server/crashmanager/management/commands/notify_by_email.py | 2 ++ server/crashmanager/management/commands/triage_new_crash.py | 2 ++ server/crashmanager/management/commands/triage_new_crashes.py | 2 ++ server/crashmanager/management/common.py | 3 +-- .../migrations/0001_squashed_0020_add_app_permissions.py | 3 ++- server/crashmanager/migrations/0002_add_taskmanager.py | 3 ++- server/crashmanager/migrations/0003_auto_20210429_0908.py | 2 ++ server/crashmanager/migrations/0004_bugzillatemplate_mode.py | 2 ++ .../migrations/0005_user_notification_booleans.py | 2 ++ server/crashmanager/models.py | 2 ++ server/crashmanager/serializers.py | 2 ++ server/crashmanager/tasks.py | 2 ++ server/crashmanager/templatetags/extratags.py | 2 ++ server/crashmanager/tests/__init__.py | 3 +++ server/crashmanager/tests/conftest.py | 3 +++ server/crashmanager/tests/test_bugproviders_rest.py | 4 +++- server/crashmanager/tests/test_bugs.py | 3 +++ server/crashmanager/tests/test_crashes.py | 3 +++ server/crashmanager/tests/test_crashes_rest.py | 4 +++- server/crashmanager/tests/test_crashmanager.py | 3 +++ server/crashmanager/tests/test_inbox_rest.py | 4 +++- server/crashmanager/tests/test_mgmt_add_permission.py | 3 +++ server/crashmanager/tests/test_mgmt_bug_update_status.py | 3 +++ server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py | 3 +++ server/crashmanager/tests/test_mgmt_export_signatures.py | 4 +++- server/crashmanager/tests/test_mgmt_get_auth_token.py | 3 +++ server/crashmanager/tests/test_mgmt_triage_new_crashes.py | 3 +++ server/crashmanager/tests/test_rest_live.py | 3 +++ server/crashmanager/tests/test_signatures.py | 3 +++ server/crashmanager/tests/test_signatures_rest.py | 3 +++ server/crashmanager/tests/test_stats.py | 3 +++ server/crashmanager/tests/test_templates_rest.py | 4 +++- server/crashmanager/tests/test_user_settings.py | 3 +++ server/crashmanager/urls.py | 2 ++ server/crashmanager/views.py | 2 ++ server/ec2spotmanager/CloudProvider/CloudProvider.py | 2 ++ server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py | 2 ++ server/ec2spotmanager/CloudProvider/GCECloudProvider.py | 3 +++ server/ec2spotmanager/__init__.py | 2 ++ server/ec2spotmanager/common/ec2.py | 2 ++ server/ec2spotmanager/common/gce.py | 2 ++ server/ec2spotmanager/common/prices.py | 2 ++ server/ec2spotmanager/cron.py | 2 ++ .../migrations/0001_squashed_0013_add_gce_fields.py | 3 ++- server/ec2spotmanager/migrations/0002_auto_20210429_0908.py | 2 ++ server/ec2spotmanager/models.py | 2 ++ server/ec2spotmanager/serializers.py | 2 ++ server/ec2spotmanager/tasks.py | 2 ++ server/ec2spotmanager/templatetags/datetags.py | 2 ++ server/ec2spotmanager/templatetags/recursetags.py | 2 ++ server/ec2spotmanager/tests/__init__.py | 3 +++ server/ec2spotmanager/tests/conftest.py | 3 +++ server/ec2spotmanager/tests/test_configs.py | 3 +++ server/ec2spotmanager/tests/test_configs_rest.py | 3 +++ server/ec2spotmanager/tests/test_ec2spotmanager.py | 3 +++ server/ec2spotmanager/tests/test_pools.py | 3 +++ server/ec2spotmanager/tests/test_pools_rest.py | 3 +++ server/ec2spotmanager/tests/test_status_rest.py | 3 +++ server/ec2spotmanager/tests/test_task_graph.py | 3 +++ server/ec2spotmanager/tests/test_task_status.py | 3 +++ server/ec2spotmanager/tests/test_tasks.py | 3 +++ server/ec2spotmanager/urls.py | 2 ++ server/ec2spotmanager/views.py | 2 ++ server/manage.py | 3 +++ server/server/auth.py | 2 ++ server/server/middleware.py | 3 ++- server/server/settings.py | 3 +++ server/server/settings_docker.py | 2 ++ server/server/settings_nondebug.py | 2 ++ server/server/settings_test.py | 2 ++ server/server/tests/__init__.py | 2 ++ server/server/urls.py | 2 ++ server/server/utils.py | 2 ++ server/server/views.py | 2 ++ server/server/wsgi.py | 2 ++ server/taskmanager/__init__.py | 2 ++ server/taskmanager/apps.py | 3 ++- server/taskmanager/cron.py | 4 +++- .../management/commands/taskmanager_change_poolid.py | 3 +++ .../taskmanager/management/commands/taskmanager_list_pools.py | 3 +++ .../management/commands/taskmanager_pulse_listen.py | 3 +++ .../management/commands/taskmanager_scrape_task_group.py | 3 +++ server/taskmanager/migrations/0001_initial.py | 2 ++ ...0002_allow_unknown_task_status_and_run_time_calculation.py | 2 ++ server/taskmanager/models.py | 3 ++- server/taskmanager/serializers.py | 3 +++ server/taskmanager/tasks.py | 3 +++ server/taskmanager/tests/__init__.py | 2 ++ server/taskmanager/tests/conftest.py | 3 +++ server/taskmanager/tests/test_pools_rest.py | 3 +++ server/taskmanager/tests/test_taskmanager.py | 3 +++ server/taskmanager/tests/test_tasks_rest.py | 3 +++ server/taskmanager/tests/test_update_pools.py | 3 +++ server/taskmanager/urls.py | 2 ++ server/taskmanager/views.py | 3 ++- setup.py | 3 +++ 179 files changed, 390 insertions(+), 90 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index 72ee470ad..effa38134 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -17,8 +17,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import argparse import base64 diff --git a/Collector/__main__.py b/Collector/__main__.py index 69936c257..271e84b9c 100644 --- a/Collector/__main__.py +++ b/Collector/__main__.py @@ -15,6 +15,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import sys from .Collector import main diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index 23d1a47ec..d289358e3 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -12,7 +12,9 @@ @contact: choller@mozilla.com ''' -from __future__ import absolute_import, unicode_literals + +from __future__ import annotations + import json import os import platform diff --git a/CovReporter/CovReporter.py b/CovReporter/CovReporter.py index 98bacc411..26a9132fa 100755 --- a/CovReporter/CovReporter.py +++ b/CovReporter/CovReporter.py @@ -17,8 +17,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import argparse import json diff --git a/CovReporter/__main__.py b/CovReporter/__main__.py index 051ffbb24..1ed127002 100644 --- a/CovReporter/__main__.py +++ b/CovReporter/__main__.py @@ -15,6 +15,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import sys from .CovReporter import main diff --git a/CovReporter/tests/test_CovReporter.py b/CovReporter/tests/test_CovReporter.py index 86d6438e6..12b660388 100644 --- a/CovReporter/tests/test_CovReporter.py +++ b/CovReporter/tests/test_CovReporter.py @@ -12,6 +12,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import json import os import tempfile diff --git a/EC2Reporter/EC2Reporter.py b/EC2Reporter/EC2Reporter.py index c150e5252..f8e3372dc 100755 --- a/EC2Reporter/EC2Reporter.py +++ b/EC2Reporter/EC2Reporter.py @@ -17,8 +17,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import argparse import functools diff --git a/EC2Reporter/__main__.py b/EC2Reporter/__main__.py index 9a3248f28..4af99b213 100644 --- a/EC2Reporter/__main__.py +++ b/EC2Reporter/__main__.py @@ -15,6 +15,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import sys from .EC2Reporter import main diff --git a/EC2Reporter/tests/test_EC2Reporter.py b/EC2Reporter/tests/test_EC2Reporter.py index 7498ee89f..e788e8506 100644 --- a/EC2Reporter/tests/test_EC2Reporter.py +++ b/EC2Reporter/tests/test_EC2Reporter.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import annotations import pytest from django.utils import timezone diff --git a/FTB/AssertionHelper.py b/FTB/AssertionHelper.py index caacf3b7f..6cab47628 100644 --- a/FTB/AssertionHelper.py +++ b/FTB/AssertionHelper.py @@ -14,6 +14,8 @@ @contact: choller@mozilla.com ''' +from __future__ import annotations + import re diff --git a/FTB/ConfigurationFiles.py b/FTB/ConfigurationFiles.py index 2cb9bcf09..2908b5694 100755 --- a/FTB/ConfigurationFiles.py +++ b/FTB/ConfigurationFiles.py @@ -13,8 +13,8 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations + import sys from six.moves import configparser diff --git a/FTB/CoverageHelper.py b/FTB/CoverageHelper.py index c2a08b335..ff5919447 100644 --- a/FTB/CoverageHelper.py +++ b/FTB/CoverageHelper.py @@ -13,8 +13,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import re diff --git a/FTB/ProgramConfiguration.py b/FTB/ProgramConfiguration.py index e0b4aa375..cb6276255 100644 --- a/FTB/ProgramConfiguration.py +++ b/FTB/ProgramConfiguration.py @@ -16,8 +16,8 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations + import sys import os from FTB.ConfigurationFiles import ConfigurationFiles diff --git a/FTB/Running/AutoRunner.py b/FTB/Running/AutoRunner.py index 347a3e6d8..7087276ba 100644 --- a/FTB/Running/AutoRunner.py +++ b/FTB/Running/AutoRunner.py @@ -14,8 +14,7 @@ @contact: choller@mozilla.com """ -# Ensure print() compatibility with Python 3 -from __future__ import print_function, unicode_literals +from __future__ import annotations from abc import ABCMeta from distutils import spawn diff --git a/FTB/Running/GDB.py b/FTB/Running/GDB.py index 59c284eb3..202d60a85 100644 --- a/FTB/Running/GDB.py +++ b/FTB/Running/GDB.py @@ -12,7 +12,8 @@ @contact: choller@mozilla.com ''' -from __future__ import print_function + +from __future__ import annotations def is64bit() -> bool: diff --git a/FTB/Running/PersistentApplication.py b/FTB/Running/PersistentApplication.py index af5578c5b..556d1460e 100644 --- a/FTB/Running/PersistentApplication.py +++ b/FTB/Running/PersistentApplication.py @@ -19,8 +19,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from abc import ABCMeta import os diff --git a/FTB/Running/StreamCollector.py b/FTB/Running/StreamCollector.py index 9e1fb74a8..13f33d2f3 100644 --- a/FTB/Running/StreamCollector.py +++ b/FTB/Running/StreamCollector.py @@ -13,8 +13,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import threading diff --git a/FTB/Running/WaitpidMonitor.py b/FTB/Running/WaitpidMonitor.py index 14640bb26..4d59af17e 100644 --- a/FTB/Running/WaitpidMonitor.py +++ b/FTB/Running/WaitpidMonitor.py @@ -14,8 +14,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import os import threading diff --git a/FTB/Running/tests/test_persistent.py b/FTB/Running/tests/test_persistent.py index 2ff730dd3..8b5d945b7 100644 --- a/FTB/Running/tests/test_persistent.py +++ b/FTB/Running/tests/test_persistent.py @@ -12,7 +12,9 @@ @contact: choller@mozilla.com ''' -from __future__ import print_function + +from __future__ import annotations + import os import sys import time diff --git a/FTB/Running/tests/test_shell.py b/FTB/Running/tests/test_shell.py index 2007a0abc..57a08eaf3 100644 --- a/FTB/Running/tests/test_shell.py +++ b/FTB/Running/tests/test_shell.py @@ -12,8 +12,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import os import signal diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 2e6c01948..c77b82b33 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -15,8 +15,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from abc import ABCMeta import json diff --git a/FTB/Signatures/CrashSignature.py b/FTB/Signatures/CrashSignature.py index 13f490d7e..660bde2d5 100644 --- a/FTB/Signatures/CrashSignature.py +++ b/FTB/Signatures/CrashSignature.py @@ -14,6 +14,8 @@ @contact: choller@mozilla.com ''' +from __future__ import annotations + import difflib import json diff --git a/FTB/Signatures/JSONHelper.py b/FTB/Signatures/JSONHelper.py index 4b3ec0e22..619856e4f 100644 --- a/FTB/Signatures/JSONHelper.py +++ b/FTB/Signatures/JSONHelper.py @@ -14,6 +14,8 @@ @contact: choller@mozilla.com ''' +from __future__ import annotations + import numbers import six diff --git a/FTB/Signatures/Matchers.py b/FTB/Signatures/Matchers.py index 6023eb268..d793ac7b1 100644 --- a/FTB/Signatures/Matchers.py +++ b/FTB/Signatures/Matchers.py @@ -14,8 +14,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function, unicode_literals +from __future__ import annotations from abc import ABCMeta, abstractmethod import numbers diff --git a/FTB/Signatures/RegisterHelper.py b/FTB/Signatures/RegisterHelper.py index 84fdbca18..8c8f764b9 100644 --- a/FTB/Signatures/RegisterHelper.py +++ b/FTB/Signatures/RegisterHelper.py @@ -12,6 +12,8 @@ @contact: choller@mozilla.com ''' +from __future__ import annotations + x86Registers = ["eax", "ebx", "ecx", "edx", "esi", "edi", "ebp", "esp", "eip"] x64Registers = ["rax", "rbx", "rcx", "rdx", "rsi", "rdi", "rbp", "rsp", "r8", diff --git a/FTB/Signatures/Symptom.py b/FTB/Signatures/Symptom.py index 636a31e0d..389962492 100644 --- a/FTB/Signatures/Symptom.py +++ b/FTB/Signatures/Symptom.py @@ -14,8 +14,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from abc import ABCMeta, abstractmethod import json diff --git a/FTB/Signatures/tests/test_CrashInfo.py b/FTB/Signatures/tests/test_CrashInfo.py index b25ca8c7f..93c5e6941 100644 --- a/FTB/Signatures/tests/test_CrashInfo.py +++ b/FTB/Signatures/tests/test_CrashInfo.py @@ -12,6 +12,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import os import pytest diff --git a/FTB/Signatures/tests/test_CrashSignature.py b/FTB/Signatures/tests/test_CrashSignature.py index 108ee0f57..0fba1bc5c 100644 --- a/FTB/Signatures/tests/test_CrashSignature.py +++ b/FTB/Signatures/tests/test_CrashSignature.py @@ -4,6 +4,9 @@ @author: decoder ''' + +from __future__ import annotations + import json import os diff --git a/FTB/tests/test_AssertionHelper.py b/FTB/tests/test_AssertionHelper.py index fd468940e..346ffff6d 100644 --- a/FTB/tests/test_AssertionHelper.py +++ b/FTB/tests/test_AssertionHelper.py @@ -12,6 +12,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import re import six from FTB import AssertionHelper diff --git a/FTB/tests/test_CoverageHelper.py b/FTB/tests/test_CoverageHelper.py index 85b59492f..9b81df58c 100644 --- a/FTB/tests/test_CoverageHelper.py +++ b/FTB/tests/test_CoverageHelper.py @@ -12,6 +12,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import json from FTB import CoverageHelper diff --git a/Reporter/Reporter.py b/Reporter/Reporter.py index ab37332c1..e8d21a098 100644 --- a/Reporter/Reporter.py +++ b/Reporter/Reporter.py @@ -13,8 +13,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from abc import ABCMeta import functools diff --git a/TaskStatusReporter/TaskStatusReporter.py b/TaskStatusReporter/TaskStatusReporter.py index 1a57c1a32..e241d7c22 100755 --- a/TaskStatusReporter/TaskStatusReporter.py +++ b/TaskStatusReporter/TaskStatusReporter.py @@ -17,8 +17,7 @@ @contact: jschwartzentruber@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import argparse import functools diff --git a/TaskStatusReporter/__main__.py b/TaskStatusReporter/__main__.py index 9b278f987..59fb8e57f 100644 --- a/TaskStatusReporter/__main__.py +++ b/TaskStatusReporter/__main__.py @@ -15,6 +15,9 @@ @contact: jschwartzentruber@mozilla.com ''' + +from __future__ import annotations + import sys from .TaskStatusReporter import main diff --git a/TaskStatusReporter/tests/test_TaskStatusReporter.py b/TaskStatusReporter/tests/test_TaskStatusReporter.py index 23356d18e..c2a4bb8bb 100644 --- a/TaskStatusReporter/tests/test_TaskStatusReporter.py +++ b/TaskStatusReporter/tests/test_TaskStatusReporter.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import annotations import pytest from six.moves.urllib.parse import urlsplit diff --git a/misc/afl_libfuzzer/S3Manager.py b/misc/afl_libfuzzer/S3Manager.py index ba07d601b..c82acc3c1 100644 --- a/misc/afl_libfuzzer/S3Manager.py +++ b/misc/afl_libfuzzer/S3Manager.py @@ -13,8 +13,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from boto.s3.connection import S3Connection from boto.s3.key import Key diff --git a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py index 0ad5bc458..dcae0b020 100755 --- a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py +++ b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py @@ -14,8 +14,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import argparse import collections diff --git a/misc/ec2prices/simulations/best_every_n_hours.py b/misc/ec2prices/simulations/best_every_n_hours.py index d7d9f2684..ee79177c6 100644 --- a/misc/ec2prices/simulations/best_every_n_hours.py +++ b/misc/ec2prices/simulations/best_every_n_hours.py @@ -16,8 +16,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from .common import select_better diff --git a/misc/ec2prices/simulations/choose_once.py b/misc/ec2prices/simulations/choose_once.py index f9f1a8717..5bbfecae9 100644 --- a/misc/ec2prices/simulations/choose_once.py +++ b/misc/ec2prices/simulations/choose_once.py @@ -16,8 +16,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from .common import select_better diff --git a/misc/ec2prices/simulations/common.py b/misc/ec2prices/simulations/common.py index af6a18a70..314de0089 100644 --- a/misc/ec2prices/simulations/common.py +++ b/misc/ec2prices/simulations/common.py @@ -13,7 +13,8 @@ @contact: choller@mozilla.com ''' -from __future__ import print_function + +from __future__ import annotations def select_better(data, current_price=None, region=None, zone=None, instance_type=None, instance_time=None, indent=1, diff --git a/misc/ec2prices/simulator.py b/misc/ec2prices/simulator.py index bc6677083..82b41df6f 100644 --- a/misc/ec2prices/simulator.py +++ b/misc/ec2prices/simulator.py @@ -19,8 +19,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import boto.ec2 from collections import OrderedDict diff --git a/misc/libfuzzer/libfuzzer.py b/misc/libfuzzer/libfuzzer.py index 8451bd36f..aacc7b36d 100755 --- a/misc/libfuzzer/libfuzzer.py +++ b/misc/libfuzzer/libfuzzer.py @@ -17,8 +17,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import argparse import os diff --git a/misc/update_prices.py b/misc/update_prices.py index d55ea73f0..38d8e7d1e 100644 --- a/misc/update_prices.py +++ b/misc/update_prices.py @@ -10,7 +10,8 @@ f1.2xlarge,h1.2xlarge,x1e.2xlarge,m5d.2xlarge,t2.2xlarge ''' -from __future__ import print_function +from __future__ import annotations + import json import requests import sys diff --git a/server/celeryconf.py b/server/celeryconf.py index 900995347..c0dd07316 100644 --- a/server/celeryconf.py +++ b/server/celeryconf.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import annotations from celery import Celery import os diff --git a/server/conftest.py b/server/conftest.py index 981d311b2..77e554fc1 100644 --- a/server/conftest.py +++ b/server/conftest.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging from django.apps import apps from django.db import connection diff --git a/server/contrib/create_user.py b/server/contrib/create_user.py index 4b2f2a7fc..6ccd13151 100644 --- a/server/contrib/create_user.py +++ b/server/contrib/create_user.py @@ -1,4 +1,4 @@ -from __future__ import print_function +from __future__ import annotations import argparse import os diff --git a/server/contrib/fuzzmanager_setup_helper.py b/server/contrib/fuzzmanager_setup_helper.py index ddcd1fc7a..889c1775b 100644 --- a/server/contrib/fuzzmanager_setup_helper.py +++ b/server/contrib/fuzzmanager_setup_helper.py @@ -1,4 +1,4 @@ -from __future__ import print_function +from __future__ import annotations import os import random diff --git a/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py b/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py index cec673546..89496c75b 100644 --- a/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py @@ -12,8 +12,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function, unicode_literals +from __future__ import annotations import subprocess diff --git a/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py b/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py index fe082dfae..182316037 100644 --- a/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py @@ -12,8 +12,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function, unicode_literals +from __future__ import annotations import re import subprocess diff --git a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py index bbce01b23..0aa4db9dc 100644 --- a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py @@ -12,8 +12,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from abc import ABCMeta, abstractmethod diff --git a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py index 17a4b13ab..df68f2bed 100644 --- a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py +++ b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py @@ -12,6 +12,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import os import pytest import shutil diff --git a/server/covmanager/cron.py b/server/covmanager/cron.py index c79e5ba9a..b6596b4d7 100644 --- a/server/covmanager/cron.py +++ b/server/covmanager/cron.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import logging import requests diff --git a/server/covmanager/management/commands/setup_repository.py b/server/covmanager/management/commands/setup_repository.py index 4257247d4..3cd8da380 100644 --- a/server/covmanager/management/commands/setup_repository.py +++ b/server/covmanager/management/commands/setup_repository.py @@ -1,5 +1,5 @@ -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations + import os from django.core.management.base import BaseCommand, CommandError diff --git a/server/covmanager/migrations/0001_initial.py b/server/covmanager/migrations/0001_initial.py index a05de3e84..8a5efce95 100644 --- a/server/covmanager/migrations/0001_initial.py +++ b/server/covmanager/migrations/0001_initial.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + +from __future__ import annotations from django.db import models, migrations import django.utils.timezone diff --git a/server/covmanager/migrations/0002_increase_collection_filename_length.py b/server/covmanager/migrations/0002_increase_collection_filename_length.py index 927751837..816616472 100644 --- a/server/covmanager/migrations/0002_increase_collection_filename_length.py +++ b/server/covmanager/migrations/0002_increase_collection_filename_length.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + +from __future__ import annotations import django.core.files.storage from django.db import migrations, models diff --git a/server/covmanager/migrations/0003_collection_file_optional.py b/server/covmanager/migrations/0003_collection_file_optional.py index 7bc0b4d0a..dda3a381f 100644 --- a/server/covmanager/migrations/0003_collection_file_optional.py +++ b/server/covmanager/migrations/0003_collection_file_optional.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-20 14:20 -from __future__ import unicode_literals + +from __future__ import annotations from django.db import migrations, models import django.db.models.deletion diff --git a/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py b/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py index cdf7f8961..22cd67cdb 100644 --- a/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py +++ b/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-09-03 15:00 -from __future__ import unicode_literals + +from __future__ import annotations from django.db import migrations, models import django.db.models.deletion diff --git a/server/covmanager/migrations/0005_report.py b/server/covmanager/migrations/0005_report.py index 36a5015b2..cb6f0514d 100644 --- a/server/covmanager/migrations/0005_report.py +++ b/server/covmanager/migrations/0005_report.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-05-22 20:01 -from __future__ import unicode_literals + +from __future__ import annotations from django.db import migrations, models import django.db.models.deletion diff --git a/server/covmanager/migrations/0006_auto_20210429_0908.py b/server/covmanager/migrations/0006_auto_20210429_0908.py index 87e2973e3..fb796c395 100644 --- a/server/covmanager/migrations/0006_auto_20210429_0908.py +++ b/server/covmanager/migrations/0006_auto_20210429_0908.py @@ -1,5 +1,7 @@ # Generated by Django 3.0.14 on 2021-04-29 09:08 +from __future__ import annotations + import django.core.files.storage from django.db import migrations, models from django.conf import settings diff --git a/server/covmanager/models.py b/server/covmanager/models.py index 45543570b..a9d1d37d0 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf import settings from django.contrib.auth.models import User as DjangoUser # noqa from django.core.files.storage import FileSystemStorage diff --git a/server/covmanager/serializers.py b/server/covmanager/serializers.py index ec66cd2fa..dbfaf2afb 100644 --- a/server/covmanager/serializers.py +++ b/server/covmanager/serializers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.core.exceptions import MultipleObjectsReturned # noqa from django.core.files.base import ContentFile import hashlib diff --git a/server/covmanager/tasks.py b/server/covmanager/tasks.py index 2ab1537e5..8043a8cd2 100644 --- a/server/covmanager/tasks.py +++ b/server/covmanager/tasks.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf import settings # noqa from django.core.files.base import ContentFile diff --git a/server/covmanager/templatetags/recurseroot.py b/server/covmanager/templatetags/recurseroot.py index 25e25ffe4..98e297355 100644 --- a/server/covmanager/templatetags/recurseroot.py +++ b/server/covmanager/templatetags/recurseroot.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django import template from django.utils.safestring import mark_safe diff --git a/server/covmanager/tests/conftest.py b/server/covmanager/tests/conftest.py index c9b3f0f91..d11eab5b9 100644 --- a/server/covmanager/tests/conftest.py +++ b/server/covmanager/tests/conftest.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import os import shutil diff --git a/server/covmanager/tests/test_collections.py b/server/covmanager/tests/test_collections.py index d54bf214f..8e5875fa4 100644 --- a/server/covmanager/tests/test_collections.py +++ b/server/covmanager/tests/test_collections.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json import logging import os diff --git a/server/covmanager/tests/test_collections_rest.py b/server/covmanager/tests/test_collections_rest.py index 5df0fcb21..64900aa90 100644 --- a/server/covmanager/tests/test_collections_rest.py +++ b/server/covmanager/tests/test_collections_rest.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import codecs import json import logging diff --git a/server/covmanager/tests/test_covmanager.py b/server/covmanager/tests/test_covmanager.py index a11d54550..da0e13f72 100644 --- a/server/covmanager/tests/test_covmanager.py +++ b/server/covmanager/tests/test_covmanager.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import pytest import requests diff --git a/server/covmanager/tests/test_mgmt_setup_repository.py b/server/covmanager/tests/test_mgmt_setup_repository.py index 1035ee0e7..9bc424e05 100644 --- a/server/covmanager/tests/test_mgmt_setup_repository.py +++ b/server/covmanager/tests/test_mgmt_setup_repository.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import os import pytest from django.core.management import call_command, CommandError diff --git a/server/covmanager/tests/test_repositories.py b/server/covmanager/tests/test_repositories.py index 5e38bdd12..1799baa94 100644 --- a/server/covmanager/tests/test_repositories.py +++ b/server/covmanager/tests/test_repositories.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json import logging import pytest diff --git a/server/covmanager/tests/test_repositories_rest.py b/server/covmanager/tests/test_repositories_rest.py index 1c5204275..11356742b 100644 --- a/server/covmanager/tests/test_repositories_rest.py +++ b/server/covmanager/tests/test_repositories_rest.py @@ -10,6 +10,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' +from __future__ import annotations + import json import logging import pytest diff --git a/server/covmanager/urls.py b/server/covmanager/urls.py index 16ccc570e..8d7663715 100644 --- a/server/covmanager/urls.py +++ b/server/covmanager/urls.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf.urls import include, url from rest_framework import routers from . import views diff --git a/server/covmanager/views.py b/server/covmanager/views.py index f74cc7a44..83dca90a6 100644 --- a/server/covmanager/views.py +++ b/server/covmanager/views.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf import settings from django.core.exceptions import SuspiciousOperation, PermissionDenied from django.db.models import Q diff --git a/server/crashmanager/Bugtracker/BugzillaProvider.py b/server/crashmanager/Bugtracker/BugzillaProvider.py index cf0aad722..2b4064e65 100644 --- a/server/crashmanager/Bugtracker/BugzillaProvider.py +++ b/server/crashmanager/Bugtracker/BugzillaProvider.py @@ -12,8 +12,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from django.forms.models import model_to_dict from django.shortcuts import get_object_or_404 diff --git a/server/crashmanager/Bugtracker/BugzillaREST.py b/server/crashmanager/Bugtracker/BugzillaREST.py index fb51d82f3..e71d0d95b 100644 --- a/server/crashmanager/Bugtracker/BugzillaREST.py +++ b/server/crashmanager/Bugtracker/BugzillaREST.py @@ -12,8 +12,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import requests diff --git a/server/crashmanager/Bugtracker/Provider.py b/server/crashmanager/Bugtracker/Provider.py index 45cb01453..635978283 100644 --- a/server/crashmanager/Bugtracker/Provider.py +++ b/server/crashmanager/Bugtracker/Provider.py @@ -12,8 +12,7 @@ @contact: choller@mozilla.com ''' -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations from abc import ABCMeta, abstractmethod diff --git a/server/crashmanager/__init__.py b/server/crashmanager/__init__.py index ba00c6d1d..2e82c2ba6 100644 --- a/server/crashmanager/__init__.py +++ b/server/crashmanager/__init__.py @@ -1 +1,3 @@ +from __future__ import annotations + from . import tasks # noqa diff --git a/server/crashmanager/admin.py b/server/crashmanager/admin.py index 64bb47200..891d80832 100644 --- a/server/crashmanager/admin.py +++ b/server/crashmanager/admin.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.contrib import admin from crashmanager.models import CrashEntry, Bucket, Bug, Platform, Product, OS # @UnresolvedImport diff --git a/server/crashmanager/cron.py b/server/crashmanager/cron.py index f46cf878e..cf63da007 100644 --- a/server/crashmanager/cron.py +++ b/server/crashmanager/cron.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import shutil from tempfile import mkstemp diff --git a/server/crashmanager/forms.py b/server/crashmanager/forms.py index 1122c0154..1b63207b9 100644 --- a/server/crashmanager/forms.py +++ b/server/crashmanager/forms.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, Layout, Div, Field, Submit from django.conf import settings diff --git a/server/crashmanager/management/commands/add_permission.py b/server/crashmanager/management/commands/add_permission.py index c84918a28..6e697d8cc 100644 --- a/server/crashmanager/management/commands/add_permission.py +++ b/server/crashmanager/management/commands/add_permission.py @@ -1,4 +1,4 @@ -from __future__ import print_function +from __future__ import annotations from django.core.management import BaseCommand from django.contrib.contenttypes.models import ContentType diff --git a/server/crashmanager/management/commands/bug_update_status.py b/server/crashmanager/management/commands/bug_update_status.py index 6ca98a1d0..17aa53621 100644 --- a/server/crashmanager/management/commands/bug_update_status.py +++ b/server/crashmanager/management/commands/bug_update_status.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.core.management import BaseCommand, CommandError diff --git a/server/crashmanager/management/commands/cleanup_old_crashes.py b/server/crashmanager/management/commands/cleanup_old_crashes.py index c5d06c8e6..750e98c51 100644 --- a/server/crashmanager/management/commands/cleanup_old_crashes.py +++ b/server/crashmanager/management/commands/cleanup_old_crashes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import timedelta from django.conf import settings diff --git a/server/crashmanager/management/commands/export_signatures.py b/server/crashmanager/management/commands/export_signatures.py index 724f822e9..850eb755c 100644 --- a/server/crashmanager/management/commands/export_signatures.py +++ b/server/crashmanager/management/commands/export_signatures.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json from zipfile import ZipFile diff --git a/server/crashmanager/management/commands/get_auth_token.py b/server/crashmanager/management/commands/get_auth_token.py index be46c90ff..e53080f73 100644 --- a/server/crashmanager/management/commands/get_auth_token.py +++ b/server/crashmanager/management/commands/get_auth_token.py @@ -1,4 +1,4 @@ -from __future__ import print_function +from __future__ import annotations from django.core.management.base import LabelCommand from django.contrib.auth.models import User diff --git a/server/crashmanager/management/commands/notify_by_email.py b/server/crashmanager/management/commands/notify_by_email.py index cc8b66ba0..a7415b171 100644 --- a/server/crashmanager/management/commands/notify_by_email.py +++ b/server/crashmanager/management/commands/notify_by_email.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.core.mail import send_mail from django.core.management import BaseCommand from django.template.loader import render_to_string diff --git a/server/crashmanager/management/commands/triage_new_crash.py b/server/crashmanager/management/commands/triage_new_crash.py index 67d368055..ff325b845 100644 --- a/server/crashmanager/management/commands/triage_new_crash.py +++ b/server/crashmanager/management/commands/triage_new_crash.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections import OrderedDict from django.conf import settings diff --git a/server/crashmanager/management/commands/triage_new_crashes.py b/server/crashmanager/management/commands/triage_new_crashes.py index 46d78fe8b..99cdd99bc 100644 --- a/server/crashmanager/management/commands/triage_new_crashes.py +++ b/server/crashmanager/management/commands/triage_new_crashes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.core.management import BaseCommand, call_command from crashmanager.management.common import mgmt_lock_required diff --git a/server/crashmanager/management/common.py b/server/crashmanager/management/common.py index 05c552848..e9b6dbe84 100644 --- a/server/crashmanager/management/common.py +++ b/server/crashmanager/management/common.py @@ -1,5 +1,4 @@ -# Ensure print() compatibility with Python 3 -from __future__ import print_function +from __future__ import annotations import functools from django.conf import settings diff --git a/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py b/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py index 73da59fb4..5f884df34 100644 --- a/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py +++ b/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-12-09 00:06 -from __future__ import unicode_literals + +from __future__ import annotations from django.conf import settings import django.core.files.storage diff --git a/server/crashmanager/migrations/0002_add_taskmanager.py b/server/crashmanager/migrations/0002_add_taskmanager.py index 7cc380c91..9809c742e 100644 --- a/server/crashmanager/migrations/0002_add_taskmanager.py +++ b/server/crashmanager/migrations/0002_add_taskmanager.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-04-03 04:18 -from __future__ import unicode_literals + +from __future__ import annotations from django.db import migrations diff --git a/server/crashmanager/migrations/0003_auto_20210429_0908.py b/server/crashmanager/migrations/0003_auto_20210429_0908.py index 5ae0fc43c..5d4ba21ad 100644 --- a/server/crashmanager/migrations/0003_auto_20210429_0908.py +++ b/server/crashmanager/migrations/0003_auto_20210429_0908.py @@ -1,5 +1,7 @@ # Generated by Django 3.0.14 on 2021-04-29 09:08 +from __future__ import annotations + import django.core.files.storage from django.db import migrations, models from django.conf import settings diff --git a/server/crashmanager/migrations/0004_bugzillatemplate_mode.py b/server/crashmanager/migrations/0004_bugzillatemplate_mode.py index bb73987dc..5e62d758b 100644 --- a/server/crashmanager/migrations/0004_bugzillatemplate_mode.py +++ b/server/crashmanager/migrations/0004_bugzillatemplate_mode.py @@ -1,5 +1,7 @@ # Generated by Django 2.2.20 on 2021-05-21 14:15 +from __future__ import annotations + import crashmanager.models from django.db import migrations import enumfields.fields diff --git a/server/crashmanager/migrations/0005_user_notification_booleans.py b/server/crashmanager/migrations/0005_user_notification_booleans.py index 3f0ff9303..b7c34d71b 100644 --- a/server/crashmanager/migrations/0005_user_notification_booleans.py +++ b/server/crashmanager/migrations/0005_user_notification_booleans.py @@ -1,5 +1,7 @@ # Generated by Django 2.2.20 on 2021-06-18 13:28 +from __future__ import annotations + from django.db import migrations, models diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index 67f48b362..40277f828 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json import logging import re diff --git a/server/crashmanager/serializers.py b/server/crashmanager/serializers.py index 3a3d8e1aa..03f90b03a 100644 --- a/server/crashmanager/serializers.py +++ b/server/crashmanager/serializers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import base64 from django.core.exceptions import MultipleObjectsReturned # noqa from django.core.files.base import ContentFile diff --git a/server/crashmanager/tasks.py b/server/crashmanager/tasks.py index f539d17a8..aed8a4099 100644 --- a/server/crashmanager/tasks.py +++ b/server/crashmanager/tasks.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.core.management import call_command from celeryconf import app diff --git a/server/crashmanager/templatetags/extratags.py b/server/crashmanager/templatetags/extratags.py index 6af6a4931..85081c0b2 100644 --- a/server/crashmanager/templatetags/extratags.py +++ b/server/crashmanager/templatetags/extratags.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json import os from django import template diff --git a/server/crashmanager/tests/__init__.py b/server/crashmanager/tests/__init__.py index 99f67cc60..0cd2dfd6a 100644 --- a/server/crashmanager/tests/__init__.py +++ b/server/crashmanager/tests/__init__.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + from django.test import SimpleTestCase as DjangoTestCase diff --git a/server/crashmanager/tests/conftest.py b/server/crashmanager/tests/conftest.py index 8c092238f..bb6e509b8 100644 --- a/server/crashmanager/tests/conftest.py +++ b/server/crashmanager/tests/conftest.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission diff --git a/server/crashmanager/tests/test_bugproviders_rest.py b/server/crashmanager/tests/test_bugproviders_rest.py index 62c938ceb..9c25f8ec1 100644 --- a/server/crashmanager/tests/test_bugproviders_rest.py +++ b/server/crashmanager/tests/test_bugproviders_rest.py @@ -1,5 +1,7 @@ # coding: utf-8 -from __future__ import unicode_literals + +from __future__ import annotations + import logging import pytest import requests diff --git a/server/crashmanager/tests/test_bugs.py b/server/crashmanager/tests/test_bugs.py index 3a9f11cf4..29c96b88b 100644 --- a/server/crashmanager/tests/test_bugs.py +++ b/server/crashmanager/tests/test_bugs.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import pytest import requests diff --git a/server/crashmanager/tests/test_crashes.py b/server/crashmanager/tests/test_crashes.py index 3f463ab9f..42301a5d8 100644 --- a/server/crashmanager/tests/test_crashes.py +++ b/server/crashmanager/tests/test_crashes.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import pytest import requests diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index 21f436a4b..c17a9024c 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -9,7 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' -from __future__ import unicode_literals + +from __future__ import annotations + from datetime import datetime import json import logging diff --git a/server/crashmanager/tests/test_crashmanager.py b/server/crashmanager/tests/test_crashmanager.py index a871fd598..b53c11ab7 100644 --- a/server/crashmanager/tests/test_crashmanager.py +++ b/server/crashmanager/tests/test_crashmanager.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import pytest import requests diff --git a/server/crashmanager/tests/test_inbox_rest.py b/server/crashmanager/tests/test_inbox_rest.py index 965a7d0c7..2cca5aa4d 100644 --- a/server/crashmanager/tests/test_inbox_rest.py +++ b/server/crashmanager/tests/test_inbox_rest.py @@ -9,7 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. """ -from __future__ import unicode_literals + +from __future__ import annotations + from django.urls import reverse from notifications.models import Notification from notifications.signals import notify diff --git a/server/crashmanager/tests/test_mgmt_add_permission.py b/server/crashmanager/tests/test_mgmt_add_permission.py index f19dc77aa..6014ae393 100644 --- a/server/crashmanager/tests/test_mgmt_add_permission.py +++ b/server/crashmanager/tests/test_mgmt_add_permission.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import pytest from django.contrib.auth.models import User from django.core.management import call_command, CommandError diff --git a/server/crashmanager/tests/test_mgmt_bug_update_status.py b/server/crashmanager/tests/test_mgmt_bug_update_status.py index 86697564d..14d4720d3 100644 --- a/server/crashmanager/tests/test_mgmt_bug_update_status.py +++ b/server/crashmanager/tests/test_mgmt_bug_update_status.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json from django.contrib.auth.models import User from django.core.management import call_command, CommandError diff --git a/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py b/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py index 0cb79610c..e7f9acb17 100644 --- a/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py +++ b/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + from datetime import timedelta import pytest from django.core.management import call_command, CommandError diff --git a/server/crashmanager/tests/test_mgmt_export_signatures.py b/server/crashmanager/tests/test_mgmt_export_signatures.py index c5b874c96..aaa0a5e5e 100644 --- a/server/crashmanager/tests/test_mgmt_export_signatures.py +++ b/server/crashmanager/tests/test_mgmt_export_signatures.py @@ -9,7 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' -from __future__ import unicode_literals + +from __future__ import annotations + import json import os import re diff --git a/server/crashmanager/tests/test_mgmt_get_auth_token.py b/server/crashmanager/tests/test_mgmt_get_auth_token.py index bc5662e9d..ecdc200fd 100644 --- a/server/crashmanager/tests/test_mgmt_get_auth_token.py +++ b/server/crashmanager/tests/test_mgmt_get_auth_token.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import re from django.contrib.auth.models import User from django.core.management import call_command, CommandError diff --git a/server/crashmanager/tests/test_mgmt_triage_new_crashes.py b/server/crashmanager/tests/test_mgmt_triage_new_crashes.py index 377ce0472..5cd77da28 100644 --- a/server/crashmanager/tests/test_mgmt_triage_new_crashes.py +++ b/server/crashmanager/tests/test_mgmt_triage_new_crashes.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json from django.contrib.auth.models import User from django.core.management import call_command, CommandError diff --git a/server/crashmanager/tests/test_rest_live.py b/server/crashmanager/tests/test_rest_live.py index 7d3e30255..673ebfc60 100644 --- a/server/crashmanager/tests/test_rest_live.py +++ b/server/crashmanager/tests/test_rest_live.py @@ -12,6 +12,9 @@ @contact: choller@mozilla.com ''' + +from __future__ import annotations + import pytest import requests from six.moves.urllib.parse import urlsplit diff --git a/server/crashmanager/tests/test_signatures.py b/server/crashmanager/tests/test_signatures.py index e9b7ad7d4..4cd9af654 100644 --- a/server/crashmanager/tests/test_signatures.py +++ b/server/crashmanager/tests/test_signatures.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json import logging import pytest diff --git a/server/crashmanager/tests/test_signatures_rest.py b/server/crashmanager/tests/test_signatures_rest.py index 874078d14..5fb73b72b 100644 --- a/server/crashmanager/tests/test_signatures_rest.py +++ b/server/crashmanager/tests/test_signatures_rest.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json import logging import pytest diff --git a/server/crashmanager/tests/test_stats.py b/server/crashmanager/tests/test_stats.py index ac8aca485..5949d00ce 100644 --- a/server/crashmanager/tests/test_stats.py +++ b/server/crashmanager/tests/test_stats.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import datetime import logging import pytest diff --git a/server/crashmanager/tests/test_templates_rest.py b/server/crashmanager/tests/test_templates_rest.py index 7b55eb443..b5478b4e0 100644 --- a/server/crashmanager/tests/test_templates_rest.py +++ b/server/crashmanager/tests/test_templates_rest.py @@ -1,5 +1,7 @@ # coding: utf-8 -from __future__ import unicode_literals + +from __future__ import annotations + import logging import pytest import requests diff --git a/server/crashmanager/tests/test_user_settings.py b/server/crashmanager/tests/test_user_settings.py index c7e962c7e..c9654feac 100644 --- a/server/crashmanager/tests/test_user_settings.py +++ b/server/crashmanager/tests/test_user_settings.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import pytest import requests diff --git a/server/crashmanager/urls.py b/server/crashmanager/urls.py index 63d97f8a5..c781e1d20 100644 --- a/server/crashmanager/urls.py +++ b/server/crashmanager/urls.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf.urls import include, url from rest_framework import routers from . import views diff --git a/server/crashmanager/views.py b/server/crashmanager/views.py index dbfc992c6..31b1fe462 100644 --- a/server/crashmanager/views.py +++ b/server/crashmanager/views.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections import OrderedDict from datetime import timedelta from django.core.exceptions import FieldError, SuspiciousOperation, PermissionDenied diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index bafdf428b..b01a8c33f 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -12,6 +12,8 @@ @contact: truber@mozilla.com ''' +from __future__ import annotations + import functools import logging import socket diff --git a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py index 4b5e6d7e7..47481299b 100644 --- a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import logging import re diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index 282b9271a..9ae2c8dd5 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -11,6 +11,9 @@ @contact: truber@mozilla.com ''' + +from __future__ import annotations + import logging import requests import time diff --git a/server/ec2spotmanager/__init__.py b/server/ec2spotmanager/__init__.py index ba00c6d1d..2e82c2ba6 100644 --- a/server/ec2spotmanager/__init__.py +++ b/server/ec2spotmanager/__init__.py @@ -1 +1,3 @@ +from __future__ import annotations + from . import tasks # noqa diff --git a/server/ec2spotmanager/common/ec2.py b/server/ec2spotmanager/common/ec2.py index a89046f35..8903b84d0 100644 --- a/server/ec2spotmanager/common/ec2.py +++ b/server/ec2spotmanager/common/ec2.py @@ -1,5 +1,7 @@ # data exported from: https://ec2instances.info/ at 2018-08-16 17:54:16 UTC .. see disclaimers +from __future__ import annotations + import collections diff --git a/server/ec2spotmanager/common/gce.py b/server/ec2spotmanager/common/gce.py index e713f200a..6ddb05d02 100644 --- a/server/ec2spotmanager/common/gce.py +++ b/server/ec2spotmanager/common/gce.py @@ -1,5 +1,7 @@ # extracted from https://cloud.google.com/compute/docs/machine-types +from __future__ import annotations + import collections diff --git a/server/ec2spotmanager/common/prices.py b/server/ec2spotmanager/common/prices.py index cf10b9176..1543512bb 100644 --- a/server/ec2spotmanager/common/prices.py +++ b/server/ec2spotmanager/common/prices.py @@ -13,6 +13,8 @@ @contact: choller@mozilla.com ''' +from __future__ import annotations + def get_prices(regions, cloud_provider, instance_types=None, use_multiprocess=False): if use_multiprocess: diff --git a/server/ec2spotmanager/cron.py b/server/ec2spotmanager/cron.py index a740aca5a..ff11f0339 100644 --- a/server/ec2spotmanager/cron.py +++ b/server/ec2spotmanager/cron.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import json import logging diff --git a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py index 6897d67fa..908da09a2 100644 --- a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py +++ b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-12-09 00:08 -from __future__ import unicode_literals + +from __future__ import annotations import django.core.files.storage from django.db import migrations, models diff --git a/server/ec2spotmanager/migrations/0002_auto_20210429_0908.py b/server/ec2spotmanager/migrations/0002_auto_20210429_0908.py index b05558988..49db582b5 100644 --- a/server/ec2spotmanager/migrations/0002_auto_20210429_0908.py +++ b/server/ec2spotmanager/migrations/0002_auto_20210429_0908.py @@ -1,5 +1,7 @@ # Generated by Django 3.0.14 on 2021-04-29 09:08 +from __future__ import annotations + from django.conf import settings from django.db import migrations, models import ec2spotmanager.models diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index b5b08f12b..66649d48a 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json import os from django.conf import settings diff --git a/server/ec2spotmanager/serializers.py b/server/ec2spotmanager/serializers.py index 3e68a3222..c94f8c3b3 100644 --- a/server/ec2spotmanager/serializers.py +++ b/server/ec2spotmanager/serializers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import itertools from django.http.response import Http404 # noqa from rest_framework import serializers diff --git a/server/ec2spotmanager/tasks.py b/server/ec2spotmanager/tasks.py index 34ae234b1..48c097308 100644 --- a/server/ec2spotmanager/tasks.py +++ b/server/ec2spotmanager/tasks.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json import itertools import logging diff --git a/server/ec2spotmanager/templatetags/datetags.py b/server/ec2spotmanager/templatetags/datetags.py index 37e60fd13..ec18df981 100644 --- a/server/ec2spotmanager/templatetags/datetags.py +++ b/server/ec2spotmanager/templatetags/datetags.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django import template from django.utils import timezone diff --git a/server/ec2spotmanager/templatetags/recursetags.py b/server/ec2spotmanager/templatetags/recursetags.py index 92850cbe3..7bbe9e571 100644 --- a/server/ec2spotmanager/templatetags/recursetags.py +++ b/server/ec2spotmanager/templatetags/recursetags.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django import template from django.utils.safestring import mark_safe diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index 68077d930..97bd4e39f 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging from django.core.files.base import ContentFile from django.test import SimpleTestCase as DjangoTestCase diff --git a/server/ec2spotmanager/tests/conftest.py b/server/ec2spotmanager/tests/conftest.py index 5773875c5..42e65c36e 100644 --- a/server/ec2spotmanager/tests/conftest.py +++ b/server/ec2spotmanager/tests/conftest.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import functools import sys from django.contrib.contenttypes.models import ContentType diff --git a/server/ec2spotmanager/tests/test_configs.py b/server/ec2spotmanager/tests/test_configs.py index 24a900720..359788ea4 100644 --- a/server/ec2spotmanager/tests/test_configs.py +++ b/server/ec2spotmanager/tests/test_configs.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import decimal import json import logging diff --git a/server/ec2spotmanager/tests/test_configs_rest.py b/server/ec2spotmanager/tests/test_configs_rest.py index 7c4c954e0..017cc1675 100644 --- a/server/ec2spotmanager/tests/test_configs_rest.py +++ b/server/ec2spotmanager/tests/test_configs_rest.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json import logging import requests diff --git a/server/ec2spotmanager/tests/test_ec2spotmanager.py b/server/ec2spotmanager/tests/test_ec2spotmanager.py index 467a0a160..4cdf1a644 100644 --- a/server/ec2spotmanager/tests/test_ec2spotmanager.py +++ b/server/ec2spotmanager/tests/test_ec2spotmanager.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import requests from django.urls import reverse diff --git a/server/ec2spotmanager/tests/test_pools.py b/server/ec2spotmanager/tests/test_pools.py index bfe06e1ae..2f27261ff 100644 --- a/server/ec2spotmanager/tests/test_pools.py +++ b/server/ec2spotmanager/tests/test_pools.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import requests from django.urls import reverse diff --git a/server/ec2spotmanager/tests/test_pools_rest.py b/server/ec2spotmanager/tests/test_pools_rest.py index 97be08c8a..78495803f 100644 --- a/server/ec2spotmanager/tests/test_pools_rest.py +++ b/server/ec2spotmanager/tests/test_pools_rest.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json import logging import pytest diff --git a/server/ec2spotmanager/tests/test_status_rest.py b/server/ec2spotmanager/tests/test_status_rest.py index db0717efb..374262b86 100644 --- a/server/ec2spotmanager/tests/test_status_rest.py +++ b/server/ec2spotmanager/tests/test_status_rest.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import json import logging import requests diff --git a/server/ec2spotmanager/tests/test_task_graph.py b/server/ec2spotmanager/tests/test_task_graph.py index a225ec59f..7bce9dad7 100644 --- a/server/ec2spotmanager/tests/test_task_graph.py +++ b/server/ec2spotmanager/tests/test_task_graph.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import pytest from ec2spotmanager.cron import check_instance_pools diff --git a/server/ec2spotmanager/tests/test_task_status.py b/server/ec2spotmanager/tests/test_task_status.py index 24c4edb9d..d8111d697 100644 --- a/server/ec2spotmanager/tests/test_task_status.py +++ b/server/ec2spotmanager/tests/test_task_status.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import pytest from ec2spotmanager.models import PoolStatusEntry, ProviderStatusEntry from ec2spotmanager.tasks import _update_pool_status, _update_provider_status diff --git a/server/ec2spotmanager/tests/test_tasks.py b/server/ec2spotmanager/tests/test_tasks.py index 69b5653d9..179b2963a 100644 --- a/server/ec2spotmanager/tests/test_tasks.py +++ b/server/ec2spotmanager/tests/test_tasks.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import datetime import logging import boto.ec2 diff --git a/server/ec2spotmanager/urls.py b/server/ec2spotmanager/urls.py index 9bef3b38e..13f220b49 100644 --- a/server/ec2spotmanager/urls.py +++ b/server/ec2spotmanager/urls.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf.urls import url, include from rest_framework import routers from . import views diff --git a/server/ec2spotmanager/views.py b/server/ec2spotmanager/views.py index a7070b07b..9d0b20a4b 100644 --- a/server/ec2spotmanager/views.py +++ b/server/ec2spotmanager/views.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json from operator import attrgetter from chartjs.colors import next_color diff --git a/server/manage.py b/server/manage.py index 194423238..6d4f11750 100644 --- a/server/manage.py +++ b/server/manage.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 + +from __future__ import annotations + import os import sys diff --git a/server/server/auth.py b/server/server/auth.py index 6b77c7422..fc3a678a9 100644 --- a/server/server/auth.py +++ b/server/server/auth.py @@ -1,6 +1,8 @@ # This is code for Mozilla's 2FA using OID. If you have your own OID provider, # you can probably use similar code to get 2FA for your FuzzManager instance. +from __future__ import annotations + import unicodedata from django.conf import settings diff --git a/server/server/middleware.py b/server/server/middleware.py index d325f6be0..f91746029 100644 --- a/server/server/middleware.py +++ b/server/server/middleware.py @@ -1,4 +1,5 @@ -from __future__ import print_function +from __future__ import annotations + import re import traceback diff --git a/server/server/settings.py b/server/server/settings.py index 532bceeba..9bc9b8983 100644 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -7,6 +7,9 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ + +from __future__ import annotations + # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os from django.conf import global_settings # noqa diff --git a/server/server/settings_docker.py b/server/server/settings_docker.py index 7cea8931b..28da069f7 100644 --- a/server/server/settings_docker.py +++ b/server/server/settings_docker.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from .settings import * # noqa # Run in production mode diff --git a/server/server/settings_nondebug.py b/server/server/settings_nondebug.py index 7e8164f79..a715b34f5 100644 --- a/server/server/settings_nondebug.py +++ b/server/server/settings_nondebug.py @@ -1,2 +1,4 @@ +from __future__ import annotations + from .settings import * # noqa DEBUG = False diff --git a/server/server/settings_test.py b/server/server/settings_test.py index 7daeca9bf..700e0a979 100644 --- a/server/server/settings_test.py +++ b/server/server/settings_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from .settings import * # noqa TC_ROOT_URL = "" # must be set for taskmanager tests TC_PROJECT = "" # must be set for taskmanager tests diff --git a/server/server/tests/__init__.py b/server/server/tests/__init__.py index 192cda067..594270576 100644 --- a/server/server/tests/__init__.py +++ b/server/server/tests/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission diff --git a/server/server/urls.py b/server/server/urls.py index cdeb4ae64..b35c5c97c 100644 --- a/server/server/urls.py +++ b/server/server/urls.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static diff --git a/server/server/utils.py b/server/server/utils.py index f4fdae53d..735ea20b5 100644 --- a/server/server/utils.py +++ b/server/server/utils.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import logging import time import uuid diff --git a/server/server/views.py b/server/server/views.py index feb0304ac..161dc471a 100644 --- a/server/server/views.py +++ b/server/server/views.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.shortcuts import redirect from django.contrib.auth.views import LoginView from django.conf import settings diff --git a/server/server/wsgi.py b/server/server/wsgi.py index 2837e311e..363b5ae51 100644 --- a/server/server/wsgi.py +++ b/server/server/wsgi.py @@ -7,6 +7,8 @@ https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ +from __future__ import annotations + import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "server.settings") diff --git a/server/taskmanager/__init__.py b/server/taskmanager/__init__.py index ba00c6d1d..2e82c2ba6 100644 --- a/server/taskmanager/__init__.py +++ b/server/taskmanager/__init__.py @@ -1 +1,3 @@ +from __future__ import annotations + from . import tasks # noqa diff --git a/server/taskmanager/apps.py b/server/taskmanager/apps.py index 0fc5fd562..7bd35aa83 100644 --- a/server/taskmanager/apps.py +++ b/server/taskmanager/apps.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + +from __future__ import annotations from django.apps import AppConfig diff --git a/server/taskmanager/cron.py b/server/taskmanager/cron.py index 4dfff9c07..6c8a50acf 100644 --- a/server/taskmanager/cron.py +++ b/server/taskmanager/cron.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + +from __future__ import annotations + from datetime import datetime from logging import getLogger from django.conf import settings diff --git a/server/taskmanager/management/commands/taskmanager_change_poolid.py b/server/taskmanager/management/commands/taskmanager_change_poolid.py index e18aab254..5b37c27ed 100644 --- a/server/taskmanager/management/commands/taskmanager_change_poolid.py +++ b/server/taskmanager/management/commands/taskmanager_change_poolid.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- + +from __future__ import annotations + from logging import getLogger from django.core.management import BaseCommand # noqa diff --git a/server/taskmanager/management/commands/taskmanager_list_pools.py b/server/taskmanager/management/commands/taskmanager_list_pools.py index 8a156b3c8..11e41a0b5 100644 --- a/server/taskmanager/management/commands/taskmanager_list_pools.py +++ b/server/taskmanager/management/commands/taskmanager_list_pools.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- + +from __future__ import annotations + from django.core.management import BaseCommand # noqa from ...models import Pool diff --git a/server/taskmanager/management/commands/taskmanager_pulse_listen.py b/server/taskmanager/management/commands/taskmanager_pulse_listen.py index ec78ad1f7..2d7df6b8b 100644 --- a/server/taskmanager/management/commands/taskmanager_pulse_listen.py +++ b/server/taskmanager/management/commands/taskmanager_pulse_listen.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- + +from __future__ import annotations + from logging import getLogger from pathlib import Path diff --git a/server/taskmanager/management/commands/taskmanager_scrape_task_group.py b/server/taskmanager/management/commands/taskmanager_scrape_task_group.py index 7302595fb..51078b548 100644 --- a/server/taskmanager/management/commands/taskmanager_scrape_task_group.py +++ b/server/taskmanager/management/commands/taskmanager_scrape_task_group.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- + +from __future__ import annotations + import functools from logging import getLogger diff --git a/server/taskmanager/migrations/0001_initial.py b/server/taskmanager/migrations/0001_initial.py index 6b7203b0f..8d189d32a 100644 --- a/server/taskmanager/migrations/0001_initial.py +++ b/server/taskmanager/migrations/0001_initial.py @@ -1,5 +1,7 @@ # Generated by Django 2.2.12 on 2020-04-03 20:06 +from __future__ import annotations + from django.db import migrations, models import django.db.models.deletion diff --git a/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py b/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py index 71128d9a4..2d5423c41 100644 --- a/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py +++ b/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py @@ -1,5 +1,7 @@ # Generated by Django 2.2.12 on 2020-07-22 16:29 +from __future__ import annotations + from django.db import migrations, models import django.db.models.deletion diff --git a/server/taskmanager/models.py b/server/taskmanager/models.py index f8175ed32..0dc84132e 100644 --- a/server/taskmanager/models.py +++ b/server/taskmanager/models.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + +from __future__ import annotations from django.db import models diff --git a/server/taskmanager/serializers.py b/server/taskmanager/serializers.py index 1a356aac2..78baf2dcc 100644 --- a/server/taskmanager/serializers.py +++ b/server/taskmanager/serializers.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- + +from __future__ import annotations + import datetime from django.conf import settings from django.db.models import Q diff --git a/server/taskmanager/tasks.py b/server/taskmanager/tasks.py index 02cf2994c..79bd767c7 100644 --- a/server/taskmanager/tasks.py +++ b/server/taskmanager/tasks.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- + +from __future__ import annotations + from datetime import timedelta from logging import getLogger from pathlib import Path diff --git a/server/taskmanager/tests/__init__.py b/server/taskmanager/tests/__init__.py index a5ea0bff5..e94cc0540 100644 --- a/server/taskmanager/tests/__init__.py +++ b/server/taskmanager/tests/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import logging from django.utils import timezone diff --git a/server/taskmanager/tests/conftest.py b/server/taskmanager/tests/conftest.py index 9ce467fe6..064a42b45 100644 --- a/server/taskmanager/tests/conftest.py +++ b/server/taskmanager/tests/conftest.py @@ -10,6 +10,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission import pytest diff --git a/server/taskmanager/tests/test_pools_rest.py b/server/taskmanager/tests/test_pools_rest.py index 682fbfa43..9c240422d 100644 --- a/server/taskmanager/tests/test_pools_rest.py +++ b/server/taskmanager/tests/test_pools_rest.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. """ + +from __future__ import annotations + import itertools import datetime import json diff --git a/server/taskmanager/tests/test_taskmanager.py b/server/taskmanager/tests/test_taskmanager.py index 69463a012..72982f3fb 100644 --- a/server/taskmanager/tests/test_taskmanager.py +++ b/server/taskmanager/tests/test_taskmanager.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import logging import pytest import requests diff --git a/server/taskmanager/tests/test_tasks_rest.py b/server/taskmanager/tests/test_tasks_rest.py index a72320a43..cf1d7ced8 100644 --- a/server/taskmanager/tests/test_tasks_rest.py +++ b/server/taskmanager/tests/test_tasks_rest.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. """ + +from __future__ import annotations + import itertools import json import logging diff --git a/server/taskmanager/tests/test_update_pools.py b/server/taskmanager/tests/test_update_pools.py index db80fb577..e6673b798 100644 --- a/server/taskmanager/tests/test_update_pools.py +++ b/server/taskmanager/tests/test_update_pools.py @@ -9,6 +9,9 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ''' + +from __future__ import annotations + import datetime import logging import os.path diff --git a/server/taskmanager/urls.py b/server/taskmanager/urls.py index c70511217..6600dd285 100644 --- a/server/taskmanager/urls.py +++ b/server/taskmanager/urls.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf.urls import include, url from rest_framework import routers from . import views diff --git a/server/taskmanager/views.py b/server/taskmanager/views.py index 238b7e55c..9225e8011 100644 --- a/server/taskmanager/views.py +++ b/server/taskmanager/views.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals + +from __future__ import annotations import datetime import logging diff --git a/setup.py b/setup.py index 097cbe16a..5ca725087 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,7 @@ #!/usr/bin/env python + +from __future__ import annotations + from setuptools import setup if __name__ == '__main__': From df75fc26bbdb62a868183fda52c4cdfcb54ef5bb Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 1 Sep 2021 00:48:44 -0700 Subject: [PATCH 014/137] Stop testing on Python 3.6 --- setup.cfg | 1 - tox.ini | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0cfbda033..a96e7125a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,6 @@ classifiers = Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Topic :: Software Development :: Testing diff --git a/tox.ini b/tox.ini index 59abecc77..a325699d2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{36,37,38} +envlist = py{37,38} minversion = 3.2 tox_pip_extensions_ext_venv_update = true skip_missing_interpreters = true @@ -33,12 +33,6 @@ commands = twine upload --skip-existing dist/* # test with frozen requirements for Django 3.x -[testenv:py36-3.0] -basepython = python3.6 -deps = - -r{toxinidir}/server/requirements3.0.txt - git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision - [testenv:py37-3.0] basepython = python3.7 deps = @@ -52,10 +46,6 @@ deps = git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision # test with unfrozen requirements (latest for all deps) -[testenv:py36-next] -basepython = python3.6 -deps = - [testenv:py37-next] basepython = python3.7 deps = From 67572a7cff6866b2318975049c7ccc5c3047c545 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 1 Sep 2021 00:51:19 -0700 Subject: [PATCH 015/137] Use built-in tuple instead of Tuple since we now import annotations from __future__ --- Collector/Collector.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index effa38134..365cd1b10 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -28,7 +28,6 @@ import sys from tempfile import mkstemp from typing import Generator -from typing import Tuple from zipfile import ZipFile from FTB.ProgramConfiguration import ProgramConfiguration # noqa @@ -322,7 +321,7 @@ def __store_signature_hashed(self, signature: CrashSignature) -> str: return sigfile @staticmethod - def read_testcase(testCase: str) -> Tuple[str, bool]: + def read_testcase(testCase: str) -> tuple[str, bool]: ''' Read a testcase file, return the content and indicate if it is binary or not. From d2008be9f21f7b00b17be29df50b0911ea1397f6 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 1 Sep 2021 01:02:13 -0700 Subject: [PATCH 016/137] Make createCrashSignature and generate functions typed, defaults from the former were applied to the latter --- Collector/Collector.py | 8 ++------ FTB/Signatures/CrashInfo.py | 9 ++------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index 365cd1b10..23b085df7 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -195,22 +195,18 @@ def search(self, crashInfo): return (None, None) @signature_checks - def generate(self, crashInfo, forceCrashAddress=None, forceCrashInstruction=None, numFrames=None): + def generate(self, crashInfo: CrashInfo, forceCrashAddress: bool = False, + forceCrashInstruction: bool = False, numFrames: int = 8) -> str | None: ''' Generates a signature in the local cache directory. It will be deleted when L{refresh} is called on the same local cache directory. - @type crashInfo: CrashInfo @param crashInfo: CrashInfo instance obtained from L{CrashInfo.fromRawCrashData} - @type forceCrashAddress: bool @param forceCrashAddress: Force including the crash address into the signature - @type forceCrashInstruction: bool @param forceCrashInstruction: Force including the crash instruction into the signature (GDB only) - @type numFrames: int @param numFrames: How many frames to include in the signature - @rtype: string @return: File containing crash signature in JSON format ''' diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index c77b82b33..58f1e4108 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -359,21 +359,16 @@ def createShortSignature(self): return "[@ %s]" % self.backtrace[0] - def createCrashSignature(self, forceCrashAddress=False, forceCrashInstruction=False, maxFrames=8, - minimumSupportedVersion=13): + def createCrashSignature(self, forceCrashAddress: bool = False, forceCrashInstruction: bool = False, + maxFrames: int = 8, minimumSupportedVersion: int = 13) -> CrashSignature | None: ''' @param forceCrashAddress: If True, the crash address will be included in any case - @type forceCrashAddress: bool @param forceCrashInstruction: If True, the crash instruction will be included in any case - @type forceCrashInstruction: bool @param maxFrames: How many frames (at most) should be included in the signature - @type maxFrames: int @param minimumSupportedVersion: The minimum crash signature standard version that the generated signature should be valid for (10 => 1.0, 13 => 1.3) - @type minimumSupportedVersion: int - @rtype: CrashSignature @return: A crash signature object ''' # Determine the actual number of frames based on how many we got From 4198e1e0fa64771e721bd6542a9165a9030d1b06 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 1 Sep 2021 02:47:19 -0700 Subject: [PATCH 017/137] Make getSanitizedAssertionPattern typed --- FTB/AssertionHelper.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/FTB/AssertionHelper.py b/FTB/AssertionHelper.py index 6cab47628..7b2a4b7c5 100644 --- a/FTB/AssertionHelper.py +++ b/FTB/AssertionHelper.py @@ -179,16 +179,14 @@ def getAuxiliaryAbortMessage(output): return lastLine -def getSanitizedAssertionPattern(msgs): +def getSanitizedAssertionPattern(msgs: list[str] | str) -> list[str] | str: ''' This method provides a way to strip out unwanted dynamic information from assertions and replace it with pattern matching elements, e.g. for use in signature matching. - @type msgs: string or list @param msgs: Assertion message(s) to be sanitized - @rtype: string @return: Sanitized assertion message (regular expression) ''' assert msgs is not None @@ -202,7 +200,7 @@ def getSanitizedAssertionPattern(msgs): for msg in msgs: # remember the position of all backslashes in the input - bsPositions = [] + bsPositions: list[int] = [] for chunk in msg.split("\\"): if not bsPositions: bsPositions.append(len(chunk)) @@ -259,7 +257,7 @@ def getSanitizedAssertionPattern(msgs): replacementPatterns.append("[0-9]{2,}") for replacementPattern in replacementPatterns: - def _handleMatch(match): + def _handleMatch(match: re.Match[str]) -> str: start = match.start(0) end = match.end(0) lengthDiff = len(replacementPattern) - len(match.group(0)) From 325246c160b1fd9e2df1f4f2c55f48fdefb10526 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 29 Nov 2021 03:31:31 -0800 Subject: [PATCH 018/137] More type information, especially for CrashInfo --- Collector/Collector.py | 2 +- FTB/AssertionHelper.py | 10 +- FTB/Running/PersistentApplication.py | 1 + FTB/Running/WaitpidMonitor.py | 10 +- FTB/Signatures/CrashInfo.py | 202 ++++++++++++++++++--------- 5 files changed, 147 insertions(+), 78 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index 23b085df7..308ed2bb4 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -36,7 +36,7 @@ from FTB.Signatures.CrashSignature import CrashSignature # noqa from Reporter.Reporter import Reporter, signature_checks, remote_checks # noqa -__all__ = [] +__all__: list[str] = [] __version__ = 0.1 __date__ = '2014-10-01' __updated__ = '2014-10-01' diff --git a/FTB/AssertionHelper.py b/FTB/AssertionHelper.py index 7b2a4b7c5..0c4f71f25 100644 --- a/FTB/AssertionHelper.py +++ b/FTB/AssertionHelper.py @@ -28,17 +28,16 @@ RE_V8_END = re.compile(r"^") -def getAssertion(output): +def getAssertion(output: list[str]) -> list[str] | str | None: ''' This helper method provides a way to extract and process the different types of assertions from a given buffer. The problem here is that pretty much every software has its own type of assertions with different output formats. - @type output: list @param output: List of strings to be searched ''' - lastLine = None + lastLine: list[str] | str | None = None endRegex = None # Use this to ignore the ASan head line in case of an assertion @@ -123,17 +122,16 @@ def getAssertion(output): return lastLine -def getAuxiliaryAbortMessage(output): +def getAuxiliaryAbortMessage(output: list[str]) -> list[str] | str | None: ''' This helper method provides a way to extract and process additional abort messages or other useful messages produced by helper tools like sanitizers. These messages can be helpful in signatures if there is no abort message from the program itself. - @type output: list @param output: List of strings to be searched ''' - lastLine = None + lastLine: list[str] | str | None = None needASanRW = False needTSanRW = False diff --git a/FTB/Running/PersistentApplication.py b/FTB/Running/PersistentApplication.py index 556d1460e..279379e5a 100644 --- a/FTB/Running/PersistentApplication.py +++ b/FTB/Running/PersistentApplication.py @@ -178,6 +178,7 @@ def _write_log_test(self, test): self.process.stdin.close() def _wait_child_stopped(self): + reveal_type(self.process.pid) monitor = WaitpidMonitor(self.process.pid, os.WUNTRACED) monitor.start() monitor.join(self.processingTimeout) diff --git a/FTB/Running/WaitpidMonitor.py b/FTB/Running/WaitpidMonitor.py index 4d59af17e..2df4ecc42 100644 --- a/FTB/Running/WaitpidMonitor.py +++ b/FTB/Running/WaitpidMonitor.py @@ -21,14 +21,14 @@ class WaitpidMonitor(threading.Thread): - def __init__(self, pid, options): + def __init__(self, pid: int, options: int): threading.Thread.__init__(self) - self.pid = pid - self.options = options + self.pid: int = pid + self.options: int = options - self.childPid = None - self.childExit = None + self.childPid: int | None = None + self.childExit: int | None = None def run(self) -> None: while not self.childPid: diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 58f1e4108..3b97da739 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -22,6 +22,8 @@ import os import re import sys +from typing import Mapping +from typing_extensions import TypedDict import six @@ -31,7 +33,7 @@ from FTB.Signatures.CrashSignature import CrashSignature -def uint32(val): +def uint32(val: int) -> int: '''Force `val` into unsigned 32-bit range. Note that the input is returned as an int, therefore @@ -51,7 +53,7 @@ def uint32(val): return val & 0xFFFFFFFF -def int32(val): +def int32(val: int) -> int: '''Force `val` into signed 32-bit range. Note that the input is returned as an int, therefore @@ -74,7 +76,7 @@ def int32(val): return val -def uint64(val): +def uint64(val: int) -> int: '''Force `val` into unsigned 64-bit range. Note that the input is returned as an int, therefore @@ -94,7 +96,7 @@ def uint64(val): return val & 0xFFFFFFFFFFFFFFFF -def int64(val): +def int64(val: int) -> int: '''Force `val` into signed 64-bit range. Note that the input is returned as an int, therefore @@ -117,6 +119,16 @@ def int64(val): return val +class CacheObject(TypedDict): + """CacheObject type specification.""" + + backtrace: list[str] + registers: dict[str, int] + crashAddress: int | None + crashInstruction: str | None + failureReason: str | None + + @six.add_metaclass(ABCMeta) class CrashInfo(object): ''' @@ -125,28 +137,28 @@ class CrashInfo(object): ''' def __init__(self) -> None: # Store the raw data - self.rawStdout = [] - self.rawStderr = [] - self.rawCrashData = [] + self.rawStdout: list[str] = [] + self.rawStderr: list[str] = [] + self.rawCrashData: list[str] = [] # Store processed data - self.backtrace = [] - self.registers = {} - self.crashAddress = None - self.crashInstruction = None + self.backtrace: list[str] = [] + self.registers: dict[str, int] = {} + self.crashAddress: int | None = None + self.crashInstruction: str | None = None # Store configuration data (platform, product, os, etc.) - self.configuration = None + self.configuration: ProgramConfiguration | None = None # This is an optional testcase that is not stored with the crashInfo but # can be "attached" before matching signatures that might require the # testcase. - self.testcase = None + self.testcase: str | None = None # This can be used to record failures during signature creation - self.failureReason = None + self.failureReason: str | None = None - def __str__(self): + def __str__(self) -> str: buf = [] buf.append("Crash trace:") buf.append("") @@ -168,48 +180,43 @@ def __str__(self): return "\n".join(buf) - def toCacheObject(self): + def toCacheObject(self) -> CacheObject: ''' Create a cache object for restoring the class instance later on without parsing the crash data again. This object includes all class fields except for the storage heavy raw objects like stdout, stderr and raw crashdata. - @rtype: dict @return: Dictionary containing expensive class fields ''' - cacheObject = {} - cacheObject['backtrace'] = self.backtrace - cacheObject['registers'] = self.registers - - if self.crashAddress is not None: - cacheObject['crashAddress'] = int(self.crashAddress) - else: - cacheObject['crashAddress'] = None - - cacheObject['crashInstruction'] = self.crashInstruction - cacheObject['failureReason'] = self.failureReason + cacheObject: CacheObject = { + 'backtrace': self.backtrace, + 'registers': self.registers, + 'crashAddress': self.crashAddress, + 'crashInstruction': self.crashInstruction, + 'failureReason': self.failureReason, + } return cacheObject @staticmethod - def fromRawCrashData(stdout, stderr, configuration, auxCrashData=None, cacheObject=None): + def fromRawCrashData( + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + auxCrashData: list[str] | None = None, + cacheObject: CacheObject | None = None, + ) -> CrashInfo: ''' Create appropriate CrashInfo instance from raw crash data - @type stdout: List of strings @param stdout: List of lines as they appeared on stdout - @type stderr: List of strings @param stderr: List of lines as they appeared on stderr - @type configuration: ProgramConfiguration @param configuration: Exact program configuration that is associated with the crash - @type auxCrashData: List of strings @param auxCrashData: Optional additional crash output (e.g. GDB). If not specified, stderr is used. - @type cacheObject: Dictionary @param cacheObject: The cache object that should be used to restore the class fields instead of parsing the crash data. The appropriate object can be created by calling the toCacheObject method. - @rtype: CrashInfo @return: Crash information object ''' @@ -281,7 +288,7 @@ def fromRawCrashData(stdout, stderr, configuration, auxCrashData=None, cacheObje if stderr is not None: lines.extend(stderr) - result = None + result: UBSanCrashInfo | ASanCrashInfo | LSanCrashInfo | TSanCrashInfo | AppleCrashInfo | CDBCrashInfo | GDBCrashInfo | RustCrashInfo | MinidumpCrashInfo | ValgrindCrashInfo | NoCrashInfo | None = None for line in lines: if ubsanString in line and re.match(ubsanRegex, line) is not None: result = UBSanCrashInfo(stdout, stderr, configuration, auxCrashData) @@ -336,9 +343,8 @@ def fromRawCrashData(stdout, stderr, configuration, auxCrashData=None, cacheObje return result - def createShortSignature(self): + def createShortSignature(self) -> str: ''' - @rtype: String @return: A string representing this crash (short signature) ''' # See if we have an abort message and if so, use that as short signature @@ -522,15 +528,13 @@ def createCrashSignature(self, forceCrashAddress: bool = False, forceCrashInstru return CrashSignature(json.dumps(sigObj, indent=2, sort_keys=True)) @staticmethod - def sanitizeStackFrame(frame): + def sanitizeStackFrame(frame: str) -> str: ''' This function removes function arguments and other non-generic parts of the function frame, returning a (hopefully) generic function name. @param frame: The stack frame to sanitize - @type forceCrashAddress: str - @rtype: str @return: Sanitized stack frame ''' @@ -566,7 +570,13 @@ def sanitizeStackFrame(frame): class NoCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -585,7 +595,13 @@ def __init__(self, stdout, stderr, configuration, crashData=None): class ASanCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -690,9 +706,8 @@ def __init__(self, stdout, stderr, configuration, crashData=None): self.backtrace.append(CrashInfo.sanitizeStackFrame(component)) expectedIndex += 1 - def createShortSignature(self): + def createShortSignature(self) -> str: ''' - @rtype: String @return: A string representing this crash (short signature) ''' # Always prefer using regular program aborts @@ -756,7 +771,13 @@ def createShortSignature(self): class LSanCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -817,9 +838,8 @@ def __init__(self, stdout, stderr, configuration, crashData=None): # frame so it doesn't show up as "No crash detected" self.backtrace.append("??") - def createShortSignature(self): + def createShortSignature(self) -> str: ''' - @rtype: String @return: A string representing this crash (short signature) ''' # Try to find the LSan message on stderr and use that as short signature @@ -841,7 +861,13 @@ def createShortSignature(self): class UBSanCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -902,9 +928,8 @@ def __init__(self, stdout, stderr, configuration, crashData=None): # frame so it doesn't show up as "No crash detected" self.backtrace.append("??") - def createShortSignature(self): + def createShortSignature(self) -> str: ''' - @rtype: String @return: A string representing this crash (short signature) ''' # Try to find the UBSan message on stderr and use that as short signature @@ -926,7 +951,13 @@ def createShortSignature(self): class GDBCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -1069,16 +1100,16 @@ def __init__(self, stdout, stderr, configuration, crashData=None): self.crashAddress = uint64(self.crashAddress) @staticmethod - def calculateCrashAddress(crashInstruction, registerMap): + def calculateCrashAddress( + crashInstruction: str, + registerMap: Mapping[str, int], + ) -> int: ''' Calculate the crash address given the crash instruction and register contents - @type crashInstruction: string @param crashInstruction: Crash instruction string as provided by GDB - @type registerMap: Map from string to int @param registerMap: Map of register names to values - @rtype: int @return The calculated crash address On error, a string containing the failure message is returned instead. @@ -1345,7 +1376,10 @@ def calculateARMDerefOpAddress(derefOp): return failureReason @staticmethod - def calculateComplexDerefOpAddress(complexDerefOp, registerMap): + def calculateComplexDerefOpAddress( + complexDerefOp: str, + registerMap: Mapping[str, int], + ): match = re.match("((?:\\-?0x[0-9a-f]+)?)\\(%([a-z0-9]+),%([a-z0-9]+),([0-9]+)\\)", complexDerefOp) if match is not None: @@ -1376,7 +1410,13 @@ def calculateComplexDerefOpAddress(complexDerefOp, registerMap): class MinidumpCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -1425,7 +1465,13 @@ def __init__(self, stdout, stderr, configuration, crashData=None): class AppleCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -1476,14 +1522,14 @@ def __init__(self, stdout, stderr, configuration, crashData=None): self.backtrace.append(stackEntry) @staticmethod - def removeFilename(stackEntry): + def removeFilename(stackEntry: str) -> str: match = re.match(r'(.*) \(\S+\)', stackEntry) if match: return match.group(1) return stackEntry @staticmethod - def removeOffset(stackEntry): + def removeOffset(stackEntry: str) -> str: match = re.match(r'(.*) \+ \d+', stackEntry) if match: return match.group(1) @@ -1491,7 +1537,13 @@ def removeOffset(stackEntry): class CDBCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -1618,7 +1670,7 @@ def __init__(self, stdout, stderr, configuration, crashData=None): self.backtrace.append(stackEntry) @staticmethod - def removeFilenameAndOffset(stackEntry): + def removeFilenameAndOffset(stackEntry: str) -> str: # Extract only the function name if "0x" in stackEntry: result = stackEntry.split("!")[-1].split("+")[0].split("<")[0].split(" ")[-1] @@ -1638,7 +1690,13 @@ class RustCrashInfo(CrashInfo): RE_FRAME = re.compile(r"^( +\d+:( +0x[0-9a-f]+ -)? (?P.+?)" r"(::h[0-9a-f]{16})?|\s+at ([A-Za-z]:)?(/[A-Za-z0-9_ .]+)+:\d+)$") - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -1679,7 +1737,13 @@ def __init__(self, stdout, stderr, configuration, crashData=None): class TSanCrashInfo(CrashInfo): - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' @@ -1830,7 +1894,13 @@ class ValgrindCrashInfo(CrashInfo): (Syscall\sparam.+) )""", re.VERBOSE) - def __init__(self, stdout, stderr, configuration, crashData=None): + def __init__( + self, + stdout: list[str] | None, + stderr: list[str] | None, + configuration: ProgramConfiguration, + crashData: list[str] | None = None, + ): ''' Private constructor, called by L{CrashInfo.fromRawCrashData}. Do not use directly. ''' From 81a2d7924ef65b48d106541c5ed7b596601dc133 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 29 Nov 2021 03:54:54 -0800 Subject: [PATCH 019/137] More type info progress in FTB --- FTB/Signatures/CrashInfo.py | 667 ++++++++++++++++--------------- FTB/Signatures/RegisterHelper.py | 25 +- 2 files changed, 343 insertions(+), 349 deletions(-) diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 3b97da739..3b0978618 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -22,7 +22,6 @@ import os import re import sys -from typing import Mapping from typing_extensions import TypedDict import six @@ -638,73 +637,74 @@ def __init__( expectedIndex = 0 reportFound = False - for traceLine in asanOutput: - if not reportFound or self.crashAddress is None: - match = re.search(asanCrashAddressPattern, traceLine) - if match is not None: - reportFound = True - try: - self.crashAddress = int(match.group(1), 16) - except TypeError: - pass # No crash address available - - # Crash Address and Registers are in the same line for ASan - match = re.search(asanRegisterPattern, traceLine) - # Collect register values if they are available in the ASan trace + if asanOutput is not None: + for traceLine in asanOutput: + if not reportFound or self.crashAddress is None: + match = re.search(asanCrashAddressPattern, traceLine) if match is not None: - self.registers["pc"] = int(match.group(1), 16) - self.registers[match.group(2)] = int(match.group(3), 16) - self.registers[match.group(4)] = int(match.group(5), 16) - elif not reportFound: - # Not in the ASan output yet. - # Some lines in eg. debug+asan builds might error if we continue. + reportFound = True + try: + self.crashAddress = int(match.group(1), 16) + except TypeError: + pass # No crash address available + + # Crash Address and Registers are in the same line for ASan + match = re.search(asanRegisterPattern, traceLine) + # Collect register values if they are available in the ASan trace + if match is not None: + self.registers["pc"] = int(match.group(1), 16) + self.registers[match.group(2)] = int(match.group(3), 16) + self.registers[match.group(4)] = int(match.group(5), 16) + elif not reportFound: + # Not in the ASan output yet. + # Some lines in eg. debug+asan builds might error if we continue. + continue + + parts = traceLine.strip().split() + + # We only want stack frames + if not parts or not parts[0].startswith("#"): continue - parts = traceLine.strip().split() - - # We only want stack frames - if not parts or not parts[0].startswith("#"): - continue + try: + index = int(parts[0][1:]) + except ValueError: + continue - try: - index = int(parts[0][1:]) - except ValueError: - continue - - # We may see multiple traces in ASAN - if index == 0: - expectedIndex = 0 - - if not expectedIndex == index: - raise RuntimeError("Fatal error parsing ASan trace (Index mismatch, got index %s but expected %s)" % - (index, expectedIndex)) - - component = None - # TSan doesn't include address, symbol will be immediately following the frame number - if len(parts) > 1 and not parts[1].startswith("0x"): - if parts[1] == "": - # the last part is either `(lib.so+0xoffset)` or `(0xaddress)` - if "+" in parts[-1]: - # Remove parentheses around component - component = parts[-1][1:-1] + # We may see multiple traces in ASAN + if index == 0: + expectedIndex = 0 + + if not expectedIndex == index: + raise RuntimeError("Fatal error parsing ASan trace (Index mismatch, got index %s but expected %s)" % + (index, expectedIndex)) + + component = None + # TSan doesn't include address, symbol will be immediately following the frame number + if len(parts) > 1 and not parts[1].startswith("0x"): + if parts[1] == "": + # the last part is either `(lib.so+0xoffset)` or `(0xaddress)` + if "+" in parts[-1]: + # Remove parentheses around component + component = parts[-1][1:-1] + else: + component = "" else: + component = " ".join(parts[1:-2]) + elif len(parts) > 2: + if parts[2] == "in": + component = " ".join(parts[3:-1]) + elif parts[2:] == ["()"]: component = "" + else: + # Remove parentheses around component + component = parts[2][1:-1] else: - component = " ".join(parts[1:-2]) - elif len(parts) > 2: - if parts[2] == "in": - component = " ".join(parts[3:-1]) - elif parts[2:] == ["()"]: + print("Warning: Missing component in this line: %s" % traceLine, file=sys.stderr) component = "" - else: - # Remove parentheses around component - component = parts[2][1:-1] - else: - print("Warning: Missing component in this line: %s" % traceLine, file=sys.stderr) - component = "" - self.backtrace.append(CrashInfo.sanitizeStackFrame(component)) - expectedIndex += 1 + self.backtrace.append(CrashInfo.sanitizeStackFrame(component)) + expectedIndex += 1 def createShortSignature(self) -> str: ''' @@ -800,37 +800,38 @@ def __init__( lsanPatternSeen = False expectedIndex = 0 - for traceLine in lsanOutput: - if not lsanErrorPattern: - if lsanErrorPattern in traceLine: - lsanPatternSeen = True - continue + if lsanOutput is not None: + for traceLine in lsanOutput: + if not lsanErrorPattern: + if lsanErrorPattern in traceLine: + lsanPatternSeen = True + continue - parts = traceLine.strip().split() + parts = traceLine.strip().split() - # We only want stack frames - if not parts or not parts[0].startswith("#"): - continue + # We only want stack frames + if not parts or not parts[0].startswith("#"): + continue - index = int(parts[0][1:]) + index = int(parts[0][1:]) - if expectedIndex != index: - raise RuntimeError("Fatal error parsing LSan trace (Index mismatch, got index %s but expected %s)" % - (index, expectedIndex)) + if expectedIndex != index: + raise RuntimeError("Fatal error parsing LSan trace (Index mismatch, got index %s but expected %s)" % + (index, expectedIndex)) - component = None - if len(parts) > 2: - if parts[2] == "in": - component = " ".join(parts[3:-1]) + component = None + if len(parts) > 2: + if parts[2] == "in": + component = " ".join(parts[3:-1]) + else: + # Remove parentheses around component + component = parts[2][1:-1] else: - # Remove parentheses around component - component = parts[2][1:-1] - else: - print("Warning: Missing component in this line: %s" % traceLine, file=sys.stderr) - component = "" + print("Warning: Missing component in this line: %s" % traceLine, file=sys.stderr) + component = "" - self.backtrace.append(CrashInfo.sanitizeStackFrame(component)) - expectedIndex += 1 + self.backtrace.append(CrashInfo.sanitizeStackFrame(component)) + expectedIndex += 1 if not self.backtrace and lsanPatternSeen: # We've seen the crash address but no frames, so this is likely @@ -890,37 +891,38 @@ def __init__( ubsanPatternSeen = False expectedIndex = 0 - for traceLine in ubsanOutput: - if not ubsanPatternSeen: - if re.search(ubsanErrorPattern, traceLine) is not None: - ubsanPatternSeen = True - continue + if ubsanOutput is not None: + for traceLine in ubsanOutput: + if not ubsanPatternSeen: + if re.search(ubsanErrorPattern, traceLine) is not None: + ubsanPatternSeen = True + continue - parts = traceLine.strip().split() + parts = traceLine.strip().split() - # We only want stack frames - if not parts or not parts[0].startswith("#"): - continue + # We only want stack frames + if not parts or not parts[0].startswith("#"): + continue - index = int(parts[0][1:]) + index = int(parts[0][1:]) - if expectedIndex != index: - raise RuntimeError("Fatal error parsing UBSan trace (Index mismatch, got index %s but expected %s)" % - (index, expectedIndex)) + if expectedIndex != index: + raise RuntimeError("Fatal error parsing UBSan trace (Index mismatch, got index %s but expected %s)" % + (index, expectedIndex)) - component = None - if len(parts) > 2: - if parts[2] == "in": - component = " ".join(parts[3:-1]) + component = None + if len(parts) > 2: + if parts[2] == "in": + component = " ".join(parts[3:-1]) + else: + # Remove parentheses around component + component = parts[2][1:-1] else: - # Remove parentheses around component - component = parts[2][1:-1] - else: - print("Warning: Missing component in this line: %s" % traceLine, file=sys.stderr) - component = "" + print("Warning: Missing component in this line: %s" % traceLine, file=sys.stderr) + component = "" - self.backtrace.append(CrashInfo.sanitizeStackFrame(component)) - expectedIndex += 1 + self.backtrace.append(CrashInfo.sanitizeStackFrame(component)) + expectedIndex += 1 if not self.backtrace and ubsanPatternSeen: # We've seen the crash address but no frames, so this is likely @@ -1102,7 +1104,7 @@ def __init__( @staticmethod def calculateCrashAddress( crashInstruction: str, - registerMap: Mapping[str, int], + registerMap: dict[str, int], ) -> int: ''' Calculate the crash address given the crash instruction and register contents @@ -1167,12 +1169,12 @@ def calculateCrashAddress( # e.g. shrb -0x69(%rdx,%rbx,8) # When we fail, try storing a reason here - failureReason = "Unknown failure." + failureReason: str | None = "Unknown failure." - def isDerefOp(op): + def isDerefOp(op: str) -> bool: return "(" in op and ")" in op - def calculateDerefOpAddress(derefOp): + def calculateDerefOpAddress(derefOp: str) -> tuple[int | None, str | None]: match = re.match("\\*?((?:\\-?0x[0-9a-f]+)?)\\(%([a-z0-9]+)\\)", derefOp) if match is not None: offset = 0 @@ -1314,13 +1316,13 @@ def calculateDerefOpAddress(derefOp): # Anything that is not explicitly handled now is considered unsupported failureReason = "Unsupported instruction in incomplete ARM/ARM64 support." - def getARMImmConst(val): + def getARMImmConst(val: str) -> int: val = val.replace("#", "").strip() if val.startswith("0x"): return int(val, 16) return int(val) - def calculateARMDerefOpAddress(derefOp): + def calculateARMDerefOpAddress(derefOp: str) -> tuple[int | None, str | None]: derefOps = derefOp.split(",") if len(derefOps) > 2: @@ -1378,8 +1380,8 @@ def calculateARMDerefOpAddress(derefOp): @staticmethod def calculateComplexDerefOpAddress( complexDerefOp: str, - registerMap: Mapping[str, int], - ): + registerMap: dict[str, int], + ) -> tuple[int | None, str | None]: match = re.match("((?:\\-?0x[0-9a-f]+)?)\\(%([a-z0-9]+),%([a-z0-9]+),([0-9]+)\\)", complexDerefOp) if match is not None: @@ -1489,37 +1491,38 @@ def __init__( self.configuration = configuration inCrashingThread = False - for line in crashData: - # Crash address - if line.startswith("Exception Codes:"): - # Example: - # Exception Type: EXC_BAD_ACCESS (SIGABRT) - # Exception Codes: KERN_INVALID_ADDRESS at 0x00000001374b893e - address = line.split(" ")[-1] - if address.startswith('0x'): - self.crashAddress = int(address, 16) - - # Start of stack for crashing thread - if re.match(r'Thread \d+ Crashed:', line): - inCrashingThread = True - continue - - if line.strip() == "": - inCrashingThread = False - continue - - if inCrashingThread: - # Example: - # 0 js-dbg-64-dm-darwin-a523d4c7efe2 0x00000001004b04c4 js::jit::MacroAssembler::Pop(js::jit::Register) + 180 (MacroAssembler-inl.h:50) # noqa - components = line.split(None, 3) - stackEntry = components[3] - if stackEntry.startswith('0'): - self.backtrace.append("??") - else: - stackEntry = AppleCrashInfo.removeFilename(stackEntry) - stackEntry = AppleCrashInfo.removeOffset(stackEntry) - stackEntry = CrashInfo.sanitizeStackFrame(stackEntry) - self.backtrace.append(stackEntry) + if crashData is not None: + for line in crashData: + # Crash address + if line.startswith("Exception Codes:"): + # Example: + # Exception Type: EXC_BAD_ACCESS (SIGABRT) + # Exception Codes: KERN_INVALID_ADDRESS at 0x00000001374b893e + address = line.split(" ")[-1] + if address.startswith('0x'): + self.crashAddress = int(address, 16) + + # Start of stack for crashing thread + if re.match(r'Thread \d+ Crashed:', line): + inCrashingThread = True + continue + + if line.strip() == "": + inCrashingThread = False + continue + + if inCrashingThread: + # Example: + # 0 js-dbg-64-dm-darwin-a523d4c7efe2 0x00000001004b04c4 js::jit::MacroAssembler::Pop(js::jit::Register) + 180 (MacroAssembler-inl.h:50) # noqa + components = line.split(None, 3) + stackEntry = components[3] + if stackEntry.startswith('0'): + self.backtrace.append("??") + else: + stackEntry = AppleCrashInfo.removeFilename(stackEntry) + stackEntry = AppleCrashInfo.removeOffset(stackEntry) + stackEntry = CrashInfo.sanitizeStackFrame(stackEntry) + self.backtrace.append(stackEntry) @staticmethod def removeFilename(stackEntry: str) -> str: @@ -1569,105 +1572,106 @@ def __init__( ecxrData = [] cInstruction = "" - for line in crashData: - # Start of .ecxr data - if re.match(r'0:000> \.ecxr', line): - inEcxrData = True - continue - - if inEcxrData: - # 32-bit example: - # 0:000> .ecxr - # eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 - # eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc - # cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 - # 64-bit example: - # 0:000> .ecxr - # rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b - # rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 - # rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 - # r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 - # r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff - # r14=000000e87fbfd0e0 r15=0000000000000003 - # iopl=0 nv up ei pl nz na pe nc - # cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 - if line.startswith("cs="): - inEcxrData = False - continue - - # Crash address - # Extract the eip/rip specifically for use later - if "eip=" in line: - address = line.split("eip=")[1].split()[0] - self.crashAddress = int(address, 16) - elif "rip=" in line: - address = line.split("rip=")[1].split()[0] - self.crashAddress = int(address, 16) - - # First extract the line - # 32-bit example: - # eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 - # 64-bit example: - # rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b - matchLine = re.search(RegisterHelper.getRegisterPattern(), line) - if matchLine is not None: - ecxrData.extend(line.split()) - - # Next, put the eax/rax, ebx/rbx, etc. entries into a list of their own, then iterate - match = re.search(cdbRegisterPattern, line) - for instr in ecxrData: - match = re.search(cdbRegisterPattern, instr) - if match is not None: - register = match.group(1) - value = int(match.group(2), 16) - self.registers[register] = value - - # Crash instruction - # Start of crash instruction details - if line.startswith("FAULTING_IP"): - inCrashInstruction = True - continue - - if inCrashInstruction and not cInstruction: - if "PROCESS_NAME" in line: - inCrashInstruction = False + if crashData is not None: + for line in crashData: + # Start of .ecxr data + if re.match(r'0:000> \.ecxr', line): + inEcxrData = True continue - # 64-bit binaries have a backtick in their addresses, e.g. 00007ff7`1e424e62 - lineWithoutBacktick = line.replace("`", "", 1) - if address and lineWithoutBacktick.startswith(address): - # 32-bit examples: - # 25d80b01 cc int 3 - # 00404c59 8b39 mov edi,dword ptr [ecx] + if inEcxrData: + # 32-bit example: + # 0:000> .ecxr + # eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 + # eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc + # cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 # 64-bit example: - # 00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] - cInstruction = line.split(None, 2)[-1] - # There may be multiple spaces inside the faulting instruction - cInstruction = " ".join(cInstruction.split()) - self.crashInstruction = cInstruction - - # Start of stack for crashing thread - if line.startswith("STACK_TEXT:"): - inCrashingThread = True - continue - - if inCrashingThread: - # 32-bit example: - # 016fdc38 004b2387 01e104e8 016fe490 016fe490 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9 # noqa - # 64-bit example: - # 000000e8`7fbfc040 00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 # noqa - if "STACK_COMMAND" in line or "SYMBOL_NAME" in line \ - or "THREAD_SHA1_HASH_MOD_FUNC" in line or "FAULTING_SOURCE_CODE" in line: - inCrashingThread = False + # 0:000> .ecxr + # rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b + # rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 + # rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 + # r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 + # r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff + # r14=000000e87fbfd0e0 r15=0000000000000003 + # iopl=0 nv up ei pl nz na pe nc + # cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 + if line.startswith("cs="): + inEcxrData = False + continue + + # Crash address + # Extract the eip/rip specifically for use later + if "eip=" in line: + address = line.split("eip=")[1].split()[0] + self.crashAddress = int(address, 16) + elif "rip=" in line: + address = line.split("rip=")[1].split()[0] + self.crashAddress = int(address, 16) + + # First extract the line + # 32-bit example: + # eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 + # 64-bit example: + # rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b + matchLine = re.search(RegisterHelper.getRegisterPattern(), line) + if matchLine is not None: + ecxrData.extend(line.split()) + + # Next, put the eax/rax, ebx/rbx, etc. entries into a list of their own, then iterate + match = re.search(cdbRegisterPattern, line) + for instr in ecxrData: + match = re.search(cdbRegisterPattern, instr) + if match is not None: + register = match.group(1) + value = int(match.group(2), 16) + self.registers[register] = value + + # Crash instruction + # Start of crash instruction details + if line.startswith("FAULTING_IP"): + inCrashInstruction = True continue - # Ignore cdb error and empty lines - if "Following frames may be wrong." in line or line.strip() == '': + if inCrashInstruction and not cInstruction: + if "PROCESS_NAME" in line: + inCrashInstruction = False + continue + + # 64-bit binaries have a backtick in their addresses, e.g. 00007ff7`1e424e62 + lineWithoutBacktick = line.replace("`", "", 1) + if address and lineWithoutBacktick.startswith(address): + # 32-bit examples: + # 25d80b01 cc int 3 + # 00404c59 8b39 mov edi,dword ptr [ecx] + # 64-bit example: + # 00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] + cInstruction = line.split(None, 2)[-1] + # There may be multiple spaces inside the faulting instruction + cInstruction = " ".join(cInstruction.split()) + self.crashInstruction = cInstruction + + # Start of stack for crashing thread + if line.startswith("STACK_TEXT:"): + inCrashingThread = True continue - stackEntry = CDBCrashInfo.removeFilenameAndOffset(line) - stackEntry = CrashInfo.sanitizeStackFrame(stackEntry) - self.backtrace.append(stackEntry) + if inCrashingThread: + # 32-bit example: + # 016fdc38 004b2387 01e104e8 016fe490 016fe490 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9 # noqa + # 64-bit example: + # 000000e8`7fbfc040 00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 # noqa + if "STACK_COMMAND" in line or "SYMBOL_NAME" in line \ + or "THREAD_SHA1_HASH_MOD_FUNC" in line or "FAULTING_SOURCE_CODE" in line: + inCrashingThread = False + continue + + # Ignore cdb error and empty lines + if "Following frames may be wrong." in line or line.strip() == '': + continue + + stackEntry = CDBCrashInfo.removeFilenameAndOffset(line) + stackEntry = CrashInfo.sanitizeStackFrame(stackEntry) + self.backtrace.append(stackEntry) @staticmethod def removeFilenameAndOffset(stackEntry: str) -> str: @@ -1720,20 +1724,21 @@ def __init__( inAssertion = False inBacktrace = False - for line in rustOutput: - # Start of stack - if not inAssertion: - if AssertionHelper.RE_RUST_ASSERT.match(line) is not None: - inAssertion = True - continue - - frame = self.RE_FRAME.match(line) - if frame is None and inBacktrace: - break - elif frame is not None: - inBacktrace = True - if frame.group("symbol"): - self.backtrace.append(frame.group("symbol")) + if rustOutput is not None: + for line in rustOutput: + # Start of stack + if not inAssertion: + if AssertionHelper.RE_RUST_ASSERT.match(line) is not None: + inAssertion = True + continue + + frame = self.RE_FRAME.match(line) + if frame is None and inBacktrace: + break + elif frame is not None: + inBacktrace = True + if frame.group("symbol"): + self.backtrace.append(frame.group("symbol")) class TSanCrashInfo(CrashInfo): @@ -1775,62 +1780,63 @@ def __init__( isDataRace = False backtraces = [] currentBacktrace = None - for traceLine in tsanOutput: - if not reportFound: - match = re.search(tsanWarningPattern, traceLine) - if match is not None: - self.tsanWarnLine = traceLine.strip() - reportFound = True - isDataRace = "data race" in self.tsanWarnLine - continue + if tsanOutput is not None: + for traceLine in tsanOutput: + if not reportFound: + match = re.search(tsanWarningPattern, traceLine) + if match is not None: + self.tsanWarnLine = traceLine.strip() + reportFound = True + isDataRace = "data race" in self.tsanWarnLine + continue - if "[failed to restore the stack]" in traceLine: - # TSan failed to symbolize at least one stack - brokenStack = True + if "[failed to restore the stack]" in traceLine: + # TSan failed to symbolize at least one stack + brokenStack = True - parts = traceLine.strip().split() + parts = traceLine.strip().split() - # We only want stack frames - if not parts or not parts[0].startswith("#"): - continue + # We only want stack frames + if not parts or not parts[0].startswith("#"): + continue - try: - index = int(parts[0][1:]) - except ValueError: - continue - - # We may see multiple traces in TSAN - if index == 0: - if currentBacktrace is not None: - backtraces.append(currentBacktrace) - currentBacktrace = [] - expectedIndex = 0 - - if not expectedIndex == index: - raise RuntimeError("Fatal error parsing TSan trace (Index mismatch, got index %s but expected %s)" % - (index, expectedIndex)) - - component = None - if len(parts) > 2: - # TSan has a different trace style than other sanitizers: - # TSan uses: - # #0 function name filename:line:col (bin+0xaddr) - # ASan uses: - # #0 0xaddr in function name filename:line - component = " ".join(parts[1:-2]) - - if component == "" and len(parts) > 3: - # TSan uses to indicate missing symbols, e.g. - # #1 (libXext.so.6+0xcc89) - # Remove parentheses around component - component = parts[3][1:-1] - else: - print("Warning: Missing component in this line: %s" % traceLine, file=sys.stderr) - component = "" + try: + index = int(parts[0][1:]) + except ValueError: + continue + + # We may see multiple traces in TSAN + if index == 0: + if currentBacktrace is not None: + backtraces.append(currentBacktrace) + currentBacktrace = [] + expectedIndex = 0 + + if not expectedIndex == index: + raise RuntimeError("Fatal error parsing TSan trace (Index mismatch, got index %s but expected %s)" % + (index, expectedIndex)) + + component = None + if len(parts) > 2: + # TSan has a different trace style than other sanitizers: + # TSan uses: + # #0 function name filename:line:col (bin+0xaddr) + # ASan uses: + # #0 0xaddr in function name filename:line + component = " ".join(parts[1:-2]) - currentBacktrace.append(CrashInfo.sanitizeStackFrame(component)) + if component == "" and len(parts) > 3: + # TSan uses to indicate missing symbols, e.g. + # #1 (libXext.so.6+0xcc89) + # Remove parentheses around component + component = parts[3][1:-1] + else: + print("Warning: Missing component in this line: %s" % traceLine, file=sys.stderr) + component = "" - expectedIndex += 1 + currentBacktrace.append(CrashInfo.sanitizeStackFrame(component)) + + expectedIndex += 1 if currentBacktrace is not None: backtraces.append(currentBacktrace) @@ -1927,34 +1933,35 @@ def __init__( """, re.VERBOSE) foundStart = False - for traceLine in vgdOutput: - if not traceLine.startswith("=="): - # skip unrelated noise - continue - elif not foundStart: - if re.match(self.MSG_REGEX, traceLine) is not None: - # skip other lines that are not part of a recognized trace - foundStart = True - # continue search for the beginning of the stack trace - continue - - lineInfo = re.match(stackPattern, traceLine) - if lineInfo is not None: - lineFunc = lineInfo.group("func") - # if function name is not available use the file name instead - if lineFunc == "???": - lineFunc = lineInfo.group("file") - self.backtrace.append(CrashInfo.sanitizeStackFrame(lineFunc)) - - elif self.backtrace: - # check if address info is available - addr = re.match(r"^==\d+==\s+Address\s(?P0x[0-9A-Fa-f]+)\s", traceLine) - if addr: - self.crashAddress = int(addr.group("addr"), 16) - # look for '==PID== \n' to indicate the end of a trace - if re.match(r"^==\d+==\s+$", traceLine) is not None: - # done parsing - break + if vgdOutput is not None: + for traceLine in vgdOutput: + if not traceLine.startswith("=="): + # skip unrelated noise + continue + elif not foundStart: + if re.match(self.MSG_REGEX, traceLine) is not None: + # skip other lines that are not part of a recognized trace + foundStart = True + # continue search for the beginning of the stack trace + continue + + lineInfo = re.match(stackPattern, traceLine) + if lineInfo is not None: + lineFunc = lineInfo.group("func") + # if function name is not available use the file name instead + if lineFunc == "???": + lineFunc = lineInfo.group("file") + self.backtrace.append(CrashInfo.sanitizeStackFrame(lineFunc)) + + elif self.backtrace: + # check if address info is available + addr = re.match(r"^==\d+==\s+Address\s(?P0x[0-9A-Fa-f]+)\s", traceLine) + if addr: + self.crashAddress = int(addr.group("addr"), 16) + # look for '==PID== \n' to indicate the end of a trace + if re.match(r"^==\d+==\s+$", traceLine) is not None: + # done parsing + break def createShortSignature(self) -> str: ''' diff --git a/FTB/Signatures/RegisterHelper.py b/FTB/Signatures/RegisterHelper.py index 8c8f764b9..5c58fc3a6 100644 --- a/FTB/Signatures/RegisterHelper.py +++ b/FTB/Signatures/RegisterHelper.py @@ -43,14 +43,12 @@ def getRegisterPattern() -> str: ['|'.join(i) for i in validRegisters.values()]) + ")" -def getStackPointer(registerMap): +def getStackPointer(registerMap: dict[str, int]) -> int: ''' Return the stack pointer value from the given register map - @type registerMap: map @param registerMap: Map of register names to value - @rtype: int @return: The value of the stack pointer ''' @@ -61,14 +59,12 @@ def getStackPointer(registerMap): raise RuntimeError("Register map does not contain a usable stack pointer!") -def getInstructionPointer(registerMap): +def getInstructionPointer(registerMap: dict[str, int]) -> int: ''' Return the instruction pointer value from the given register map - @type registerMap: map @param registerMap: Map of register names to value - @rtype: int @return: The value of the instruction pointer ''' @@ -79,18 +75,15 @@ def getInstructionPointer(registerMap): raise RuntimeError("Register map does not contain a usable instruction pointer!") -def getRegisterValue(register, registerMap): +def getRegisterValue(register: str, registerMap: dict[str, int]) -> int: ''' Return the value of the specified register using the provided register map. This method also works for getting lower register parts out of higher ones. - @type register: string @param register: The register to get the value for - @type registerMap: map @param registerMap: Map of register names to values - @rtype: int @return: The register value ''' @@ -150,14 +143,12 @@ def getRegisterValue(register, registerMap): return None -def getBitWidth(registerMap): +def getBitWidth(registerMap: dict[str, int]) -> int: ''' Return the bit width (32 or 64 bit) given the registers - @type registerMap: map @param registerMap: Map of register names to value - @rtype: int @return: The bit width ''' if "rax" in registerMap or "x0" in registerMap: @@ -166,15 +157,13 @@ def getBitWidth(registerMap): return 32 -def isX86Compatible(registerMap): +def isX86Compatible(registerMap: dict[str, int]) -> bool: ''' Return true, if the the given registers are X86 compatible, such as x86 or x86-64. ARM, PPC and your PDP-15 will fail this check and we don't support it right now. - @type registerMap: map @param registerMap: Map of register names to value - @rtype: bool @return: True if the architecture is X86 compatible, False otherwise ''' for register in x86OnlyRegisters: @@ -183,14 +172,12 @@ def isX86Compatible(registerMap): return False -def isARMCompatible(registerMap): +def isARMCompatible(registerMap: dict[str, int]) -> bool: ''' Return true, if the the given registers are either ARM or ARM64. - @type registerMap: map @param registerMap: Map of register names to value - @rtype: bool @return: True if the architecture is ARM/ARM64 compatible, False otherwise ''' for register in armOnlyRegisters: From 3cf241beccd530228e2dc939bc4b8862ca76a0d2 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 29 Nov 2021 04:47:36 -0800 Subject: [PATCH 020/137] Remove stray reveal_type call --- FTB/Running/PersistentApplication.py | 1 - 1 file changed, 1 deletion(-) diff --git a/FTB/Running/PersistentApplication.py b/FTB/Running/PersistentApplication.py index 279379e5a..556d1460e 100644 --- a/FTB/Running/PersistentApplication.py +++ b/FTB/Running/PersistentApplication.py @@ -178,7 +178,6 @@ def _write_log_test(self, test): self.process.stdin.close() def _wait_child_stopped(self): - reveal_type(self.process.pid) monitor = WaitpidMonitor(self.process.pid, os.WUNTRACED) monitor.start() monitor.join(self.processingTimeout) From 4fe7c698d4ab504a746ead1eb5d710f15d1934cd Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 29 Nov 2021 05:02:57 -0800 Subject: [PATCH 021/137] More type information especially for ProgramConfiguration --- FTB/ProgramConfiguration.py | 25 ++++++++++++++----------- server/crashmanager/tests/__init__.py | 5 +++-- server/ec2spotmanager/tests/__init__.py | 3 ++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/FTB/ProgramConfiguration.py b/FTB/ProgramConfiguration.py index cb6276255..f266faefc 100644 --- a/FTB/ProgramConfiguration.py +++ b/FTB/ProgramConfiguration.py @@ -24,13 +24,19 @@ class ProgramConfiguration(): - def __init__(self, product, platform, os, version=None, env=None, args=None, metadata=None): + def __init__( + self, + product: str, + platform: str, + os: str, + version: str | None = None, + env: dict[str, str] | None = None, + args: list[str] | None = None, + metadata: dict[str, str] | None = None, + ): ''' - @type product: string @param product: The name of the product/program/branch tested - @type platform: string @param platform: Platform on which is tested (e.g. x86, x86-64 or arm) - @type os: string @param os: Operating system on which is tested (e.g. linux, windows, macosx) ''' self.product = product.lower() @@ -56,7 +62,7 @@ def __init__(self, product, platform, os, version=None, env=None, args=None, met self.metadata = metadata @staticmethod - def fromBinary(binaryPath): + def fromBinary(binaryPath: str) -> ProgramConfiguration | None: binaryConfig = "%s.fuzzmanagerconf" % binaryPath if not os.path.exists(binaryConfig): print("Warning: No binary configuration found at %s" % binaryConfig, file=sys.stderr) @@ -77,33 +83,30 @@ def fromBinary(binaryPath): return ProgramConfiguration(mainConfig["product"], mainConfig["platform"], mainConfig["os"], version=version, metadata=config.metadataConfig) - def addEnvironmentVariables(self, env): + def addEnvironmentVariables(self, env: dict[str, str]) -> None: ''' Add (additional) environment variable definitions. Existing definitions will be overwritten if they are redefined in the given environment. - @type env: dict @param env: Dictionary containing the environment variables ''' assert isinstance(env, dict) self.env.update(env) - def addProgramArguments(self, args): + def addProgramArguments(self, args: list[str]) -> None: ''' Add (additional) program arguments. - @type args: list @param args: List containing the program arguments ''' assert isinstance(args, list) self.args.extend(args) - def addMetadata(self, metadata): + def addMetadata(self, metadata: dict[str, str]) -> None: ''' Add (additional) metadata definitions. Existing definitions will be overwritten if they are redefined in the given metadata. - @type metadata: dict @param metadata: Dictionary containing the metadata ''' assert isinstance(metadata, dict) diff --git a/server/crashmanager/tests/__init__.py b/server/crashmanager/tests/__init__.py index 0cd2dfd6a..192b69820 100644 --- a/server/crashmanager/tests/__init__.py +++ b/server/crashmanager/tests/__init__.py @@ -12,10 +12,11 @@ from __future__ import annotations +from django.http.response import HttpResponse from django.test import SimpleTestCase as DjangoTestCase -def assert_contains(response, text): +def assert_contains(response: HttpResponse, text: str) -> None: """Assert that the response was successful, and contains the given text. """ @@ -27,7 +28,7 @@ def runTest(self) -> None: _().assertContains(response, text) -def assert_not_contains(response, text): +def assert_not_contains(response: HttpResponse, text: str) -> None: """Assert that the response was successful, and does not contain the given text. """ diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index 97bd4e39f..c9e53e5b3 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -14,6 +14,7 @@ import logging from django.core.files.base import ContentFile +from django.http.response import HttpResponse from django.test import SimpleTestCase as DjangoTestCase from django.utils import timezone from ec2spotmanager.models import Instance, InstancePool, PoolConfiguration, PoolStatusEntry @@ -27,7 +28,7 @@ class UncatchableException(BaseException): pass -def assert_contains(response, text): +def assert_contains(response: HttpResponse, text: str) -> None: """Assert that the response was successful, and contains the given text. """ From 737d5468333834692a51a63c84dd56992578a2e0 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 29 Nov 2021 05:25:27 -0800 Subject: [PATCH 022/137] Add required typing modules --- setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.cfg b/setup.cfg index a96e7125a..d96f3391c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,9 +24,11 @@ keywords = fuzz fuzzing security test testing [options] install_requires = + django-stubs>=1.9.0 fasteners>=0.14.1 requests>=2.20.1 six>=1.12.0 + typing_extensions>=4.0.0 packages = Collector CovReporter From be2257128c13619fd4e6d464a65ffaa9754d31e5 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 29 Nov 2021 05:30:37 -0800 Subject: [PATCH 023/137] More assorted type information --- FTB/Running/StreamCollector.py | 2 +- FTB/Signatures/RegisterHelper.py | 2 +- .../covmanager/management/commands/setup_repository.py | 9 ++++++--- .../migrations/0001_squashed_0013_add_gce_fields.py | 2 +- server/taskmanager/migrations/0001_initial.py | 3 +-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/FTB/Running/StreamCollector.py b/FTB/Running/StreamCollector.py index 13f33d2f3..2e44e39e5 100644 --- a/FTB/Running/StreamCollector.py +++ b/FTB/Running/StreamCollector.py @@ -58,5 +58,5 @@ def run(self) -> None: self.fd.close() - def addResponsePrefix(self, prefix): + def addResponsePrefix(self, prefix: str) -> None: self.responsePrefixes.append(prefix) diff --git a/FTB/Signatures/RegisterHelper.py b/FTB/Signatures/RegisterHelper.py index 5c58fc3a6..ff3249073 100644 --- a/FTB/Signatures/RegisterHelper.py +++ b/FTB/Signatures/RegisterHelper.py @@ -75,7 +75,7 @@ def getInstructionPointer(registerMap: dict[str, int]) -> int: raise RuntimeError("Register map does not contain a usable instruction pointer!") -def getRegisterValue(register: str, registerMap: dict[str, int]) -> int: +def getRegisterValue(register: str, registerMap: dict[str, int]) -> int | None: ''' Return the value of the specified register using the provided register map. This method also works for getting lower register parts out of higher ones. diff --git a/server/covmanager/management/commands/setup_repository.py b/server/covmanager/management/commands/setup_repository.py index 3cd8da380..3e9d799a3 100644 --- a/server/covmanager/management/commands/setup_repository.py +++ b/server/covmanager/management/commands/setup_repository.py @@ -1,6 +1,8 @@ from __future__ import annotations +from argparse import ArgumentParser import os +from typing import Any from django.core.management.base import BaseCommand, CommandError @@ -10,12 +12,12 @@ class Command(BaseCommand): help = 'Sets up a repository for CovManager' - def add_arguments(self, parser): + def add_arguments(self, parser: ArgumentParser) -> None: parser.add_argument("name", help="repository identifier") parser.add_argument("provider", help="SourceCodeProvider subclass") parser.add_argument("location", help="path to the repository root") - def handle(self, name, provider, location, **opts): + def handle(self, name: str, provider: str, location: str, **opts: Any) -> None: if not name: raise CommandError("Error: invalid repository name") @@ -30,7 +32,8 @@ def handle(self, name, provider, location, **opts): provider = {"git": "GITSourceCodeProvider", "hg": "HGSourceCodeProvider"}.get(provider, provider) try: - __import__('covmanager.SourceCodeProvider.%s' % provider, fromlist=[provider.encode("utf-8")]) + # Type information here may be confused by the need for Python 2 compatibility + __import__('covmanager.SourceCodeProvider.%s' % provider, fromlist=[provider.encode("utf-8")]) # type: ignore[list-item] except ImportError: raise CommandError("Error: '%s' is not a valid source code provider!" % provider) diff --git a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py index 908da09a2..ca4cffa0f 100644 --- a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py +++ b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py @@ -32,7 +32,7 @@ class Migration(migrations.Migration): initial = True - dependencies = [] + dependencies: list[str] = [] operations = [ migrations.CreateModel( diff --git a/server/taskmanager/migrations/0001_initial.py b/server/taskmanager/migrations/0001_initial.py index 8d189d32a..641fcf3c3 100644 --- a/server/taskmanager/migrations/0001_initial.py +++ b/server/taskmanager/migrations/0001_initial.py @@ -10,8 +10,7 @@ class Migration(migrations.Migration): initial = True - dependencies = [ - ] + dependencies: list[str] = [] operations = [ migrations.CreateModel( From aa9aa2ac37833b2b7bfbd57ba6d63d1a5d5b9967 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 29 Nov 2021 05:36:44 -0800 Subject: [PATCH 024/137] Also get the boto3-stubs and celery-types packages --- setup.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.cfg b/setup.cfg index d96f3391c..953852a87 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,6 +24,8 @@ keywords = fuzz fuzzing security test testing [options] install_requires = + boto3-stubs>=1.20.15 + celery-types>=0.9.3 django-stubs>=1.9.0 fasteners>=0.14.1 requests>=2.20.1 From 9fb19dce204e8f1f82e8f4342478406d904ff9fd Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 29 Nov 2021 13:19:45 -0800 Subject: [PATCH 025/137] Add more type information for CrashSignature and Symptom from FTB --- FTB/Signatures/CrashSignature.py | 25 ++++++++++------------- FTB/Signatures/Symptom.py | 35 +++++++++----------------------- 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/FTB/Signatures/CrashSignature.py b/FTB/Signatures/CrashSignature.py index 660bde2d5..4a8d5596c 100644 --- a/FTB/Signatures/CrashSignature.py +++ b/FTB/Signatures/CrashSignature.py @@ -18,18 +18,19 @@ import difflib import json +from pathlib import Path from FTB.Signatures import JSONHelper +from FTB.Signatures.CrashInfo import CrashInfo from FTB.Signatures.Symptom import Symptom, TestcaseSymptom, StackFramesSymptom, \ OutputSymptom class CrashSignature(object): - def __init__(self, rawSignature): + def __init__(self, rawSignature: str): ''' Constructor - @type rawSignature: string @param rawSignature: A JSON-formatted string representing the crash signature ''' @@ -63,21 +64,19 @@ def __init__(self, rawSignature): self.products = JSONHelper.getArrayChecked(obj, "products") @staticmethod - def fromFile(signatureFile): + def fromFile(signatureFile: Path | str) -> CrashSignature: with open(signatureFile, 'r') as sigFd: return CrashSignature(sigFd.read()) - def __str__(self): + def __str__(self) -> str: return str(self.rawSignature) - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Match this signature against the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash info to match the signature against - @rtype: bool @return: True if the signature matches, False otherwise ''' if self.platforms is not None and crashInfo.configuration.platform not in self.platforms: @@ -107,14 +106,13 @@ def matches(self, crashInfo): return True - def matchRequiresTest(self): + def matchRequiresTest(self) -> bool: ''' Check if the signature requires a testcase to match. This method can be used to avoid attaching a testcase to the crashInfo before matching, avoiding unnecessary I/O on testcase files. - @rtype: bool @return: True if the signature requires a testcase to match ''' for symptom in self.symptoms: @@ -123,14 +121,13 @@ def matchRequiresTest(self): return False - def getRequiredOutputSources(self): + def getRequiredOutputSources(self) -> list[str]: ''' Return a list of output sources required by this signature for matching. This method can be used to avoid loading raw output fields from the database if they are not required for the particular signature. - @rtype: list(str) @return: A list of output identifiers (e.g. stdout, stderr or crashdata) required by this signature. ''' @@ -172,7 +169,7 @@ def getDistance(self, crashInfo): return distance - def fit(self, crashInfo): + def fit(self, crashInfo: CrashInfo) -> CrashSignature | None: sigObj = {} sigSymptoms = [] @@ -201,7 +198,7 @@ def fit(self, crashInfo): return CrashSignature(json.dumps(sigObj, indent=2, sort_keys=True)) - def getSymptomsDiff(self, crashInfo): + def getSymptomsDiff(self, crashInfo: CrashInfo): symptomsDiff = [] for symptom in self.symptoms: if symptom.matches(crashInfo): @@ -219,7 +216,7 @@ def getSymptomsDiff(self, crashInfo): symptomsDiff.append({'offending': True, 'symptom': symptom}) return symptomsDiff - def getSignatureUnifiedDiffTuples(self, crashInfo): + def getSignatureUnifiedDiffTuples(self, crashInfo: CrashInfo): diffTuples = [] # go through dumps(loads()) to standardize the format. diff --git a/FTB/Signatures/Symptom.py b/FTB/Signatures/Symptom.py index 389962492..f3e0547e1 100644 --- a/FTB/Signatures/Symptom.py +++ b/FTB/Signatures/Symptom.py @@ -22,6 +22,7 @@ import six from FTB.Signatures import JSONHelper +from FTB.Signatures.CrashInfo import CrashInfo from FTB.Signatures.Matchers import StringMatch, NumberMatch @@ -73,14 +74,12 @@ def fromJSONObject(obj): raise RuntimeError("Unknown symptom type: %s" % stype) @abstractmethod - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Check if the symptom matches the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash information to check against - @rtype: bool @return: True if the symptom matches, False otherwise ''' return @@ -100,14 +99,12 @@ def __init__(self, obj): if self.src != "stderr" and self.src != "stdout" and self.src != "crashdata": raise RuntimeError("Invalid source specified: %s" % self.src) - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Check if the symptom matches the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash information to check against - @rtype: bool @return: True if the symptom matches, False otherwise ''' checkedOutput = [] @@ -146,14 +143,12 @@ def __init__(self, obj): # Default to 0 self.frameNumber = NumberMatch(0) - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Check if the symptom matches the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash information to check against - @rtype: bool @return: True if the symptom matches, False otherwise ''' @@ -174,14 +169,12 @@ def __init__(self, obj): Symptom.__init__(self, obj) self.stackSize = NumberMatch(JSONHelper.getNumberOrStringChecked(obj, "size", True)) - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Check if the symptom matches the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash information to check against - @rtype: bool @return: True if the symptom matches, False otherwise ''' return self.stackSize.matches(len(crashInfo.backtrace)) @@ -195,14 +188,12 @@ def __init__(self, obj): Symptom.__init__(self, obj) self.address = NumberMatch(JSONHelper.getNumberOrStringChecked(obj, "address", True)) - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Check if the symptom matches the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash information to check against - @rtype: bool @return: True if the symptom matches, False otherwise ''' # In case the crash address is not available, @@ -224,14 +215,12 @@ def __init__(self, obj): elif self.registerNames is None or len(self.registerNames) == 0: raise RuntimeError("Must provide at least instruction name or register names") - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Check if the symptom matches the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash information to check against - @rtype: bool @return: True if the symptom matches, False otherwise ''' if crashInfo.crashInstruction is None: @@ -258,14 +247,12 @@ def __init__(self, obj): Symptom.__init__(self, obj) self.output = StringMatch(JSONHelper.getObjectOrStringChecked(obj, "value", True)) - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Check if the symptom matches the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash information to check against - @rtype: bool @return: True if the symptom matches, False otherwise ''' @@ -295,20 +282,18 @@ def __init__(self, obj): for fn in rawFunctionNames: self.functionNames.append(StringMatch(fn)) - def matches(self, crashInfo): + def matches(self, crashInfo: CrashInfo) -> bool: ''' Check if the symptom matches the given crash information - @type crashInfo: CrashInfo @param crashInfo: The crash information to check against - @rtype: bool @return: True if the symptom matches, False otherwise ''' return StackFramesSymptom._match(crashInfo.backtrace, self.functionNames) - def diff(self, crashInfo): + def diff(self, crashInfo: CrashInfo): if self.matches(crashInfo): return (0, None) From d6d85bdc994ad73c442f566e9a74e15d8f8353e7 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 2 Dec 2021 00:17:58 -0800 Subject: [PATCH 026/137] More type information - now down to 2,145 remaining --- CovReporter/CovReporter.py | 2 +- EC2Reporter/EC2Reporter.py | 2 +- FTB/AssertionHelper.py | 2 +- FTB/Signatures/CrashInfo.py | 2 +- FTB/tests/test_AssertionHelper.py | 2 +- TaskStatusReporter/TaskStatusReporter.py | 2 +- misc/libfuzzer/libfuzzer.py | 2 +- .../GITSourceCodeProvider.py | 18 ++--- .../HGSourceCodeProvider.py | 16 ++-- .../SourceCodeProvider/SourceCodeProvider.py | 76 ++++++++----------- .../tests/test_sourcecodeprovider.py | 9 ++- server/covmanager/views.py | 45 ++++++----- .../CloudProvider/EC2SpotCloudProvider.py | 8 +- server/ec2spotmanager/tasks.py | 2 +- server/server/utils.py | 6 +- 15 files changed, 92 insertions(+), 102 deletions(-) diff --git a/CovReporter/CovReporter.py b/CovReporter/CovReporter.py index 4c9c46cd8..e4accaddc 100755 --- a/CovReporter/CovReporter.py +++ b/CovReporter/CovReporter.py @@ -27,7 +27,7 @@ from FTB import CoverageHelper from Reporter.Reporter import remote_checks, Reporter # noqa -__all__ = [] +__all__: list[str] = [] __version__ = 0.1 __date__ = '2017-07-10' __updated__ = '2017-07-10' diff --git a/EC2Reporter/EC2Reporter.py b/EC2Reporter/EC2Reporter.py index f8e3372dc..7dadf00ba 100755 --- a/EC2Reporter/EC2Reporter.py +++ b/EC2Reporter/EC2Reporter.py @@ -32,7 +32,7 @@ from FTB.ConfigurationFiles import ConfigurationFiles # noqa from Reporter.Reporter import Reporter, remote_checks # noqa -__all__ = [] +__all__: list[str] = [] __version__ = 0.1 __date__ = '2014-10-01' __updated__ = '2014-10-01' diff --git a/FTB/AssertionHelper.py b/FTB/AssertionHelper.py index 0c4f71f25..5c4047776 100644 --- a/FTB/AssertionHelper.py +++ b/FTB/AssertionHelper.py @@ -177,7 +177,7 @@ def getAuxiliaryAbortMessage(output: list[str]) -> list[str] | str | None: return lastLine -def getSanitizedAssertionPattern(msgs: list[str] | str) -> list[str] | str: +def getSanitizedAssertionPattern(msgs: list[str] | str | None) -> list[str] | str: ''' This method provides a way to strip out unwanted dynamic information from assertions and replace it with pattern matching elements, e.g. diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 3b0978618..8b9cd5e94 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -22,9 +22,9 @@ import os import re import sys -from typing_extensions import TypedDict import six +from typing_extensions import TypedDict from FTB import AssertionHelper from FTB.ProgramConfiguration import ProgramConfiguration diff --git a/FTB/tests/test_AssertionHelper.py b/FTB/tests/test_AssertionHelper.py index 346ffff6d..0d3a483ea 100644 --- a/FTB/tests/test_AssertionHelper.py +++ b/FTB/tests/test_AssertionHelper.py @@ -100,7 +100,7 @@ """ # noqa -def _check_regex_matches(error_lines, sanitized_message): +def _check_regex_matches(error_lines: list[str] | str, sanitized_message: list[str] | str) -> None: if isinstance(sanitized_message, (six.text_type, bytes)): sanitized_message = [sanitized_message] else: diff --git a/TaskStatusReporter/TaskStatusReporter.py b/TaskStatusReporter/TaskStatusReporter.py index e241d7c22..7838087af 100755 --- a/TaskStatusReporter/TaskStatusReporter.py +++ b/TaskStatusReporter/TaskStatusReporter.py @@ -32,7 +32,7 @@ from FTB.ConfigurationFiles import ConfigurationFiles # noqa from Reporter.Reporter import Reporter, remote_checks # noqa -__all__ = [] +__all__: list[str] = [] __version__ = 0.1 __date__ = '2014-10-01' __updated__ = '2014-10-01' diff --git a/misc/libfuzzer/libfuzzer.py b/misc/libfuzzer/libfuzzer.py index aacc7b36d..24514a401 100755 --- a/misc/libfuzzer/libfuzzer.py +++ b/misc/libfuzzer/libfuzzer.py @@ -71,7 +71,7 @@ def getTestcase(self): return self.testcase -__all__ = [] +__all__: list[str] = [] __version__ = 0.1 __date__ = '2016-07-28' __updated__ = '2016-07-28' diff --git a/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py b/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py index 89496c75b..62aa7f490 100644 --- a/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py @@ -20,10 +20,10 @@ class GITSourceCodeProvider(SourceCodeProvider): - def __init__(self, location): + def __init__(self, location: str): super(GITSourceCodeProvider, self).__init__(location) - def getSource(self, filename, revision): + def getSource(self, filename: str, revision: str) -> str: try: return subprocess.check_output(["git", "show", "%s:%s" % (revision, filename)], cwd=self.location).decode('utf-8') @@ -35,7 +35,7 @@ def getSource(self, filename, revision): # Otherwise assume the file doesn't exist raise UnknownFilenameException - def testRevision(self, revision): + def testRevision(self, revision: str) -> bool: try: subprocess.check_output(["git", "show", revision], cwd=self.location, stderr=subprocess.STDOUT) except subprocess.CalledProcessError: @@ -46,25 +46,25 @@ def update(self) -> None: # TODO: This will fail without remotes subprocess.check_call(["git", "fetch"], cwd=self.location) - def getParents(self, revision): + def getParents(self, revision: str) -> list[str]: try: output = subprocess.check_output(["git", "log", revision, "--format=%P"], cwd=self.location) except subprocess.CalledProcessError: raise UnknownRevisionException - output = output.decode('utf-8').splitlines() + output_str = output.decode('utf-8').splitlines() # No parents - if not output[0]: + if not output_str[0]: return [] - return output[0].split(" ") + return output_str[0].split(" ") - def getUnifiedDiff(self, revision): + def getUnifiedDiff(self, revision: str) -> str: # TODO: Implement this method for GIT pass - def checkRevisionsEquivalent(self, revisionA, revisionB): + def checkRevisionsEquivalent(self, revisionA: str, revisionB: str) -> bool: # We do not implement any kind of revision equivalence # for GIT other than equality. return revisionA == revisionB diff --git a/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py b/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py index 182316037..ef5caef89 100644 --- a/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py @@ -21,10 +21,10 @@ class HGSourceCodeProvider(SourceCodeProvider): - def __init__(self, location): + def __init__(self, location: str): super(HGSourceCodeProvider, self).__init__(location) - def getSource(self, filename, revision): + def getSource(self, filename: str, revision: str) -> str: revision = revision.replace('+', '') # Avoid passing in absolute filenames to HG @@ -41,7 +41,7 @@ def getSource(self, filename, revision): # Otherwise assume the file doesn't exist raise UnknownFilenameException - def testRevision(self, revision): + def testRevision(self, revision: str) -> bool: revision = revision.replace('+', '') try: @@ -54,7 +54,7 @@ def update(self) -> None: # TODO: This will fail without remotes subprocess.check_call(["hg", "pull"], cwd=self.location) - def getParents(self, revision): + def getParents(self, revision: str) -> list[str]: revision = revision.replace('+', '') try: @@ -63,18 +63,18 @@ def getParents(self, revision): except subprocess.CalledProcessError: raise UnknownRevisionException - output = output.splitlines() + output_str = output.splitlines() parents = [] - for line in output: + for line in output_str: result = re.match(r'\d+:([0-9a-f]+)\s+', line) if result: parents.append(result.group(1)) return parents - def getUnifiedDiff(self, revision): + def getUnifiedDiff(self, revision: str) -> str: revision = revision.replace('+', '') try: @@ -84,7 +84,7 @@ def getUnifiedDiff(self, revision): return output.decode('utf-8') - def checkRevisionsEquivalent(self, revisionA, revisionB): + def checkRevisionsEquivalent(self, revisionA: str, revisionB: str) -> bool: # Check if revisions are equal if revisionA == revisionB: return True diff --git a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py index 0aa4db9dc..b341c5652 100644 --- a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py @@ -17,6 +17,7 @@ from abc import ABCMeta, abstractmethod import six +from typing_extensions import TypedDict class UnknownRevisionException(Exception): @@ -32,38 +33,30 @@ class SourceCodeProvider(): ''' Abstract base class that defines what interfaces Source Code Providers must implement ''' - def __init__(self, location): + def __init__(self, location: str): self.location = location @abstractmethod - def getSource(self, filename, revision): + def getSource(self, filename: str, revision: str) -> str: """ Return the source code for the given filename on the given revision. - @ptype filename: string @param filename: The path to the requested file, relative to the root of the repository. - - @ptype revision: string @param revision: The revision to use when retrieving the source code. - - @rtype string @return The requested source code as a single string. """ - return + return "" @abstractmethod - def testRevision(self, revision): + def testRevision(self, revision: str) -> bool: """ Check if the given revision exists in the resource associated with this provider. - @ptype revision: string @param revision: The revision to check for. - - @rtype bool @return True, if the revision exists, False otherwise. """ - return + return False @abstractmethod def update(self) -> None: @@ -80,52 +73,48 @@ def update(self) -> None: return @abstractmethod - def getParents(self, revision): + def getParents(self, revision: str) -> list[str]: """ Gets the parent revisions of the specified revision. - @ptype revision: string @param revision: The revision to get parents for. - - @rtype list @return The list of parent revisions. """ - return + return [] @abstractmethod - def getUnifiedDiff(self, revision): + def getUnifiedDiff(self, revision: str) -> str: """ Return a GIT-style unified diff for the given revision. - @ptype revision: string @param revision: The revision to get the diff for. - - @rtype string @return The unified diff as a single string. """ - return + return "" @abstractmethod - def checkRevisionsEquivalent(self, revisionA, revisionB): + def checkRevisionsEquivalent(self, revisionA: str, revisionB: str) -> bool: """ Check if the given revisions are considered to be equivalent. - @ptype revisionA: string @param revisionA: The first revision to compare. - - @ptype revisionB: string @param revisionB: The second revision to compare. - - @rtype bool @return True, if the revisions are equivalent, False otherwise. """ - return + return False + + +class CObj(TypedDict): + """CObj type specification.""" + + filename: str | None + locations: list[int] class Utils(): @staticmethod - def getDiffLocations(diff): + def getDiffLocations(diff: str) -> list[CObj]: """ This method tries to return reasonable diff hunk locations for each changed file in the given unified diff, where the locations refer to the @@ -144,28 +133,25 @@ def getDiffLocations(diff): Note that the heuristics used here are far from perfect and are only meant to aid manual inspection. - @ptype diff: string @param diff: A GIT-style unified diff as a single string. - - @rtype list @return A list containing one object per file changed. Each object in the list has two attributes, "filename" and "locations", where "locations" is the list of diff hunk locations for that particular file. """ - ret = [] - diff = diff.splitlines() + ret: list[CObj] = [] + diff_list = diff.splitlines() - while diff: - cobj = {"filename": None, "locations": []} + while diff_list: + cobj: CObj = {"filename": None, "locations": []} skipDiff = False - line = diff.pop(0) + line = diff_list.pop(0) if line.startswith("diff --git "): - (mm, mmLine) = diff.pop(0).split(" ", 2) - (pp, ppLine) = diff.pop(0).split(" ", 2) + (mm, mmLine) = diff_list.pop(0).split(" ", 2) + (pp, ppLine) = diff_list.pop(0).split(" ", 2) if not mm == "---" or not pp == "+++": raise RuntimeError("Malformed trace") @@ -176,11 +162,11 @@ def getDiffLocations(diff): cobj["filename"] = mmLine[2:] skipHunk = False - lastHunkStart = None - hunkLineRemoveCount = None + lastHunkStart = 0 + hunkLineRemoveCount = 0 - while diff and not diff[0].startswith("diff --git "): - line = diff.pop(0) + while diff_list and not diff_list[0].startswith("diff --git "): + line = diff_list.pop(0) if not skipDiff: if line.startswith("@@ "): diff --git a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py index df68f2bed..48bb39710 100644 --- a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py +++ b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py @@ -16,6 +16,7 @@ from __future__ import annotations import os +from pathlib import Path import pytest import shutil from covmanager.SourceCodeProvider.GITSourceCodeProvider import GITSourceCodeProvider @@ -24,7 +25,7 @@ @pytest.fixture -def git_repo(tmp_path): +def git_repo(tmp_path: Path): shutil.copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test-git"), str(tmp_path / "test-git")) (tmp_path / "test-git" / "git").rename(tmp_path / "test-git" / ".git") @@ -32,14 +33,14 @@ def git_repo(tmp_path): @pytest.fixture -def hg_repo(tmp_path): +def hg_repo(tmp_path: Path): shutil.copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test-hg"), str(tmp_path / "test-hg")) (tmp_path / "test-hg" / "hg").rename(tmp_path / "test-hg" / ".hg") yield str(tmp_path / "test-hg") -def test_GITSourceCodeProvider(git_repo): +def test_GITSourceCodeProvider(git_repo: str) -> None: provider = GITSourceCodeProvider(git_repo) tests = { @@ -67,7 +68,7 @@ def test_GITSourceCodeProvider(git_repo): assert len(parents) == 0 -def test_HGSourceCodeProvider(hg_repo): +def test_HGSourceCodeProvider(hg_repo: str) -> None: provider = HGSourceCodeProvider(hg_repo) tests = { diff --git a/server/covmanager/views.py b/server/covmanager/views.py index 83dca90a6..a834c340a 100644 --- a/server/covmanager/views.py +++ b/server/covmanager/views.py @@ -4,7 +4,10 @@ from django.core.exceptions import SuspiciousOperation, PermissionDenied from django.db.models import Q from django.http import Http404 +from django.http.request import HttpRequest from django.http.response import HttpResponse +from django.http.response import HttpResponsePermanentRedirect +from django.http.response import HttpResponseRedirect from django.shortcuts import render, redirect, get_object_or_404 from django.views.decorators.csrf import csrf_exempt import json @@ -24,40 +27,40 @@ from .SourceCodeProvider import SourceCodeProvider -def index(request): +def index(request: HttpRequest) -> HttpResponseRedirect | HttpResponsePermanentRedirect: return redirect('covmanager:%s' % getattr(settings, 'COV_DEFAULT_PAGE', "collections")) -def reports(request): +def reports(request: HttpRequest) -> HttpResponse: return render(request, 'collections/report.html', {}) -def repositories(request): +def repositories(request: HttpRequest) -> HttpResponse: repositories = Repository.objects.all() return render(request, 'repositories/index.html', {'repositories': repositories}) -def reportconfigurations(request): +def reportconfigurations(request: HttpRequest) -> HttpResponse: return render(request, 'reportconfigurations/index.html', {}) -def collections(request): +def collections(request: HttpRequest) -> HttpResponse: return render(request, 'collections/index.html', {}) -def collections_browse(request, collectionid): +def collections_browse(request: HttpRequest, collectionid: str) -> HttpResponse: return render(request, 'collections/browse.html', {'collectionid': collectionid}) -def collections_diff(request): +def collections_diff(request: HttpRequest) -> HttpResponse: return render(request, 'collections/browse.html', {'diff_api': True}) -def collections_reportsummary(request, collectionid): +def collections_reportsummary(request: HttpRequest, collectionid: str) -> HttpResponse: return render(request, 'reportconfigurations/summary.html', {'collectionid': collectionid}) -def collections_reportsummary_html_list(request, collectionid): +def collections_reportsummary_html_list(request: HttpRequest, collectionid: str) -> HttpResponse: collection = get_object_or_404(Collection, pk=collectionid) if not collection.coverage: @@ -138,7 +141,7 @@ def annotate_delta(a, b): return render(request, 'reportconfigurations/summary_html_list.html', {'root': root}) -def collections_download(request, collectionid): +def collections_download(request: HttpRequest, collectionid: str) -> HttpResponse: collection = get_object_or_404(Collection, pk=collectionid) if not collection.coverage: @@ -154,7 +157,7 @@ def collections_download(request, collectionid): return response -def collections_browse_api(request, collectionid, path): +def collections_browse_api(request: HttpRequest, collectionid: str, path) -> HttpResponse: collection = get_object_or_404(Collection, pk=collectionid) if not collection.coverage: @@ -185,7 +188,7 @@ def collections_browse_api(request, collectionid, path): return HttpResponse(json.dumps(data), content_type='application/json') -def collections_diff_api(request, path): +def collections_diff_api(request: HttpRequest, path) -> HttpResponse: collections = None coverages = [] @@ -294,11 +297,11 @@ def collections_diff_api(request, path): return HttpResponse(json.dumps(data), content_type='application/json') -def collections_patch(request): +def collections_patch(request: HttpRequest) -> HttpResponse: return render(request, 'collections/patch.html', {}) -def collections_patch_api(request, collectionid, patch_revision): +def collections_patch_api(request: HttpRequest, collectionid: str, patch_revision) -> HttpResponse: collection = get_object_or_404(Collection, pk=collectionid) if not collection.coverage: @@ -418,7 +421,7 @@ def collections_patch_api(request, collectionid, patch_revision): return HttpResponse(json.dumps(results), content_type='application/json') -def collections_reportsummary_api(request, collectionid): +def collections_reportsummary_api(request: HttpRequest, collectionid: str) -> HttpResponse: collection = get_object_or_404(Collection, pk=collectionid) if not collection.coverage: @@ -456,7 +459,7 @@ def collections_reportsummary_api(request, collectionid): return HttpResponse(summary.cached_result, content_type='application/json') -def repositories_search_api(request): +def repositories_search_api(request: HttpRequest) -> HttpResponse: results = [] if "name" in request.GET: @@ -466,7 +469,7 @@ def repositories_search_api(request): return HttpResponse(json.dumps({"results": list(results)}), content_type='application/json') -def tools_search_api(request): +def tools_search_api(request: HttpRequest) -> HttpResponse: results = [] if "name" in request.GET: @@ -477,7 +480,7 @@ def tools_search_api(request): @csrf_exempt -def collections_aggregate_api(request): +def collections_aggregate_api(request: HttpRequest) -> HttpResponse: if request.method != 'POST': return HttpResponse( content=json.dumps({"error": "This API only supports POST."}), @@ -586,7 +589,7 @@ class CollectionFilterBackend(filters.BaseFilterBackend): """ Accepts filtering with several collection-specific fields from the URL """ - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): """ Return a filtered queryset. """ @@ -646,7 +649,7 @@ class ReportFilterBackend(filters.BaseFilterBackend): """ Accepts broad filtering by q parameter to search multiple fields """ - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): """ Return a filtered queryset. """ @@ -714,7 +717,7 @@ class ReportConfigurationFilterBackend(filters.BaseFilterBackend): """ Accepts broad filtering by q parameter to search multiple fields """ - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): """ Return a filtered queryset. """ diff --git a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py index 47481299b..262ab5327 100644 --- a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py @@ -22,7 +22,7 @@ def __init__(self) -> None: self.cluster = None self.connected_region = None - def _connect(self, region): + def _connect(self, region: str) -> EC2Manager: if self.connected_region != region: self.cluster = EC2Manager(None) # create a new Manager to invalidate cached image names, etc. self.cluster.connect(region=region, aws_access_key_id=settings.AWS_ACCESS_KEY_ID, @@ -31,7 +31,7 @@ def _connect(self, region): return self.cluster @wrap_provider_errors - def terminate_instances(self, instances_ids_by_region): + def terminate_instances(self, instances_ids_by_region) -> None: for region, instance_ids in instances_ids_by_region.items(): cluster = self._connect(region) self.logger.info("Terminating %s instances in region %s", len(instance_ids), region) @@ -50,7 +50,7 @@ def terminate_instances(self, instances_ids_by_region): cluster.terminate(boto_instances) @wrap_provider_errors - def cancel_requests(self, requested_instances_by_region): + def cancel_requests(self, requested_instances_by_region) -> None: for region, instance_ids in requested_instances_by_region.items(): cluster = self._connect(region) cluster.cancel_spot_requests(instance_ids) @@ -194,7 +194,7 @@ def check_instances_state(self, pool_id, region): return instance_states @wrap_provider_errors - def get_image(self, region, config): + def get_image(self, region: str, config) -> str: cluster = self._connect(region) ami = cluster.resolve_image_name(config.ec2_image_name) return ami diff --git a/server/ec2spotmanager/tasks.py b/server/ec2spotmanager/tasks.py index 48c097308..697361f86 100644 --- a/server/ec2spotmanager/tasks.py +++ b/server/ec2spotmanager/tasks.py @@ -254,7 +254,7 @@ def _update_provider_status(provider, type_, message): logger.warning('Ignoring provider error: already exists.') -def _update_pool_status(pool, type_, message): +def _update_pool_status(pool, type_: str, message: str) -> None: from .models import PoolStatusEntry, POOL_STATUS_ENTRY_TYPE is_critical = type_ not in {'max-spot-instance-count-exceeded', 'price-too-low', 'temporary-failure'} diff --git a/server/server/utils.py b/server/server/utils.py index 735ea20b5..3de1d2551 100644 --- a/server/server/utils.py +++ b/server/server/utils.py @@ -18,7 +18,7 @@ class RedisLock(object): Not using RedLock because it isn't passable as a celery argument, so we can't release the lock in an async chain. """ - def __init__(self, conn, name, unique_id=None): + def __init__(self, conn, name: str, unique_id: str | None = None): self.conn = conn self.name = name if unique_id is None: @@ -26,7 +26,7 @@ def __init__(self, conn, name, unique_id=None): else: self.unique_id = unique_id - def acquire(self, acquire_timeout=10, lock_expiry=None): + def acquire(self, acquire_timeout: int = 10, lock_expiry=None) -> str | None: end = time.time() + acquire_timeout while time.time() < end: if self.conn.set(self.name, self.unique_id, ex=lock_expiry, nx=True): @@ -38,7 +38,7 @@ def acquire(self, acquire_timeout=10, lock_expiry=None): LOG.debug("Failed to acquire lock: %s(%s)", self.name, self.unique_id) return None - def release(self): + def release(self) -> bool: with self.conn.pipeline() as pipe: while True: try: From ade368d24679e6f03ae74ce3b102d8cfad4d445e Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 2 Dec 2021 00:22:59 -0800 Subject: [PATCH 027/137] Move stubs packages to requirements3.0.txt --- server/requirements3.0.txt | 3 +++ setup.cfg | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/requirements3.0.txt b/server/requirements3.0.txt index 37c60b06f..bf26af0a2 100644 --- a/server/requirements3.0.txt +++ b/server/requirements3.0.txt @@ -6,7 +6,9 @@ backports.functools-lru-cache==1.5; python_version == '2.7' billiard>=3.5.0.3,<3.6 boto>=2.48.0,<2.50 boto3==1.7.78 +boto3-stubs>=1.20.15 celery>=4.1.1,<4.3 +celery-types>=0.9.3 certifi>=2018.4.16 chardet>=3.0.4,<3.1 configparser>=3.5.0,<3.6; python_version == '2.7' @@ -16,6 +18,7 @@ django-chartjs==1.3 django-crispy-forms==1.11.2 django-enumfields==2.1.1 django-notifications-hq==1.6.0 +django-stubs>=1.9.0 djangorestframework>=3.9.4 enum34>=1.1.6,<1.2; python_version == '2.7' fasteners>=0.14.1,<0.15 diff --git a/setup.cfg b/setup.cfg index 953852a87..e8f69569e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,9 +24,6 @@ keywords = fuzz fuzzing security test testing [options] install_requires = - boto3-stubs>=1.20.15 - celery-types>=0.9.3 - django-stubs>=1.9.0 fasteners>=0.14.1 requests>=2.20.1 six>=1.12.0 From 0d2fab44fb26ec6f99483f02ada37f636c5e7059 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 2 Dec 2021 04:54:12 -0800 Subject: [PATCH 028/137] 2086 mypy issues left --- FTB/ConfigurationFiles.py | 8 ++-- Reporter/Reporter.py | 41 +++++++++++-------- .../tests/test_sourcecodeprovider.py | 6 +-- .../management/commands/add_permission.py | 7 +++- .../management/commands/bug_update_status.py | 4 +- .../commands/cleanup_old_crashes.py | 3 +- .../management/commands/export_signatures.py | 3 +- .../management/commands/notify_by_email.py | 4 +- .../management/commands/triage_new_crash.py | 6 ++- .../management/commands/triage_new_crashes.py | 4 +- server/crashmanager/management/common.py | 23 ++++++++--- .../CloudProvider/CloudProvider.py | 7 +++- server/ec2spotmanager/tests/test_tasks.py | 2 +- .../commands/taskmanager_change_poolid.py | 6 ++- .../commands/taskmanager_list_pools.py | 4 +- .../commands/taskmanager_pulse_listen.py | 11 ++--- .../commands/taskmanager_scrape_task_group.py | 8 ++-- 17 files changed, 93 insertions(+), 54 deletions(-) diff --git a/FTB/ConfigurationFiles.py b/FTB/ConfigurationFiles.py index 2908b5694..c5208d767 100755 --- a/FTB/ConfigurationFiles.py +++ b/FTB/ConfigurationFiles.py @@ -21,9 +21,9 @@ class ConfigurationFiles(): - def __init__(self, configFiles): - self.mainConfig = {} - self.metadataConfig = {} + def __init__(self, configFiles: list[str]): + self.mainConfig: dict[str, str] = {} + self.metadataConfig: dict[str, str] = {} if configFiles: self.parser = configparser.ConfigParser() @@ -45,7 +45,7 @@ def __init__(self, configFiles): if sections: print("Warning: Ignoring the following config file sections: %s" % " ".join(sections), file=sys.stderr) - def getSectionMap(self, section): + def getSectionMap(self, section: str) -> str: ret = {} try: options = self.parser.options(section) diff --git a/Reporter/Reporter.py b/Reporter/Reporter.py index 0a98d78f1..56e8f923b 100644 --- a/Reporter/Reporter.py +++ b/Reporter/Reporter.py @@ -16,11 +16,14 @@ from __future__ import annotations from abc import ABC +from collections.abc import Callable import functools import logging import os import platform import time +from typing import Any +from typing import TypeVar import requests import requests.exceptions @@ -29,12 +32,13 @@ LOG = logging.getLogger(__name__) +RetType = TypeVar("RetType") -def remote_checks(wrapped): +def remote_checks(wrapped: Callable[..., RetType]) -> Callable[..., RetType]: '''Decorator to perform error checks before using remote features''' @functools.wraps(wrapped) - def decorator(self, *args, **kwargs): + def decorator(self: Reporter, *args: Any, **kwargs: Any) -> RetType: if not self.serverHost: raise RuntimeError("Must specify serverHost (configuration property: serverhost) to use remote features.") if not self.serverAuthToken: @@ -46,21 +50,21 @@ def decorator(self, *args, **kwargs): return decorator -def signature_checks(wrapped): +def signature_checks(wrapped: Callable[..., RetType]) -> Callable[..., RetType]: '''Decorator to perform error checks before using signature features''' @functools.wraps(wrapped) - def decorator(self, *args, **kwargs): + def decorator(self: Reporter, *args: Any, **kwargs: Any) -> RetType: if not self.sigCacheDir: raise RuntimeError("Must specify sigCacheDir (configuration property: sigdir) to use signatures.") return wrapped(self, *args, **kwargs) return decorator -def requests_retry(wrapped): +def requests_retry(wrapped: Callable[..., Any]) -> Callable[..., Any]: '''Wrapper around requests methods that retries up to 2 minutes if it's likely that the response codes indicate a temporary error''' @functools.wraps(wrapped) - def wrapper(*args, **kwds): + def wrapper(*args: Any, **kwds: Any) -> Any: success = kwds.pop("expected") current_timeout = 2 while True: @@ -89,25 +93,26 @@ def wrapper(*args, **kwds): class Reporter(ABC): - def __init__(self, sigCacheDir=None, serverHost=None, serverPort=None, - serverProtocol=None, serverAuthToken=None, - clientId=None, tool=None): + def __init__( + self, + sigCacheDir: str | None = None, + serverHost: str | None = None, + serverPort: int | None = None, + serverProtocol: str | None = None, + serverAuthToken: str | None = None, + clientId: str | None = None, + tool: str | None = None, + ): ''' Initialize the Reporter. This constructor will also attempt to read a configuration file to populate any missing properties that have not been passed to this constructor. - @type sigCacheDir: string @param sigCacheDir: Directory to be used for caching signatures - @type serverHost: string @param serverHost: Server host to contact for refreshing signatures - @type serverPort: int @param serverPort: Server port to use when contacting server - @type serverAuthToken: string @param serverAuthToken: Token for server authentication - @type clientId: string @param clientId: Client ID stored in the server when submitting issues - @type tool: string @param tool: Name of the tool that found this issue ''' self.sigCacheDir = sigCacheDir @@ -169,7 +174,7 @@ def __init__(self, sigCacheDir=None, serverHost=None, serverPort=None, if self.serverHost is not None and self.clientId is None: self.clientId = platform.node() - def get(self, *args, **kwds): + def get(self, *args: Any, **kwds: Any) -> Any: """requests.get, with added support for FuzzManager authentication and retry on 5xx errors. @type expected: int @@ -179,7 +184,7 @@ def get(self, *args, **kwds): kwds.setdefault("headers", {}).update({"Authorization": "Token %s" % self.serverAuthToken}) return requests_retry(self._session.get)(*args, **kwds) - def post(self, *args, **kwds): + def post(self, *args: Any, **kwds: Any) -> Any: """requests.post, with added support for FuzzManager authentication and retry on 5xx errors. @type expected: int @@ -189,7 +194,7 @@ def post(self, *args, **kwds): kwds.setdefault("headers", {}).update({"Authorization": "Token %s" % self.serverAuthToken}) return requests_retry(self._session.post)(*args, **kwds) - def patch(self, *args, **kwds): + def patch(self, *args: Any, **kwds: Any) -> Any: """requests.patch, with added support for FuzzManager authentication and retry on 5xx errors. @type expected: int diff --git a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py index 48bb39710..4e39a993d 100644 --- a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py +++ b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py @@ -24,7 +24,7 @@ from covmanager.SourceCodeProvider.SourceCodeProvider import Utils -@pytest.fixture +@pytest.fixture() # type: ignore[misc] def git_repo(tmp_path: Path): shutil.copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test-git"), str(tmp_path / "test-git")) @@ -32,7 +32,7 @@ def git_repo(tmp_path: Path): yield str(tmp_path / "test-git") -@pytest.fixture +@pytest.fixture() # type: ignore[misc] def hg_repo(tmp_path: Path): shutil.copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test-hg"), str(tmp_path / "test-hg")) @@ -96,7 +96,7 @@ def test_HGSourceCodeProvider(hg_repo: str) -> None: assert len(parents) == 0 -@pytest.mark.skipif(not os.path.isdir("/home/decoder/Mozilla/repos/mozilla-central-fm"), reason="not decoder") +@pytest.mark.skipif(not os.path.isdir("/home/decoder/Mozilla/repos/mozilla-central-fm"), reason="not decoder") # type: ignore[misc] def test_HGDiff() -> None: provider = HGSourceCodeProvider("/home/decoder/Mozilla/repos/mozilla-central-fm") diff = provider.getUnifiedDiff("4f8e0cb21016") diff --git a/server/crashmanager/management/commands/add_permission.py b/server/crashmanager/management/commands/add_permission.py index 6e697d8cc..671c898e1 100644 --- a/server/crashmanager/management/commands/add_permission.py +++ b/server/crashmanager/management/commands/add_permission.py @@ -1,5 +1,8 @@ from __future__ import annotations +from argparse import ArgumentParser +from typing import Any + from django.core.management import BaseCommand from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission @@ -11,7 +14,7 @@ class Command(BaseCommand): help = "Adds permissions to the specified user." @mgmt_lock_required - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: user = User.objects.get(username=options['user']) for perm in options['permission']: @@ -25,7 +28,7 @@ def handle(self, *args, **options): print('done') - def add_arguments(self, parser): + def add_arguments(self, parser: ArgumentParser) -> None: parser.add_argument('user') parser.add_argument('permission', nargs='+', choices=[ 'crashmanager.models.User:view_covmanager', diff --git a/server/crashmanager/management/commands/bug_update_status.py b/server/crashmanager/management/commands/bug_update_status.py index 17aa53621..715821928 100644 --- a/server/crashmanager/management/commands/bug_update_status.py +++ b/server/crashmanager/management/commands/bug_update_status.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Any + from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.core.management import BaseCommand, CommandError @@ -14,7 +16,7 @@ class Command(BaseCommand): help = "Check the status of all bugs we have" @mgmt_lock_required - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: if args: raise CommandError("Command doesn't accept any arguments") diff --git a/server/crashmanager/management/commands/cleanup_old_crashes.py b/server/crashmanager/management/commands/cleanup_old_crashes.py index 750e98c51..39a019b5e 100644 --- a/server/crashmanager/management/commands/cleanup_old_crashes.py +++ b/server/crashmanager/management/commands/cleanup_old_crashes.py @@ -1,6 +1,7 @@ from __future__ import annotations from datetime import timedelta +from typing import Any from django.conf import settings from django.core.management import BaseCommand, CommandError # noqa @@ -15,7 +16,7 @@ class Command(BaseCommand): help = "Cleanup old crash entries." @mgmt_lock_required - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: cleanup_crashes_after_days = getattr(settings, 'CLEANUP_CRASHES_AFTER_DAYS', 14) cleanup_fixed_buckets_after_days = getattr(settings, 'CLEANUP_FIXED_BUCKETS_AFTER_DAYS', 3) diff --git a/server/crashmanager/management/commands/export_signatures.py b/server/crashmanager/management/commands/export_signatures.py index 850eb755c..2ea9faf53 100644 --- a/server/crashmanager/management/commands/export_signatures.py +++ b/server/crashmanager/management/commands/export_signatures.py @@ -1,6 +1,7 @@ from __future__ import annotations import json +from typing import Any from zipfile import ZipFile from django.core.management.base import BaseCommand @@ -17,7 +18,7 @@ def add_arguments(self, parser): parser.add_argument("filename", help="output filename to write signatures zip to") @mgmt_lock_required - def handle(self, filename, **options): + def handle(self, filename: str, **options: Any) -> None: with ZipFile(filename, 'w') as zipFile: for bucket in Bucket.objects.annotate(size=Count('crashentry'), diff --git a/server/crashmanager/management/commands/notify_by_email.py b/server/crashmanager/management/commands/notify_by_email.py index a7415b171..842d27904 100644 --- a/server/crashmanager/management/commands/notify_by_email.py +++ b/server/crashmanager/management/commands/notify_by_email.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Any + from django.core.mail import send_mail from django.core.management import BaseCommand from django.template.loader import render_to_string @@ -13,7 +15,7 @@ class Command(BaseCommand): help = "Send notifications by email." @mgmt_lock_required - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: # Select all notifications that haven't been sent by email for now notifications = Notification.objects.filter(emailed=False) for notification in notifications: diff --git a/server/crashmanager/management/commands/triage_new_crash.py b/server/crashmanager/management/commands/triage_new_crash.py index ff325b845..bbc06250d 100644 --- a/server/crashmanager/management/commands/triage_new_crash.py +++ b/server/crashmanager/management/commands/triage_new_crash.py @@ -1,6 +1,8 @@ from __future__ import annotations +from argparse import ArgumentParser from collections import OrderedDict +from typing import Any from django.conf import settings from django.core.management import BaseCommand @@ -21,7 +23,7 @@ class Command(BaseCommand): help = ("Triage a crash entry into an existing bucket.") - def add_arguments(self, parser): + def add_arguments(self, parser: ArgumentParser) -> None: parser.add_argument( "id", type=int, @@ -29,7 +31,7 @@ def add_arguments(self, parser): ) @mgmt_lock_required - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: entry = CrashEntry.objects.get(pk=options["id"]) crashInfo = entry.getCrashInfo(attachTestcase=True) diff --git a/server/crashmanager/management/commands/triage_new_crashes.py b/server/crashmanager/management/commands/triage_new_crashes.py index 99cdd99bc..f6c6ea9f1 100644 --- a/server/crashmanager/management/commands/triage_new_crashes.py +++ b/server/crashmanager/management/commands/triage_new_crashes.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Any + from django.core.management import BaseCommand, call_command from crashmanager.management.common import mgmt_lock_required @@ -11,7 +13,7 @@ class Command(BaseCommand): "into the existing buckets.") @mgmt_lock_required - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: entries = CrashEntry.objects.filter(triagedOnce=False, bucket=None) for entry in entries: diff --git a/server/crashmanager/management/common.py b/server/crashmanager/management/common.py index e9b6dbe84..dd1d2abc9 100644 --- a/server/crashmanager/management/common.py +++ b/server/crashmanager/management/common.py @@ -5,14 +5,20 @@ from fasteners import InterProcessLock import os import sys +from types import TracebackType +from typing import Any +from typing import Callable +from typing import Literal +from typing import Type +from typing import TypeVar LOCK_PATH = os.path.realpath(os.path.join(settings.BASE_DIR, 'mgmt')) - +RetType = TypeVar("RetType") class ManagementLock(object): def __init__(self) -> None: - self.lock = None + self.lock: InterProcessLock = None def acquire(self) -> None: self.lock = InterProcessLock(LOCK_PATH) @@ -34,21 +40,26 @@ def release(self) -> None: if self.lock is not None: self.lock.release() - def __enter__(self): + def __enter__(self) -> ManagementLock: self.acquire() return self - def __exit__(self, _exc_type, _exc_val, _exc_tb): + def __exit__( + self, + _exc_type: Type[BaseException] | None, + _exc_val: BaseException | None, + _exc_tb: TracebackType | None, + ) -> Literal[False]: self.release() return False -def mgmt_lock_required(method): +def mgmt_lock_required(method: Callable[..., RetType]) -> Callable[..., RetType]: """ Decorator to use on management methods that shouldn't run in parallel """ @functools.wraps(method) - def decorator(*args, **options): + def decorator(*args: Any, **options: Any) -> RetType: with ManagementLock(): return method(*args, **options) return decorator diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index b01a8c33f..53db8771f 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -20,6 +20,8 @@ import ssl import traceback from abc import ABCMeta, abstractmethod +from typing import Any +# from typing import TypeVar import six @@ -29,6 +31,7 @@ # List of currently supported providers. This and what is returned by get_name() must match PROVIDERS = ['EC2Spot', 'GCE'] +RetType = TypeVar("RetType") class CloudProviderError(Exception): @@ -49,9 +52,9 @@ class CloudProviderInstanceCountError(CloudProviderError): TYPE = 'max-spot-instance-count-exceeded' -def wrap_provider_errors(wrapped): +def wrap_provider_errors(wrapped: Callable[..., RetType]) -> Callable[..., RetType]: @functools.wraps(wrapped) - def wrapper(*args, **kwds): + def wrapper(*args: Any, **kwds: Any) -> RetType: try: return wrapped(*args, **kwds) except (ssl.SSLError, socket.error) as exc: diff --git a/server/ec2spotmanager/tests/test_tasks.py b/server/ec2spotmanager/tests/test_tasks.py index 179b2963a..6b8ee3a59 100644 --- a/server/ec2spotmanager/tests/test_tasks.py +++ b/server/ec2spotmanager/tests/test_tasks.py @@ -31,7 +31,7 @@ pytestmark = pytest.mark.usefixtures('ec2spotmanager_test', 'raise_on_status') # pylint: disable=invalid-name -@pytest.mark.usefixtures('mock_provider') +@pytest.mark.usefixtures('mock_provider') # type: ignore[misc] def test_nothing_to_do() -> None: """nothing is done if no pools are enabled""" diff --git a/server/taskmanager/management/commands/taskmanager_change_poolid.py b/server/taskmanager/management/commands/taskmanager_change_poolid.py index 5b37c27ed..954f8efcf 100644 --- a/server/taskmanager/management/commands/taskmanager_change_poolid.py +++ b/server/taskmanager/management/commands/taskmanager_change_poolid.py @@ -2,7 +2,9 @@ from __future__ import annotations +from argparse import ArgumentParser from logging import getLogger +from typing import Any from django.core.management import BaseCommand # noqa @@ -15,7 +17,7 @@ class Command(BaseCommand): help = "Change a Taskmanager pool ID" - def add_arguments(self, parser): + def add_arguments(self, parser: ArgumentParser) -> None: parser.add_argument( "old", type=int, @@ -27,7 +29,7 @@ def add_arguments(self, parser): help="Original pool ID", ) - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: old = options["old"] new = options["new"] diff --git a/server/taskmanager/management/commands/taskmanager_list_pools.py b/server/taskmanager/management/commands/taskmanager_list_pools.py index 11e41a0b5..dd2025687 100644 --- a/server/taskmanager/management/commands/taskmanager_list_pools.py +++ b/server/taskmanager/management/commands/taskmanager_list_pools.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import Any + from django.core.management import BaseCommand # noqa from ...models import Pool @@ -10,7 +12,7 @@ class Command(BaseCommand): help = "List Taskmanager pools" - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: for pool in Pool.objects.all(): if pool.pool_id != f"pool{pool.id}": print(f"!=: {pool.id} ({pool.pool_id})") diff --git a/server/taskmanager/management/commands/taskmanager_pulse_listen.py b/server/taskmanager/management/commands/taskmanager_pulse_listen.py index 2d7df6b8b..c744b4fed 100644 --- a/server/taskmanager/management/commands/taskmanager_pulse_listen.py +++ b/server/taskmanager/management/commands/taskmanager_pulse_listen.py @@ -4,6 +4,7 @@ from logging import getLogger from pathlib import Path +from typing import Any from django.conf import settings from django.core.management import BaseCommand, CommandError # noqa @@ -17,7 +18,7 @@ class TaskClusterConsumer(GenericConsumer): - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: repo_slug = Path(settings.TC_FUZZING_CFG_REPO.split(":", 1)[1]) org = repo_slug.parent repo = repo_slug.stem @@ -46,7 +47,7 @@ class Command(BaseCommand): help = ("Listens for Mozilla Pulse messages relating to TaskManager tasks, " "and schedule celery tasks to handle them") - def callback(self, body, msg): + def callback(self, body, msg) -> None: if msg.delivery_info["exchange"].startswith("exchange/taskcluster-queue/v1/task-"): LOG.info( "%s on %s for %s", @@ -56,7 +57,7 @@ def callback(self, body, msg): ) update_task.delay(body) msg.ack() - return + return None if msg.delivery_info["exchange"] == "exchange/taskcluster-github/v1/push": LOG.info( "%s on %s for %s", @@ -67,7 +68,7 @@ def callback(self, body, msg): if body["body"]["ref"] == "refs/heads/master": update_pool_defns.delay() msg.ack() - return + return None raise RuntimeError( "Unhandled message: %s on %s" % ( msg.delivery_info["routing_key"], @@ -75,7 +76,7 @@ def callback(self, body, msg): ) ) - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: LOG.info("pulse listener starting") try: TaskClusterConsumer( diff --git a/server/taskmanager/management/commands/taskmanager_scrape_task_group.py b/server/taskmanager/management/commands/taskmanager_scrape_task_group.py index 51078b548..2a5b1e3e3 100644 --- a/server/taskmanager/management/commands/taskmanager_scrape_task_group.py +++ b/server/taskmanager/management/commands/taskmanager_scrape_task_group.py @@ -2,8 +2,10 @@ from __future__ import annotations +from argparse import ArgumentParser import functools from logging import getLogger +from typing import Any from django.conf import settings from django.core.management import BaseCommand # noqa @@ -43,7 +45,7 @@ def _wrapped(*args, **kwds): class Command(BaseCommand): help = "Scrape a task group and add created tasks to taskmanager" - def add_arguments(self, parser): + def add_arguments(self, parser: ArgumentParser) -> None: parser.add_argument( "task_group", help="Taskcluster task group to add tasks for", @@ -55,7 +57,7 @@ def add_arguments(self, parser): "(ie. include task with taskId == taskGroupId)", ) - def handle(self, *args, **options): + def handle(self, *args: Any, **options: Any) -> None: queue_svc = taskcluster.Queue({"rootUrl": settings.TC_ROOT_URL}) task_group_id = options["task_group"] @@ -72,7 +74,7 @@ def handle(self, *args, **options): task["status"]["taskId"], task["status"]["workerType"], ) - return + return None for run in task["status"]["runs"]: _, created = Task.objects.update_or_create( From ba3b24edeadd9607722958cfaf67b10e0e6bec42 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 2 Dec 2021 05:02:38 -0800 Subject: [PATCH 029/137] 2073 mypy issues left --- Collector/Collector.py | 2 +- CovReporter/CovReporter.py | 2 +- EC2Reporter/EC2Reporter.py | 2 +- TaskStatusReporter/TaskStatusReporter.py | 2 +- misc/afl_libfuzzer/afl-libfuzzer-daemon.py | 2 +- misc/libfuzzer/libfuzzer.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index 308ed2bb4..f8d613416 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -334,7 +334,7 @@ def read_testcase(testCase: str) -> tuple[str, bool]: return (testCaseData, isBinary) -def main(args=None) -> int: +def main(args: list[str] | None = None)-> int: '''Command line options.''' # setup argparser diff --git a/CovReporter/CovReporter.py b/CovReporter/CovReporter.py index e4accaddc..1f4d483fe 100755 --- a/CovReporter/CovReporter.py +++ b/CovReporter/CovReporter.py @@ -256,7 +256,7 @@ def create_combined_coverage(coverage_files, version=None): return (ret, version, stats) -def main(argv=None): +def main(argv: list[str] | None = None)-> int: '''Command line options.''' # setup argparser diff --git a/EC2Reporter/EC2Reporter.py b/EC2Reporter/EC2Reporter.py index 7dadf00ba..dc427e28c 100755 --- a/EC2Reporter/EC2Reporter.py +++ b/EC2Reporter/EC2Reporter.py @@ -102,7 +102,7 @@ def enable(self, poolid): self.post(url, {}, expected=requests.codes["ok"]) -def main(argv=None): +def main(argv: list[str] | None = None)-> int: '''Command line options.''' # setup argparser diff --git a/TaskStatusReporter/TaskStatusReporter.py b/TaskStatusReporter/TaskStatusReporter.py index 7838087af..9dc998da0 100755 --- a/TaskStatusReporter/TaskStatusReporter.py +++ b/TaskStatusReporter/TaskStatusReporter.py @@ -66,7 +66,7 @@ def report(self, text): self.post(url, data, expected=requests.codes["ok"]) -def main(argv=None): +def main(argv: list[str] | None = None)-> int: '''Command line options.''' # setup argparser diff --git a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py index dcae0b020..113827d3f 100755 --- a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py +++ b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py @@ -665,7 +665,7 @@ def apply_transform(script_path, testcase_path): return archive_path -def main(argv=None): +def main(argv: list[str] | None = None)-> int: '''Command line options.''' program_name = os.path.basename(sys.argv[0]) diff --git a/misc/libfuzzer/libfuzzer.py b/misc/libfuzzer/libfuzzer.py index 24514a401..d4dda8c67 100755 --- a/misc/libfuzzer/libfuzzer.py +++ b/misc/libfuzzer/libfuzzer.py @@ -77,7 +77,7 @@ def getTestcase(self): __updated__ = '2016-07-28' -def main(argv=None): +def main(argv: list[str] | None = None)-> int: '''Command line options.''' program_name = os.path.basename(sys.argv[0]) From 2f6a0a94e9a29231340d954b78446312ba33dc0c Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 2 Dec 2021 12:40:44 -0800 Subject: [PATCH 030/137] 1897 mypy issues left --- FTB/Signatures/tests/test_CrashSignature.py | 16 ++ server/covmanager/models.py | 37 ++--- server/crashmanager/models.py | 164 ++++++++++---------- server/crashmanager/views.py | 3 +- server/ec2spotmanager/models.py | 98 ++++++------ server/taskmanager/models.py | 24 +-- 6 files changed, 184 insertions(+), 158 deletions(-) diff --git a/FTB/Signatures/tests/test_CrashSignature.py b/FTB/Signatures/tests/test_CrashSignature.py index 0fba1bc5c..2f15861c9 100644 --- a/FTB/Signatures/tests/test_CrashSignature.py +++ b/FTB/Signatures/tests/test_CrashSignature.py @@ -468,6 +468,9 @@ def test_SignatureCreateTest() -> None: crashSig1 = crashInfo.createCrashSignature(forceCrashAddress=True, maxFrames=4, minimumSupportedVersion=10) crashSig2 = crashInfo.createCrashSignature(forceCrashAddress=False, maxFrames=3, minimumSupportedVersion=10) crashSig3 = crashInfo.createCrashSignature(forceCrashInstruction=True, maxFrames=2, minimumSupportedVersion=10) + assert isinstance(crashSig1, CrashSignature) + assert isinstance(crashSig2, CrashSignature) + assert isinstance(crashSig3, CrashSignature) # Check that all generated signatures match their originating crashInfo assert crashSig1.matches(crashInfo) @@ -573,6 +576,7 @@ def test_SignatureStackFramesWildcardTailTest() -> None: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTrace2.splitlines()) testSig = crashInfo.createCrashSignature() + assert isinstance(testSig, CrashSignature) # Ensure that the last frame with a symbol is at the right place and there is nothing else, # espcially no wildcard, following afterwards. @@ -602,6 +606,8 @@ def test_SignatureStackFramesAuxMessagesTest() -> None: crashSignaturePos = crashInfoPos.createCrashSignature() crashSignatureNeg = crashInfoNeg.createCrashSignature() + assert isinstance(crashSignaturePos, CrashSignature) + assert isinstance(crashSignatureNeg, CrashSignature) # Check that the first crash signature has ASan symptoms but # the second does not because it has a program abort message @@ -622,6 +628,7 @@ def test_SignatureStackFramesNegativeSizeParamTest() -> None: crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTraceNegativeSizeParam.splitlines()) testSig = crashInfoPos.createCrashSignature() + assert isinstance(testSig, CrashSignature) assert "/ERROR: AddressSanitizer" in str(testSig) assert "negative-size-param" in str(testSig) @@ -633,6 +640,7 @@ def test_SignatureAsanStackOverflowTest() -> None: crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanStackOverflow.splitlines()) testSig = crashInfoPos.createCrashSignature() + assert isinstance(testSig, CrashSignature) # Check matches appropriately assert testSig.matches(crashInfoPos) @@ -643,6 +651,7 @@ def test_SignatureAsanAccessViolationTest() -> None: crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanAccessViolation.splitlines()) testSig = crashInfoPos.createCrashSignature() + assert isinstance(testSig, CrashSignature) assert "/ERROR: AddressSanitizer" not in str(testSig) assert "access-violation" not in str(testSig) @@ -664,6 +673,7 @@ def test_SignatureAsanFailedAllocTest() -> None: crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanFailedAlloc.splitlines()) testSig = crashInfoPos.createCrashSignature() + assert isinstance(testSig, CrashSignature) assert "/AddressSanitizer failed to allocate" in str(testSig) assert testSig.matches(crashInfoPos) assert isinstance(testSig.symptoms[1], StackFramesSymptom) @@ -674,6 +684,7 @@ def test_SignatureGenerationTSanLeakTest() -> None: with open(os.path.join(CWD, 'resources', 'tsan-simple-leak-report.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) testSignature = crashInfo.createCrashSignature() + assert isinstance(testSignature, CrashSignature) assert testSignature.matches(crashInfo) @@ -691,6 +702,7 @@ def test_SignatureGenerationTSanRaceTest() -> None: with open(os.path.join(CWD, 'resources', 'tsan-simple-race-report.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) testSignature = crashInfo.createCrashSignature() + assert isinstance(testSignature, CrashSignature) print(testSignature) @@ -722,6 +734,7 @@ def test_SignatureGenerationTSanRaceTestComplex1() -> None: with open(os.path.join(CWD, 'resources', 'tsan-report2.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) testSignature = crashInfo.createCrashSignature() + assert isinstance(testSignature, CrashSignature) print(testSignature) @@ -759,6 +772,7 @@ def test_SignatureGenerationTSanRaceTestAtomic() -> None: "ThreadSanitizer: data race [@ pthread_mutex_destroy] vs. [@ pthread_mutex_unlock]") testSignature = crashInfo.createCrashSignature() + assert isinstance(testSignature, CrashSignature) assert testSignature.matches(crashInfo) @@ -809,6 +823,7 @@ def test_SignatureMatchAssertionSlashes() -> None: # test that signature generated from linux assertion matches both linux_sig = fs_linux.createCrashSignature() + assert isinstance(linux_sig, CrashSignature) assert linux_sig.matches(fs_linux) assert not linux_sig.matches(bs_linux) # this is invalid and should not match assert linux_sig.matches(fs_windows) @@ -816,6 +831,7 @@ def test_SignatureMatchAssertionSlashes() -> None: # test that signature generated from windows assertion matches both windows_sig = bs_windows.createCrashSignature() + assert isinstance(windows_sig, CrashSignature) assert windows_sig.matches(fs_linux) assert not windows_sig.matches(bs_linux) # this is invalid and should not match assert windows_sig.matches(fs_windows) diff --git a/server/covmanager/models.py b/server/covmanager/models.py index a9d1d37d0..55b26d44f 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -9,6 +9,7 @@ from django.utils import timezone import codecs import json +from typing import cast from crashmanager.models import Client, Tool from FTB import CoverageHelper @@ -18,9 +19,9 @@ class Repository(models.Model): - classname = models.CharField(max_length=255, blank=False) - name = models.CharField(max_length=255, blank=False) - location = models.CharField(max_length=1023, blank=False) + classname = str(models.CharField(max_length=255, blank=False)) + name = str(models.CharField(max_length=255, blank=False)) + location = str(models.CharField(max_length=1023, blank=False)) def getInstance(self): # Dynamically instantiate the provider as requested @@ -33,18 +34,18 @@ class CollectionFile(models.Model): file = models.FileField(storage=FileSystemStorage(location=getattr(settings, 'COV_STORAGE', None)), max_length=255, upload_to="coverage") - format = models.IntegerField(default=0) + format = int(str(models.IntegerField(default=0))) class Collection(models.Model): created = models.DateTimeField(default=timezone.now) - description = models.CharField(max_length=1023, blank=True) - repository = models.ForeignKey(Repository, on_delete=models.deletion.CASCADE) - revision = models.CharField(max_length=255, blank=False) - branch = models.CharField(max_length=255, blank=True) + description = str(models.CharField(max_length=1023, blank=True)) + repository = cast(Repository, models.ForeignKey(Repository, on_delete=models.deletion.CASCADE)) + revision = str(models.CharField(max_length=255, blank=False)) + branch = str(models.CharField(max_length=255, blank=True)) tools = models.ManyToManyField(Tool) - client = models.ForeignKey(Client, on_delete=models.deletion.CASCADE) - coverage = models.ForeignKey(CollectionFile, blank=True, null=True, on_delete=models.deletion.CASCADE) + client = cast(Client, models.ForeignKey(Client, on_delete=models.deletion.CASCADE)) + coverage = cast(CollectionFile, models.ForeignKey(CollectionFile, blank=True, null=True, on_delete=models.deletion.CASCADE)) def __init__(self, *args, **kwargs): # This variable can hold the deserialized contents of the coverage blob @@ -191,10 +192,10 @@ def Collection_save(sender, instance, **kwargs): class ReportConfiguration(models.Model): - description = models.CharField(max_length=1023, blank=True) - repository = models.ForeignKey(Repository, on_delete=models.deletion.CASCADE) - directives = models.TextField() - public = models.BooleanField(blank=False, default=False) + description = str(models.CharField(max_length=1023, blank=True)) + repository = cast(Repository, models.ForeignKey(Repository, on_delete=models.deletion.CASCADE)) + directives = str(models.TextField()) + public = bool(models.BooleanField(blank=False, default=False)) logical_parent = models.ForeignKey("self", blank=True, null=True, on_delete=models.deletion.CASCADE) def apply(self, collection): @@ -204,7 +205,7 @@ def apply(self, collection): class ReportSummary(models.Model): collection = models.OneToOneField(Collection, on_delete=models.deletion.CASCADE) - cached_result = models.TextField(null=True, blank=True) + cached_result = str(models.TextField(null=True, blank=True)) class Report(models.Model): @@ -214,8 +215,8 @@ class Report(models.Model): # creation dates. This date will be used as a reference time frame to # determine week, month, quarter, etc. for displaying purposes. data_created = models.DateTimeField(default=timezone.now) - public = models.BooleanField(blank=False, default=False) + public = bool(models.BooleanField(blank=False, default=False)) coverage = models.ForeignKey(Collection, blank=False, null=False, on_delete=models.deletion.CASCADE) - is_monthly = models.BooleanField(blank=False, default=False) - is_quarterly = models.BooleanField(blank=False, default=False) + is_monthly = bool(models.BooleanField(blank=False, default=False)) + is_quarterly = bool(models.BooleanField(blank=False, default=False)) diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index f997d1141..7afbb49ac 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -3,8 +3,12 @@ import json import logging import re +from typing import Any +from typing import cast from django.conf import settings +from django.contrib.auth.base_user import AbstractBaseUser +from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User as DjangoUser, Permission from django.contrib.contenttypes.models import ContentType from django.core.files.storage import FileSystemStorage @@ -25,34 +29,34 @@ class Tool(models.Model): - name = models.CharField(max_length=63) + name = str(models.CharField(max_length=63)) - def __str__(self): + def __str__(self) -> str: return self.name class Platform(models.Model): - name = models.CharField(max_length=63) + name = str(models.CharField(max_length=63)) class Product(models.Model): - name = models.CharField(max_length=63) - version = models.CharField(max_length=127, blank=True, null=True) + name = str(models.CharField(max_length=63)) + version = str(models.CharField(max_length=127, blank=True, null=True)) class OS(models.Model): - name = models.CharField(max_length=63) - version = models.CharField(max_length=127, blank=True, null=True) + name = str(models.CharField(max_length=63)) + version = str(models.CharField(max_length=127, blank=True, null=True)) class TestCase(models.Model): test = models.FileField(storage=FileSystemStorage(location=getattr(settings, 'TEST_STORAGE', None)), upload_to="tests") - size = models.IntegerField(default=0) - quality = models.IntegerField(default=0) - isBinary = models.BooleanField(default=False) + size = int(str(models.IntegerField(default=0))) + quality = int(str(models.IntegerField(default=0))) + isBinary = bool(models.BooleanField(default=False)) - def __init__(self, *args, **kwargs): + def __init__(self, *args: Any, **kwargs: Any) -> None: # This variable can hold the testcase data temporarily self.content = None @@ -76,15 +80,15 @@ def storeTestAndSave(self) -> None: class Client(models.Model): - name = models.CharField(max_length=255) + name = str(models.CharField(max_length=255)) class BugProvider(models.Model): - classname = models.CharField(max_length=255, blank=False) - hostname = models.CharField(max_length=255, blank=False) + classname = str(models.CharField(max_length=255, blank=False)) + hostname = str(models.CharField(max_length=255, blank=False)) # This is used to annotate bugs with the URL linking to them - urlTemplate = models.CharField(max_length=1023, blank=False) + urlTemplate = str(models.CharField(max_length=1023, blank=False)) def getInstance(self): # Dynamically instantiate the provider as requested @@ -97,8 +101,8 @@ def __str__(self): class Bug(models.Model): - externalId = models.CharField(max_length=255, blank=True) - externalType = models.ForeignKey(BugProvider, on_delete=models.deletion.CASCADE) + externalId = str(models.CharField(max_length=255, blank=True)) + externalType = cast(BugProvider, models.ForeignKey(BugProvider, on_delete=models.deletion.CASCADE)) closed = models.DateTimeField(blank=True, null=True) @property @@ -111,12 +115,12 @@ def tools_filter_users(self): class Bucket(models.Model): - bug = models.ForeignKey(Bug, blank=True, null=True, on_delete=models.deletion.CASCADE) - signature = models.TextField() - optimizedSignature = models.TextField(blank=True, null=True) - shortDescription = models.CharField(max_length=1023, blank=True) - frequent = models.BooleanField(blank=False, default=False) - permanent = models.BooleanField(blank=False, default=False) + bug = cast(Bug, models.ForeignKey(Bug, blank=True, null=True, on_delete=models.deletion.CASCADE)) + signature = str(models.TextField()) + optimizedSignature = str(models.TextField(blank=True, null=True)) + shortDescription = str(models.CharField(max_length=1023, blank=True)) + frequent = bool(models.BooleanField(blank=False, default=False)) + permanent = bool(models.BooleanField(blank=False, default=False)) @property def watchers(self): @@ -126,13 +130,13 @@ def watchers(self): ).values_list('user_id', flat=True) return DjangoUser.objects.filter(id__in=ids).distinct() - def getSignature(self): + def getSignature(self) -> CrashSignature: return CrashSignature(self.signature) - def getOptimizedSignature(self): + def getOptimizedSignature(self) -> CrashSignature: return CrashSignature(self.optimizedSignature) - def save(self, *args, **kwargs): + def save(self, *args: Any, **kwargs: Any) -> None: # Sanitize signature line endings so we end up with the same hash # TODO: We might want to just parse the JSON here, and re-serialize # it to a canonical string representation. @@ -300,10 +304,10 @@ def buckethit_default_range_begin(): class BucketHit(models.Model): - bucket = models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE) - tool = models.ForeignKey(Tool, on_delete=models.deletion.CASCADE) + bucket = cast(Bucket, models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE)) + tool = cast(Tool, models.ForeignKey(Tool, on_delete=models.deletion.CASCADE)) begin = models.DateTimeField(default=buckethit_default_range_begin) - count = models.IntegerField(default=0) + count = int(str(models.IntegerField(default=0))) @classmethod def decrement_count(cls, bucket_id, tool_id, begin): @@ -329,24 +333,24 @@ def increment_count(cls, bucket_id, tool_id, begin): class CrashEntry(models.Model): created = models.DateTimeField(default=timezone.now) - tool = models.ForeignKey(Tool, on_delete=models.deletion.CASCADE) - platform = models.ForeignKey(Platform, on_delete=models.deletion.CASCADE) - product = models.ForeignKey(Product, on_delete=models.deletion.CASCADE) - os = models.ForeignKey(OS, on_delete=models.deletion.CASCADE) - testcase = models.ForeignKey(TestCase, blank=True, null=True, on_delete=models.deletion.CASCADE) - client = models.ForeignKey(Client, on_delete=models.deletion.CASCADE) - bucket = models.ForeignKey(Bucket, blank=True, null=True, on_delete=models.deletion.CASCADE) - rawStdout = models.TextField(blank=True) - rawStderr = models.TextField(blank=True) - rawCrashData = models.TextField(blank=True) - metadata = models.TextField(blank=True) - env = models.TextField(blank=True) - args = models.TextField(blank=True) - crashAddress = models.CharField(max_length=255, blank=True) + tool = cast(Tool, models.ForeignKey(Tool, on_delete=models.deletion.CASCADE)) + platform = cast(Platform, models.ForeignKey(Platform, on_delete=models.deletion.CASCADE)) + product = cast(Product, models.ForeignKey(Product, on_delete=models.deletion.CASCADE)) + os = cast(OS, models.ForeignKey(OS, on_delete=models.deletion.CASCADE)) + testcase = cast(TestCase, models.ForeignKey(TestCase, blank=True, null=True, on_delete=models.deletion.CASCADE)) + client = cast(Client, models.ForeignKey(Client, on_delete=models.deletion.CASCADE)) + bucket = cast(Bucket, models.ForeignKey(Bucket, blank=True, null=True, on_delete=models.deletion.CASCADE)) + rawStdout = str(models.TextField(blank=True)) + rawStderr = str(models.TextField(blank=True)) + rawCrashData = str(models.TextField(blank=True)) + metadata = str(models.TextField(blank=True)) + env = str(models.TextField(blank=True)) + args = str(models.TextField(blank=True)) + crashAddress = str(models.CharField(max_length=255, blank=True)) crashAddressNumeric = models.BigIntegerField(blank=True, null=True) - shortSignature = models.CharField(max_length=255, blank=True) - cachedCrashInfo = models.TextField(blank=True, null=True) - triagedOnce = models.BooleanField(blank=False, default=False) + shortSignature = str(models.CharField(max_length=255, blank=True)) + cachedCrashInfo = str(models.TextField(blank=True, null=True)) + triagedOnce = bool(models.BooleanField(blank=False, default=False)) def __init__(self, *args, **kwargs): # These variables can hold temporarily deserialized data @@ -427,7 +431,7 @@ def deserializeFields(self) -> None: metadataDict = json.loads(self.metadata) self.metadataList = ["%s=%s" % (s, metadataDict[s]) for s in metadataDict.keys()] - def getCrashInfo(self, attachTestcase=False, requiredOutputSources=("stdout", "stderr", "crashdata")): + def getCrashInfo(self, attachTestcase: bool = False, requiredOutputSources: tuple[str, str, str] = ("stdout", "stderr", "crashdata")) -> CrashInfo: # TODO: This should be cached at some level # TODO: Need to include environment and program arguments here configuration = ProgramConfiguration(self.product.name, self.platform.name, self.os.name, self.product.version) @@ -548,30 +552,30 @@ class BugzillaTemplateMode(Enum): class BugzillaTemplate(models.Model): mode = EnumField(BugzillaTemplateMode, max_length=30) - name = models.TextField() - product = models.TextField() - component = models.TextField() - summary = models.TextField(blank=True) - version = models.TextField() - description = models.TextField(blank=True) - whiteboard = models.TextField(blank=True) - keywords = models.TextField(blank=True) - op_sys = models.TextField(blank=True) - platform = models.TextField(blank=True) - priority = models.TextField(blank=True) - severity = models.TextField(blank=True) - alias = models.TextField(blank=True) - cc = models.TextField(blank=True) - assigned_to = models.TextField(blank=True) - qa_contact = models.TextField(blank=True) - target_milestone = models.TextField(blank=True) - attrs = models.TextField(blank=True) - security = models.BooleanField(blank=False, default=False) - security_group = models.TextField(blank=True) - comment = models.TextField(blank=True) - testcase_filename = models.TextField(blank=True) - blocks = models.TextField(blank=True) - dependson = models.TextField(blank=True) + name = str(models.TextField()) + product = str(models.TextField()) + component = str(models.TextField()) + summary = str(models.TextField(blank=True)) + version = str(models.TextField()) + description = str(models.TextField(blank=True)) + whiteboard = str(models.TextField(blank=True)) + keywords = str(models.TextField(blank=True)) + op_sys = str(models.TextField(blank=True)) + platform = str(models.TextField(blank=True)) + priority = str(models.TextField(blank=True)) + severity = str(models.TextField(blank=True)) + alias = str(models.TextField(blank=True)) + cc = str(models.TextField(blank=True)) + assigned_to = str(models.TextField(blank=True)) + qa_contact = str(models.TextField(blank=True)) + target_milestone = str(models.TextField(blank=True)) + attrs = str(models.TextField(blank=True)) + security = bool(models.BooleanField(blank=False, default=False)) + security_group = str(models.TextField(blank=True)) + comment = str(models.TextField(blank=True)) + testcase_filename = str(models.TextField(blank=True)) + blocks = str(models.TextField(blank=True)) + dependson = str(models.TextField(blank=True)) def __str__(self): return self.name @@ -589,18 +593,18 @@ class Meta: user = models.OneToOneField(DjangoUser, on_delete=models.deletion.CASCADE) # Explicitly do not store this as a ForeignKey to e.g. BugzillaTemplate # because the bug provider has to decide how to interpret this ID. - defaultTemplateId = models.IntegerField(default=0) - defaultProviderId = models.IntegerField(default=1) + defaultTemplateId = int(str(models.IntegerField(default=0))) + defaultProviderId = int(str(models.IntegerField(default=1))) defaultToolsFilter = models.ManyToManyField(Tool) - restricted = models.BooleanField(blank=False, default=False) + restricted = bool(models.BooleanField(blank=False, default=False)) bucketsWatching = models.ManyToManyField(Bucket, through='BucketWatch') # Notifications - inaccessible_bug = models.BooleanField(blank=False, default=False) - bucket_hit = models.BooleanField(blank=False, default=False) + inaccessible_bug = bool(models.BooleanField(blank=False, default=False)) + bucket_hit = bool(models.BooleanField(blank=False, default=False)) @staticmethod - def get_or_create_restricted(request_user): + def get_or_create_restricted(request_user: AbstractBaseUser | AnonymousUser) -> tuple[DjangoUser, bool]: (user, created) = User.objects.get_or_create(user=request_user) if created and getattr(settings, 'USERS_RESTRICTED_BY_DEFAULT', False): user.restricted = True @@ -623,9 +627,9 @@ def add_default_perms(sender, instance, created, **kwargs): class BucketWatch(models.Model): - user = models.ForeignKey(User, on_delete=models.deletion.CASCADE) - bucket = models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE) + user = cast(User, models.ForeignKey(User, on_delete=models.deletion.CASCADE)) + bucket = cast(Bucket, models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE)) # This is the primary key of last crash marked viewed by the user # Store as an integer to prevent problems if the particular crash # is deleted later. We only care about its place in the ordering. - lastCrash = models.IntegerField(default=0) + lastCrash = int(str(models.IntegerField(default=0))) diff --git a/server/crashmanager/views.py b/server/crashmanager/views.py index a26c33dbc..989c18f57 100644 --- a/server/crashmanager/views.py +++ b/server/crashmanager/views.py @@ -6,6 +6,7 @@ from django.db.models import F, Q from django.db.models.aggregates import Count, Min from django.http import Http404, HttpResponse +from django.http.request import HttpRequest from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse, reverse_lazy from django.utils import timezone @@ -73,7 +74,7 @@ def check_authorized_for_signature(request, signature): return -def deny_restricted_users(request): +def deny_restricted_users(request: HttpRequest) -> None: user = User.get_or_create_restricted(request.user)[0] if user.restricted: raise PermissionDenied({"message": "Restricted users cannot use this feature."}) diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index 66649d48a..4bdb8962c 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -2,6 +2,8 @@ import json import os +from typing import cast + from django.conf import settings from django.core.files.base import ContentFile from django.core.files.storage import FileSystemStorage @@ -33,33 +35,33 @@ def get_available_name(self, name, max_length=None): class PoolConfiguration(models.Model): parent = models.ForeignKey('self', blank=True, null=True, on_delete=models.deletion.CASCADE) - name = models.CharField(max_length=255, blank=False) - size = models.IntegerField(default=1, blank=True, null=True) - cycle_interval = models.IntegerField(default=86400, blank=True, null=True) + name = str(models.CharField(max_length=255, blank=False)) + size = int(str(models.IntegerField(default=1, blank=True, null=True))) + cycle_interval = int(str(models.IntegerField(default=86400, blank=True, null=True))) max_price = models.DecimalField(max_digits=12, decimal_places=6, blank=True, null=True) - instance_tags = models.CharField(max_length=1023, blank=True, null=True) - ec2_key_name = models.CharField(max_length=255, blank=True, null=True) - ec2_security_groups = models.CharField(max_length=255, blank=True, null=True) - ec2_instance_types = models.TextField(blank=True, null=True) - ec2_image_name = models.CharField(max_length=255, blank=True, null=True) + instance_tags = str(models.CharField(max_length=1023, blank=True, null=True)) + ec2_key_name = str(models.CharField(max_length=255, blank=True, null=True)) + ec2_security_groups = str(models.CharField(max_length=255, blank=True, null=True)) + ec2_instance_types = str(models.TextField(blank=True, null=True)) + ec2_image_name = str(models.CharField(max_length=255, blank=True, null=True)) ec2_userdata_file = \ models.FileField(storage=OverwritingStorage(location=getattr(settings, 'USERDATA_STORAGE', None)), upload_to=get_storage_path, blank=True, null=True) - ec2_userdata_macros = models.TextField(blank=True, null=True) - ec2_allowed_regions = models.CharField(max_length=1023, blank=True, null=True) - ec2_raw_config = models.TextField(blank=True, null=True) - gce_machine_types = models.TextField(blank=True, null=True) - gce_image_name = models.CharField(max_length=255, blank=True, null=True) - gce_container_name = models.CharField(max_length=512, blank=True, null=True) - gce_docker_privileged = models.BooleanField(default=False) - gce_disk_size = models.IntegerField(blank=True, null=True) - gce_cmd = models.TextField(blank=True, null=True) - gce_args = models.TextField(blank=True, null=True) - gce_env = models.TextField(blank=True, null=True) + ec2_userdata_macros = str(models.TextField(blank=True, null=True)) + ec2_allowed_regions = str(models.CharField(max_length=1023, blank=True, null=True)) + ec2_raw_config = str(models.TextField(blank=True, null=True)) + gce_machine_types = str(models.TextField(blank=True, null=True)) + gce_image_name = str(models.CharField(max_length=255, blank=True, null=True)) + gce_container_name = str(models.CharField(max_length=512, blank=True, null=True)) + gce_docker_privileged = bool(models.BooleanField(default=False)) + gce_disk_size = int(str(models.IntegerField(blank=True, null=True))) + gce_cmd = str(models.TextField(blank=True, null=True)) + gce_args = str(models.TextField(blank=True, null=True)) + gce_env = str(models.TextField(blank=True, null=True)) # this is a special case that allows copying ec2_userdata_macros into gce_env during flatten() # we typically use userdata_macros to be the env vars provided to the userdata script - gce_env_include_macros = models.BooleanField(default=False) - gce_raw_config = models.TextField(blank=True, null=True) + gce_env_include_macros = bool(models.BooleanField(default=False)) + gce_raw_config = str(models.TextField(blank=True, null=True)) def __init__(self, *args, **kwargs): # These variables can hold temporarily deserialized data @@ -337,56 +339,56 @@ def deletePoolConfigurationFiles(sender, instance, **kwargs): class InstancePool(models.Model): - config = models.ForeignKey(PoolConfiguration, on_delete=models.deletion.CASCADE) - isEnabled = models.BooleanField(default=False) + config = cast(PoolConfiguration, models.ForeignKey(PoolConfiguration, on_delete=models.deletion.CASCADE)) + isEnabled = bool(models.BooleanField(default=False)) last_cycled = models.DateTimeField(blank=True, null=True) class Instance(models.Model): created = models.DateTimeField(default=timezone.now) - pool = models.ForeignKey(InstancePool, blank=True, null=True, on_delete=models.deletion.CASCADE) - hostname = models.CharField(max_length=255, blank=True, null=True) - status_code = models.IntegerField() - status_data = models.TextField(blank=True, null=True) - instance_id = models.CharField(max_length=255, blank=True, null=True) - region = models.CharField(max_length=255) - zone = models.CharField(max_length=255) - size = models.IntegerField(default=1) - provider = models.CharField(max_length=255) + pool = cast(InstancePool, models.ForeignKey(InstancePool, blank=True, null=True, on_delete=models.deletion.CASCADE)) + hostname = str(models.CharField(max_length=255, blank=True, null=True)) + status_code = int(str(models.IntegerField())) + status_data = str(models.TextField(blank=True, null=True)) + instance_id = str(models.CharField(max_length=255, blank=True, null=True)) + region = str(models.CharField(max_length=255)) + zone = str(models.CharField(max_length=255)) + size = int(str(models.IntegerField(default=1))) + provider = str(models.CharField(max_length=255)) class InstanceStatusEntry(models.Model): - instance = models.ForeignKey(Instance, on_delete=models.deletion.CASCADE) + instance = cast(Instance, models.ForeignKey(Instance, on_delete=models.deletion.CASCADE)) created = models.DateTimeField(default=timezone.now) - msg = models.CharField(max_length=4095) - isCritical = models.BooleanField(default=False) + msg = str(models.CharField(max_length=4095)) + isCritical = bool(models.BooleanField(default=False)) class PoolStatusEntry(models.Model): - pool = models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) + pool = cast(InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE)) created = models.DateTimeField(default=timezone.now) - type = models.IntegerField() - msg = models.CharField(max_length=4095) - isCritical = models.BooleanField(default=False) + type = int(str(models.IntegerField())) + msg = str(models.CharField(max_length=4095)) + isCritical = bool(models.BooleanField(default=False)) class ProviderStatusEntry(models.Model): - provider = models.CharField(max_length=255) + provider = str(models.CharField(max_length=255)) created = models.DateTimeField(default=timezone.now) - type = models.IntegerField() - msg = models.CharField(max_length=4095) - isCritical = models.BooleanField(default=False) + type = int(str(models.IntegerField())) + msg = str(models.CharField(max_length=4095)) + isCritical = bool(models.BooleanField(default=False)) class PoolUptimeDetailedEntry(models.Model): - pool = models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) + pool = cast(InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE)) created = models.DateTimeField(default=timezone.now) - target = models.IntegerField() - actual = models.IntegerField() + target = int(str(models.IntegerField())) + actual = int(str(models.IntegerField())) class PoolUptimeAccumulatedEntry(models.Model): - pool = models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) + pool = cast(InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE)) created = models.DateTimeField(default=timezone.now) - accumulated_count = models.IntegerField(default=0) + accumulated_count = int(str(models.IntegerField(default=0))) uptime_percentage = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True) diff --git a/server/taskmanager/models.py b/server/taskmanager/models.py index 0dc84132e..073d625d2 100644 --- a/server/taskmanager/models.py +++ b/server/taskmanager/models.py @@ -2,27 +2,29 @@ from __future__ import annotations +from typing import cast + from django.db import models class Pool(models.Model): - pool_id = models.CharField(max_length=255) # filename in fuzzing-tc-config - pool_name = models.CharField(max_length=255) # friendly name - platform = models.CharField(max_length=15) - size = models.PositiveIntegerField(null=True) - cpu = models.CharField(max_length=15, null=True) + pool_id = str(models.CharField(max_length=255)) # filename in fuzzing-tc-config + pool_name = str(models.CharField(max_length=255)) # friendly name + platform = str(models.CharField(max_length=15)) + size = int(models.PositiveIntegerField(null=True)) + cpu = str(models.CharField(max_length=15, null=True)) cycle_time = models.DurationField(null=True) max_run_time = models.DurationField(null=True) class Task(models.Model): - pool = models.ForeignKey(Pool, on_delete=models.deletion.CASCADE, null=True) - task_id = models.CharField(max_length=64) - decision_id = models.CharField(max_length=64, null=True) - run_id = models.PositiveIntegerField() - state = models.CharField(max_length=15) + pool = cast(Pool, models.ForeignKey(Pool, on_delete=models.deletion.CASCADE, null=True)) + task_id = str(models.CharField(max_length=64)) + decision_id = str(models.CharField(max_length=64, null=True)) + run_id = int(models.PositiveIntegerField()) + state = str(models.CharField(max_length=15)) created = models.DateTimeField(null=True) - status_data = models.CharField(max_length=4095, blank=True) + status_data = str(models.CharField(max_length=4095, blank=True)) started = models.DateTimeField(null=True) resolved = models.DateTimeField(null=True) expires = models.DateTimeField() From 11bf7ec708ea6a40d51b54819db271525b19332c Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 2 Dec 2021 12:49:37 -0800 Subject: [PATCH 031/137] Some small type information follow-ups --- .../ec2spotmanager/CloudProvider/CloudProvider.py | 3 ++- server/server/settings.py | 14 +++++++++++--- server/taskmanager/models.py | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index 53db8771f..3ab2874c9 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -21,7 +21,8 @@ import traceback from abc import ABCMeta, abstractmethod from typing import Any -# from typing import TypeVar +from typing import Callable +from typing import TypeVar import six diff --git a/server/server/settings.py b/server/server/settings.py index 9bc9b8983..4539ca650 100644 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -12,7 +12,9 @@ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os -from django.conf import global_settings # noqa +from typing import TypedDict +from django.conf import global_settings +from django.http.request import HttpRequest # noqa BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -37,7 +39,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS: list[str] = [] # Application definition @@ -80,9 +82,15 @@ ) +class ResolverContextProcessorObj(TypedDict): + app_name: str + namespace: str + url_name: str | None + + # We add a custom context processor to make our application name # and certain other variables available in all our templates -def resolver_context_processor(request): +def resolver_context_processor(request: HttpRequest) -> ResolverContextProcessorObj: return { 'app_name': request.resolver_match.app_name, 'namespace': request.resolver_match.namespace, diff --git a/server/taskmanager/models.py b/server/taskmanager/models.py index 073d625d2..8712179a9 100644 --- a/server/taskmanager/models.py +++ b/server/taskmanager/models.py @@ -11,7 +11,7 @@ class Pool(models.Model): pool_id = str(models.CharField(max_length=255)) # filename in fuzzing-tc-config pool_name = str(models.CharField(max_length=255)) # friendly name platform = str(models.CharField(max_length=15)) - size = int(models.PositiveIntegerField(null=True)) + size = int(str(models.PositiveIntegerField(null=True))) cpu = str(models.CharField(max_length=15, null=True)) cycle_time = models.DurationField(null=True) max_run_time = models.DurationField(null=True) @@ -21,7 +21,7 @@ class Task(models.Model): pool = cast(Pool, models.ForeignKey(Pool, on_delete=models.deletion.CASCADE, null=True)) task_id = str(models.CharField(max_length=64)) decision_id = str(models.CharField(max_length=64, null=True)) - run_id = int(models.PositiveIntegerField()) + run_id = int(str(models.PositiveIntegerField())) state = str(models.CharField(max_length=15)) created = models.DateTimeField(null=True) status_data = str(models.CharField(max_length=4095, blank=True)) From 11e916a3c21080c8fcdee03cb9ad93f8fc03e7d9 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 11 Dec 2021 21:00:59 -0800 Subject: [PATCH 032/137] 1827 mypy issues left --- Collector/Collector.py | 2 +- CovReporter/CovReporter.py | 2 +- EC2Reporter/EC2Reporter.py | 14 ++-- FTB/CoverageHelper.py | 3 +- FTB/Signatures/JSONHelper.py | 27 ++----- FTB/Signatures/Symptom.py | 3 +- TaskStatusReporter/TaskStatusReporter.py | 5 +- misc/afl_libfuzzer/S3Manager.py | 74 ++++--------------- misc/afl_libfuzzer/afl-libfuzzer-daemon.py | 2 +- misc/libfuzzer/libfuzzer.py | 2 +- .../SourceCodeProvider/SourceCodeProvider.py | 2 + server/covmanager/models.py | 18 ++--- server/covmanager/views.py | 29 +++++--- server/ec2spotmanager/tasks.py | 34 +++------ 14 files changed, 77 insertions(+), 140 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index f8d613416..ed9d05ae7 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -334,7 +334,7 @@ def read_testcase(testCase: str) -> tuple[str, bool]: return (testCaseData, isBinary) -def main(args: list[str] | None = None)-> int: +def main(args: list[str] | None = None) -> int: '''Command line options.''' # setup argparser diff --git a/CovReporter/CovReporter.py b/CovReporter/CovReporter.py index 1f4d483fe..f7c9f151a 100755 --- a/CovReporter/CovReporter.py +++ b/CovReporter/CovReporter.py @@ -256,7 +256,7 @@ def create_combined_coverage(coverage_files, version=None): return (ret, version, stats) -def main(argv: list[str] | None = None)-> int: +def main(argv: list[str] | None = None) -> int: '''Command line options.''' # setup argparser diff --git a/EC2Reporter/EC2Reporter.py b/EC2Reporter/EC2Reporter.py index dc427e28c..ef6382550 100755 --- a/EC2Reporter/EC2Reporter.py +++ b/EC2Reporter/EC2Reporter.py @@ -45,11 +45,10 @@ def __init__(self, *args, **kwargs): super(EC2Reporter, self).__init__(*args, **kwargs) @remote_checks - def report(self, text): + def report(self, text: str) -> None: ''' Send textual report to server, overwriting any existing reports. - @type text: string @param text: Report text to send ''' url = "%s://%s:%s/ec2spotmanager/rest/report/" % (self.serverProtocol, self.serverHost, self.serverPort) @@ -63,11 +62,10 @@ def report(self, text): self.post(url, data) @remote_checks - def cycle(self, poolid): + def cycle(self, poolid: int) -> None: ''' Cycle the pool with the given id. - @type poolid: int @param poolid: ID of the pool to cycle ''' url = "%s://%s:%s/ec2spotmanager/rest/pool/%s/cycle/" % (self.serverProtocol, self.serverHost, self.serverPort, @@ -76,11 +74,10 @@ def cycle(self, poolid): self.post(url, {}, expected=requests.codes["ok"]) @remote_checks - def disable(self, poolid): + def disable(self, poolid: int) -> None: ''' Disable the pool with the given id. - @type poolid: int @param poolid: ID of the pool to disable ''' url = "%s://%s:%s/ec2spotmanager/rest/pool/%s/disable/" % (self.serverProtocol, self.serverHost, @@ -89,11 +86,10 @@ def disable(self, poolid): self.post(url, {}, expected=requests.codes["ok"]) @remote_checks - def enable(self, poolid): + def enable(self, poolid: int) -> None: ''' Enable the pool with the given id. - @type poolid: int @param poolid: ID of the pool to enable ''' url = "%s://%s:%s/ec2spotmanager/rest/pool/%s/enable/" % (self.serverProtocol, self.serverHost, @@ -102,7 +98,7 @@ def enable(self, poolid): self.post(url, {}, expected=requests.codes["ok"]) -def main(argv: list[str] | None = None)-> int: +def main(argv: list[str] | None = None) -> int: '''Command line options.''' # setup argparser diff --git a/FTB/CoverageHelper.py b/FTB/CoverageHelper.py index ff5919447..77516bd61 100644 --- a/FTB/CoverageHelper.py +++ b/FTB/CoverageHelper.py @@ -303,7 +303,7 @@ def __apply_include_exclude_directives(node, directives): __apply_include_exclude_directives(node, directives_new) -def get_flattened_names(node, prefix=""): +def get_flattened_names(node, prefix: str = ""): """ Returns a list of flattened paths (files and directories) of the given node. @@ -314,7 +314,6 @@ def get_flattened_names(node, prefix=""): @type node: dict @param prefix: An optional prefix to prepend to each name - @type prefix: str @return The list of all paths occurring in the given node. @rtype: list(str) diff --git a/FTB/Signatures/JSONHelper.py b/FTB/Signatures/JSONHelper.py index 619856e4f..effdcf03a 100644 --- a/FTB/Signatures/JSONHelper.py +++ b/FTB/Signatures/JSONHelper.py @@ -21,17 +21,14 @@ import six -def getArrayChecked(obj, key, mandatory=False): +def getArrayChecked(obj, key: str, mandatory: bool = False): ''' Retrieve a list from the given object using the given key @type obj: map @param obj: Source object - @type key: string @param key: Key to retrieve from obj - - @type mandatory: bool @param mandatory: If True, throws an exception if the key is not found @rtype: list @@ -40,17 +37,14 @@ def getArrayChecked(obj, key, mandatory=False): return __getTypeChecked(obj, key, [list], mandatory) -def getStringChecked(obj, key, mandatory=False): +def getStringChecked(obj, key: str, mandatory: bool = False): ''' Retrieve a string from the given object using the given key @type obj: map @param obj: Source object - @type key: string @param key: Key to retrieve from obj - - @type mandatory: bool @param mandatory: If True, throws an exception if the key is not found @rtype: string @@ -59,17 +53,14 @@ def getStringChecked(obj, key, mandatory=False): return __getTypeChecked(obj, key, [six.text_type, bytes], mandatory) -def getNumberChecked(obj, key, mandatory=False): +def getNumberChecked(obj, key: str, mandatory: bool = False): ''' Retrieve an integer from the given object using the given key @type obj: map @param obj: Source object - @type key: string @param key: Key to retrieve from obj - - @type mandatory: bool @param mandatory: If True, throws an exception if the key is not found @rtype: int @@ -78,17 +69,14 @@ def getNumberChecked(obj, key, mandatory=False): return __getTypeChecked(obj, key, [numbers.Integral], mandatory) -def getObjectOrStringChecked(obj, key, mandatory=False): +def getObjectOrStringChecked(obj, key: str, mandatory: bool = False): ''' Retrieve an object or string from the given object using the given key @type obj: map @param obj: Source object - @type key: string @param key: Key to retrieve from obj - - @type mandatory: bool @param mandatory: If True, throws an exception if the key is not found @rtype: string or dict @@ -97,17 +85,14 @@ def getObjectOrStringChecked(obj, key, mandatory=False): return __getTypeChecked(obj, key, [six.text_type, bytes, dict], mandatory) -def getNumberOrStringChecked(obj, key, mandatory=False): +def getNumberOrStringChecked(obj, key: str, mandatory: bool = False): ''' Retrieve a number or string from the given object using the given key @type obj: map @param obj: Source object - @type key: string @param key: Key to retrieve from obj - - @type mandatory: bool @param mandatory: If True, throws an exception if the key is not found @rtype: string or number @@ -116,7 +101,7 @@ def getNumberOrStringChecked(obj, key, mandatory=False): return __getTypeChecked(obj, key, [six.text_type, bytes, numbers.Integral], mandatory) -def __getTypeChecked(obj, key, valTypes, mandatory=False): +def __getTypeChecked(obj, key: str, valTypes, mandatory: bool = False): if key not in obj: if mandatory: raise RuntimeError('Expected key "%s" in object' % key) diff --git a/FTB/Signatures/Symptom.py b/FTB/Signatures/Symptom.py index f3e0547e1..3ddc3d3df 100644 --- a/FTB/Signatures/Symptom.py +++ b/FTB/Signatures/Symptom.py @@ -41,14 +41,13 @@ def __str__(self): return self.jsonsrc @staticmethod - def fromJSONObject(obj): + def fromJSONObject(obj) -> Symptom: ''' Create the appropriate Symptom based on the given object (decoded from JSON) @type obj: map @param obj: Object as decoded from JSON - @rtype: Symptom @return: Symptom subclass instance matching the given object ''' if "type" not in obj: diff --git a/TaskStatusReporter/TaskStatusReporter.py b/TaskStatusReporter/TaskStatusReporter.py index 9dc998da0..f177db9f9 100755 --- a/TaskStatusReporter/TaskStatusReporter.py +++ b/TaskStatusReporter/TaskStatusReporter.py @@ -45,11 +45,10 @@ def __init__(self, *args, **kwargs): super(TaskStatusReporter, self).__init__(*args, **kwargs) @remote_checks - def report(self, text): + def report(self, text: str) -> None: ''' Send textual report to server, overwriting any existing reports. - @type text: string @param text: Report text to send ''' url = "%s://%s:%s/taskmanager/rest/tasks/update_status/" % ( @@ -66,7 +65,7 @@ def report(self, text): self.post(url, data, expected=requests.codes["ok"]) -def main(argv: list[str] | None = None)-> int: +def main(argv: list[str] | None = None) -> int: '''Command line options.''' # setup argparser diff --git a/misc/afl_libfuzzer/S3Manager.py b/misc/afl_libfuzzer/S3Manager.py index c82acc3c1..af49eec43 100644 --- a/misc/afl_libfuzzer/S3Manager.py +++ b/misc/afl_libfuzzer/S3Manager.py @@ -33,15 +33,10 @@ class S3Manager(): - def __init__(self, bucket_name, project_name, build_project_name=None, zip_name="build.zip"): + def __init__(self, bucket_name: str, project_name: str, build_project_name: str | None = None, zip_name: str = "build.zip"): ''' - @type bucket_name: String @param bucket_name: Name of the S3 bucket to use - - @type project_name: String @param project_name: Name of the project folder inside the S3 bucket - - @type cmdline_file: String @param cmdline_file: Path to the cmdline file to upload. ''' self.bucket_name = bucket_name @@ -67,19 +62,14 @@ def __init__(self, bucket_name, project_name, build_project_name=None, zip_name= self.uploaded_files = set() self.downloaded_files = set() - def upload_libfuzzer_queue_dir(self, base_dir, corpus_dir, original_corpus): + def upload_libfuzzer_queue_dir(self, base_dir: str, corpus_dir: str, original_corpus: list[str]) -> None: ''' Synchronize the corpus directory of the specified libFuzzer corpus directory to the specified S3 bucket. This method only uploads files that don't exist yet on the receiving side and excludes all files in the original corpus. - @type base_dir: String @param base_dir: libFuzzer base directory - - @type corpus_dir: String @param corpus_dir: libFuzzer corpus directory - - @type original_corpus: Set @param original_corpus: Set of original corpus files to exclude from synchronization ''' upload_files = [x for x in os.listdir(corpus_dir) if x not in original_corpus and x not in self.uploaded_files] @@ -91,11 +81,10 @@ def upload_libfuzzer_queue_dir(self, base_dir, corpus_dir, original_corpus): return self.__upload_queue_files(corpus_dir, upload_files, base_dir, cmdline_file) - def download_libfuzzer_queues(self, corpus_dir): + def download_libfuzzer_queues(self, corpus_dir: str) -> None: ''' Synchronize files from open libFuzzer queues directly back into the local corpus directory. - @type corpus_dir: String @param corpus_dir: libFuzzer corpus directory ''' remote_keys = list(self.bucket.list(self.remote_path_queues)) @@ -132,16 +121,13 @@ def download_libfuzzer_queues(self, corpus_dir): self.downloaded_files.add(basename) - def upload_afl_queue_dir(self, base_dir, new_cov_only=True): + def upload_afl_queue_dir(self, base_dir: str, new_cov_only: bool = True) -> None: ''' Synchronize the queue directory of the specified AFL base directory to the specified S3 bucket. This method only uploads files that don't exist yet on the receiving side. - @type base_dir: String @param base_dir: AFL base directory - - @type new_cov_only: Boolean @param new_cov_only: Only upload files that have new coverage ''' queue_dir = os.path.join(base_dir, "queue") @@ -167,7 +153,7 @@ def upload_afl_queue_dir(self, base_dir, new_cov_only=True): cmdline_file = os.path.join(base_dir, "cmdline") return self.__upload_queue_files(queue_dir, queue_files, base_dir, cmdline_file) - def download_queue_dirs(self, work_dir): + def download_queue_dirs(self, work_dir: str) -> None: ''' Downloads all queue files into the queues sub directory of the specified local work directory. The files are renamed to match their SHA1 hashes @@ -175,7 +161,6 @@ def download_queue_dirs(self, work_dir): This method marks all remote queues that have been downloaded as closed. - @type work_dir: String @param work_dir: Local work directory ''' download_dir = os.path.join(work_dir, "queues") @@ -256,17 +241,16 @@ def clean_queue_dirs(self) -> None: self.bucket.delete_keys(remote_keys_for_deletion, quiet=True) - def get_queue_status(self): + def get_queue_status(self) -> dict[str, int]: ''' Return status data for all queues in the specified S3 bucket/project - @rtype: dict @return: Dictionary containing queue size per queue ''' remote_keys = list(self.bucket.list(self.remote_path_queues)) remote_queues_closed_names = [x.name.rsplit("/", 1)[0] for x in remote_keys if x.name.endswith("/closed")] - status_data = {} + status_data: dict[str, int] = {} for remote_key in remote_keys: # Ignore any folders @@ -288,22 +272,15 @@ def get_queue_status(self): return status_data - def get_corpus_status(self): + def get_corpus_status(self) -> dict[str, int]: ''' Return status data for the corpus of the specified S3 bucket/project - @type bucket_name: String - @param bucket_name: Name of the S3 bucket to use - - @type project_name: String - @param project_name: Name of the project folder inside the S3 bucket - - @rtype: dict @return: Dictionary containing corpus size per date modified ''' remote_keys = list(self.bucket.list(self.remote_path_corpus)) - status_data = {} + status_data: dict[str, int] = {} for remote_key in remote_keys: # Ignore any folders @@ -320,19 +297,12 @@ def get_corpus_status(self): return status_data - def download_build(self, build_dir): + def download_build(self, build_dir: str) -> None: ''' Downloads build.zip from the specified S3 bucket and unpacks it into the specified build directory. - @type base_dir: String @param base_dir: Build directory - - @type bucket_name: String - @param bucket_name: Name of the S3 bucket to use - - @type project_name: String - @param project_name: Name of the project folder inside the S3 bucket ''' # Clear any previous builds if os.path.exists(build_dir): @@ -348,33 +318,29 @@ def download_build(self, build_dir): subprocess.check_call(["unzip", zip_dest, "-d", build_dir]) - def upload_build(self, build_file): + def upload_build(self, build_file: str) -> None: ''' Upload the given build zip file to the specified S3 bucket/project directory. - @type build_file: String @param build_file: (ZIP) file containing the build that should be uploaded ''' if not os.path.exists(build_file) or not os.path.isfile(build_file): print("Error: Build must be a (zip) file.", file=sys.stderr) - return + return None remote_key = Key(self.bucket) remote_key.name = self.remote_path_build print("Uploading file %s -> %s" % (build_file, remote_key.name)) remote_key.set_contents_from_filename(build_file) - def download_corpus(self, corpus_dir, random_subset_size=None): + def download_corpus(self, corpus_dir: str, random_subset_size: int | None = None) -> None: ''' Downloads the test corpus from the specified S3 bucket and project into the specified directory, without overwriting any files. - @type corpus_dir: String @param corpus_dir: Directory where to store test corpus files - - @type random_subset_size: int @param random_subset_size: If specified, only download a random subset of the corpus, with the specified size. ''' @@ -414,15 +380,12 @@ def download_corpus(self, corpus_dir, random_subset_size=None): if not os.path.exists(dest_file): remote_key.get_contents_to_filename(dest_file) - def upload_corpus(self, corpus_dir, corpus_delete=False): + def upload_corpus(self, corpus_dir: str, corpus_delete: bool = False) -> None: ''' Synchronize the specified test corpus directory to the specified S3 bucket. This method only uploads files that don't exist yet on the receiving side. - @type corpus_dir: String @param corpus_dir: Directory where the test corpus files are stored - - @type corpus_delete: bool @param corpus_delete: Delete all remote files that don't exist on our side ''' test_files = [file for file in os.listdir(corpus_dir) if os.path.isfile(os.path.join(corpus_dir, file))] @@ -467,20 +430,15 @@ def upload_corpus(self, corpus_dir, corpus_delete=False): if corpus_delete: self.bucket.delete_keys(delete_list, quiet=True) - def __get_machine_id(self, base_dir, refresh=False): + def __get_machine_id(self, base_dir: str, refresh: bool = False) -> str: ''' Get (and if necessary generate) the machine id which is based on the current timestamp and the hostname of the machine. The generated ID is cached inside the base directory, so all future calls to this method return the same ID. - @type base_dir: String @param base_dir: Base directory - - @type refresh: bool @param refresh: Force generating a new machine ID - - @rtype: String @return: The generated/cached machine ID ''' id_file = os.path.join(base_dir, "s3_id") @@ -500,7 +458,7 @@ def __get_machine_id(self, base_dir, refresh=False): with open(id_file, 'r') as id_fd: return id_fd.read() - def __upload_queue_files(self, queue_basedir, queue_files, base_dir, cmdline_file): + def __upload_queue_files(self, queue_basedir: str, queue_files: list[str], base_dir: str, cmdline_file: str) -> None: machine_id = self.__get_machine_id(base_dir) remote_path = "%s%s/" % (self.remote_path_queues, machine_id) remote_files = [key.name.replace(remote_path, "", 1) for key in list(self.bucket.list(remote_path))] diff --git a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py index 113827d3f..20fb24302 100755 --- a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py +++ b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py @@ -665,7 +665,7 @@ def apply_transform(script_path, testcase_path): return archive_path -def main(argv: list[str] | None = None)-> int: +def main(argv: list[str] | None = None) -> int: '''Command line options.''' program_name = os.path.basename(sys.argv[0]) diff --git a/misc/libfuzzer/libfuzzer.py b/misc/libfuzzer/libfuzzer.py index d4dda8c67..93e652677 100755 --- a/misc/libfuzzer/libfuzzer.py +++ b/misc/libfuzzer/libfuzzer.py @@ -77,7 +77,7 @@ def getTestcase(self): __updated__ = '2016-07-28' -def main(argv: list[str] | None = None)-> int: +def main(argv: list[str] | None = None) -> int: '''Command line options.''' program_name = os.path.basename(sys.argv[0]) diff --git a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py index b341c5652..8dac08972 100644 --- a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py @@ -109,6 +109,8 @@ class CObj(TypedDict): filename: str | None locations: list[int] + missed: list[int] + not_coverable: list[int] class Utils(): diff --git a/server/covmanager/models.py b/server/covmanager/models.py index 55b26d44f..0cab3711e 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -1,5 +1,7 @@ from __future__ import annotations +from datetime import datetime + from django.conf import settings from django.contrib.auth.models import User as DjangoUser # noqa from django.core.files.storage import FileSystemStorage @@ -38,12 +40,12 @@ class CollectionFile(models.Model): class Collection(models.Model): - created = models.DateTimeField(default=timezone.now) + created = cast(datetime, models.DateTimeField(default=timezone.now)) description = str(models.CharField(max_length=1023, blank=True)) repository = cast(Repository, models.ForeignKey(Repository, on_delete=models.deletion.CASCADE)) revision = str(models.CharField(max_length=255, blank=False)) branch = str(models.CharField(max_length=255, blank=True)) - tools = models.ManyToManyField(Tool) + tools = cast(Tool, models.ManyToManyField(Tool)) client = cast(Client, models.ForeignKey(Client, on_delete=models.deletion.CASCADE)) coverage = cast(CollectionFile, models.ForeignKey(CollectionFile, blank=True, null=True, on_delete=models.deletion.CASCADE)) @@ -73,14 +75,13 @@ def loadCoverage(self) -> None: self.content = json.load(codecs.getreader('utf-8')(self.coverage.file)) self.coverage.file.close() - def annotateSource(self, path, coverage): + def annotateSource(self, path: str, coverage) -> None: """ Annotate the source code to the given (leaf) coverage object by querying the SourceCodeProvider registered for the repository associated with this collection. The resulting source code is added to a "source" property in the object. - @type path: string @param path: The path to the source code that this coverage belongs to. @type coverage: dict @@ -91,12 +92,11 @@ def annotateSource(self, path, coverage): provider = self.repository.getInstance() coverage["source"] = provider.getSource(path, self.revision) - def subset(self, path, report_configuration=None): + def subset(self, path: str, report_configuration=None): """ Calculate a subset of the coverage stored in this collection based on the given path. - @type path: string @param path: The path to reduce to. It is expected to use forward slashes. The path is interpreted as relative to the root of the collection. @@ -204,7 +204,7 @@ def apply(self, collection): class ReportSummary(models.Model): - collection = models.OneToOneField(Collection, on_delete=models.deletion.CASCADE) + collection = cast(Collection, models.OneToOneField(Collection, on_delete=models.deletion.CASCADE)) cached_result = str(models.TextField(null=True, blank=True)) @@ -214,9 +214,9 @@ class Report(models.Model): # because aggregated collections can be created later, losing the original # creation dates. This date will be used as a reference time frame to # determine week, month, quarter, etc. for displaying purposes. - data_created = models.DateTimeField(default=timezone.now) + data_created = cast(datetime, models.DateTimeField(default=timezone.now)) public = bool(models.BooleanField(blank=False, default=False)) - coverage = models.ForeignKey(Collection, blank=False, null=False, on_delete=models.deletion.CASCADE) + coverage = cast(Collection, models.ForeignKey(Collection, blank=False, null=False, on_delete=models.deletion.CASCADE)) is_monthly = bool(models.BooleanField(blank=False, default=False)) is_quarterly = bool(models.BooleanField(blank=False, default=False)) diff --git a/server/covmanager/views.py b/server/covmanager/views.py index a834c340a..7130f54da 100644 --- a/server/covmanager/views.py +++ b/server/covmanager/views.py @@ -1,5 +1,9 @@ from __future__ import annotations +from datetime import datetime +from typing import TypedDict +from typing import cast + from django.conf import settings from django.core.exceptions import SuspiciousOperation, PermissionDenied from django.db.models import Q @@ -61,7 +65,7 @@ def collections_reportsummary(request: HttpRequest, collectionid: str) -> HttpRe def collections_reportsummary_html_list(request: HttpRequest, collectionid: str) -> HttpResponse: - collection = get_object_or_404(Collection, pk=collectionid) + collection: Collection = get_object_or_404(Collection, pk=collectionid) if not collection.coverage: return HttpResponse( @@ -113,7 +117,7 @@ def collections_reportsummary_html_list(request: HttpRequest, collectionid: str) root["diffid"] = diff_collection.pk - def annotate_delta(a, b): + def annotate_delta(a, b) -> None: delta = round(a["coveragePercent"] - b["coveragePercent"], 2) if delta >= 1.0: @@ -122,7 +126,7 @@ def annotate_delta(a, b): a["coveragePercentDelta"] = "%s %%" % delta if "children" not in a or "children" not in b: - return + return None # Map children to their ids so we can iterate them side-by-side a_child_dict = {c["id"]: c for c in a["children"]} @@ -188,16 +192,23 @@ def collections_browse_api(request: HttpRequest, collectionid: str, path) -> Htt return HttpResponse(json.dumps(data), content_type='application/json') -def collections_diff_api(request: HttpRequest, path) -> HttpResponse: +class CTooltipDataType(TypedDict): + """ctooltipdata type specification.""" + id: int + label: str + created: datetime - collections = None + +def collections_diff_api(request: HttpRequest, path: str) -> HttpResponse: + + collections: list[Collection] coverages = [] if "ids" in request.GET: ids = request.GET["ids"].split(",") - collections = Collection.objects.filter(pk__in=ids) + collections = cast(list[Collection], Collection.objects.filter(pk__in=ids)) - if len(collections) < 2: + if collections and len(collections) < 2: raise Http404("Need at least two collections") report_configuration = None @@ -213,7 +224,7 @@ def collections_diff_api(request: HttpRequest, path) -> HttpResponse: # else: # raise Http404("NYI") - tooltipdata = [] + tooltipdata: list[CTooltipDataType] = [] for collection in collections: if not collection.coverage: @@ -242,7 +253,7 @@ def collections_diff_api(request: HttpRequest, path) -> HttpResponse: coverages.append(coverage) - ctooltipdata = {} + ctooltipdata: CTooltipDataType = {} for k in coverage: if k != "children": ctooltipdata[k] = coverage[k] diff --git a/server/ec2spotmanager/tasks.py b/server/ec2spotmanager/tasks.py index 697361f86..cde387438 100644 --- a/server/ec2spotmanager/tasks.py +++ b/server/ec2spotmanager/tasks.py @@ -12,6 +12,7 @@ from celeryconf import app from . import cron # noqa ensure cron tasks get registered from .common.prices import get_price_median +from .models import Pool from .CloudProvider.CloudProvider import INSTANCE_STATE, PROVIDERS, CloudProvider, CloudProviderError @@ -22,7 +23,7 @@ @app.task -def _terminate_instance_ids(provider, region, instance_ids): +def _terminate_instance_ids(provider: str, region: str, instance_ids: str) -> None: cloud_provider = CloudProvider.get_instance(provider) try: cloud_provider.terminate_instances({region: instance_ids}) @@ -33,7 +34,7 @@ def _terminate_instance_ids(provider, region, instance_ids): @app.task -def _terminate_instance_request_ids(provider, region, request_ids): +def _terminate_instance_request_ids(provider: str, region: str, request_ids: str) -> None: cloud_provider = CloudProvider.get_instance(provider) try: cloud_provider.cancel_requests({region: request_ids}) @@ -133,7 +134,7 @@ def _determine_best_location(config, count, cache=None): return (best_provider, best_region, best_zone, best_type, rejected_prices) -def _start_pool_instances(pool, config, count=1): +def _start_pool_instances(pool: Pool, config, count: int = 1) -> None: """ Start an instance with the given configuration """ from .models import Instance, PoolStatusEntry, POOL_STATUS_ENTRY_TYPE @@ -153,7 +154,7 @@ def _start_pool_instances(pool, config, count=1): for zone in rejected_prices: msg += "\n%s at %s" % (zone, rejected_prices[zone]) _update_pool_status(pool, 'price-too-low', msg) - return + return None elif priceLowEntries: priceLowEntries.delete() @@ -232,7 +233,7 @@ def _start_pool_instances(pool, config, count=1): _update_pool_status(pool, 'unclassified', str(msg)) -def _update_provider_status(provider, type_, message): +def _update_provider_status(provider: str, type_: str, message: str) -> None: from .models import ProviderStatusEntry, POOL_STATUS_ENTRY_TYPE is_critical = type_ not in {'max-spot-instance-count-exceeded', 'price-too-low', 'temporary-failure'} @@ -277,16 +278,11 @@ def _update_pool_status(pool, type_: str, message: str) -> None: @app.task -def update_requests(provider, region, pool_id): +def update_requests(provider: str, region: str, pool_id: int) -> None: """Update all requests in a given provider/region/pool. - @ptype provider: str @param provider: CloudProvider name - - @ptype region: str @param region: Region name within the given provider - - @ptype pool_id: int @param pool_id: InstancePool pk """ from .models import Instance, InstancePool, PoolStatusEntry, ProviderStatusEntry, POOL_STATUS_ENTRY_TYPE @@ -361,13 +357,10 @@ def update_requests(provider, region, pool_id): @app.task -def update_instances(provider, region): +def update_instances(provider: str, region: str) -> None: """Reconcile database instances with cloud provider for a given provider/region. - @ptype provider: str @param provider: CloudProvider name - - @ptype region: str @param region: Region name within the given provider """ from .models import Instance @@ -480,13 +473,10 @@ def update_instances(provider, region): @app.task -def cycle_and_terminate_disabled(provider, region): +def cycle_and_terminate_disabled(provider: str, region: str) -> None: """Kill off instances if pools need to be cycled or disabled. - @ptype provider: str @param provider: CloudProvider name - - @ptype region: str @param region: Region name within the given provider """ from .models import Instance, PoolStatusEntry, ProviderStatusEntry @@ -543,11 +533,10 @@ def cycle_and_terminate_disabled(provider, region): @app.task -def check_and_resize_pool(pool_id): +def check_and_resize_pool(pool_id: int) -> list[int]: """Check pool size and either request more instances from cheapest provider/region, or terminate unneeded instances. - @ptype pool_id: int @param pool_id: InstancePool pk """ from .models import Instance, InstancePool, PoolStatusEntry @@ -637,10 +626,9 @@ def check_and_resize_pool(pool_id): @app.task -def terminate_instances(pool_instances): +def terminate_instances(pool_instances: list[list[int]]) -> None: """Terminate a given list of instances. - @ptype pool_instances: list of lists of instance ids @param pool_instances: Takes the results from multiple calls to check_and_resize_pool(), and aggregates the results into one call to terminate instances/requests per provider/region. """ From 2c391548df76d55c70cfe5e48dd566ee858d4522 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 12 Dec 2021 01:44:25 -0800 Subject: [PATCH 033/137] Add some more type information --- .../tests/test_mgmt_cleanup_old_crashes.py | 13 ++++++++----- server/ec2spotmanager/tests/conftest.py | 12 +++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py b/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py index e7f9acb17..81573ec2a 100644 --- a/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py +++ b/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py @@ -13,6 +13,9 @@ from __future__ import annotations from datetime import timedelta +from typing import Any +from typing import cast + import pytest from django.core.management import call_command, CommandError from django.utils import timezone @@ -22,14 +25,14 @@ pytestmark = pytest.mark.django_db() # pylint: disable=invalid-name -def _crashentry_create(**kwds): +def _crashentry_create(**kwds: Any) -> CrashEntry: defaults = {"client": Client.objects.create(), "os": OS.objects.create(), "platform": Platform.objects.create(), "product": Product.objects.create(), "tool": Tool.objects.create()} defaults.update(kwds) - return CrashEntry.objects.create(**defaults) + return cast(CrashEntry, CrashEntry.objects.create(**defaults)) def test_args() -> None: @@ -44,7 +47,7 @@ def test_bug_cleanup() -> None: assert Bug.objects.count() == 0 -def test_closed_bugs(settings): +def test_closed_bugs(settings) -> None: """all buckets that have been closed for x days""" settings.CLEANUP_CRASHES_AFTER_DAYS = 4 settings.CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 2 @@ -62,7 +65,7 @@ def test_closed_bugs(settings): assert set(CrashEntry.objects.values_list('pk', flat=True)) == {o.pk for o in crashes[:-1]} -def test_empty_bucket(settings): +def test_empty_bucket(settings) -> None: """all buckets that are empty""" settings.CLEANUP_CRASHES_AFTER_DAYS = 4 settings.CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 2 @@ -77,7 +80,7 @@ def test_empty_bucket(settings): assert Bug.objects.count() == 1 -def test_old_crashes(settings): +def test_old_crashes(settings) -> None: """all entries that are older than x days and not in any bucket or bucket has no bug associated with it""" settings.CLEANUP_CRASHES_AFTER_DAYS = 3 settings.CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 1 diff --git a/server/ec2spotmanager/tests/conftest.py b/server/ec2spotmanager/tests/conftest.py index 42e65c36e..9d80ced01 100644 --- a/server/ec2spotmanager/tests/conftest.py +++ b/server/ec2spotmanager/tests/conftest.py @@ -15,6 +15,8 @@ import functools import sys +from typing import cast + from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission import pytest @@ -28,8 +30,8 @@ from mock import Mock -def _create_user(username, email="test@mozilla.com", password="test", has_permission=True): - user = User.objects.create_user(username, email, password) +def _create_user(username: str, email: str = "test@mozilla.com", password: str = "test", has_permission: bool = True) -> User: + user = cast(User, User.objects.create_user(username, email, password)) user.user_permissions.clear() if has_permission: content_type = ContentType.objects.get_for_model(cmUser) @@ -41,7 +43,7 @@ def _create_user(username, email="test@mozilla.com", password="test", has_permis @pytest.fixture -def ec2spotmanager_test(db): # pylint: disable=invalid-name,unused-argument +def ec2spotmanager_test(db) -> None: # pylint: disable=invalid-name,unused-argument """Common testcase class for all ec2spotmanager unittests""" # Create one unrestricted and one restricted test user _create_user("test") @@ -77,9 +79,9 @@ def get_instance(cls, provider): @pytest.fixture -def raise_on_status(mocker): +def raise_on_status(mocker) -> None: - def _mock_pool_status(_pool, type_, message): + def _mock_pool_status(_pool, type_: str, message: str) -> None: if sys.exc_info() != (None, None, None): raise # pylint: disable=misplaced-bare-raise raise UncatchableException("%s: %s" % (type_, message)) From da2008926a197d36ade7a71c4ced19dcd06f785e Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 12 Dec 2021 01:48:06 -0800 Subject: [PATCH 034/137] Move PyPI requirements to a new requirements3.10.txt file and revert requirements3.0.txt one --- server/requirements3.0.txt | 11 ------ server/requirements3.10.txt | 68 +++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 server/requirements3.10.txt diff --git a/server/requirements3.0.txt b/server/requirements3.0.txt index bf26af0a2..1de1b48b2 100644 --- a/server/requirements3.0.txt +++ b/server/requirements3.0.txt @@ -6,9 +6,7 @@ backports.functools-lru-cache==1.5; python_version == '2.7' billiard>=3.5.0.3,<3.6 boto>=2.48.0,<2.50 boto3==1.7.78 -boto3-stubs>=1.20.15 celery>=4.1.1,<4.3 -celery-types>=0.9.3 certifi>=2018.4.16 chardet>=3.0.4,<3.1 configparser>=3.5.0,<3.6; python_version == '2.7' @@ -18,7 +16,6 @@ django-chartjs==1.3 django-crispy-forms==1.11.2 django-enumfields==2.1.1 django-notifications-hq==1.6.0 -django-stubs>=1.9.0 djangorestframework>=3.9.4 enum34>=1.1.6,<1.2; python_version == '2.7' fasteners>=0.14.1,<0.15 @@ -34,7 +31,6 @@ mccabe>=0.6.1,<0.7 mock==2.0.0; python_version == '2.7' monotonic==1.5 more-itertools>=4.2.0,<4.4 -mypy==0.910 pluggy>=0.7.0,<0.8 py>=1.5.3 pycodestyle>=2.5,<2.6 @@ -54,13 +50,6 @@ singledispatch>=3.4.0.3,<3.4.1; python_version == '2.7' six>=1.12.0 # fuzzing-decision is only needed for the taskmanager module (requires python 3) #git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision -types-boto==0.1.4 -types-mock==0.1.5 -types-PyYAML==5.4.6 -types-python-dateutil==0.1.6 -types-redis==3.5.6 -types-requests==2.25.6 -types-six==0.1.9 urllib3>=1.22,<2 vine>=1.1.4,<1.2 whitenoise==5.2.0 diff --git a/server/requirements3.10.txt b/server/requirements3.10.txt new file mode 100644 index 000000000..bf26af0a2 --- /dev/null +++ b/server/requirements3.10.txt @@ -0,0 +1,68 @@ +amqp>=2.3.2,<2.4 +appdirs>=1.4.3,<1.5 +atomicwrites>=1.1.5,<1.3 +attrs>=18.1.0,<19 +backports.functools-lru-cache==1.5; python_version == '2.7' +billiard>=3.5.0.3,<3.6 +boto>=2.48.0,<2.50 +boto3==1.7.78 +boto3-stubs>=1.20.15 +celery>=4.1.1,<4.3 +celery-types>=0.9.3 +certifi>=2018.4.16 +chardet>=3.0.4,<3.1 +configparser>=3.5.0,<3.6; python_version == '2.7' +coverage==5.5 +Django>=3.0,<3.1 +django-chartjs==1.3 +django-crispy-forms==1.11.2 +django-enumfields==2.1.1 +django-notifications-hq==1.6.0 +django-stubs>=1.9.0 +djangorestframework>=3.9.4 +enum34>=1.1.6,<1.2; python_version == '2.7' +fasteners>=0.14.1,<0.15 +flake8>=3.7.9,<3.8 +funcsigs>=1.0.2,<1.1; python_version == '2.7' +futures>=3.2.0,<3.3; python_version == '2.7' +idna>=2.6,<2.8 +isort>=4.3.4,<4.4 +kombu>=4.2.1,<4.3 +laniakea>=1.17.0 +lazy-object-proxy>=1.3.1,<1.4 +mccabe>=0.6.1,<0.7 +mock==2.0.0; python_version == '2.7' +monotonic==1.5 +more-itertools>=4.2.0,<4.4 +mypy==0.910 +pluggy>=0.7.0,<0.8 +py>=1.5.3 +pycodestyle>=2.5,<2.6 +pyflakes>=2.1.1,<2.2 +pytest>=3.10.0,<4.0 +pytest-cov>=2.6.0,<2.7 +pytest-django>=3.4.4,<3.5 +pytest-flake8>=1.0.1,<1.1 +pytest-mock>=1.10.4,<1.11 +pytest-pythonpath>=0.7.2,<0.8 +python-dateutil>=2.8,<3 +pytz>=2018.4 +PyYAML>=5.1,<6.0 +redis>=2.10.6,<2.11 +requests>=2.20.1,<3 +singledispatch>=3.4.0.3,<3.4.1; python_version == '2.7' +six>=1.12.0 +# fuzzing-decision is only needed for the taskmanager module (requires python 3) +#git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision +types-boto==0.1.4 +types-mock==0.1.5 +types-PyYAML==5.4.6 +types-python-dateutil==0.1.6 +types-redis==3.5.6 +types-requests==2.25.6 +types-six==0.1.9 +urllib3>=1.22,<2 +vine>=1.1.4,<1.2 +whitenoise==5.2.0 +wrapt>=1.10.11,<1.11 +#django-livesync==0.4 From 040044bf9420c1efd93eee1e282fdf0a9ce6a8cf Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 12 Dec 2021 02:10:29 -0800 Subject: [PATCH 035/137] Bump server requirements3.10.txt package versions to latest and remove those that require Python 2.7, this will fix some missing types in some packages --- server/requirements3.10.txt | 105 +++++++++++++++++------------------- 1 file changed, 49 insertions(+), 56 deletions(-) diff --git a/server/requirements3.10.txt b/server/requirements3.10.txt index bf26af0a2..8e377ad56 100644 --- a/server/requirements3.10.txt +++ b/server/requirements3.10.txt @@ -1,68 +1,61 @@ -amqp>=2.3.2,<2.4 -appdirs>=1.4.3,<1.5 -atomicwrites>=1.1.5,<1.3 -attrs>=18.1.0,<19 -backports.functools-lru-cache==1.5; python_version == '2.7' -billiard>=3.5.0.3,<3.6 -boto>=2.48.0,<2.50 -boto3==1.7.78 -boto3-stubs>=1.20.15 -celery>=4.1.1,<4.3 -celery-types>=0.9.3 -certifi>=2018.4.16 -chardet>=3.0.4,<3.1 -configparser>=3.5.0,<3.6; python_version == '2.7' -coverage==5.5 +amqp>=5.0.6,<5.1 +appdirs>=1.4.4,<1.5 +atomicwrites>=1.4.0,<1.5 +attrs>=21.2.0,<21.3 +billiard>=3.6.4.0,<3.7 +boto>=2.49.0,<2.50 +boto3==1.20.23 +boto3-stubs>=1.20.23,<1.21 +celery>=5.2.1,<5.3 +celery-types>=0.9.3,<0.10 +certifi>=2021.10.8 +chardet>=4.0.0,<4.1 +coverage==6.2 Django>=3.0,<3.1 django-chartjs==1.3 django-crispy-forms==1.11.2 django-enumfields==2.1.1 django-notifications-hq==1.6.0 -django-stubs>=1.9.0 -djangorestframework>=3.9.4 -enum34>=1.1.6,<1.2; python_version == '2.7' -fasteners>=0.14.1,<0.15 -flake8>=3.7.9,<3.8 -funcsigs>=1.0.2,<1.1; python_version == '2.7' -futures>=3.2.0,<3.3; python_version == '2.7' -idna>=2.6,<2.8 -isort>=4.3.4,<4.4 -kombu>=4.2.1,<4.3 +django-stubs>=1.9.0,<2.0 +djangorestframework>=3.12.4 +fasteners>=0.16.3,<0.17 +flake8>=4.0.1,<4.1 +idna>=3.3,<3.4 +isort>=5.10.1,<5.11 +kombu>=5.2.2,<5.3 laniakea>=1.17.0 -lazy-object-proxy>=1.3.1,<1.4 +lazy-object-proxy>=1.6.0,<1.7 mccabe>=0.6.1,<0.7 -mock==2.0.0; python_version == '2.7' -monotonic==1.5 -more-itertools>=4.2.0,<4.4 +monotonic==1.6 +more-itertools>=8.12.0,<8.13 mypy==0.910 -pluggy>=0.7.0,<0.8 -py>=1.5.3 -pycodestyle>=2.5,<2.6 -pyflakes>=2.1.1,<2.2 -pytest>=3.10.0,<4.0 -pytest-cov>=2.6.0,<2.7 -pytest-django>=3.4.4,<3.5 -pytest-flake8>=1.0.1,<1.1 -pytest-mock>=1.10.4,<1.11 -pytest-pythonpath>=0.7.2,<0.8 -python-dateutil>=2.8,<3 -pytz>=2018.4 -PyYAML>=5.1,<6.0 -redis>=2.10.6,<2.11 -requests>=2.20.1,<3 -singledispatch>=3.4.0.3,<3.4.1; python_version == '2.7' -six>=1.12.0 +pluggy>=1.0.0,<1.1 +py>=1.11.0 +pycodestyle>=2.8.0,<2.9 +pyflakes>=2.4.0,<2.5 +pytest>=6.2.5,<6.3 +pytest-cov>=3.0.0,<3.1 +pytest-django>=4.5.2,<4.6 +pytest-flake8>=1.0.7,<1.1 +pytest-mock>=3.6.1,<3.7 +pytest-pythonpath>=0.7.3,<0.8 +python-dateutil>=2.8.2,<3 +pytz>=2021.3 +PyYAML>=6.0,<6.1 +redis>=4.0.2,<4.1 +requests>=2.26.0,<3 +six>=1.16.0 # fuzzing-decision is only needed for the taskmanager module (requires python 3) #git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision -types-boto==0.1.4 -types-mock==0.1.5 -types-PyYAML==5.4.6 -types-python-dateutil==0.1.6 -types-redis==3.5.6 -types-requests==2.25.6 -types-six==0.1.9 -urllib3>=1.22,<2 -vine>=1.1.4,<1.2 +types-boto==2.49.2 +types-mock==4.0.4 +types-PyYAML==6.0.1 +types-python-dateutil==2.8.3 +types-redis==4.0.3 +types-requests==2.26.1 +types-six==1.16.3 +urllib3>=1.26.7,<2 +vine>=5.0.0,<5.1 whitenoise==5.2.0 -wrapt>=1.10.11,<1.11 +wrapt>=1.13.3,<1.14 #django-livesync==0.4 From 68a1b9209a8e7c0660e1d8aa8e050925cbd8f7ec Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 12 Dec 2021 02:29:48 -0800 Subject: [PATCH 036/137] 1740 mypy issues left --- server/crashmanager/views.py | 107 ++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/server/crashmanager/views.py b/server/crashmanager/views.py index 989c18f57..ab0d54cb8 100644 --- a/server/crashmanager/views.py +++ b/server/crashmanager/views.py @@ -7,6 +7,8 @@ from django.db.models.aggregates import Count, Min from django.http import Http404, HttpResponse from django.http.request import HttpRequest +from django.http.response import HttpResponsePermanentRedirect +from django.http.response import HttpResponseRedirect from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse, reverse_lazy from django.utils import timezone @@ -24,6 +26,7 @@ from rest_framework.response import Response from rest_framework.views import APIView import six +from typing import cast from wsgiref.util import FileWrapper @@ -48,18 +51,18 @@ def default(self, obj): return super().default(obj) -def check_authorized_for_crash_entry(request, entry): - user = User.get_or_create_restricted(request.user)[0] +def check_authorized_for_crash_entry(request: HttpRequest, entry: CrashEntry) -> None: + user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: defaultToolsFilter = user.defaultToolsFilter.all() if not defaultToolsFilter or entry.tool not in defaultToolsFilter: raise PermissionDenied({"message": "You don't have permission to access this crash entry."}) - return + return None -def check_authorized_for_signature(request, signature): - user = User.get_or_create_restricted(request.user)[0] +def check_authorized_for_signature(request: HttpRequest, signature: Bucket) -> None: + user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: defaultToolsFilter = user.defaultToolsFilter.all() if not defaultToolsFilter: @@ -71,17 +74,17 @@ def check_authorized_for_signature(request, signature): if not entries: raise PermissionDenied({"message": "You don't have permission to access this signature."}) - return + return None def deny_restricted_users(request: HttpRequest) -> None: - user = User.get_or_create_restricted(request.user)[0] + user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: raise PermissionDenied({"message": "Restricted users cannot use this feature."}) -def filter_crash_entries_by_toolfilter(request, entries, restricted_only=False): - user = User.get_or_create_restricted(request.user)[0] +def filter_crash_entries_by_toolfilter(request: HttpRequest, entries, restricted_only=False): + user = cast(User, User.get_or_create_restricted(request.user)[0]) if restricted_only and not user.restricted: return entries @@ -95,8 +98,8 @@ def filter_crash_entries_by_toolfilter(request, entries, restricted_only=False): return entries -def filter_signatures_by_toolfilter(request, signatures, restricted_only=False, legacy_filters=True): - user = User.get_or_create_restricted(request.user)[0] +def filter_signatures_by_toolfilter(request: HttpRequest, signatures, restricted_only=False, legacy_filters=True): + user = cast(User, User.get_or_create_restricted(request.user)[0]) if restricted_only and not user.restricted: return signatures @@ -123,8 +126,8 @@ def filter_signatures_by_toolfilter(request, signatures, restricted_only=False, return signatures -def filter_bucket_hits_by_toolfilter(request, hits, restricted_only=False): - user = User.get_or_create_restricted(request.user)[0] +def filter_bucket_hits_by_toolfilter(request: HttpRequest, hits, restricted_only=False): + user = cast(User, User.get_or_create_restricted(request.user)[0]) if restricted_only and not user.restricted: return hits @@ -138,11 +141,11 @@ def filter_bucket_hits_by_toolfilter(request, hits, restricted_only=False): return hits -def renderError(request, err): +def renderError(request: HttpRequest, err: str) -> HttpResponse: return render(request, 'error.html', {'error_message': err}) -def stats(request): +def stats(request: HttpRequest) -> HttpResponse: lastHourDelta = timezone.now() - timedelta(hours=1) print(lastHourDelta) entries = CrashEntry.objects.filter(created__gt=lastHourDelta).select_related('bucket') @@ -175,18 +178,18 @@ def stats(request): }) -def settings(request): +def settings(request: HttpRequest) -> HttpResponse: return render(request, 'settings.html') -def watchedSignatures(request): +def watchedSignatures(request: HttpRequest) -> HttpResponse: # for this user, list watches # buckets sig new crashes remove # ======================================== # 1 crash 10 tr # 2 assert 0 tr # 3 blah 0 tr - user = User.get_or_create_restricted(request.user)[0] + user = cast(User, User.get_or_create_restricted(request.user)[0]) filters = { 'user': user, @@ -221,8 +224,8 @@ def watchedSignatures(request): return render(request, 'signatures/watch.html', {'siglist': buckets}) -def deleteBucketWatch(request, sigid): - user = User.get_or_create_restricted(request.user)[0] +def deleteBucketWatch(request: HttpRequest, sigid: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: + user = cast(User, User.get_or_create_restricted(request.user)[0]) if request.method == 'POST': entry = get_object_or_404(BucketWatch, user=user, bucket=sigid) @@ -235,9 +238,9 @@ def deleteBucketWatch(request, sigid): raise SuspiciousOperation() -def newBucketWatch(request): +def newBucketWatch(request: HttpRequest) -> HttpResponseRedirect | HttpResponsePermanentRedirect: if request.method == 'POST': - user = User.get_or_create_restricted(request.user)[0] + user = cast(User, User.get_or_create_restricted(request.user)[0]) bucket = get_object_or_404(Bucket, pk=int(request.POST['bucket'])) for watch in BucketWatch.objects.filter(user=user, bucket=bucket): watch.lastCrash = int(request.POST['crash']) @@ -251,14 +254,14 @@ def newBucketWatch(request): raise SuspiciousOperation() -def bucketWatchCrashes(request, sigid): - user = User.get_or_create_restricted(request.user)[0] +def bucketWatchCrashes(request: HttpRequest, sigid: int) -> HttpResponse: + user = cast(User, User.get_or_create_restricted(request.user)[0]) bucket = get_object_or_404(Bucket, pk=sigid) watch = get_object_or_404(BucketWatch, user=user, bucket=bucket) return render(request, 'crashes/index.html', {'restricted': user.restricted, 'watchId': watch.id}) -def signatures(request): +def signatures(request: HttpRequest) -> HttpResponse: providers = BugProviderSerializer(BugProvider.objects.all(), many=True).data return render( request, @@ -270,16 +273,16 @@ def signatures(request): ) -def index(request): +def index(request: HttpRequest) -> HttpResponse: return redirect('crashmanager:crashes') -def crashes(request): - user = User.get_or_create_restricted(request.user)[0] +def crashes(request: HttpRequest) -> HttpResponse: + user = cast(User, User.get_or_create_restricted(request.user)[0]) return render(request, 'crashes/index.html', {'restricted': user.restricted}) -def viewCrashEntry(request, crashid): +def viewCrashEntry(request: HttpRequest, crashid: int) -> HttpResponse: entry = get_object_or_404(CrashEntry, pk=crashid) check_authorized_for_crash_entry(request, entry) entry.deserializeFields() @@ -292,7 +295,7 @@ def viewCrashEntry(request, crashid): return render(request, 'crashes/view.html', {'entry': entry, 'providers': json.dumps(providers)}) -def editCrashEntry(request, crashid): +def editCrashEntry(request: HttpRequest, crashid: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: entry = get_object_or_404(CrashEntry, pk=crashid) check_authorized_for_crash_entry(request, entry) entry.deserializeFields() @@ -330,7 +333,7 @@ def editCrashEntry(request, crashid): return render(request, 'crashes/edit.html', {'entry': entry}) -def deleteCrashEntry(request, crashid): +def deleteCrashEntry(request: HttpRequest, crashid: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: entry = get_object_or_404(CrashEntry, pk=crashid) check_authorized_for_crash_entry(request, entry) @@ -343,7 +346,7 @@ def deleteCrashEntry(request, crashid): raise SuspiciousOperation -def newSignature(request): +def newSignature(request: HttpRequest) -> HttpResponse: if request.method != 'GET': raise SuspiciousOperation @@ -404,7 +407,7 @@ def newSignature(request): return render(request, 'signatures/edit.html', data) -def deleteSignature(request, sigid): +def deleteSignature(request: HttpRequest, sigid: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: bucket = Bucket.objects.filter(pk=sigid).annotate(size=Count('crashentry')) if not bucket: raise Http404 @@ -426,7 +429,7 @@ def deleteSignature(request, sigid): raise SuspiciousOperation -def viewSignature(request, sigid): +def viewSignature(request: HttpRequest, sigid: int) -> HttpResponse: bucket = BucketVueViewSet.as_view({'get': 'retrieve'})(request, pk=sigid).data if bucket['best_entry'] is not None: best_entry_size = get_object_or_404(CrashEntry, pk=bucket['best_entry']).testcase.size @@ -444,7 +447,7 @@ def viewSignature(request, sigid): }) -def editSignature(request, sigid): +def editSignature(request: HttpRequest, sigid: int) -> HttpResponse: if request.method != 'GET' or sigid is None: raise SuspiciousOperation @@ -459,7 +462,7 @@ def editSignature(request, sigid): return render(request, 'signatures/edit.html', {'bucketId': bucket.pk, 'proposedSig': proposedSignature}) -def trySignature(request, sigid, crashid): +def trySignature(request: HttpRequest, sigid: int, crashid: int) -> HttpResponse: bucket = get_object_or_404(Bucket, pk=sigid) check_authorized_for_signature(request, bucket) @@ -475,7 +478,7 @@ def trySignature(request, sigid, crashid): return render(request, 'signatures/try.html', {'bucket': bucket, 'entry': entry, 'diff': diff}) -def optimizeSignature(request, sigid): +def optimizeSignature(request: HttpRequest, sigid: int) -> HttpResponse: bucket = get_object_or_404(Bucket, pk=sigid) check_authorized_for_signature(request, bucket) @@ -492,7 +495,7 @@ def optimizeSignature(request, sigid): 'diff': diff, 'matchingEntries': matchingEntries}) -def optimizeSignaturePrecomputed(request, sigid): +def optimizeSignaturePrecomputed(request: HttpRequest, sigid: int) -> HttpResponse: bucket = get_object_or_404(Bucket, pk=sigid) check_authorized_for_signature(request, bucket) @@ -524,7 +527,7 @@ def optimizeSignaturePrecomputed(request, sigid): 'diff': diff, 'matchingEntries': matchingEntries}) -def findSignatures(request, crashid): +def findSignatures(request: HttpRequest, crashid: int) -> HttpResponse: entry = get_object_or_404(CrashEntry, pk=crashid) check_authorized_for_crash_entry(request, entry) @@ -618,7 +621,7 @@ def findSignatures(request, crashid): return render(request, 'signatures/find.html', {'buckets': similarBuckets, 'crashentry': entry}) -def createExternalBug(request, crashid): +def createExternalBug(request: HttpRequest, crashid: int): entry = get_object_or_404(CrashEntry, pk=crashid) check_authorized_for_crash_entry(request, entry) @@ -630,7 +633,7 @@ def createExternalBug(request, crashid): if 'provider' in request.GET: provider = get_object_or_404(BugProvider, pk=request.GET['provider']) else: - user = User.get_or_create_restricted(request.user)[0] + user = cast(User, User.get_or_create_restricted(request.user)[0]) provider = get_object_or_404(BugProvider, pk=user.defaultProviderId) template = provider.getInstance().getTemplateForUser(request, entry) @@ -645,7 +648,7 @@ def createExternalBug(request, crashid): raise SuspiciousOperation -def createExternalBugComment(request, crashid): +def createExternalBugComment(request: HttpRequest, crashid: int) -> HttpResponse: entry = get_object_or_404(CrashEntry, pk=crashid) check_authorized_for_crash_entry(request, entry) @@ -653,7 +656,7 @@ def createExternalBugComment(request, crashid): if 'provider' in request.GET: provider = get_object_or_404(BugProvider, pk=request.GET['provider']) else: - user = User.get_or_create_restricted(request.user)[0] + user = cast(User, User.get_or_create_restricted(request.user)[0]) provider = get_object_or_404(BugProvider, pk=user.defaultProviderId) template = provider.getInstance().getTemplateForUser(request, entry) @@ -668,12 +671,12 @@ def createExternalBugComment(request, crashid): raise SuspiciousOperation -def viewBugProviders(request): +def viewBugProviders(request: HttpRequest) -> HttpResponse: providers = BugProvider.objects.annotate(size=Count('bug')) return render(request, 'providers/index.html', {'providers': providers}) -def deleteBugProvider(request, providerId): +def deleteBugProvider(request: HttpRequest, providerId: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: deny_restricted_users(request) provider = get_object_or_404(BugProvider, pk=providerId) @@ -693,7 +696,7 @@ def deleteBugProvider(request, providerId): raise SuspiciousOperation -def viewBugProvider(request, providerId): +def viewBugProvider(request: HttpRequest, providerId: int) -> HttpResponse: provider = BugProvider.objects.filter(pk=providerId).annotate(size=Count('bug')) if not provider: @@ -704,7 +707,7 @@ def viewBugProvider(request, providerId): return render(request, 'providers/view.html', {'provider': provider}) -def editBugProvider(request, providerId): +def editBugProvider(request: HttpRequest, providerId: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: deny_restricted_users(request) provider = get_object_or_404(BugProvider, pk=providerId) @@ -726,7 +729,7 @@ def editBugProvider(request, providerId): raise SuspiciousOperation -def createBugProvider(request): +def createBugProvider(request: HttpRequest) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: deny_restricted_users(request) if request.method == 'POST': @@ -746,7 +749,7 @@ def createBugProvider(request): raise SuspiciousOperation -def duplicateBugzillaTemplate(request, templateId): +def duplicateBugzillaTemplate(request: HttpRequest, templateId: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect: clone = get_object_or_404(BugzillaTemplate, pk=templateId) clone.pk = None # to autogen a new pk on save() clone.name = "Clone of " + clone.name @@ -872,7 +875,7 @@ def get_serializer(self, *args, **kwds): def partial_update(self, request, pk=None): """Update individual crash fields.""" - user = User.get_or_create_restricted(request.user)[0] + user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: raise MethodNotAllowed(request.method) @@ -950,7 +953,7 @@ def list(self, request, *args, **kwargs): return response def retrieve(self, request, *args, **kwargs): - user = User.get_or_create_restricted(request.user)[0] + user = cast(User, User.get_or_create_restricted(request.user)[0]) instance = self.get_object() ignore_toolfilter = getattr(self, "ignore_toolfilter", False) @@ -1040,7 +1043,7 @@ def update(self, request, *args, **kwargs): raise MethodNotAllowed(request.method) def partial_update(self, request, *args, **kwargs): - user = User.get_or_create_restricted(request.user)[0] + user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: raise MethodNotAllowed(request.method) From 486f9120d0ae4b1a0a5753f7702a689b1c21d96e Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 12 Dec 2021 03:26:44 -0800 Subject: [PATCH 037/137] Revert "Bump server requirements3.10.txt package versions to latest and remove those that require Python 2.7, this will fix some missing types in some packages" This reverts commit 040044bf9420c1efd93eee1e282fdf0a9ce6a8cf. --- server/requirements3.10.txt | 105 +++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/server/requirements3.10.txt b/server/requirements3.10.txt index 8e377ad56..bf26af0a2 100644 --- a/server/requirements3.10.txt +++ b/server/requirements3.10.txt @@ -1,61 +1,68 @@ -amqp>=5.0.6,<5.1 -appdirs>=1.4.4,<1.5 -atomicwrites>=1.4.0,<1.5 -attrs>=21.2.0,<21.3 -billiard>=3.6.4.0,<3.7 -boto>=2.49.0,<2.50 -boto3==1.20.23 -boto3-stubs>=1.20.23,<1.21 -celery>=5.2.1,<5.3 -celery-types>=0.9.3,<0.10 -certifi>=2021.10.8 -chardet>=4.0.0,<4.1 -coverage==6.2 +amqp>=2.3.2,<2.4 +appdirs>=1.4.3,<1.5 +atomicwrites>=1.1.5,<1.3 +attrs>=18.1.0,<19 +backports.functools-lru-cache==1.5; python_version == '2.7' +billiard>=3.5.0.3,<3.6 +boto>=2.48.0,<2.50 +boto3==1.7.78 +boto3-stubs>=1.20.15 +celery>=4.1.1,<4.3 +celery-types>=0.9.3 +certifi>=2018.4.16 +chardet>=3.0.4,<3.1 +configparser>=3.5.0,<3.6; python_version == '2.7' +coverage==5.5 Django>=3.0,<3.1 django-chartjs==1.3 django-crispy-forms==1.11.2 django-enumfields==2.1.1 django-notifications-hq==1.6.0 -django-stubs>=1.9.0,<2.0 -djangorestframework>=3.12.4 -fasteners>=0.16.3,<0.17 -flake8>=4.0.1,<4.1 -idna>=3.3,<3.4 -isort>=5.10.1,<5.11 -kombu>=5.2.2,<5.3 +django-stubs>=1.9.0 +djangorestframework>=3.9.4 +enum34>=1.1.6,<1.2; python_version == '2.7' +fasteners>=0.14.1,<0.15 +flake8>=3.7.9,<3.8 +funcsigs>=1.0.2,<1.1; python_version == '2.7' +futures>=3.2.0,<3.3; python_version == '2.7' +idna>=2.6,<2.8 +isort>=4.3.4,<4.4 +kombu>=4.2.1,<4.3 laniakea>=1.17.0 -lazy-object-proxy>=1.6.0,<1.7 +lazy-object-proxy>=1.3.1,<1.4 mccabe>=0.6.1,<0.7 -monotonic==1.6 -more-itertools>=8.12.0,<8.13 +mock==2.0.0; python_version == '2.7' +monotonic==1.5 +more-itertools>=4.2.0,<4.4 mypy==0.910 -pluggy>=1.0.0,<1.1 -py>=1.11.0 -pycodestyle>=2.8.0,<2.9 -pyflakes>=2.4.0,<2.5 -pytest>=6.2.5,<6.3 -pytest-cov>=3.0.0,<3.1 -pytest-django>=4.5.2,<4.6 -pytest-flake8>=1.0.7,<1.1 -pytest-mock>=3.6.1,<3.7 -pytest-pythonpath>=0.7.3,<0.8 -python-dateutil>=2.8.2,<3 -pytz>=2021.3 -PyYAML>=6.0,<6.1 -redis>=4.0.2,<4.1 -requests>=2.26.0,<3 -six>=1.16.0 +pluggy>=0.7.0,<0.8 +py>=1.5.3 +pycodestyle>=2.5,<2.6 +pyflakes>=2.1.1,<2.2 +pytest>=3.10.0,<4.0 +pytest-cov>=2.6.0,<2.7 +pytest-django>=3.4.4,<3.5 +pytest-flake8>=1.0.1,<1.1 +pytest-mock>=1.10.4,<1.11 +pytest-pythonpath>=0.7.2,<0.8 +python-dateutil>=2.8,<3 +pytz>=2018.4 +PyYAML>=5.1,<6.0 +redis>=2.10.6,<2.11 +requests>=2.20.1,<3 +singledispatch>=3.4.0.3,<3.4.1; python_version == '2.7' +six>=1.12.0 # fuzzing-decision is only needed for the taskmanager module (requires python 3) #git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision -types-boto==2.49.2 -types-mock==4.0.4 -types-PyYAML==6.0.1 -types-python-dateutil==2.8.3 -types-redis==4.0.3 -types-requests==2.26.1 -types-six==1.16.3 -urllib3>=1.26.7,<2 -vine>=5.0.0,<5.1 +types-boto==0.1.4 +types-mock==0.1.5 +types-PyYAML==5.4.6 +types-python-dateutil==0.1.6 +types-redis==3.5.6 +types-requests==2.25.6 +types-six==0.1.9 +urllib3>=1.22,<2 +vine>=1.1.4,<1.2 whitenoise==5.2.0 -wrapt>=1.13.3,<1.14 +wrapt>=1.10.11,<1.11 #django-livesync==0.4 From ed971ef88f4fca16067071b884071d47f6be469a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 12 Dec 2021 03:27:18 -0800 Subject: [PATCH 038/137] Rename from requirements3.10.txt to requirements3.7.txt --- server/{requirements3.10.txt => requirements3.7.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename server/{requirements3.10.txt => requirements3.7.txt} (100%) diff --git a/server/requirements3.10.txt b/server/requirements3.7.txt similarity index 100% rename from server/requirements3.10.txt rename to server/requirements3.7.txt From daeed35934e3ca2fed2c5b050274aa067ebcdfdc Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 12 Dec 2021 03:30:28 -0800 Subject: [PATCH 039/137] Update requirements3.7.txt pytest-related packages and remove Python 2.7-related ones --- server/requirements3.7.txt | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index bf26af0a2..95ede98a5 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -2,7 +2,6 @@ amqp>=2.3.2,<2.4 appdirs>=1.4.3,<1.5 atomicwrites>=1.1.5,<1.3 attrs>=18.1.0,<19 -backports.functools-lru-cache==1.5; python_version == '2.7' billiard>=3.5.0.3,<3.6 boto>=2.48.0,<2.50 boto3==1.7.78 @@ -11,7 +10,6 @@ celery>=4.1.1,<4.3 celery-types>=0.9.3 certifi>=2018.4.16 chardet>=3.0.4,<3.1 -configparser>=3.5.0,<3.6; python_version == '2.7' coverage==5.5 Django>=3.0,<3.1 django-chartjs==1.3 @@ -20,18 +18,14 @@ django-enumfields==2.1.1 django-notifications-hq==1.6.0 django-stubs>=1.9.0 djangorestframework>=3.9.4 -enum34>=1.1.6,<1.2; python_version == '2.7' fasteners>=0.14.1,<0.15 flake8>=3.7.9,<3.8 -funcsigs>=1.0.2,<1.1; python_version == '2.7' -futures>=3.2.0,<3.3; python_version == '2.7' idna>=2.6,<2.8 isort>=4.3.4,<4.4 kombu>=4.2.1,<4.3 laniakea>=1.17.0 lazy-object-proxy>=1.3.1,<1.4 mccabe>=0.6.1,<0.7 -mock==2.0.0; python_version == '2.7' monotonic==1.5 more-itertools>=4.2.0,<4.4 mypy==0.910 @@ -39,18 +33,17 @@ pluggy>=0.7.0,<0.8 py>=1.5.3 pycodestyle>=2.5,<2.6 pyflakes>=2.1.1,<2.2 -pytest>=3.10.0,<4.0 -pytest-cov>=2.6.0,<2.7 -pytest-django>=3.4.4,<3.5 -pytest-flake8>=1.0.1,<1.1 -pytest-mock>=1.10.4,<1.11 -pytest-pythonpath>=0.7.2,<0.8 +pytest>=6.2.5,<6.3 +pytest-cov>=3.0.0,<3.1 +pytest-django>=4.5.2,<4.6 +pytest-flake8>=1.0.7,<1.1 +pytest-mock>=3.6.1,<3.7 +pytest-pythonpath>=0.7.3,<0.8 python-dateutil>=2.8,<3 pytz>=2018.4 PyYAML>=5.1,<6.0 redis>=2.10.6,<2.11 requests>=2.20.1,<3 -singledispatch>=3.4.0.3,<3.4.1; python_version == '2.7' six>=1.12.0 # fuzzing-decision is only needed for the taskmanager module (requires python 3) #git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision From 459ae00b17f612fa417c0c2e20ace3940295a492 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 12 Dec 2021 03:34:41 -0800 Subject: [PATCH 040/137] Also bump attrs and pluggy versions as latest pytest 6.2.5 requires them --- server/requirements3.7.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 95ede98a5..d958793b1 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -1,7 +1,7 @@ amqp>=2.3.2,<2.4 appdirs>=1.4.3,<1.5 atomicwrites>=1.1.5,<1.3 -attrs>=18.1.0,<19 +attrs>=21.2.0,<21.3 billiard>=3.5.0.3,<3.6 boto>=2.48.0,<2.50 boto3==1.7.78 @@ -29,7 +29,7 @@ mccabe>=0.6.1,<0.7 monotonic==1.5 more-itertools>=4.2.0,<4.4 mypy==0.910 -pluggy>=0.7.0,<0.8 +pluggy>=1.0.0,<1.1 py>=1.5.3 pycodestyle>=2.5,<2.6 pyflakes>=2.1.1,<2.2 From 82ec20cfa2dedd48c5c296688e10efcbc27545ce Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 13 Dec 2021 19:25:01 -0800 Subject: [PATCH 041/137] Remove some mypy ignore messages since we are now on a pytest version with type information --- .../SourceCodeProvider/tests/test_sourcecodeprovider.py | 6 +++--- server/ec2spotmanager/tests/test_tasks.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py index 4e39a993d..ebcc8ffc2 100644 --- a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py +++ b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py @@ -24,7 +24,7 @@ from covmanager.SourceCodeProvider.SourceCodeProvider import Utils -@pytest.fixture() # type: ignore[misc] +@pytest.fixture() def git_repo(tmp_path: Path): shutil.copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test-git"), str(tmp_path / "test-git")) @@ -32,7 +32,7 @@ def git_repo(tmp_path: Path): yield str(tmp_path / "test-git") -@pytest.fixture() # type: ignore[misc] +@pytest.fixture() def hg_repo(tmp_path: Path): shutil.copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test-hg"), str(tmp_path / "test-hg")) @@ -96,7 +96,7 @@ def test_HGSourceCodeProvider(hg_repo: str) -> None: assert len(parents) == 0 -@pytest.mark.skipif(not os.path.isdir("/home/decoder/Mozilla/repos/mozilla-central-fm"), reason="not decoder") # type: ignore[misc] +@pytest.mark.skipif(not os.path.isdir("/home/decoder/Mozilla/repos/mozilla-central-fm"), reason="not decoder") def test_HGDiff() -> None: provider = HGSourceCodeProvider("/home/decoder/Mozilla/repos/mozilla-central-fm") diff = provider.getUnifiedDiff("4f8e0cb21016") diff --git a/server/ec2spotmanager/tests/test_tasks.py b/server/ec2spotmanager/tests/test_tasks.py index 6b8ee3a59..179b2963a 100644 --- a/server/ec2spotmanager/tests/test_tasks.py +++ b/server/ec2spotmanager/tests/test_tasks.py @@ -31,7 +31,7 @@ pytestmark = pytest.mark.usefixtures('ec2spotmanager_test', 'raise_on_status') # pylint: disable=invalid-name -@pytest.mark.usefixtures('mock_provider') # type: ignore[misc] +@pytest.mark.usefixtures('mock_provider') def test_nothing_to_do() -> None: """nothing is done if no pools are enabled""" From d2a96665b31143209a0e89d730816e6e973eac18 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 15 Dec 2021 17:34:13 -0800 Subject: [PATCH 042/137] Bump mypy to 0.920 --- server/requirements3.7.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index d958793b1..f8dbc2b13 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -28,7 +28,7 @@ lazy-object-proxy>=1.3.1,<1.4 mccabe>=0.6.1,<0.7 monotonic==1.5 more-itertools>=4.2.0,<4.4 -mypy==0.910 +mypy==0.920 pluggy>=1.0.0,<1.1 py>=1.5.3 pycodestyle>=2.5,<2.6 From 4c073b5320a091ed266ce4864444f6e035495f5c Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 15 Dec 2021 23:48:33 -0800 Subject: [PATCH 043/137] Add djangorestframework-stubs as a dependency --- server/requirements3.7.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index f8dbc2b13..ad06096b2 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -18,6 +18,7 @@ django-enumfields==2.1.1 django-notifications-hq==1.6.0 django-stubs>=1.9.0 djangorestframework>=3.9.4 +djangorestframework-stubs>=1.4.0 fasteners>=0.14.1,<0.15 flake8>=3.7.9,<3.8 idna>=2.6,<2.8 From c7765bd3715316b88fc1730400123242aa574120 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 15 Dec 2021 23:50:23 -0800 Subject: [PATCH 044/137] 1672 mypy issues left --- misc/libfuzzer/libfuzzer.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/misc/libfuzzer/libfuzzer.py b/misc/libfuzzer/libfuzzer.py index 93e652677..7fb59bfd0 100755 --- a/misc/libfuzzer/libfuzzer.py +++ b/misc/libfuzzer/libfuzzer.py @@ -24,6 +24,8 @@ import subprocess import sys import threading +from typing import IO +from typing import cast from Collector.Collector import Collector # noqa from FTB.ProgramConfiguration import ProgramConfiguration # noqa @@ -31,15 +33,15 @@ class LibFuzzerMonitor(threading.Thread): - def __init__(self, fd): + def __init__(self, fd: IO[str]): assert callable(fd.readline) threading.Thread.__init__(self) self.fd = fd - self.trace = [] + self.trace: list[str] = [] self.inTrace = False - self.testcase = None + self.testcase: str | None = None def run(self) -> None: while True: @@ -64,10 +66,10 @@ def run(self) -> None: self.fd.close() - def getASanTrace(self): + def getASanTrace(self) -> list[str]: return self.trace - def getTestcase(self): + def getTestcase(self) -> str | None: return self.testcase @@ -77,7 +79,7 @@ def getTestcase(self): __updated__ = '2016-07-28' -def main(argv: list[str] | None = None) -> int: +def main(argv: list[str] | None = None) -> int | None: '''Command line options.''' program_name = os.path.basename(sys.argv[0]) @@ -201,7 +203,7 @@ def main(argv: list[str] | None = None) -> int: universal_newlines=True ) - monitor = LibFuzzerMonitor(process.stderr) + monitor = LibFuzzerMonitor(cast(IO[str], process.stderr)) monitor.start() monitor.join() @@ -231,6 +233,8 @@ def main(argv: list[str] | None = None) -> int: print("Too many crashes with the same signature, exiting...", file=sys.stderr) break + return None + if __name__ == "__main__": sys.exit(main()) From 20e7987c8e1135ad997e36ebc8f9922d8624da07 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 16 Dec 2021 00:03:39 -0800 Subject: [PATCH 045/137] 1656 mypy issues left --- server/covmanager/serializers.py | 8 ++++---- server/crashmanager/forms.py | 6 +++--- server/crashmanager/serializers.py | 10 +++++----- server/crashmanager/views.py | 12 ++++++------ server/ec2spotmanager/serializers.py | 6 +++--- server/taskmanager/serializers.py | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/server/covmanager/serializers.py b/server/covmanager/serializers.py index dbfaf2afb..e9c1f22cb 100644 --- a/server/covmanager/serializers.py +++ b/server/covmanager/serializers.py @@ -14,7 +14,7 @@ class InvalidArgumentException(APIException): status_code = 400 -class CollectionSerializer(serializers.ModelSerializer): +class CollectionSerializer(serializers.ModelSerializer[Collection]): # We need to redefine several fields explicitly because we flatten our # foreign keys into these fields instead of using primary keys, hyperlinks # or slug fields. All of the other solutions would require the client to @@ -91,14 +91,14 @@ def create(self, attrs): return super(CollectionSerializer, self).create(attrs) -class RepositorySerializer(serializers.ModelSerializer): +class RepositorySerializer(serializers.ModelSerializer[Repository]): class Meta: model = Repository fields = ('name',) read_only_fields = ('name',) -class ReportConfigurationSerializer(serializers.ModelSerializer): +class ReportConfigurationSerializer(serializers.ModelSerializer[ReportConfiguration]): repository = serializers.CharField(source='repository.name', max_length=255) class Meta: @@ -154,7 +154,7 @@ def create(self, attrs): return super(ReportConfigurationSerializer, self).create(attrs) -class ReportSerializer(serializers.ModelSerializer): +class ReportSerializer(serializers.ModelSerializer[Report]): class Meta: model = Report fields = ( diff --git a/server/crashmanager/forms.py b/server/crashmanager/forms.py index d983f08da..892db1cd7 100644 --- a/server/crashmanager/forms.py +++ b/server/crashmanager/forms.py @@ -14,7 +14,7 @@ class Row(Div): css_class = 'row' -class BugzillaTemplateBugForm(ModelForm): +class BugzillaTemplateBugForm(ModelForm[BugzillaTemplate]): helper = FormHelper() helper.layout = Layout( HTML("""
"""), @@ -127,7 +127,7 @@ class Meta: widgets['attrs'] = Textarea(attrs={'rows': 2}) -class BugzillaTemplateCommentForm(ModelForm): +class BugzillaTemplateCommentForm(ModelForm[BugzillaTemplate]): helper = FormHelper() helper.layout = Layout( HTML("""
"""), @@ -158,7 +158,7 @@ class Meta: } -class UserSettingsForm(ModelForm): +class UserSettingsForm(ModelForm[User]): helper = FormHelper() helper.layout = Layout( 'defaultToolsFilter', diff --git a/server/crashmanager/serializers.py b/server/crashmanager/serializers.py index d3e7f48aa..ac8c0a566 100644 --- a/server/crashmanager/serializers.py +++ b/server/crashmanager/serializers.py @@ -20,7 +20,7 @@ class InvalidArgumentException(APIException): status_code = 400 -class CrashEntrySerializer(serializers.ModelSerializer): +class CrashEntrySerializer(serializers.ModelSerializer[CrashEntry]): # We need to redefine several fields explicitly because we flatten our # foreign keys into these fields instead of using primary keys, hyperlinks # or slug fields. All of the other solutions would require the client to @@ -126,7 +126,7 @@ def create(self, attrs): raise -class BucketSerializer(serializers.ModelSerializer): +class BucketSerializer(serializers.ModelSerializer[Bucket]): signature = serializers.CharField(style={'base_template': 'textarea.html'}, required=False) bug = serializers.CharField(source='bug.externalId', default=None, allow_null=True) # write_only here means don't try to read it automatically in super().to_representation() @@ -248,13 +248,13 @@ def get_find_sigs_url(self, entry): return reverse('crashmanager:findsigs', kwargs={'crashid': entry.id}) -class BugProviderSerializer(serializers.ModelSerializer): +class BugProviderSerializer(serializers.ModelSerializer[BugProvider]): class Meta: model = BugProvider fields = ('id', 'classname', 'hostname', 'urlTemplate',) -class BugzillaTemplateSerializer(serializers.ModelSerializer): +class BugzillaTemplateSerializer(serializers.ModelSerializer[BugzillaTemplate]): mode = serializers.SerializerMethodField() class Meta: @@ -270,7 +270,7 @@ def get_mode(self, obj): return obj.mode.value -class NotificationSerializer(serializers.ModelSerializer): +class NotificationSerializer(serializers.ModelSerializer[Notification]): actor_url = serializers.SerializerMethodField() target_url = serializers.SerializerMethodField() external_bug_url = serializers.SerializerMethodField() diff --git a/server/crashmanager/views.py b/server/crashmanager/views.py index ab0d54cb8..5c0c244dd 100644 --- a/server/crashmanager/views.py +++ b/server/crashmanager/views.py @@ -1280,20 +1280,20 @@ def get(self, request, format=None): return self.response(file_path, filename) -class BugzillaTemplateListView(ListView): +class BugzillaTemplateListView(ListView[BugzillaTemplate]): model = BugzillaTemplate template_name = 'bugzilla/list.html' paginate_by = 100 -class BugzillaTemplateDeleteView(DeleteView): +class BugzillaTemplateDeleteView(DeleteView[BugzillaTemplate]): model = BugzillaTemplate template_name = 'bugzilla/delete.html' success_url = reverse_lazy('crashmanager:templates') pk_url_kwarg = 'templateId' -class BugzillaTemplateEditView(UpdateView): +class BugzillaTemplateEditView(UpdateView[BugzillaTemplate]): model = BugzillaTemplate template_name = 'bugzilla/create_edit.html' success_url = reverse_lazy('crashmanager:templates') @@ -1311,7 +1311,7 @@ def get_form_class(self): return BugzillaTemplateCommentForm -class BugzillaTemplateBugCreateView(CreateView): +class BugzillaTemplateBugCreateView(CreateView[BugzillaTemplate]): model = BugzillaTemplate template_name = 'bugzilla/create_edit.html' form_class = BugzillaTemplateBugForm @@ -1327,7 +1327,7 @@ def form_valid(self, form): return super(BugzillaTemplateBugCreateView, self).form_valid(form) -class BugzillaTemplateCommentCreateView(CreateView): +class BugzillaTemplateCommentCreateView(CreateView[BugzillaTemplate]): model = BugzillaTemplate template_name = 'bugzilla/create_edit.html' form_class = BugzillaTemplateCommentForm @@ -1343,7 +1343,7 @@ def form_valid(self, form): return super(BugzillaTemplateCommentCreateView, self).form_valid(form) -class UserSettingsEditView(UpdateView): +class UserSettingsEditView(UpdateView[User]): model = User template_name = 'usersettings.html' form_class = UserSettingsForm diff --git a/server/ec2spotmanager/serializers.py b/server/ec2spotmanager/serializers.py index c94f8c3b3..c4f081690 100644 --- a/server/ec2spotmanager/serializers.py +++ b/server/ec2spotmanager/serializers.py @@ -4,10 +4,10 @@ from django.http.response import Http404 # noqa from rest_framework import serializers -from ec2spotmanager.models import Instance +from ec2spotmanager.models import Instance, PoolConfiguration -class PoolConfigurationSerializer(serializers.BaseSerializer): +class PoolConfigurationSerializer(serializers.BaseSerializer[PoolConfiguration]): id = serializers.IntegerField(read_only=True) parent = serializers.IntegerField(min_value=0, allow_null=True) name = serializers.CharField(max_length=255) @@ -77,7 +77,7 @@ def to_representation(self, obj): return result -class MachineStatusSerializer(serializers.ModelSerializer): +class MachineStatusSerializer(serializers.ModelSerializer[Instance]): status_data = serializers.CharField(max_length=4095) class Meta: diff --git a/server/taskmanager/serializers.py b/server/taskmanager/serializers.py index 8315c3853..4ad2d27bb 100644 --- a/server/taskmanager/serializers.py +++ b/server/taskmanager/serializers.py @@ -18,7 +18,7 @@ RUN_RATIO_THRESHOLD = 0.03 -class PoolSerializer(serializers.ModelSerializer): +class PoolSerializer(serializers.ModelSerializer[Pool]): class Meta: model = Pool fields = "__all__" @@ -93,7 +93,7 @@ def get_view_url(self, pool): return reverse('taskmanager:pool-view-ui', kwargs={'pk': pool.id}) -class TaskSerializer(serializers.ModelSerializer): +class TaskSerializer(serializers.ModelSerializer[Task]): status_data = serializers.CharField(trim_whitespace=False) class Meta: From 7a39d21a1a902a49f377162da57b189f90be23f9 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 16 Dec 2021 00:18:36 -0800 Subject: [PATCH 046/137] Use mock from unittest in stdlib since FuzzManager will be Python 3.7+ --- Collector/tests/test_Collector.py | 6 +----- EC2Reporter/tests/test_EC2Reporter.py | 7 ++----- TaskStatusReporter/tests/test_TaskStatusReporter.py | 7 ++----- server/crashmanager/tests/test_crashes_rest.py | 7 ++----- server/crashmanager/tests/test_mgmt_bug_update_status.py | 6 ++---- server/ec2spotmanager/tests/conftest.py | 6 +----- server/ec2spotmanager/tests/test_task_graph.py | 7 ++----- 7 files changed, 12 insertions(+), 34 deletions(-) diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index d289358e3..3af4a2437 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -18,6 +18,7 @@ import json import os import platform +from unittest.mock import Mock, patch import zipfile import pytest @@ -29,11 +30,6 @@ from FTB.ProgramConfiguration import ProgramConfiguration from crashmanager.models import CrashEntry -try: - from unittest.mock import Mock, patch -except ImportError: - from mock import Mock, patch - asanTraceCrash = '''ASAN:SIGSEGV ================================================================= diff --git a/EC2Reporter/tests/test_EC2Reporter.py b/EC2Reporter/tests/test_EC2Reporter.py index e788e8506..219698f21 100644 --- a/EC2Reporter/tests/test_EC2Reporter.py +++ b/EC2Reporter/tests/test_EC2Reporter.py @@ -1,5 +1,7 @@ from __future__ import annotations +from unittest.mock import Mock, patch + import pytest from django.utils import timezone from six.moves.urllib.parse import urlsplit @@ -8,11 +10,6 @@ from ec2spotmanager.models import Instance, InstancePool from ec2spotmanager.tests import create_config, create_instance, create_pool -try: - from unittest.mock import Mock, patch -except ImportError: - from mock import Mock, patch - pytestmark = pytest.mark.django_db(transaction=True) pytest_plugins = 'server.tests' diff --git a/TaskStatusReporter/tests/test_TaskStatusReporter.py b/TaskStatusReporter/tests/test_TaskStatusReporter.py index c2a4bb8bb..af2419c08 100644 --- a/TaskStatusReporter/tests/test_TaskStatusReporter.py +++ b/TaskStatusReporter/tests/test_TaskStatusReporter.py @@ -1,17 +1,14 @@ from __future__ import annotations import pytest +from unittest.mock import Mock, patch + from six.moves.urllib.parse import urlsplit from TaskStatusReporter.TaskStatusReporter import TaskStatusReporter, main from taskmanager.models import Task from taskmanager.tests import create_pool, create_task -try: - from unittest.mock import Mock, patch -except ImportError: - from mock import Mock, patch - pytestmark = pytest.mark.django_db(transaction=True) pytest_plugins = 'server.tests' diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index c17a9024c..98e500b11 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -16,15 +16,12 @@ import json import logging import os.path +from unittest.mock import Mock, patch + import pytest import requests from crashmanager.models import CrashEntry, TestCase as cmTestCase -try: - from unittest.mock import Mock, patch -except ImportError: - from mock import Mock, patch - # What should be allowed: # diff --git a/server/crashmanager/tests/test_mgmt_bug_update_status.py b/server/crashmanager/tests/test_mgmt_bug_update_status.py index 14d4720d3..64e4db2b0 100644 --- a/server/crashmanager/tests/test_mgmt_bug_update_status.py +++ b/server/crashmanager/tests/test_mgmt_bug_update_status.py @@ -13,6 +13,8 @@ from __future__ import annotations import json +from unittest.mock import patch + from django.contrib.auth.models import User from django.core.management import call_command, CommandError from notifications.models import Notification @@ -20,10 +22,6 @@ from crashmanager.models import Bucket, Bug, BugProvider, Client, CrashEntry, OS, Platform, \ Product, Tool, User as cmUser -try: - from unittest.mock import patch -except ImportError: - from mock import patch pytestmark = pytest.mark.django_db() # pylint: disable=invalid-name pytestmark = pytest.mark.usefixtures("crashmanager_test") diff --git a/server/ec2spotmanager/tests/conftest.py b/server/ec2spotmanager/tests/conftest.py index 9d80ced01..b8137bfaa 100644 --- a/server/ec2spotmanager/tests/conftest.py +++ b/server/ec2spotmanager/tests/conftest.py @@ -16,6 +16,7 @@ import functools import sys from typing import cast +from unittest.mock import Mock from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission @@ -24,11 +25,6 @@ from ec2spotmanager.CloudProvider.CloudProvider import CloudProvider from . import UncatchableException -try: - from unittest.mock import Mock -except ImportError: - from mock import Mock - def _create_user(username: str, email: str = "test@mozilla.com", password: str = "test", has_permission: bool = True) -> User: user = cast(User, User.objects.create_user(username, email, password)) diff --git a/server/ec2spotmanager/tests/test_task_graph.py b/server/ec2spotmanager/tests/test_task_graph.py index 7bce9dad7..c7599b5df 100644 --- a/server/ec2spotmanager/tests/test_task_graph.py +++ b/server/ec2spotmanager/tests/test_task_graph.py @@ -14,17 +14,14 @@ from __future__ import annotations import logging +from unittest.mock import call + import pytest from ec2spotmanager.cron import check_instance_pools from ec2spotmanager.tasks import terminate_instances from ec2spotmanager.CloudProvider.CloudProvider import INSTANCE_STATE from . import create_config, create_instance, create_pool -try: - from unittest.mock import call -except ImportError: - from mock import call - LOG = logging.getLogger('fm.ec2spotmanager.tests.task_graph') pytestmark = pytest.mark.usefixtures('ec2spotmanager_test', 'mock_provider') # pylint: disable=invalid-name From e240fbf54691188fcf2bc434c6c45086b74a7969 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 16 Dec 2021 00:19:00 -0800 Subject: [PATCH 047/137] 1649 mypy issues left --- server/crashmanager/management/commands/triage_new_crash.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/crashmanager/management/commands/triage_new_crash.py b/server/crashmanager/management/commands/triage_new_crash.py index bbc06250d..60a9a57fc 100644 --- a/server/crashmanager/management/commands/triage_new_crash.py +++ b/server/crashmanager/management/commands/triage_new_crash.py @@ -3,6 +3,7 @@ from argparse import ArgumentParser from collections import OrderedDict from typing import Any +from typing import OrderedDict from django.conf import settings from django.core.management import BaseCommand @@ -17,7 +18,7 @@ # although this cache looks pointless within this command, # the command is called in a loop from triage_new_crashes.py # and may be called multiple times in one process by celery -TRIAGE_CACHE = OrderedDict() +TRIAGE_CACHE: OrderedDict[str, list[int]] = OrderedDict() class Command(BaseCommand): From 8af00f10d688b9a7f89ddc16db222384d57cc86d Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 16 Dec 2021 00:41:47 -0800 Subject: [PATCH 048/137] Try turning on mypy on GitHub Actions temporarily --- .github/workflows/mypytmp.yml | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/mypytmp.yml diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml new file mode 100644 index 000000000..521431adf --- /dev/null +++ b/.github/workflows/mypytmp.yml @@ -0,0 +1,55 @@ +name: mypytmp + +on: + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + # pip cache dependencies to save time + - uses: actions/cache@v2 + if: startsWith(runner.os, 'Linux') + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + - name: pip cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + # - name: Install OS prerequisites + # if: startsWith(runner.os, 'Linux') + # run: sudo apt-get install ripgrep + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: | + python -u -m pip install --upgrade pip setuptools wheel + pip install -r server/requirements3.7.txt + pip install --upgrade -e . + + - name: Run mypy + run: | + py Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py From abb40b35d5eca0408ad13431032fd63e726dd71a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 16 Dec 2021 00:42:41 -0800 Subject: [PATCH 049/137] Revert "Try turning on mypy on GitHub Actions temporarily" This reverts commit 8af00f10d688b9a7f89ddc16db222384d57cc86d. --- .github/workflows/mypytmp.yml | 55 ----------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 .github/workflows/mypytmp.yml diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml deleted file mode 100644 index 521431adf..000000000 --- a/.github/workflows/mypytmp.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: mypytmp - -on: - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - # pip cache dependencies to save time - - uses: actions/cache@v2 - if: startsWith(runner.os, 'Linux') - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - name: pip cache - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - # - name: Install OS prerequisites - # if: startsWith(runner.os, 'Linux') - # run: sudo apt-get install ripgrep - - - name: Install dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: | - python -u -m pip install --upgrade pip setuptools wheel - pip install -r server/requirements3.7.txt - pip install --upgrade -e . - - - name: Run mypy - run: | - py Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py From 3800c84a45245636c42162b31116bb0b8bef4a63 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 16 Dec 2021 03:47:43 -0800 Subject: [PATCH 050/137] Switch to use typing-extensions since we are trying to aim for Python 3.7+ --- server/covmanager/views.py | 2 +- server/crashmanager/management/common.py | 2 +- server/requirements3.7.txt | 1 + server/server/settings.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/covmanager/views.py b/server/covmanager/views.py index 7130f54da..a5ddcf58f 100644 --- a/server/covmanager/views.py +++ b/server/covmanager/views.py @@ -1,7 +1,6 @@ from __future__ import annotations from datetime import datetime -from typing import TypedDict from typing import cast from django.conf import settings @@ -19,6 +18,7 @@ from rest_framework import mixins, viewsets, filters from rest_framework.authentication import TokenAuthentication, \ SessionAuthentication +from typing_extensions import TypedDict from wsgiref.util import FileWrapper from server.views import JsonQueryFilterBackend, SimpleQueryFilterBackend diff --git a/server/crashmanager/management/common.py b/server/crashmanager/management/common.py index dd1d2abc9..dfbcdd787 100644 --- a/server/crashmanager/management/common.py +++ b/server/crashmanager/management/common.py @@ -8,9 +8,9 @@ from types import TracebackType from typing import Any from typing import Callable -from typing import Literal from typing import Type from typing import TypeVar +from typing_extensions import Literal LOCK_PATH = os.path.realpath(os.path.join(settings.BASE_DIR, 'mgmt')) RetType = TypeVar("RetType") diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index ad06096b2..10ace09c4 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -55,6 +55,7 @@ types-python-dateutil==0.1.6 types-redis==3.5.6 types-requests==2.25.6 types-six==0.1.9 +typing-extensions==4.0.1 urllib3>=1.22,<2 vine>=1.1.4,<1.2 whitenoise==5.2.0 diff --git a/server/server/settings.py b/server/server/settings.py index 4539ca650..ad527024b 100644 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -12,9 +12,9 @@ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os -from typing import TypedDict from django.conf import global_settings from django.http.request import HttpRequest # noqa +from typing_extensions import TypedDict BASE_DIR = os.path.dirname(os.path.dirname(__file__)) From fa9255c855d436205c9759050cfa2a44f98e57a9 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 16 Dec 2021 04:17:13 -0800 Subject: [PATCH 051/137] 1639 mypy issues left --- server/crashmanager/models.py | 9 +++++- .../crashmanager/tests/test_user_settings.py | 6 ++-- server/crashmanager/views.py | 2 +- server/server/views.py | 29 ++++++++++++++----- 4 files changed, 33 insertions(+), 13 deletions(-) diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index 7afbb49ac..f6823fd4f 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -13,12 +13,14 @@ from django.contrib.contenttypes.models import ContentType from django.core.files.storage import FileSystemStorage from django.db import models +from django.db.models.query import QuerySet from django.db.models.signals import post_delete, post_save from django.dispatch.dispatcher import receiver from django.utils import timezone from enumfields import Enum, EnumField from notifications.signals import notify import six +from typing import TypeVar from FTB.ProgramConfiguration import ProgramConfiguration from FTB.Signatures.CrashInfo import CrashInfo @@ -27,6 +29,8 @@ if getattr(settings, 'USE_CELERY', None): from .tasks import triage_new_crash +MT = TypeVar("MT", bound=models.Model) + class Tool(models.Model): name = str(models.CharField(max_length=63)) @@ -489,7 +493,10 @@ def reparseCrashInfo(self): return self.save() @staticmethod - def deferRawFields(queryset, requiredOutputSources=()): + def deferRawFields( + queryset: QuerySet[MT], + requiredOutputSources: tuple[str, str, str] = ("", "", ""), + ) -> QuerySet[MT]: # This method calls defer() on the given query set for every raw field # that is not required as specified in requiredOutputSources. if "stdout" not in requiredOutputSources: diff --git a/server/crashmanager/tests/test_user_settings.py b/server/crashmanager/tests/test_user_settings.py index c9654feac..0b8a78166 100644 --- a/server/crashmanager/tests/test_user_settings.py +++ b/server/crashmanager/tests/test_user_settings.py @@ -23,7 +23,7 @@ pytestmark = pytest.mark.usefixtures("crashmanager_test") -def test_user_settings_no_login(client): +def test_user_settings_no_login(client) -> None: """Request without login hits the login redirect""" path = reverse("crashmanager:usersettings") resp = client.get(path) @@ -31,7 +31,7 @@ def test_user_settings_no_login(client): assert resp.url == '/login/?next=' + path -def test_user_settings_simple_get(client): +def test_user_settings_simple_get(client) -> None: """No errors are thrown in template""" client.login(username='test', password='test') path = reverse("crashmanager:usersettings") @@ -41,7 +41,7 @@ def test_user_settings_simple_get(client): assert response.context['user'] == User.objects.get(user__username='test').user -def test_user_settings_edit(client, cm): +def test_user_settings_edit(client, cm) -> None: """No errors are thrown in template""" tools = [Tool.objects.create(name="Tool #%d" % (i + 1)) for i in range(2)] providers = [ diff --git a/server/crashmanager/views.py b/server/crashmanager/views.py index 5c0c244dd..330ee14f0 100644 --- a/server/crashmanager/views.py +++ b/server/crashmanager/views.py @@ -1286,7 +1286,7 @@ class BugzillaTemplateListView(ListView[BugzillaTemplate]): paginate_by = 100 -class BugzillaTemplateDeleteView(DeleteView[BugzillaTemplate]): +class BugzillaTemplateDeleteView(DeleteView): model = BugzillaTemplate template_name = 'bugzilla/delete.html' success_url = reverse_lazy('crashmanager:templates') diff --git a/server/server/views.py b/server/server/views.py index 161dc471a..b3f7b60fb 100644 --- a/server/server/views.py +++ b/server/server/views.py @@ -5,18 +5,31 @@ from django.conf import settings from django.core.exceptions import PermissionDenied from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage +from django.db.models import Model from django.db.models import Q +from django.db.models.query import QuerySet +from django.http.request import HttpRequest +from django.http.response import HttpResponse +from django.http.response import HttpResponsePermanentRedirect +from django.http.response import HttpResponseRedirect +from django.shortcuts import render from django.urls import resolve, reverse +from django.views import View import collections import functools import json from rest_framework import filters import six +from typing import TypeVar +from typing import cast from crashmanager.models import User +from server.covmanager.models import Collection +MT = TypeVar("MT", bound=Model) -def index(request): + +def index(request: HttpRequest) -> HttpResponseRedirect | HttpResponsePermanentRedirect: user = User.get_or_create_restricted(request.user)[0] # return crashmanager, covmanager, or ec2spotmanager, as allowed, in that order. # if no permission to view any apps, then use crashmanager and let that fail @@ -28,7 +41,7 @@ def index(request): return redirect('crashmanager:index') -def login(request): +def login(request: HttpRequest): if settings.USE_OIDC: auth_view = resolve(reverse('oidc_authentication_init')).func return auth_view(request) @@ -45,11 +58,11 @@ def decorator(request, *args, **kwargs): return decorator -def renderError(request, err): +def renderError(request: HttpRequest, err: str) -> HttpResponse: return render(request, 'error.html', {'error_message': err}) # noqa -def paginate_requested_list(request, entries): +def paginate_requested_list(request: HttpRequest, entries: QuerySet[Model]) -> QuerySet[Model]: """ This method generically paginates a given QuerySet and returns a list suitable for passing to a template. The set is paginated by request @@ -111,7 +124,7 @@ def json_to_query(json_str): except ValueError as e: raise RuntimeError("Invalid JSON: %s" % e) - def get_query_obj(obj, key=None): + def get_query_obj(obj: six.text_type | list[str] | int | dict[str, str] | None, key: str | None = None) -> Q: if obj is None or isinstance(obj, (six.text_type, list, int)): kwargs = {key: obj} @@ -152,7 +165,7 @@ class JsonQueryFilterBackend(filters.BaseFilterBackend): """ Accepts filtering with a query parameter which builds a Django query from JSON (see json_to_query) """ - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset: QuerySet[MT], view: View) -> QuerySet[MT]: """ Return a filtered queryset. """ @@ -170,7 +183,7 @@ class SimpleQueryFilterBackend(filters.BaseFilterBackend): """ Accepts filtering with a query parameter which builds a Django query using simple "contains" searches """ - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset: QuerySet[MT], view: View) -> QuerySet[MT]: """ Return a filtered queryset. """ @@ -181,7 +194,7 @@ def filter_queryset(self, request, queryset, view): querystr = request.query_params.get('squery', None) if querystr is not None: queryobj = None - for field in queryset[0].simple_query_fields: + for field in cast(Collection, queryset[0]).simple_query_fields: kwargs = {"%s__contains" % field: querystr} if queryobj is None: queryobj = Q(**kwargs) From 9abd823991f7eab3a891afd4ae87c812b985efc8 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 16 Dec 2021 00:41:47 -0800 Subject: [PATCH 052/137] Try turning on mypy on GitHub Actions temporarily --- .github/workflows/mypytmp.yml | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/mypytmp.yml diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml new file mode 100644 index 000000000..521431adf --- /dev/null +++ b/.github/workflows/mypytmp.yml @@ -0,0 +1,55 @@ +name: mypytmp + +on: + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + # pip cache dependencies to save time + - uses: actions/cache@v2 + if: startsWith(runner.os, 'Linux') + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + - name: pip cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + + # - name: Install OS prerequisites + # if: startsWith(runner.os, 'Linux') + # run: sudo apt-get install ripgrep + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: | + python -u -m pip install --upgrade pip setuptools wheel + pip install -r server/requirements3.7.txt + pip install --upgrade -e . + + - name: Run mypy + run: | + py Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py From c74794e9173cab165c9da73013306a9acdd29ef2 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 12:56:28 -0800 Subject: [PATCH 053/137] FuzzManager is still on master branch --- .github/workflows/mypytmp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 521431adf..579d3ae2d 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -2,7 +2,7 @@ name: mypytmp on: pull_request: - branches: [ main ] + branches: [ master ] jobs: build: From 508356cacc980ca13645fb3c7b08a758d902fa80 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 12:57:23 -0800 Subject: [PATCH 054/137] Try turning on GitHub Actions also on push on the master branch --- .github/workflows/mypytmp.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 579d3ae2d..2936faf96 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -1,6 +1,8 @@ name: mypytmp on: + push: + branches: [ master ] pull_request: branches: [ master ] From cb1cb5788ba28027f1e9f3a9aa1822b793789a2b Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 12:58:16 -0800 Subject: [PATCH 055/137] Turn on GitHub Actions on this branch --- .github/workflows/mypytmp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 2936faf96..9ab554b6e 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -2,7 +2,7 @@ name: mypytmp on: push: - branches: [ master ] + branches: [ master, basic-mypy-infrastructure ] pull_request: branches: [ master ] From 7cc7a271a3f35a4fc1dc3ff6cc9928bb6a275d33 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 18:30:17 -0800 Subject: [PATCH 056/137] Try running CI only on basic-mypy-infrastructure branch --- .github/workflows/mypytmp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 9ab554b6e..4ca693ec5 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -2,7 +2,7 @@ name: mypytmp on: push: - branches: [ master, basic-mypy-infrastructure ] + branches: [ basic-mypy-infrastructure ] pull_request: branches: [ master ] From 5af24fe38551e0c1355c29201165f6784887806a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 18:33:25 -0800 Subject: [PATCH 057/137] Disable fail-fast for GitHub Actions --- .github/workflows/mypytmp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 4ca693ec5..4d944b012 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.7", "3.8", "3.9", "3.10"] From ccd29bd5ce06b33eaff0a127c250b5d1a81afdfc Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 18:33:53 -0800 Subject: [PATCH 058/137] Run mypy on GitHub Actions properly --- .github/workflows/mypytmp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 4d944b012..0b5e785b1 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -55,4 +55,4 @@ jobs: - name: Run mypy run: | - py Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py + mypy Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py From a7c08544b1fa7b8f322f38b0df65b694f2dff972 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 19:48:40 -0800 Subject: [PATCH 059/137] Add taskcluster as a requirement --- server/requirements3.7.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 10ace09c4..d7052fba8 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -48,6 +48,7 @@ requests>=2.20.1,<3 six>=1.12.0 # fuzzing-decision is only needed for the taskmanager module (requires python 3) #git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision +taskcluster>=44.2.2,<44.3 types-boto==0.1.4 types-mock==0.1.5 types-PyYAML==5.4.6 From f184241c05ccee2e6c0373625a35668c348b38d0 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 19:59:22 -0800 Subject: [PATCH 060/137] Tweak typing dependency versions --- server/requirements3.7.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index d7052fba8..19f01ddd2 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -5,7 +5,7 @@ attrs>=21.2.0,<21.3 billiard>=3.5.0.3,<3.6 boto>=2.48.0,<2.50 boto3==1.7.78 -boto3-stubs>=1.20.15 +boto3-stubs>=1.20.15,<1.21 celery>=4.1.1,<4.3 celery-types>=0.9.3 certifi>=2018.4.16 @@ -49,14 +49,14 @@ six>=1.12.0 # fuzzing-decision is only needed for the taskmanager module (requires python 3) #git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision taskcluster>=44.2.2,<44.3 -types-boto==0.1.4 -types-mock==0.1.5 -types-PyYAML==5.4.6 -types-python-dateutil==0.1.6 -types-redis==3.5.6 -types-requests==2.25.6 -types-six==0.1.9 -typing-extensions==4.0.1 +types-boto>=0.1.4,<0.2 +types-mock>=0.1.5,<0.2 +types-PyYAML>=5.4.6,<5.5 +types-python-dateutil>=0.1.6,<0.2 +types-redis>=3.5.6,<3.6 +types-requests>=2.25.6,<2.26 +types-six>=0.1.9,<0.2 +typing-extensions>=4.0.1,<4.1 urllib3>=1.22,<2 vine>=1.1.4,<1.2 whitenoise==5.2.0 From 7314809d20da1faaa42aa99e80a2f0394fb7754d Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 20:00:00 -0800 Subject: [PATCH 061/137] Add types-setuptools dependency --- server/requirements3.7.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 19f01ddd2..57627c494 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -55,6 +55,7 @@ types-PyYAML>=5.4.6,<5.5 types-python-dateutil>=0.1.6,<0.2 types-redis>=3.5.6,<3.6 types-requests>=2.25.6,<2.26 +types-setuptools>=57.4.4,<57.5 types-six>=0.1.9,<0.2 typing-extensions>=4.0.1,<4.1 urllib3>=1.22,<2 From 9346f3b97ba9c9f04dbafd9f54e9f7e4f4659343 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 20:36:09 -0800 Subject: [PATCH 062/137] Add mozilla-django-oidc and mozillapulse as dependencies since they are being used by FuzzManager --- server/requirements3.7.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 57627c494..90a12c8e5 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -29,6 +29,8 @@ lazy-object-proxy>=1.3.1,<1.4 mccabe>=0.6.1,<0.7 monotonic==1.5 more-itertools>=4.2.0,<4.4 +mozilla-django-oidc>=2.0.0,<2.1 +mozillapulse>=1.3,<1.4 mypy==0.920 pluggy>=1.0.0,<1.1 py>=1.5.3 From a842034f41259fe09435c238769634af8f0aadb0 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 20 Dec 2021 20:36:42 -0800 Subject: [PATCH 063/137] Change pyproject.toml mypy settings to specify exact modules to ignore, since they lack type information --- pyproject.toml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d388d28f4..487b6e343 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,29 @@ [tool.mypy] strict = true -ignore_missing_imports = true show_error_codes = true + +# Add Python modules to be ignored by mypy here +[[tool.mypy.overrides]] +module = [ + "chartjs.colors", # Package: django-chartjs + "chartjs.views.base", # Package: django-chartjs + "crispy_forms.helper", # Package: django-crispy-forms + "crispy_forms.layout", # Package: django-crispy-forms + "enumfields", # Package: django-enumfields + "enumfields.fields", # Package: django-enumfields + "fasteners", # Package: fasteners + "ffpuppet", # Package: ffpuppet + "fuzzing_decision.common.pool", # Package: orion (Mozilla, needs FuzzManager types) + "laniakea.core.providers.ec2", # Package: laniakea (Mozilla, currently archived) + "laniakea.core.providers.gce", # Package: laniakea (Mozilla, currently archived) + "laniakea.core.userdata", # Package: laniakea (Mozilla, currently archived) + "mozilla_django_oidc.auth", # Package: mozilla-django-oidc + "mozillapulse.consumers", # Package: mozillapulse + "notifications", # Package: django-notifications-hq + "notifications.models", # Package: django-notifications-hq + "notifications.signals", # Package: django-notifications-hq + "server.covmanager.models", # Located here in server/covmanager/models.py + "taskcluster", # Package: taskcluster + "S3Manager", # Located here in misc/afl_libfuzzer/S3Manager.py +] +ignore_missing_imports = true From ac48dd52c2fa5052cffe0d4e2a2ad8180fee3eeb Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 21 Dec 2021 22:45:55 -0800 Subject: [PATCH 064/137] Bump mypy to 0.921 for some hotfixes --- server/requirements3.7.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 90a12c8e5..6752a88de 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -31,7 +31,7 @@ monotonic==1.5 more-itertools>=4.2.0,<4.4 mozilla-django-oidc>=2.0.0,<2.1 mozillapulse>=1.3,<1.4 -mypy==0.920 +mypy==0.921 pluggy>=1.0.0,<1.1 py>=1.5.3 pycodestyle>=2.5,<2.6 From 6331cf57b9802d4a7a439add8454e73562d06c64 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 22 Dec 2021 04:00:07 -0800 Subject: [PATCH 065/137] 1614 mypy issues left --- Collector/Collector.py | 57 +++++++++++++++++++++++-------------- FTB/Signatures/CrashInfo.py | 8 +++--- Reporter/Reporter.py | 8 +++--- 3 files changed, 44 insertions(+), 29 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index ed9d05ae7..d531785f0 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -21,13 +21,13 @@ import argparse import base64 +from collections.abc import Iterator import hashlib import json import os import shutil import sys from tempfile import mkstemp -from typing import Generator from zipfile import ZipFile from FTB.ProgramConfiguration import ProgramConfiguration # noqa @@ -50,6 +50,9 @@ def refresh(self) -> None: Refresh signatures by contacting the server, downloading new signatures and invalidating old ones. ''' + assert isinstance(self.serverHost, str) + assert isinstance(self.serverPort, int) + assert isinstance(self.serverProtocol, str) url = "%s://%s:%d/crashmanager/rest/signatures/download/" % (self.serverProtocol, self.serverHost, self.serverPort) @@ -70,6 +73,7 @@ def refreshFromZip(self, zipFileName: str) -> None: and invalidating old ones. (This is a non-standard use case; you probably want to use refresh() instead.) ''' + assert isinstance(self.sigCacheDir, str) with ZipFile(zipFileName, "r") as zipFile: if zipFile.testzip(): raise RuntimeError("Bad CRC for downloaded zipfile %s" % zipFileName) @@ -84,21 +88,21 @@ def refreshFromZip(self, zipFileName: str) -> None: zipFile.extractall(self.sigCacheDir) @remote_checks - def submit(self, crashInfo, testCase=None, testCaseQuality=0, testCaseSize=None, metaData=None): + def submit( + self, + crashInfo: CrashInfo, + testCase: str | None = None, + testCaseQuality: int = 0, + testCaseSize: int | None = None, + metaData=None, + ): ''' Submit the given crash information and an optional testcase/metadata to the server for processing and storage. - @type crashInfo: CrashInfo @param crashInfo: CrashInfo instance obtained from L{CrashInfo.fromRawCrashData} - - @type testCase: string @param testCase: A file containing a testcase for reproduction - - @type testCaseQuality: int @param testCaseQuality: A value indicating the quality of the test (less is better) - - @type testCaseSize: int or None @param testCaseSize: The size of the testcase to report. If None, use the file size. @type metaData: map @@ -106,6 +110,9 @@ def submit(self, crashInfo, testCase=None, testCaseQuality=0, testCaseSize=None, will be stored on the server in JSON format. This metadata is combined with possible metadata stored in the L{ProgramConfiguration} inside crashInfo. ''' + assert isinstance(self.serverHost, str) + assert isinstance(self.serverPort, int) + assert isinstance(self.serverProtocol, str) url = "%s://%s:%d/crashmanager/rest/crashes/" % (self.serverProtocol, self.serverHost, self.serverPort) # Serialize our crash information, testcase and metadata into a dictionary to POST @@ -130,6 +137,7 @@ def submit(self, crashInfo, testCase=None, testCaseQuality=0, testCaseSize=None, data["testcase_size"] = testCaseSize data["testcase_ext"] = os.path.splitext(testCase)[1].lstrip(".") + assert isinstance(crashInfo.configuration, ProgramConfiguration) data["platform"] = crashInfo.configuration.platform data["product"] = crashInfo.configuration.product data["os"] = crashInfo.configuration.os @@ -137,6 +145,8 @@ def submit(self, crashInfo, testCase=None, testCaseQuality=0, testCaseSize=None, if crashInfo.configuration.version: data["product_version"] = crashInfo.configuration.version + assert isinstance(self.clientId, str) + assert isinstance(self.tool, str) data["client"] = self.clientId data["tool"] = self.tool @@ -160,18 +170,17 @@ def submit(self, crashInfo, testCase=None, testCaseQuality=0, testCaseSize=None, return self.post(url, data).json() @signature_checks - def search(self, crashInfo): + def search(self, crashInfo: CrashInfo): ''' Searches within the local signature cache directory for a signature matching the given crash. - @type crashInfo: CrashInfo @param crashInfo: CrashInfo instance obtained from L{CrashInfo.fromRawCrashData} @rtype: tuple @return: Tuple containing filename of the signature and metadata matching, or None if no match. ''' - + assert isinstance(self.sigCacheDir, str) cachedSigFiles = os.listdir(self.sigCacheDir) for sigFile in cachedSigFiles: @@ -202,11 +211,9 @@ def generate(self, crashInfo: CrashInfo, forceCrashAddress: bool = False, on the same local cache directory. @param crashInfo: CrashInfo instance obtained from L{CrashInfo.fromRawCrashData} - @param forceCrashAddress: Force including the crash address into the signature @param forceCrashInstruction: Force including the crash instruction into the signature (GDB only) @param numFrames: How many frames to include in the signature - @return: File containing crash signature in JSON format ''' @@ -219,16 +226,16 @@ def generate(self, crashInfo: CrashInfo, forceCrashAddress: bool = False, return self.__store_signature_hashed(sig) @remote_checks - def download(self, crashId): + def download(self, crashId: int) -> tuple[str, dict[str, str]] | None: ''' Download the testcase for the specified crashId. - @type crashId: int @param crashId: ID of the requested crash entry on the server side - - @rtype: tuple @return: Tuple containing name of the file where the test was stored and the raw JSON response ''' + assert isinstance(self.serverHost, str) + assert isinstance(self.serverPort, int) + assert isinstance(self.serverProtocol, str) url = "%s://%s:%d/crashmanager/rest/crashes/%s/" % (self.serverProtocol, self.serverHost, self.serverPort, crashId) @@ -255,14 +262,17 @@ def download(self, crashId): return (local_filename, resp_json) @remote_checks - def download_all(self, bucketId: int) -> Generator[str]: + def download_all(self, bucketId: int) -> Iterator[str]: ''' Download all testcases for the specified bucketId. @param bucketId: ID of the requested bucket on the server side @return: generator of filenames where tests were stored. ''' - params = { + assert isinstance(self.serverHost, str) + assert isinstance(self.serverPort, int) + assert isinstance(self.serverProtocol, str) + params: dict[str, str] | None = { "query": json.dumps({ "op": "OR", "bucket": bucketId @@ -305,6 +315,7 @@ def __store_signature_hashed(self, signature: CrashSignature) -> str: @param signature: CrashSignature to store @return: Name of the file that the signature was written to ''' + assert isinstance(self.sigCacheDir, str) h = hashlib.new('sha1') if str is bytes: h.update(str(signature)) @@ -317,7 +328,7 @@ def __store_signature_hashed(self, signature: CrashSignature) -> str: return sigfile @staticmethod - def read_testcase(testCase: str) -> tuple[str, bool]: + def read_testcase(testCase: str) -> tuple[bytes, bool]: ''' Read a testcase file, return the content and indicate if it is binary or not. @@ -556,11 +567,13 @@ def main(args: list[str] | None = None) -> int: if "args" in retJSON and retJSON["args"]: args = json.loads(retJSON["args"]) + assert isinstance(args, list) print("Command line arguments: %s" % " ".join(args)) print("") if "env" in retJSON and retJSON["env"]: env = json.loads(retJSON["env"]) + assert isinstance(env, dict) print("Environment variables: %s", " ".join("%s = %s" % (k, v) for (k, v) in env.items())) print("") @@ -591,6 +604,8 @@ def main(args: list[str] | None = None) -> int: print(collector.clientId) return 0 + return 0 + if __name__ == "__main__": sys.exit(main()) diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 8b9cd5e94..9954556f7 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -152,7 +152,7 @@ def __init__(self) -> None: # This is an optional testcase that is not stored with the crashInfo but # can be "attached" before matching signatures that might require the # testcase. - self.testcase: str | None = None + self.testcase: bytes | str | None = None # This can be used to record failures during signature creation self.failureReason: str | None = None @@ -199,10 +199,10 @@ def toCacheObject(self) -> CacheObject: @staticmethod def fromRawCrashData( - stdout: list[str] | None, - stderr: list[str] | None, + stdout: list[str] | str | None, + stderr: list[str] | str | None, configuration: ProgramConfiguration, - auxCrashData: list[str] | None = None, + auxCrashData: list[str] | str | None = None, cacheObject: CacheObject | None = None, ) -> CrashInfo: ''' diff --git a/Reporter/Reporter.py b/Reporter/Reporter.py index 56e8f923b..3993ca0a7 100644 --- a/Reporter/Reporter.py +++ b/Reporter/Reporter.py @@ -38,7 +38,7 @@ def remote_checks(wrapped: Callable[..., RetType]) -> Callable[..., RetType]: '''Decorator to perform error checks before using remote features''' @functools.wraps(wrapped) - def decorator(self: Reporter, *args: Any, **kwargs: Any) -> RetType: + def decorator(self: Reporter, *args: str, **kwargs: str) -> RetType: if not self.serverHost: raise RuntimeError("Must specify serverHost (configuration property: serverhost) to use remote features.") if not self.serverAuthToken: @@ -53,7 +53,7 @@ def decorator(self: Reporter, *args: Any, **kwargs: Any) -> RetType: def signature_checks(wrapped: Callable[..., RetType]) -> Callable[..., RetType]: '''Decorator to perform error checks before using signature features''' @functools.wraps(wrapped) - def decorator(self: Reporter, *args: Any, **kwargs: Any) -> RetType: + def decorator(self: Reporter, *args: str, **kwargs: str) -> RetType: if not self.sigCacheDir: raise RuntimeError("Must specify sigCacheDir (configuration property: sigdir) to use signatures.") return wrapped(self, *args, **kwargs) @@ -64,7 +64,7 @@ def requests_retry(wrapped: Callable[..., Any]) -> Callable[..., Any]: '''Wrapper around requests methods that retries up to 2 minutes if it's likely that the response codes indicate a temporary error''' @functools.wraps(wrapped) - def wrapper(*args: Any, **kwds: Any) -> Any: + def wrapper(*args: str, **kwds: Any) -> Any: success = kwds.pop("expected") current_timeout = 2 while True: @@ -205,6 +205,6 @@ def patch(self, *args: Any, **kwds: Any) -> Any: return requests_retry(self._session.patch)(*args, **kwds) @staticmethod - def serverError(response) -> RuntimeError: + def serverError(response: requests.Response) -> RuntimeError: return RuntimeError("Server unexpectedly responded with status code %s: %s" % (response.status_code, response.text)) From fbc294f7a254613cc151164f34067216cecea474 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 23 Dec 2021 03:25:19 -0800 Subject: [PATCH 066/137] Bump mypy to 0.930 --- server/requirements3.7.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 6752a88de..6df4d4a8b 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -31,7 +31,7 @@ monotonic==1.5 more-itertools>=4.2.0,<4.4 mozilla-django-oidc>=2.0.0,<2.1 mozillapulse>=1.3,<1.4 -mypy==0.921 +mypy==0.930 pluggy>=1.0.0,<1.1 py>=1.5.3 pycodestyle>=2.5,<2.6 From 4af804b8f1002af85653875d61019c864a14421f Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 23 Dec 2021 19:25:09 -0800 Subject: [PATCH 067/137] Typing for ffpuppet is now in the works --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 487b6e343..cae3372fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,6 @@ module = [ "enumfields", # Package: django-enumfields "enumfields.fields", # Package: django-enumfields "fasteners", # Package: fasteners - "ffpuppet", # Package: ffpuppet "fuzzing_decision.common.pool", # Package: orion (Mozilla, needs FuzzManager types) "laniakea.core.providers.ec2", # Package: laniakea (Mozilla, currently archived) "laniakea.core.providers.gce", # Package: laniakea (Mozilla, currently archived) From fee0c7c0335aa3c51ed42fd8d01ea59c7efe77f6 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 30 Dec 2021 13:42:18 -0800 Subject: [PATCH 068/137] Bump types-* package versions --- server/requirements3.7.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 6df4d4a8b..60bb5f0da 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -53,12 +53,12 @@ six>=1.12.0 taskcluster>=44.2.2,<44.3 types-boto>=0.1.4,<0.2 types-mock>=0.1.5,<0.2 -types-PyYAML>=5.4.6,<5.5 -types-python-dateutil>=0.1.6,<0.2 -types-redis>=3.5.6,<3.6 -types-requests>=2.25.6,<2.26 -types-setuptools>=57.4.4,<57.5 -types-six>=0.1.9,<0.2 +types-PyYAML>=6.0.1,<6.1 +types-python-dateutil>=2.8.4,<2.9 +types-redis>=4.1.1,<4.2 +types-requests>=2.26.3,<2.27 +types-setuptools>=57.4.5,<57.5 +types-six>=1.16.6,<1.17 typing-extensions>=4.0.1,<4.1 urllib3>=1.22,<2 vine>=1.1.4,<1.2 From ff4474dc6962a0fa0f767730e7d13e7dce59eb6f Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Thu, 6 Jan 2022 19:37:08 -0800 Subject: [PATCH 069/137] Revert isinstance assert checks to checking that they are not None --- Collector/Collector.py | 40 ++++++++++----------- FTB/Signatures/tests/test_CrashSignature.py | 32 ++++++++--------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index d531785f0..f41829a35 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -50,9 +50,9 @@ def refresh(self) -> None: Refresh signatures by contacting the server, downloading new signatures and invalidating old ones. ''' - assert isinstance(self.serverHost, str) - assert isinstance(self.serverPort, int) - assert isinstance(self.serverProtocol, str) + assert self.serverHost is not None + assert self.serverPort is not None + assert self.serverProtocol is not None url = "%s://%s:%d/crashmanager/rest/signatures/download/" % (self.serverProtocol, self.serverHost, self.serverPort) @@ -73,7 +73,7 @@ def refreshFromZip(self, zipFileName: str) -> None: and invalidating old ones. (This is a non-standard use case; you probably want to use refresh() instead.) ''' - assert isinstance(self.sigCacheDir, str) + assert self.sigCacheDir is not None with ZipFile(zipFileName, "r") as zipFile: if zipFile.testzip(): raise RuntimeError("Bad CRC for downloaded zipfile %s" % zipFileName) @@ -110,9 +110,9 @@ def submit( will be stored on the server in JSON format. This metadata is combined with possible metadata stored in the L{ProgramConfiguration} inside crashInfo. ''' - assert isinstance(self.serverHost, str) - assert isinstance(self.serverPort, int) - assert isinstance(self.serverProtocol, str) + assert self.serverHost is not None + assert self.serverPort is not None + assert self.serverProtocol is not None url = "%s://%s:%d/crashmanager/rest/crashes/" % (self.serverProtocol, self.serverHost, self.serverPort) # Serialize our crash information, testcase and metadata into a dictionary to POST @@ -137,7 +137,7 @@ def submit( data["testcase_size"] = testCaseSize data["testcase_ext"] = os.path.splitext(testCase)[1].lstrip(".") - assert isinstance(crashInfo.configuration, ProgramConfiguration) + assert crashInfo.configuration is not None data["platform"] = crashInfo.configuration.platform data["product"] = crashInfo.configuration.product data["os"] = crashInfo.configuration.os @@ -145,8 +145,8 @@ def submit( if crashInfo.configuration.version: data["product_version"] = crashInfo.configuration.version - assert isinstance(self.clientId, str) - assert isinstance(self.tool, str) + assert self.clientId is not None + assert self.tool is not None data["client"] = self.clientId data["tool"] = self.tool @@ -180,7 +180,7 @@ def search(self, crashInfo: CrashInfo): @rtype: tuple @return: Tuple containing filename of the signature and metadata matching, or None if no match. ''' - assert isinstance(self.sigCacheDir, str) + assert self.sigCacheDir is not None cachedSigFiles = os.listdir(self.sigCacheDir) for sigFile in cachedSigFiles: @@ -233,9 +233,9 @@ def download(self, crashId: int) -> tuple[str, dict[str, str]] | None: @param crashId: ID of the requested crash entry on the server side @return: Tuple containing name of the file where the test was stored and the raw JSON response ''' - assert isinstance(self.serverHost, str) - assert isinstance(self.serverPort, int) - assert isinstance(self.serverProtocol, str) + assert self.serverHost is not None + assert self.serverPort is not None + assert self.serverProtocol is not None url = "%s://%s:%d/crashmanager/rest/crashes/%s/" % (self.serverProtocol, self.serverHost, self.serverPort, crashId) @@ -269,9 +269,9 @@ def download_all(self, bucketId: int) -> Iterator[str]: @param bucketId: ID of the requested bucket on the server side @return: generator of filenames where tests were stored. ''' - assert isinstance(self.serverHost, str) - assert isinstance(self.serverPort, int) - assert isinstance(self.serverProtocol, str) + assert self.serverHost is not None + assert self.serverPort is not None + assert self.serverProtocol is not None params: dict[str, str] | None = { "query": json.dumps({ "op": "OR", @@ -315,7 +315,7 @@ def __store_signature_hashed(self, signature: CrashSignature) -> str: @param signature: CrashSignature to store @return: Name of the file that the signature was written to ''' - assert isinstance(self.sigCacheDir, str) + assert self.sigCacheDir is not None h = hashlib.new('sha1') if str is bytes: h.update(str(signature)) @@ -567,13 +567,13 @@ def main(args: list[str] | None = None) -> int: if "args" in retJSON and retJSON["args"]: args = json.loads(retJSON["args"]) - assert isinstance(args, list) + assert args is not None print("Command line arguments: %s" % " ".join(args)) print("") if "env" in retJSON and retJSON["env"]: env = json.loads(retJSON["env"]) - assert isinstance(env, dict) + assert env is not None print("Environment variables: %s", " ".join("%s = %s" % (k, v) for (k, v) in env.items())) print("") diff --git a/FTB/Signatures/tests/test_CrashSignature.py b/FTB/Signatures/tests/test_CrashSignature.py index 2f15861c9..e06d555b3 100644 --- a/FTB/Signatures/tests/test_CrashSignature.py +++ b/FTB/Signatures/tests/test_CrashSignature.py @@ -468,9 +468,9 @@ def test_SignatureCreateTest() -> None: crashSig1 = crashInfo.createCrashSignature(forceCrashAddress=True, maxFrames=4, minimumSupportedVersion=10) crashSig2 = crashInfo.createCrashSignature(forceCrashAddress=False, maxFrames=3, minimumSupportedVersion=10) crashSig3 = crashInfo.createCrashSignature(forceCrashInstruction=True, maxFrames=2, minimumSupportedVersion=10) - assert isinstance(crashSig1, CrashSignature) - assert isinstance(crashSig2, CrashSignature) - assert isinstance(crashSig3, CrashSignature) + assert crashSig1 is not None + assert crashSig2 is not None + assert crashSig3 is not None # Check that all generated signatures match their originating crashInfo assert crashSig1.matches(crashInfo) @@ -576,7 +576,7 @@ def test_SignatureStackFramesWildcardTailTest() -> None: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTrace2.splitlines()) testSig = crashInfo.createCrashSignature() - assert isinstance(testSig, CrashSignature) + assert testSig is not None # Ensure that the last frame with a symbol is at the right place and there is nothing else, # espcially no wildcard, following afterwards. @@ -606,8 +606,8 @@ def test_SignatureStackFramesAuxMessagesTest() -> None: crashSignaturePos = crashInfoPos.createCrashSignature() crashSignatureNeg = crashInfoNeg.createCrashSignature() - assert isinstance(crashSignaturePos, CrashSignature) - assert isinstance(crashSignatureNeg, CrashSignature) + assert crashSignaturePos is not None + assert crashSignatureNeg is not None # Check that the first crash signature has ASan symptoms but # the second does not because it has a program abort message @@ -628,7 +628,7 @@ def test_SignatureStackFramesNegativeSizeParamTest() -> None: crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testTraceNegativeSizeParam.splitlines()) testSig = crashInfoPos.createCrashSignature() - assert isinstance(testSig, CrashSignature) + assert testSig is not None assert "/ERROR: AddressSanitizer" in str(testSig) assert "negative-size-param" in str(testSig) @@ -640,7 +640,7 @@ def test_SignatureAsanStackOverflowTest() -> None: crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanStackOverflow.splitlines()) testSig = crashInfoPos.createCrashSignature() - assert isinstance(testSig, CrashSignature) + assert testSig is not None # Check matches appropriately assert testSig.matches(crashInfoPos) @@ -651,7 +651,7 @@ def test_SignatureAsanAccessViolationTest() -> None: crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanAccessViolation.splitlines()) testSig = crashInfoPos.createCrashSignature() - assert isinstance(testSig, CrashSignature) + assert testSig is not None assert "/ERROR: AddressSanitizer" not in str(testSig) assert "access-violation" not in str(testSig) @@ -673,7 +673,7 @@ def test_SignatureAsanFailedAllocTest() -> None: crashInfoPos = CrashInfo.fromRawCrashData([], [], config, auxCrashData=testAsanFailedAlloc.splitlines()) testSig = crashInfoPos.createCrashSignature() - assert isinstance(testSig, CrashSignature) + assert testSig is not None assert "/AddressSanitizer failed to allocate" in str(testSig) assert testSig.matches(crashInfoPos) assert isinstance(testSig.symptoms[1], StackFramesSymptom) @@ -684,7 +684,7 @@ def test_SignatureGenerationTSanLeakTest() -> None: with open(os.path.join(CWD, 'resources', 'tsan-simple-leak-report.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) testSignature = crashInfo.createCrashSignature() - assert isinstance(testSignature, CrashSignature) + assert testSignature is not None assert testSignature.matches(crashInfo) @@ -702,7 +702,7 @@ def test_SignatureGenerationTSanRaceTest() -> None: with open(os.path.join(CWD, 'resources', 'tsan-simple-race-report.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) testSignature = crashInfo.createCrashSignature() - assert isinstance(testSignature, CrashSignature) + assert testSignature is not None print(testSignature) @@ -734,7 +734,7 @@ def test_SignatureGenerationTSanRaceTestComplex1() -> None: with open(os.path.join(CWD, 'resources', 'tsan-report2.txt'), 'r') as f: crashInfo = CrashInfo.fromRawCrashData([], [], config, auxCrashData=f.read().splitlines()) testSignature = crashInfo.createCrashSignature() - assert isinstance(testSignature, CrashSignature) + assert testSignature is not None print(testSignature) @@ -772,7 +772,7 @@ def test_SignatureGenerationTSanRaceTestAtomic() -> None: "ThreadSanitizer: data race [@ pthread_mutex_destroy] vs. [@ pthread_mutex_unlock]") testSignature = crashInfo.createCrashSignature() - assert isinstance(testSignature, CrashSignature) + assert testSignature is not None assert testSignature.matches(crashInfo) @@ -823,7 +823,7 @@ def test_SignatureMatchAssertionSlashes() -> None: # test that signature generated from linux assertion matches both linux_sig = fs_linux.createCrashSignature() - assert isinstance(linux_sig, CrashSignature) + assert linux_sig is not None assert linux_sig.matches(fs_linux) assert not linux_sig.matches(bs_linux) # this is invalid and should not match assert linux_sig.matches(fs_windows) @@ -831,7 +831,7 @@ def test_SignatureMatchAssertionSlashes() -> None: # test that signature generated from windows assertion matches both windows_sig = bs_windows.createCrashSignature() - assert isinstance(windows_sig, CrashSignature) + assert windows_sig is not None assert windows_sig.matches(fs_linux) assert not windows_sig.matches(bs_linux) # this is invalid and should not match assert windows_sig.matches(fs_windows) From 4cb397e19712ee21bd061c257ff8fe413f6b1e13 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 8 Jan 2022 03:25:42 -0800 Subject: [PATCH 070/137] Bump mypy to 0.931 --- server/requirements3.7.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 60bb5f0da..3d3d1b8d2 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -31,7 +31,7 @@ monotonic==1.5 more-itertools>=4.2.0,<4.4 mozilla-django-oidc>=2.0.0,<2.1 mozillapulse>=1.3,<1.4 -mypy==0.930 +mypy==0.931 pluggy>=1.0.0,<1.1 py>=1.5.3 pycodestyle>=2.5,<2.6 From d2af631bf0abd865334a8567820e8d15aed55461 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 10 Jan 2022 20:58:28 -0800 Subject: [PATCH 071/137] 1598 mypy issues left --- .../CloudProvider/CloudProvider.py | 16 +++++----- .../CloudProvider/EC2SpotCloudProvider.py | 30 ++++++++++--------- server/ec2spotmanager/common/ec2.py | 8 +++-- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index 3ab2874c9..8fa417e06 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -36,21 +36,21 @@ class CloudProviderError(Exception): - TYPE = 'unclassified' + TYPE: str = 'unclassified' - def __init__(self, message): + def __init__(self, message) -> None: self.message = message - def __str__(self): + def __str__(self) -> str: return '%s: %s (%s)' % (type(self).__name__, self.message, self.TYPE) class CloudProviderTemporaryFailure(CloudProviderError): - TYPE = 'temporary-failure' + TYPE: str = 'temporary-failure' class CloudProviderInstanceCountError(CloudProviderError): - TYPE = 'max-spot-instance-count-exceeded' + TYPE: str = 'max-spot-instance-count-exceeded' def wrap_provider_errors(wrapped: Callable[..., RetType]) -> Callable[..., RetType]: @@ -198,11 +198,10 @@ def get_image(self, region, config): @staticmethod @abstractmethod - def get_cores_per_instance() -> None: + def get_cores_per_instance() -> dict[str, int]: ''' returns dictionary of instance types and their number of cores - @rtype: dictionary @return: instance types and how many cores per instance type ''' return @@ -279,11 +278,10 @@ def get_tags(config): @staticmethod @abstractmethod - def get_name() -> None: + def get_name() -> str: ''' used to return name of cloud provider - @rtype: string @return: string representation of the cloud provider ''' return diff --git a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py index 262ab5327..2adc1cb28 100644 --- a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py @@ -3,6 +3,8 @@ import datetime import logging import re +from typing import cast + import botocore import boto3 import boto.ec2 @@ -19,12 +21,12 @@ class EC2SpotCloudProvider(CloudProvider): def __init__(self) -> None: self.logger = logging.getLogger("ec2spotmanager") - self.cluster = None - self.connected_region = None + self.cluster: EC2Manager | None = None + self.connected_region: str | None = None def _connect(self, region: str) -> EC2Manager: if self.connected_region != region: - self.cluster = EC2Manager(None) # create a new Manager to invalidate cached image names, etc. + self.cluster = cast(EC2Manager, EC2Manager(None)) # create a new Manager to invalidate cached image names, etc. self.cluster.connect(region=region, aws_access_key_id=settings.AWS_ACCESS_KEY_ID, aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY) self.connected_region = region @@ -58,8 +60,8 @@ def cancel_requests(self, requested_instances_by_region) -> None: self.logger.info("Canceling %s requests in region %s", len(instance_ids), region) @wrap_provider_errors - def start_instances(self, config, region, zone, userdata, image, instance_type, count, _tags): - images = self._create_laniakea_images(config) + def start_instances(self, config, region: str, zone: str, userdata, image: str, instance_type: str, count, _tags: str): + images: dict[str, dict[str, str]] = self._create_laniakea_images(config) self.logger.info("Using instance type %s in region %s with availability zone %s.", instance_type, region, zone) @@ -107,8 +109,8 @@ def start_instances(self, config, region, zone, userdata, image, instance_type, @wrap_provider_errors def check_instances_requests(self, region, instances, tags): - successful_requests = {} - failed_requests = {} + successful_requests: dict[str, dict[str, str]] = {} + failed_requests: dict[str, dict[str, str]] = {} cluster = self._connect(region) try: @@ -168,7 +170,7 @@ def check_instances_requests(self, region, instances, tags): return (successful_requests, failed_requests) @wrap_provider_errors - def check_instances_state(self, pool_id, region): + def check_instances_state(self, pool_id: int | None, region: str): instance_states = {} cluster = self._connect(region) @@ -196,11 +198,11 @@ def check_instances_state(self, pool_id, region): @wrap_provider_errors def get_image(self, region: str, config) -> str: cluster = self._connect(region) - ami = cluster.resolve_image_name(config.ec2_image_name) + ami = cast(str, cluster.resolve_image_name(config.ec2_image_name)) return ami @staticmethod - def get_cores_per_instance() -> int: + def get_cores_per_instance() -> dict[str, int]: return CORES_PER_INSTANCE @staticmethod @@ -228,13 +230,13 @@ def get_name() -> str: return 'EC2Spot' @staticmethod - def config_supported(config): + def config_supported(config) -> bool: fields = ['ec2_allowed_regions', 'max_price', 'ec2_key_name', 'ec2_security_groups', 'ec2_instance_types', 'ec2_image_name'] return all(config.get(key) for key in fields) @wrap_provider_errors - def get_prices_per_region(self, region_name, instance_types=None): + def get_prices_per_region(self, region_name: str, instance_types=None): '''Gets spot prices of the specified region and instance type''' prices = {} # {instance-type: region: {az: [prices]}}} zone_blacklist = ["us-east-1a", "us-east-1f"] @@ -268,8 +270,8 @@ def get_prices_per_region(self, region_name, instance_types=None): return prices @staticmethod - def _create_laniakea_images(config): - images = {"default": {}} + def _create_laniakea_images(config) -> dict[str, dict[str, str]]: + images: dict[str, dict[str, str]] = {"default": {}} # These are the configuration keys we want to put into the target configuration # without further preprocessing, except for the adjustment of the key name itself. diff --git a/server/ec2spotmanager/common/ec2.py b/server/ec2spotmanager/common/ec2.py index 8903b84d0..e8d93d4a8 100644 --- a/server/ec2spotmanager/common/ec2.py +++ b/server/ec2spotmanager/common/ec2.py @@ -2,10 +2,14 @@ from __future__ import annotations -import collections +from typing import NamedTuple -InstanceType = collections.namedtuple("InstanceType", ("api_name", "vCPUs")) +class InstanceType(NamedTuple): + """InstanceType NamedTuple type information.""" + + api_name: str + vCPUs: int INSTANCE_TYPES = ( From 3a5b563efc6642513e2f9aed9b5df3e148b07d97 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 10 Jan 2022 21:41:55 -0800 Subject: [PATCH 072/137] 1558 mypy issues left --- misc/afl_libfuzzer/afl-libfuzzer-daemon.py | 94 +++++++++------------- 1 file changed, 36 insertions(+), 58 deletions(-) diff --git a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py index 20fb24302..ff259fc7d 100755 --- a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py +++ b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py @@ -30,6 +30,8 @@ import traceback import zipfile from pathlib import Path +from typing import IO +from typing import Type from fasteners import InterProcessLock from six.moves import queue @@ -56,20 +58,20 @@ class LibFuzzerMonitor(threading.Thread): - def __init__(self, process, killOnOOM=True, mid=None, mqueue=None): + def __init__(self, process: subprocess.Popen[str], killOnOOM: bool = True, mid: int | None = None, mqueue = None) -> None: threading.Thread.__init__(self) self.process = process self.fd = process.stderr - self.trace = [] + self.trace: list[str] = [] self.stderr = collections.deque([], 128) - self.inTrace = False - self.testcase = None + self.inTrace: bool = False + self.testcase: str | None = None self.killOnOOM = killOnOOM self.hadOOM = False self.hitThreadLimit = False self.inited = False - self.mid = mid + self.mid: int | None = mid self.mqueue = mqueue # Keep some statistics @@ -80,7 +82,7 @@ def __init__(self, process, killOnOOM=True, mid=None, mqueue=None): self.last_new_pc = 0 # Store potential exceptions - self.exc = None + self.exc: Exception | None = None def run(self) -> None: assert(not self.hitThreadLimit) @@ -157,13 +159,13 @@ def run(self) -> None: if self.mqueue is not None: self.mqueue.put(self.mid) - def getASanTrace(self): + def getASanTrace(self) -> list[str]: return self.trace - def getTestcase(self): + def getTestcase(self) -> str | None: return self.testcase - def getStderr(self): + def getStderr(self) -> list[collections.deque[int]]: return list(self.stderr) def terminate(self) -> None: @@ -174,6 +176,7 @@ def terminate(self) -> None: self.process.terminate() # Emulate a wait() with timeout through poll and sleep + maxSleepTime: int | float (maxSleepTime, pollInterval) = (10, 0.2) while self.process.poll() is None and maxSleepTime > 0: maxSleepTime -= pollInterval @@ -185,14 +188,11 @@ def terminate(self) -> None: self.process.wait() -def command_file_to_list(cmd_file): +def command_file_to_list(cmd_file: str) -> tuple[int, list[str]]: ''' Open and parse custom command line file - @type cmd_file: String @param cmd_file: Command line file containing list of commands - - @rtype: Tuple @return: Test index in list and the command as a list of strings ''' cmdline = list() @@ -208,20 +208,13 @@ def command_file_to_list(cmd_file): return test_idx, cmdline -def write_stats_file(outfile, fields, stats, warnings): +def write_stats_file(outfile: str, fields: list[str], stats, warnings: list[str]) -> None: ''' Write the given stats data to the specified file - @type outfile: str @param outfile: Output file for statistics - - @type fields: list @param fields: The list of fields to write out (defines the order as well) - - @type stats: dict @param stats: The dictionary containing the actual data - - @type warnings: list @param warnings: Any textual warnings to write in addition to stats ''' @@ -245,18 +238,13 @@ def write_stats_file(outfile, fields, stats, warnings): return -def write_aggregated_stats_afl(base_dirs, outfile, cmdline_path=None): +def write_aggregated_stats_afl(base_dirs: list[str], outfile: str, cmdline_path: str | None = None) -> None: ''' Generate aggregated statistics from the given base directories and write them to the specified output file. - @type base_dirs: list @param base_dirs: List of AFL base directories - - @type outfile: str @param outfile: Output file for aggregated statistics - - @type cmdline_path: String @param cmdline_path: Optional command line file to use instead of the one found inside the base directory. ''' @@ -288,7 +276,7 @@ def write_aggregated_stats_afl(base_dirs, outfile, cmdline_path=None): fields.extend(wanted_fields_max) # Warnings to include - warnings = list() + warnings: list[str] = list() aggregated_stats = {} @@ -301,7 +289,7 @@ def write_aggregated_stats_afl(base_dirs, outfile, cmdline_path=None): for field in wanted_fields_all: aggregated_stats[field] = [] - def convert_num(num): + def convert_num(num: str) -> float | int: if '.' in num: return float(num) return int(num) @@ -346,6 +334,7 @@ def convert_num(num): aggregated_stats[field_name] = val # Verify fuzzmanagerconf exists and can be parsed + assert cmdline_path is not None _, cmdline = command_file_to_list(cmdline_path) target_binary = cmdline[0] if cmdline else None @@ -371,21 +360,14 @@ def convert_num(num): return write_stats_file(outfile, fields, aggregated_stats, warnings) -def write_aggregated_stats_libfuzzer(outfile, stats, monitors, warnings): +def write_aggregated_stats_libfuzzer(outfile: str, stats, monitors: list[LibFuzzerMonitor], warnings: list[str]) -> None: ''' Generate aggregated statistics for the given overall libfuzzer stats and the individual monitors. Results are written to the specified output file. - @type outfile: str @param outfile: Output file for aggregated statistics - - @type stats: dict @param stats: Dictionary containing overall stats - - @type monitors: list @param monitors: A list of LibFuzzerMonitor instances - - @type warnings: list @param warnings: Any textual warnings to write in addition to stats ''' @@ -475,30 +457,19 @@ def write_aggregated_stats_libfuzzer(outfile, stats, monitors, warnings): return write_stats_file(outfile, fields, aggregated_stats, warnings) -def scan_crashes(base_dir, collector, cmdline_path=None, env_path=None, test_path=None, firefox=None, - firefox_prefs=None, firefox_extensions=None, firefox_testpath=None, transform=None): +def scan_crashes(base_dir: str, collector: Collector, cmdline_path: str | None = None, env_path: str | None = None, test_path: str | None = None, firefox: str | None = None, + firefox_prefs: str | None = None, firefox_extensions: str | None = None, firefox_testpath: str | None = None, transform: str | None = None): ''' Scan the base directory for crash tests and submit them to FuzzManager. - @type base_dir: String @param base_dir: AFL base directory - - @type cmdline_path: String @param cmdline_path: Optional command line file to use instead of the one found inside the base directory. - - @type env_path: String @param env_path: Optional file containing environment variables. - - @type test_path: String @param test_path: Optional filename where to copy the test before attempting to reproduce a crash. - - @type transform: String @param transform: Optional path to script for applying post-crash transformations. - - @rtype: int @return: Non-zero return code on failure ''' crash_dir = os.path.join(base_dir, "crashes") @@ -593,7 +564,7 @@ def scan_crashes(base_dir, collector, cmdline_path=None, env_path=None, test_pat ffpInst.clean_up() -def setup_firefox(bin_path, prefs_path, ext_paths, test_path): +def setup_firefox(bin_path: str, prefs_path: str | None, ext_paths: str | None, test_path: str): ffp = FFPuppet(use_xvfb=True) # For now we support only one extension, but FFPuppet will handle @@ -618,7 +589,7 @@ def setup_firefox(bin_path, prefs_path, ext_paths, test_path): return (ffp, cmd, env) -def test_binary_asan(bin_path): +def test_binary_asan(bin_path: str) -> bool: process = subprocess.Popen( ["nm", "-g", bin_path], stdin=subprocess.PIPE, @@ -633,17 +604,12 @@ def test_binary_asan(bin_path): return False -def apply_transform(script_path, testcase_path): +def apply_transform(script_path: str, testcase_path: str) -> str: """ Apply a post-crash transformation to the testcase - @type script_path: String @param script_path: Path to the transformation script - - @type testcase_path: String @param testcase_path: Path to the testcase - - @rtype: String @return: Path to the archive containing the original and transformed testcase """ @@ -852,6 +818,7 @@ def warn_local() -> None: s3m = S3Manager(opts.s3_bucket, opts.project, opts.build_project, opts.build_zip_name) if opts.s3_queue_status: + assert s3m is not None status_data = s3m.get_queue_status() total_queue_files = 0 @@ -863,6 +830,7 @@ def warn_local() -> None: return 0 if opts.s3_corpus_status: + assert s3m is not None status_data = s3m.get_corpus_status() total_corpus_files = 0 @@ -874,18 +842,22 @@ def warn_local() -> None: return 0 if opts.s3_queue_cleanup: + assert s3m is not None s3m.clean_queue_dirs() return 0 if opts.s3_build_download: + assert s3m is not None s3m.download_build(opts.s3_build_download) return 0 if opts.s3_build_upload: + assert s3m is not None s3m.upload_build(opts.s3_build_upload) return 0 if opts.s3_corpus_download: + assert s3m is not None if opts.s3_corpus_download_size is not None: opts.s3_corpus_download_size = int(opts.s3_corpus_download_size) @@ -893,10 +865,12 @@ def warn_local() -> None: return 0 if opts.s3_corpus_upload: + assert s3m is not None s3m.upload_corpus(opts.s3_corpus_upload, opts.s3_corpus_replace) return 0 if opts.s3_corpus_refresh: + assert s3m is not None if opts.aflfuzz and not opts.aflbindir: print("Error: Must specify --afl-binary-dir for refreshing the test corpus", file=sys.stderr) return 2 @@ -1045,6 +1019,7 @@ def warn_local() -> None: return 2 if opts.libfuzzer: + assert s3m is not None if not opts.rargs: print("Error: No arguments specified", file=sys.stderr) return 2 @@ -1286,6 +1261,7 @@ def warn_local() -> None: corpus_size = len(os.listdir(corpus_dir)) # Update our auto-reduction target + assert corpus_auto_reduce_ratio is not None if corpus_size >= opts.libfuzzer_auto_reduce_min: corpus_auto_reduce_threshold = int(corpus_size * (1 + corpus_auto_reduce_ratio)) else: @@ -1447,6 +1423,7 @@ def warn_local() -> None: for i in range(len(monitors)): if monitors[i] is not None: monitor = monitors[i] + assert monitor is not None monitor.terminate() monitor.join(10) finally: @@ -1532,6 +1509,7 @@ def warn_local() -> None: # Only upload queue files every 20 minutes if opts.s3_queue_upload and last_queue_upload < int(time.time()) - 1200: + assert s3m is not None for afl_out_dir in afl_out_dirs: s3m.upload_afl_queue_dir(afl_out_dir, new_cov_only=True) last_queue_upload = int(time.time()) From 619415a8acb8e9dd5e9caff1a057d05453a84be6 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 11 Jan 2022 03:59:56 -0800 Subject: [PATCH 073/137] 1541 mypy issues left --- server/crashmanager/models.py | 15 +++++---- server/crashmanager/views.py | 62 +++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index f6823fd4f..6e1b0d878 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -100,7 +100,7 @@ def getInstance(self): providerClass = getattr(providerModule, self.classname) return providerClass(self.pk, self.hostname) - def __str__(self): + def __str__(self) -> str: return self.hostname @@ -222,7 +222,7 @@ def reassign(self, submitSave): return inList, outList, inListCount, outListCount - def optimizeSignature(self, unbucketed_entries): + def optimizeSignature(self, unbucketed_entries) -> tuple[CrashSignature | None, list[CrashEntry]]: buckets = Bucket.objects.all() signature = self.getSignature() @@ -367,6 +367,9 @@ def __init__(self, *args, **kwargs): # deserializeFields method if you need this data. self._original_bucket = None + + self.crashinfo: CrashInfo + super().__init__(*args, **kwargs) @classmethod @@ -375,13 +378,13 @@ def from_db(cls, db, field_names, values): instance._original_bucket = instance.bucket_id return instance - def save(self, *args, **kwargs): + def save(self, *args, **kwargs) -> None: if self.pk is None and not getattr(settings, 'DB_ISUTF8MB4', False): # Replace 4-byte UTF-8 characters with U+FFFD if our database # doesn't support them. By default, MySQL utf-8 does not support these. utf8_4byte_re = re.compile(u'[^\u0000-\uD7FF\uE000-\uFFFF]', re.UNICODE) - def sanitize_utf8(s): + def sanitize_utf8(s: str) -> str: if not isinstance(s, six.text_type): s = six.text_type(s, 'utf-8') @@ -464,7 +467,7 @@ def getCrashInfo(self, attachTestcase: bool = False, requiredOutputSources: tupl return crashInfo - def reparseCrashInfo(self): + def reparseCrashInfo(self) -> None: # Purges cached crash information and then forces a reparsing # of the raw crash information. Based on the new crash information, # the depending fields are also repopulated. @@ -495,7 +498,7 @@ def reparseCrashInfo(self): @staticmethod def deferRawFields( queryset: QuerySet[MT], - requiredOutputSources: tuple[str, str, str] = ("", "", ""), + requiredOutputSources: tuple[str, str, str] | list[str] = ("", "", ""), ) -> QuerySet[MT]: # This method calls defer() on the given query set for every raw field # that is not required as specified in requiredOutputSources. diff --git a/server/crashmanager/views.py b/server/crashmanager/views.py index 330ee14f0..087fce35e 100644 --- a/server/crashmanager/views.py +++ b/server/crashmanager/views.py @@ -26,6 +26,7 @@ from rest_framework.response import Response from rest_framework.views import APIView import six +from typing import Type from typing import cast from wsgiref.util import FileWrapper @@ -98,7 +99,7 @@ def filter_crash_entries_by_toolfilter(request: HttpRequest, entries, restricted return entries -def filter_signatures_by_toolfilter(request: HttpRequest, signatures, restricted_only=False, legacy_filters=True): +def filter_signatures_by_toolfilter(request: HttpRequest, signatures, restricted_only: bool = False, legacy_filters: bool = True): user = cast(User, User.get_or_create_restricted(request.user)[0]) if restricted_only and not user.restricted: @@ -126,7 +127,7 @@ def filter_signatures_by_toolfilter(request: HttpRequest, signatures, restricted return signatures -def filter_bucket_hits_by_toolfilter(request: HttpRequest, hits, restricted_only=False): +def filter_bucket_hits_by_toolfilter(request: HttpRequest, hits, restricted_only: bool = False): user = cast(User, User.get_or_create_restricted(request.user)[0]) if restricted_only and not user.restricted: @@ -319,12 +320,14 @@ def editCrashEntry(request: HttpRequest, crashid: int) -> HttpResponseRedirect | if entry.testcase: if entry.testcase.isBinary: if request.POST['testcase'] != "(binary)": + assert entry.testcase.content is not None entry.testcase.content = request.POST['testcase'] entry.testcase.isBinary = False # TODO: The file extension stored on the server remains and is likely to be wrong entry.testcase.storeTestAndSave() else: if request.POST['testcase'] != entry.testcase.content: + assert entry.testcase.content is not None entry.testcase.content = request.POST['testcase'] entry.testcase.storeTestAndSave() @@ -395,11 +398,11 @@ def newSignature(request: HttpRequest) -> HttpResponse: errorMsg = crashInfo.failureReason proposedSignature = crashInfo.createCrashSignature(maxFrames=maxStackFrames) - proposedSignature = str(proposedSignature) + proposedSignature_str = str(proposedSignature) proposedShortDesc = crashInfo.createShortSignature() data = { - 'proposedSig': json.loads(proposedSignature), + 'proposedSig': json.loads(proposedSignature_str), 'proposedDesc': proposedShortDesc, 'warningMessage': errorMsg } @@ -408,10 +411,10 @@ def newSignature(request: HttpRequest) -> HttpResponse: def deleteSignature(request: HttpRequest, sigid: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: - bucket = Bucket.objects.filter(pk=sigid).annotate(size=Count('crashentry')) - if not bucket: + buckets = Bucket.objects.filter(pk=sigid).annotate(size=Count('crashentry')) + if not buckets: raise Http404 - bucket = bucket[0] + bucket = buckets[0] check_authorized_for_signature(request, bucket) @@ -621,7 +624,7 @@ def findSignatures(request: HttpRequest, crashid: int) -> HttpResponse: return render(request, 'signatures/find.html', {'buckets': similarBuckets, 'crashentry': entry}) -def createExternalBug(request: HttpRequest, crashid: int): +def createExternalBug(request: HttpRequest, crashid: int) -> HttpResponse: entry = get_object_or_404(CrashEntry, pk=crashid) check_authorized_for_crash_entry(request, entry) @@ -761,7 +764,7 @@ class JsonQueryFilterBackend(BaseFilterBackend): """ Accepts filtering with a query parameter which builds a Django query from JSON (see json_to_query) """ - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): """ Return a filtered queryset. """ @@ -783,7 +786,7 @@ class ToolFilterCrashesBackend(BaseFilterBackend): Filters the queryset by the user's toolfilter unless '?ignore_toolfilter=1' is given. Only unrestricted users can use ignore_toolfilter. """ - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): """Return a filtered queryset""" ignore_toolfilter = request.query_params.get('ignore_toolfilter', '0') try: @@ -799,7 +802,7 @@ def filter_queryset(self, request, queryset, view): class WatchFilterCrashesBackend(BaseFilterBackend): """Filters the queryset to retrieve watched entries if '?watch='""" - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): watch_id = request.query_params.get('watch', 'false').lower() if watch_id == 'false': return queryset @@ -812,7 +815,7 @@ class ToolFilterSignaturesBackend(BaseFilterBackend): Filters the queryset by the user's toolfilter unless '?ignore_toolfilter=1' is given. Only unrestricted users can use ignore_toolfilter. """ - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): """Return a filtered queryset""" ignore_toolfilter = request.query_params.get('ignore_toolfilter', '0') try: @@ -828,13 +831,13 @@ def filter_queryset(self, request, queryset, view): class BucketAnnotateFilterBackend(BaseFilterBackend): """Annotates bucket queryset with size and best_quality""" - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): return queryset.annotate(size=Count('crashentry'), quality=Min('crashentry__testcase__quality')) class DeferRawFilterBackend(BaseFilterBackend): """Optionally defer raw fields""" - def filter_queryset(self, request, queryset, view): + def filter_queryset(self, request: HttpRequest, queryset, view): include_raw = request.query_params.get('include_raw', '1') try: include_raw = int(include_raw) @@ -873,10 +876,11 @@ def get_serializer(self, *args, **kwds): else: return super(CrashEntryViewSet, self).get_serializer(*args, **kwds) - def partial_update(self, request, pk=None): + def partial_update(self, request: HttpRequest, pk: int | None = None) -> Response: """Update individual crash fields.""" user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: + assert request.method is not None raise MethodNotAllowed(request.method) allowed_fields = {"testcase_quality"} @@ -923,7 +927,7 @@ def get_serializer(self, *args, **kwds): else: return super(BucketViewSet, self).get_serializer(*args, **kwds) - def list(self, request, *args, **kwargs): + def list(self, request, *args, **kwargs) -> Response: response = super().list(request, *args, **kwargs) if self.vue and response.status_code == 200: @@ -952,7 +956,7 @@ def list(self, request, *args, **kwargs): return response - def retrieve(self, request, *args, **kwargs): + def retrieve(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: user = cast(User, User.get_or_create_restricted(request.user)[0]) instance = self.get_object() ignore_toolfilter = getattr(self, "ignore_toolfilter", False) @@ -999,7 +1003,7 @@ def retrieve(self, request, *args, **kwargs): return response - def __validate(self, request, bucket, submitSave, reassign): + def __validate(self, request: HttpRequest, bucket: Bucket, submitSave: bool, reassign: bool): try: bucket.getSignature() except RuntimeError as e: @@ -1039,10 +1043,10 @@ def __validate(self, request, bucket, submitSave, reassign): 'outListCount': outListCount, } - def update(self, request, *args, **kwargs): + def update(self, request: HttpRequest, *args: str, **kwargs: str) -> None: raise MethodNotAllowed(request.method) - def partial_update(self, request, *args, **kwargs): + def partial_update(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: raise MethodNotAllowed(request.method) @@ -1088,7 +1092,7 @@ def partial_update(self, request, *args, **kwargs): data=data, ) - def create(self, request, *args, **kwargs): + def create(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) @@ -1111,7 +1115,7 @@ def create(self, request, *args, **kwargs): class BucketVueViewSet(BucketViewSet): """API endpoint that allows viewing Buckets and always uses Vue serializer""" - def get_serializer(self, *args, **kwds): + def get_serializer(self, *args, **kwds) -> BucketVueSerializer: self.vue = True return BucketVueSerializer(*args, **kwds) @@ -1166,7 +1170,7 @@ def mark_all_as_read(self, request): return Response(status=status.HTTP_200_OK) -def json_to_query(json_str): +def json_to_query(json_str: str): """ This method converts JSON objects into trees of Django Q objects. It can be used to provide the user the ability to perform complex @@ -1195,7 +1199,7 @@ def json_to_query(json_str): except ValueError as e: raise RuntimeError("Invalid JSON: %s" % e) - def get_query_obj(obj, key=None): + def get_query_obj(obj, key=None) -> Q: if obj is None or isinstance(obj, (six.text_type, list, int)): kwargs = {key: obj} @@ -1235,7 +1239,7 @@ class AbstractDownloadView(APIView): authentication_classes = (TokenAuthentication, SessionAuthentication) permission_classes = (CheckAppPermission,) - def response(self, file_path, filename, content_type='application/octet-stream'): + def response(self, file_path: str, filename: str, content_type: str = 'application/octet-stream') -> HttpResponse: if not os.path.exists(file_path): return HttpResponse(status=404) @@ -1244,12 +1248,12 @@ def response(self, file_path, filename, content_type='application/octet-stream') response['Content-Disposition'] = 'attachment; filename="%s"' % filename return response - def get(self): + def get(self, _request: HttpRequest, _crashid: int) -> HttpResponse: return HttpResponse(status=500) class TestDownloadView(AbstractDownloadView): - def get(self, request, crashid): + def get(self, request: HttpRequest, crashid: int) -> HttpResponse: storage_base = getattr(django_settings, 'TEST_STORAGE', None) if not storage_base: # This is a misconfiguration @@ -1266,7 +1270,7 @@ def get(self, request, crashid): class SignaturesDownloadView(AbstractDownloadView): - def get(self, request, format=None): + def get(self, request: HttpRequest, format=None) -> HttpResponse: deny_restricted_users(request) storage_base = getattr(django_settings, 'SIGNATURE_STORAGE', None) @@ -1304,7 +1308,7 @@ def get_context_data(self, **kwargs): context['title'] = 'Edit template' return context - def get_form_class(self): + def get_form_class(self) -> Type[BugzillaTemplateBugForm] | Type[BugzillaTemplateCommentForm]: if self.object.mode == BugzillaTemplateMode.Bug: return BugzillaTemplateBugForm else: From ae5c6cc63d85fe2671b0301653a6d986933ffc6b Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 11 Jan 2022 04:14:26 -0800 Subject: [PATCH 074/137] More type information for Collector/tests/test_Collector.py --- Collector/tests/test_Collector.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index 3af4a2437..acf437d67 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -17,6 +17,7 @@ import json import os +from pathlib import Path import platform from unittest.mock import Mock, patch import zipfile @@ -55,7 +56,7 @@ pytest_plugins = ('server.tests',) -def test_collector_help(capsys): +def test_collector_help(capsys: pytest.LogCaptureFixture) -> None: '''Test that help prints without throwing''' with pytest.raises(SystemExit): main() @@ -65,7 +66,7 @@ def test_collector_help(capsys): @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_collector_submit(mock_expanduser, live_server, tmp_path, fm_user): +def test_collector_submit(mock_expanduser, live_server, tmp_path: Path, fm_user) -> None: '''Test crash submission''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used @@ -175,7 +176,7 @@ class response_t(object): collector.submit(crashInfo, str(testcase_path)) -def test_collector_refresh(capsys, tmp_path): +def test_collector_refresh(capsys: pytest.LogCaptureFixture, tmp_path: Path) -> None: '''Test signature downloads''' # create a test signature zip test2_path = tmp_path / 'test2.signature' @@ -259,7 +260,7 @@ class response_t(object): # noqa collector.refresh() -def test_collector_generate_search(tmp_path): +def test_collector_generate_search(tmp_path: Path) -> None: '''Test sigcache generation and search''' # create a cache dir cache_dir = tmp_path / 'sigcache' @@ -298,7 +299,7 @@ def test_collector_generate_search(tmp_path): assert result is None -def test_collector_download(tmp_path, monkeypatch): +def test_collector_download(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: '''Test testcase downloads''' # create Collector collector = Collector(serverHost='aol.com', From 8b38990316176d4ca1c343972fe05f2962e3dfa2 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 18 Jan 2022 03:09:07 -0800 Subject: [PATCH 075/137] Revert a mypy ignore line --- server/covmanager/management/commands/setup_repository.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/covmanager/management/commands/setup_repository.py b/server/covmanager/management/commands/setup_repository.py index 3e9d799a3..1ad534d01 100644 --- a/server/covmanager/management/commands/setup_repository.py +++ b/server/covmanager/management/commands/setup_repository.py @@ -17,7 +17,7 @@ def add_arguments(self, parser: ArgumentParser) -> None: parser.add_argument("provider", help="SourceCodeProvider subclass") parser.add_argument("location", help="path to the repository root") - def handle(self, name: str, provider: str, location: str, **opts: Any) -> None: + def handle(self, name, provider, location, **opts: Any) -> None: if not name: raise CommandError("Error: invalid repository name") @@ -32,8 +32,7 @@ def handle(self, name: str, provider: str, location: str, **opts: Any) -> None: provider = {"git": "GITSourceCodeProvider", "hg": "HGSourceCodeProvider"}.get(provider, provider) try: - # Type information here may be confused by the need for Python 2 compatibility - __import__('covmanager.SourceCodeProvider.%s' % provider, fromlist=[provider.encode("utf-8")]) # type: ignore[list-item] + __import__('covmanager.SourceCodeProvider.%s' % provider, fromlist=[provider.encode("utf-8")]) except ImportError: raise CommandError("Error: '%s' is not a valid source code provider!" % provider) From dd5c6e679d62978fe22300f1b24246a366d12dcc Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 18 Jan 2022 03:29:00 -0800 Subject: [PATCH 076/137] 1521 mypy issues left --- FTB/CoverageHelper.py | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/FTB/CoverageHelper.py b/FTB/CoverageHelper.py index 77516bd61..108cf9f1b 100644 --- a/FTB/CoverageHelper.py +++ b/FTB/CoverageHelper.py @@ -17,8 +17,10 @@ import re +from server.covmanager.models import Collection -def merge_coverage_data(r, s): + +def merge_coverage_data(r: Collection, s) -> dict[str, int]: # These variables are mainly for debugging purposes. We count the number # of warnings we encounter during merging, which are mostly due to # bugs in GCOV. These statistics can be included in the report description @@ -29,7 +31,7 @@ def merge_coverage_data(r, s): 'coverable_mismatch_count': 0 } - def merge_recursive(r, s): + def merge_recursive(r: Collection, s): assert(r['name'] == s['name']) if "children" in s: @@ -107,7 +109,7 @@ def merge_recursive(r, s): return stats -def calculate_summary_fields(node, name=None): +def calculate_summary_fields(node: Collection, name: str | None = None) -> None: node["name"] = name node["linesTotal"] = 0 node["linesCovered"] = 0 @@ -140,7 +142,7 @@ def calculate_summary_fields(node, name=None): node["coveragePercent"] = 0.0 -def apply_include_exclude_directives(node, directives): +def apply_include_exclude_directives(node: Collection, directives: list[str]) -> None: """ Applies the given include and exclude directives to the given nodeself. Directives either start with a + or a - for include or exclude, followed @@ -149,9 +151,7 @@ def apply_include_exclude_directives(node, directives): are forward slashes, must not have a trailing slash and glob characters are not allowed. ** is additionally supported for recursive directory matching. @param node: The coverage node to modify, in server-side recursive format - @type node: dict @param directives: The directives to apply - @type directives: list(str) This method modifies the node in-place, nothing is returned. IMPORTANT: This method does *not* recalculate any total/summary fields. You *must* call L{calculate_summary_fields} after applying @@ -196,13 +196,13 @@ def apply_include_exclude_directives(node, directives): # convert glob pattern to regex part = part.replace("\\*", ".*").replace("\\?", ".") # compile the resulting regex - parts.append(re.compile(part)) + parts.append(str(re.compile(part))) directives_new.append((what, parts)) - def _is_dir(node): + def _is_dir(node: Collection) -> bool: return "children" in node - def __apply_include_exclude_directives(node, directives): + def __apply_include_exclude_directives(node: Collection, directives) -> None: if not _is_dir(node): return @@ -303,7 +303,7 @@ def __apply_include_exclude_directives(node, directives): __apply_include_exclude_directives(node, directives_new) -def get_flattened_names(node, prefix: str = ""): +def get_flattened_names(node: Collection, prefix: str = "") -> set[str | None]: """ Returns a list of flattened paths (files and directories) of the given node. @@ -311,14 +311,10 @@ def get_flattened_names(node, prefix: str = ""): All slashes in paths will be forward slashes and not use any trailing slashes. @param node: The coverage node to process, in server-side recursive format - @type node: dict - @param prefix: An optional prefix to prepend to each name - @return The list of all paths occurring in the given node. - @rtype: list(str) """ - def __get_flattened_names(node, prefix, result): + def __get_flattened_names(node: Collection, prefix: str, result: set[str | None]) -> set[str | None]: current_name = node["name"] if current_name is None: new_prefix = "" From f232f2f10b6fd396d3097e51c3c1cbfc6bdd3f3c Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 28 Jan 2022 15:26:44 -0800 Subject: [PATCH 077/137] 1464 mypy issues left - add return type None to __init__ functions in classes --- EC2Reporter/EC2Reporter.py | 2 +- FTB/ConfigurationFiles.py | 2 +- FTB/Running/WaitpidMonitor.py | 2 +- FTB/Signatures/CrashSignature.py | 2 +- FTB/Signatures/Matchers.py | 4 ++-- FTB/Signatures/Symptom.py | 16 ++++++++-------- TaskStatusReporter/TaskStatusReporter.py | 2 +- misc/ec2prices/simulator.py | 2 +- misc/libfuzzer/libfuzzer.py | 2 +- server/conftest.py | 2 +- .../SourceCodeProvider/GITSourceCodeProvider.py | 2 +- .../SourceCodeProvider/HGSourceCodeProvider.py | 2 +- .../SourceCodeProvider/SourceCodeProvider.py | 2 +- server/covmanager/models.py | 2 +- server/covmanager/serializers.py | 4 ++-- server/covmanager/templatetags/recurseroot.py | 2 +- .../crashmanager/Bugtracker/BugzillaProvider.py | 2 +- server/crashmanager/Bugtracker/Provider.py | 2 +- server/crashmanager/forms.py | 2 +- server/crashmanager/models.py | 2 +- server/crashmanager/serializers.py | 2 +- .../CloudProvider/GCECloudProvider.py | 2 +- server/ec2spotmanager/models.py | 2 +- server/ec2spotmanager/serializers.py | 2 +- .../ec2spotmanager/templatetags/recursetags.py | 2 +- server/ec2spotmanager/tests/test_tasks.py | 4 ++-- server/server/middleware.py | 6 +++--- 27 files changed, 39 insertions(+), 39 deletions(-) diff --git a/EC2Reporter/EC2Reporter.py b/EC2Reporter/EC2Reporter.py index ef6382550..9fd1a5b75 100755 --- a/EC2Reporter/EC2Reporter.py +++ b/EC2Reporter/EC2Reporter.py @@ -40,7 +40,7 @@ class EC2Reporter(Reporter): @functools.wraps(Reporter.__init__) - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: kwargs.setdefault('tool', 'N/A') # tool is required by remote_checks, but unused by EC2Reporter super(EC2Reporter, self).__init__(*args, **kwargs) diff --git a/FTB/ConfigurationFiles.py b/FTB/ConfigurationFiles.py index c5208d767..5dffb9e63 100755 --- a/FTB/ConfigurationFiles.py +++ b/FTB/ConfigurationFiles.py @@ -21,7 +21,7 @@ class ConfigurationFiles(): - def __init__(self, configFiles: list[str]): + def __init__(self, configFiles: list[str]) -> None: self.mainConfig: dict[str, str] = {} self.metadataConfig: dict[str, str] = {} diff --git a/FTB/Running/WaitpidMonitor.py b/FTB/Running/WaitpidMonitor.py index 2df4ecc42..2be40ac06 100644 --- a/FTB/Running/WaitpidMonitor.py +++ b/FTB/Running/WaitpidMonitor.py @@ -21,7 +21,7 @@ class WaitpidMonitor(threading.Thread): - def __init__(self, pid: int, options: int): + def __init__(self, pid: int, options: int) -> None: threading.Thread.__init__(self) self.pid: int = pid diff --git a/FTB/Signatures/CrashSignature.py b/FTB/Signatures/CrashSignature.py index 4a8d5596c..1f34d4651 100644 --- a/FTB/Signatures/CrashSignature.py +++ b/FTB/Signatures/CrashSignature.py @@ -27,7 +27,7 @@ class CrashSignature(object): - def __init__(self, rawSignature: str): + def __init__(self, rawSignature: str) -> None: ''' Constructor diff --git a/FTB/Signatures/Matchers.py b/FTB/Signatures/Matchers.py index d793ac7b1..03712321e 100644 --- a/FTB/Signatures/Matchers.py +++ b/FTB/Signatures/Matchers.py @@ -35,7 +35,7 @@ def matches(self, value): class StringMatch(Match): - def __init__(self, obj): + def __init__(self, obj) -> None: self.isPCRE = False self.compiledValue = None self.patternContainsSlash = False @@ -104,7 +104,7 @@ class NumberMatchType(object): class NumberMatch(Match): - def __init__(self, obj): + def __init__(self, obj) -> None: self.matchType = None if isinstance(obj, bytes): diff --git a/FTB/Signatures/Symptom.py b/FTB/Signatures/Symptom.py index 3ddc3d3df..c863c71ac 100644 --- a/FTB/Signatures/Symptom.py +++ b/FTB/Signatures/Symptom.py @@ -32,7 +32,7 @@ class Symptom(object): Abstract base class that provides a method to instantiate the right sub class. It also supports generating a CrashSignature based on the stored information. ''' - def __init__(self, jsonObj): + def __init__(self, jsonObj) -> None: # Store the original source so we can return it if someone wants to stringify us self.jsonsrc = json.dumps(jsonObj, indent=2) self.jsonobj = jsonObj @@ -85,7 +85,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class OutputSymptom(Symptom): - def __init__(self, obj): + def __init__(self, obj) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -128,7 +128,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class StackFrameSymptom(Symptom): - def __init__(self, obj): + def __init__(self, obj) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -161,7 +161,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class StackSizeSymptom(Symptom): - def __init__(self, obj): + def __init__(self, obj) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -180,7 +180,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class CrashAddressSymptom(Symptom): - def __init__(self, obj): + def __init__(self, obj) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -201,7 +201,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class InstructionSymptom(Symptom): - def __init__(self, obj): + def __init__(self, obj) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -239,7 +239,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class TestcaseSymptom(Symptom): - def __init__(self, obj): + def __init__(self, obj) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -269,7 +269,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class StackFramesSymptom(Symptom): - def __init__(self, obj): + def __init__(self, obj) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' diff --git a/TaskStatusReporter/TaskStatusReporter.py b/TaskStatusReporter/TaskStatusReporter.py index f177db9f9..49ffde041 100755 --- a/TaskStatusReporter/TaskStatusReporter.py +++ b/TaskStatusReporter/TaskStatusReporter.py @@ -40,7 +40,7 @@ class TaskStatusReporter(Reporter): @functools.wraps(Reporter.__init__) - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: kwargs.setdefault('tool', 'N/A') # tool is required by remote_checks, but unused by TaskStatusReporter super(TaskStatusReporter, self).__init__(*args, **kwargs) diff --git a/misc/ec2prices/simulator.py b/misc/ec2prices/simulator.py index 82b41df6f..0496c2895 100644 --- a/misc/ec2prices/simulator.py +++ b/misc/ec2prices/simulator.py @@ -111,7 +111,7 @@ def get_spot_prices(regions, start_time, end_time, aws_key_id, aws_secret_key, i class ConfigurationFile(): - def __init__(self, configFile): + def __init__(self, configFile) -> None: self.simulations = OrderedDict() self.main = {} if configFile: diff --git a/misc/libfuzzer/libfuzzer.py b/misc/libfuzzer/libfuzzer.py index 7fb59bfd0..010e2c968 100755 --- a/misc/libfuzzer/libfuzzer.py +++ b/misc/libfuzzer/libfuzzer.py @@ -33,7 +33,7 @@ class LibFuzzerMonitor(threading.Thread): - def __init__(self, fd: IO[str]): + def __init__(self, fd: IO[str]) -> None: assert callable(fd.readline) threading.Thread.__init__(self) diff --git a/server/conftest.py b/server/conftest.py index 77e554fc1..5ae82acd9 100644 --- a/server/conftest.py +++ b/server/conftest.py @@ -70,7 +70,7 @@ def migration_hook(request): class migration_hook_result(object): - def __init__(self, _from, _to): + def __init__(self, _from, _to) -> None: self._to = _to executor = MigrationExecutor(connection) self.apps = executor.loader.project_state(_from).apps diff --git a/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py b/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py index 62aa7f490..a0b320fde 100644 --- a/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/GITSourceCodeProvider.py @@ -20,7 +20,7 @@ class GITSourceCodeProvider(SourceCodeProvider): - def __init__(self, location: str): + def __init__(self, location: str) -> None: super(GITSourceCodeProvider, self).__init__(location) def getSource(self, filename: str, revision: str) -> str: diff --git a/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py b/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py index ef5caef89..45dcc2f0b 100644 --- a/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/HGSourceCodeProvider.py @@ -21,7 +21,7 @@ class HGSourceCodeProvider(SourceCodeProvider): - def __init__(self, location: str): + def __init__(self, location: str) -> None: super(HGSourceCodeProvider, self).__init__(location) def getSource(self, filename: str, revision: str) -> str: diff --git a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py index 8dac08972..224c7e7d8 100644 --- a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py @@ -33,7 +33,7 @@ class SourceCodeProvider(): ''' Abstract base class that defines what interfaces Source Code Providers must implement ''' - def __init__(self, location: str): + def __init__(self, location: str) -> None: self.location = location @abstractmethod diff --git a/server/covmanager/models.py b/server/covmanager/models.py index 0cab3711e..065aa9410 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -49,7 +49,7 @@ class Collection(models.Model): client = cast(Client, models.ForeignKey(Client, on_delete=models.deletion.CASCADE)) coverage = cast(CollectionFile, models.ForeignKey(CollectionFile, blank=True, null=True, on_delete=models.deletion.CASCADE)) - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: # This variable can hold the deserialized contents of the coverage blob self.content = None diff --git a/server/covmanager/serializers.py b/server/covmanager/serializers.py index e9c1f22cb..d978df13f 100644 --- a/server/covmanager/serializers.py +++ b/server/covmanager/serializers.py @@ -108,7 +108,7 @@ class Meta: ) read_only_fields = ('id', 'created') - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: super(ReportConfigurationSerializer, self).__init__(*args, **kwargs) request = self.context.get("request") @@ -162,7 +162,7 @@ class Meta: ) read_only_fields = ('id', 'data_created', 'coverage') - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: super(ReportSerializer, self).__init__(*args, **kwargs) request = self.context.get("request") diff --git a/server/covmanager/templatetags/recurseroot.py b/server/covmanager/templatetags/recurseroot.py index 98e297355..ad6928aac 100644 --- a/server/covmanager/templatetags/recurseroot.py +++ b/server/covmanager/templatetags/recurseroot.py @@ -7,7 +7,7 @@ class RecurseReportSummaryTree(template.Node): - def __init__(self, template_nodes, config_var): + def __init__(self, template_nodes, config_var) -> None: self.template_nodes = template_nodes self.config_var = config_var diff --git a/server/crashmanager/Bugtracker/BugzillaProvider.py b/server/crashmanager/Bugtracker/BugzillaProvider.py index 2b4064e65..13cdc9471 100644 --- a/server/crashmanager/Bugtracker/BugzillaProvider.py +++ b/server/crashmanager/Bugtracker/BugzillaProvider.py @@ -24,7 +24,7 @@ class BugzillaProvider(Provider): - def __init__(self, pk, hostname): + def __init__(self, pk, hostname) -> None: super(BugzillaProvider, self).__init__(pk, hostname) def getTemplateForUser(self, request, crashEntry): diff --git a/server/crashmanager/Bugtracker/Provider.py b/server/crashmanager/Bugtracker/Provider.py index 635978283..7a4015e6c 100644 --- a/server/crashmanager/Bugtracker/Provider.py +++ b/server/crashmanager/Bugtracker/Provider.py @@ -25,7 +25,7 @@ class Provider(): Abstract base class that defines what interfaces Bug Providers must implement ''' - def __init__(self, pk, hostname): + def __init__(self, pk, hostname) -> None: self.pk = pk self.hostname = hostname diff --git a/server/crashmanager/forms.py b/server/crashmanager/forms.py index 892db1cd7..fc7ab6d65 100644 --- a/server/crashmanager/forms.py +++ b/server/crashmanager/forms.py @@ -196,7 +196,7 @@ class Meta: 'bucket_hit' ] - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: self.user = kwargs.pop('user', None) super().__init__(*args, **kwargs) diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index 6e1b0d878..78327a822 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -356,7 +356,7 @@ class CrashEntry(models.Model): cachedCrashInfo = str(models.TextField(blank=True, null=True)) triagedOnce = bool(models.BooleanField(blank=False, default=False)) - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: # These variables can hold temporarily deserialized data self.argsList = None self.envList = None diff --git a/server/crashmanager/serializers.py b/server/crashmanager/serializers.py index ac8c0a566..2b22581a2 100644 --- a/server/crashmanager/serializers.py +++ b/server/crashmanager/serializers.py @@ -37,7 +37,7 @@ class CrashEntrySerializer(serializers.ModelSerializer[CrashEntry]): testcase_quality = serializers.IntegerField(source='testcase.quality', required=False, default=0) testcase_isbinary = serializers.BooleanField(source='testcase.isBinary', required=False, default=False) - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: include_raw = kwargs.pop('include_raw', True) diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index 9ae2c8dd5..e94a4e610 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -36,7 +36,7 @@ class _LowercaseDict(dict): - def __init__(self, *args, **kwds): + def __init__(self, *args, **kwds) -> None: super(_LowercaseDict, self).__init__() if len(args) > 1: raise TypeError("dict expected at most 1 arguments, got %d" % (len(args),)) diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index 4bdb8962c..185bfc6b0 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -63,7 +63,7 @@ class PoolConfiguration(models.Model): gce_env_include_macros = bool(models.BooleanField(default=False)) gce_raw_config = str(models.TextField(blank=True, null=True)) - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: # These variables can hold temporarily deserialized data self.instance_tags_dict = None self.instance_tags_override = None diff --git a/server/ec2spotmanager/serializers.py b/server/ec2spotmanager/serializers.py index c4f081690..df58933f4 100644 --- a/server/ec2spotmanager/serializers.py +++ b/server/ec2spotmanager/serializers.py @@ -44,7 +44,7 @@ class PoolConfigurationSerializer(serializers.BaseSerializer[PoolConfiguration]) gce_raw_config = serializers.DictField(child=serializers.CharField(), allow_null=True) gce_raw_config_override = serializers.BooleanField(default=False) - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: self._flatten = kwargs.pop('flatten', False) super(PoolConfigurationSerializer, self).__init__(*args, **kwargs) diff --git a/server/ec2spotmanager/templatetags/recursetags.py b/server/ec2spotmanager/templatetags/recursetags.py index 7bbe9e571..4b90b6a0e 100644 --- a/server/ec2spotmanager/templatetags/recursetags.py +++ b/server/ec2spotmanager/templatetags/recursetags.py @@ -7,7 +7,7 @@ class RecurseConfigTree(template.Node): - def __init__(self, template_nodes, config_var): + def __init__(self, template_nodes, config_var) -> None: self.template_nodes = template_nodes self.config_var = config_var diff --git a/server/ec2spotmanager/tests/test_tasks.py b/server/ec2spotmanager/tests/test_tasks.py index 179b2963a..ea728fcd8 100644 --- a/server/ec2spotmanager/tests/test_tasks.py +++ b/server/ec2spotmanager/tests/test_tasks.py @@ -108,7 +108,7 @@ def test_fulfilled_spot_instance(mocker): """spot instance requests are turned into instances when fulfilled""" # ensure EC2Manager returns a request ID class _MockInstance(boto.ec2.instance.Instance): - def __init__(self, *args, **kwds): + def __init__(self, *args, **kwds) -> None: super(_MockInstance, self).__init__(*args, **kwds) self._test_tags = {} @@ -309,7 +309,7 @@ class _status_code(object): code = 'instance-terminated-by-service' class _MockReq(boto.ec2.spotinstancerequest.SpotInstanceRequest): - def __init__(self, *args, **kwds): + def __init__(self, *args, **kwds) -> None: super(_MockReq, self).__init__(*args, **kwds) self.state = 'cancelled' self.status = _status_code diff --git a/server/server/middleware.py b/server/server/middleware.py index f91746029..8ab80436c 100644 --- a/server/server/middleware.py +++ b/server/server/middleware.py @@ -16,7 +16,7 @@ class ExceptionLoggingMiddleware(object): This tiny middleware module allows us to see exceptions on stderr when running a Django instance with runserver.py """ - def __init__(self, get_response): + def __init__(self, get_response) -> None: self.get_response = get_response def __call__(self, request): @@ -43,7 +43,7 @@ class RequireLoginMiddleware(object): """ # Based on snippet from https://stackoverflow.com/a/46976284 # Docstring and original idea from https://stackoverflow.com/a/2164224 - def __init__(self, get_response): + def __init__(self, get_response) -> None: self.get_response = get_response self.exceptions = re.compile("(" + "|".join(settings.LOGIN_REQUIRED_URLS_EXCEPTIONS) + ")") @@ -65,7 +65,7 @@ def process_view(self, request, view_func, view_args, view_kwargs): class CheckAppPermissionsMiddleware(object): - def __init__(self, get_response): + def __init__(self, get_response) -> None: self.get_response = get_response self.exceptions = re.compile("(" + "|".join(settings.LOGIN_REQUIRED_URLS_EXCEPTIONS) + ")") From 59b031502f6935471ed54d25b5011499a3d79d9f Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 28 Jan 2022 19:33:24 -0800 Subject: [PATCH 078/137] Bump types-boto version --- server/requirements3.7.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/requirements3.7.txt b/server/requirements3.7.txt index 3d3d1b8d2..4d859822e 100644 --- a/server/requirements3.7.txt +++ b/server/requirements3.7.txt @@ -51,7 +51,7 @@ six>=1.12.0 # fuzzing-decision is only needed for the taskmanager module (requires python 3) #git+https://github.com/MozillaSecurity/orion#egg=fuzzing-decision&subdirectory=services/fuzzing-decision taskcluster>=44.2.2,<44.3 -types-boto>=0.1.4,<0.2 +types-boto>=2.49.6,<2.50 types-mock>=0.1.5,<0.2 types-PyYAML>=6.0.1,<6.1 types-python-dateutil>=2.8.4,<2.9 From 1d81713d5f04265c1b4e2f68c59880ee1cca8075 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 28 Jan 2022 19:37:06 -0800 Subject: [PATCH 079/137] 1454 mypy issues left --- misc/ec2prices/simulator.py | 22 +++++++++++++--------- misc/update_prices.py | 7 +++++-- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/misc/ec2prices/simulator.py b/misc/ec2prices/simulator.py index 0496c2895..237309cf4 100644 --- a/misc/ec2prices/simulator.py +++ b/misc/ec2prices/simulator.py @@ -37,7 +37,7 @@ # This function must be defined at the module level so it can be pickled # by the multiprocessing module when calling this asynchronously. -def get_spot_price_per_region(region_name, start_time, end_time, aws_key_id, aws_secret_key, instance_type): +def get_spot_price_per_region(region_name: str, start_time: datetime.datetime, end_time: datetime.datetime, aws_key_id: str, aws_secret_key: str, instance_type: str): '''Gets spot prices of the specified region and instance type''' print("Region %s Instance Type %s Start %s End %s" % (region_name, instance_type, start_time.isoformat(), @@ -67,8 +67,8 @@ def get_spot_price_per_region(region_name, start_time, end_time, aws_key_id, aws return r -def get_spot_prices(regions, start_time, end_time, aws_key_id, aws_secret_key, instance_types, prices, - use_multiprocess=False): +def get_spot_prices(regions: dict[str, str], start_time: datetime.datetime, end_time: datetime.datetime, aws_key_id: str, aws_secret_key: str, instance_types: list[str], prices: list[str], + use_multiprocess: bool = False) -> None: if use_multiprocess: from multiprocessing import Pool, cpu_count pool = Pool(cpu_count()) @@ -111,9 +111,9 @@ def get_spot_prices(regions, start_time, end_time, aws_key_id, aws_secret_key, i class ConfigurationFile(): - def __init__(self, configFile) -> None: - self.simulations = OrderedDict() - self.main = {} + def __init__(self, configFile: str) -> None: + self.simulations: OrderedDict[str, str] = OrderedDict() + self.main: dict[str, str] = {} if configFile: self.parser = configparser.ConfigParser() @@ -146,7 +146,7 @@ def __init__(self, configFile) -> None: self.simulations[section] = sectionMap - def getSectionMap(self, section): + def getSectionMap(self, section: str) -> dict[str, str]: ret = OrderedDict() try: options = self.parser.options(section) @@ -157,7 +157,7 @@ def getSectionMap(self, section): return ret -def main() -> None: +def main() -> int: '''Command line options.''' # setup argparser @@ -176,7 +176,7 @@ def main() -> None: print("Error: No simulations configured, exiting...") sys.exit(1) - results = OrderedDict() + results: OrderedDict[str, int] = OrderedDict() cacheFile = configFile.main["cache_file"] regions = configFile.main["regions"].split(",") @@ -186,6 +186,7 @@ def main() -> None: aws_secret_key = configFile.main["aws_secret_key"] for (simulation_name, simulation) in configFile.simulations.items(): + assert isinstance(simulation, dict) sim_module = importlib.import_module("simulations.%s" % simulation["handler"]) print("Performing simulation '%s' ..." % simulation_name) @@ -220,6 +221,7 @@ def main() -> None: if col_len is None or col_len < len(simulation): col_len = len(simulation) + assert isinstance(col_len, int) col_len += 1 print("") @@ -244,6 +246,8 @@ def main() -> None: sys.stdout.write(" " * (len(simulation_b) - len(p) + 2)) sys.stdout.write("\n") + return 0 + if __name__ == "__main__": sys.exit(main()) diff --git a/misc/update_prices.py b/misc/update_prices.py index 38d8e7d1e..286f47a7d 100644 --- a/misc/update_prices.py +++ b/misc/update_prices.py @@ -55,7 +55,7 @@ } -def get_instance_types(regions=True, index_json=None): +def get_instance_types(regions: bool = True, index_json: dict[str, object] | None = None) -> dict[str, object]: """Fetch instance type data from EC2 pricing API. regions: if True, this will add a "regions" field to each instance type, stating which regions support it. @@ -89,8 +89,9 @@ def get_instance_types(regions=True, index_json=None): requests.get("https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json").json() data = index_json['products'] + assert isinstance(data, dict) - instance_types = {} + instance_types: dict[str, object] = {} for product in data.values(): if product["productFamily"] not in {"Compute Instance", "Compute Instance (bare metal)"} or \ @@ -100,6 +101,7 @@ def get_instance_types(regions=True, index_json=None): product["attributes"]["location"] not in REGION_NAMES: continue instance_data = instance_types.setdefault(product["attributes"]["instanceType"], {}) + assert isinstance(instance_data, dict) if instance_data: # assert that all fields are the same! new_data = {key: value for key, value in product["attributes"].items() if key not in FIELDS_BLACKLIST} @@ -122,6 +124,7 @@ def get_instance_types(regions=True, index_json=None): # normalize units for instance_data in instance_types.values(): + assert isinstance(instance_data, dict) if regions: instance_data["regions"] = list(instance_data["regions"]) instance_data["vcpu"] = int(instance_data["vcpu"]) From 1ede4962fab2f4557f1b1fde587aec025821edf1 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 29 Jan 2022 14:04:55 -0800 Subject: [PATCH 080/137] 1448 mypy issues left --- .../crashmanager/tests/test_crashes_rest.py | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index 98e500b11..4a9289bd4 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -56,14 +56,14 @@ @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/crashes/", "/crashmanager/rest/crashes/1/"]) -def test_rest_crashes_no_auth(db, api_client, method, url): +def test_rest_crashes_no_auth(db: str, api_client, method: str, url: str) -> None: """must yield unauthorized without authentication""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['unauthorized'] @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/crashes/", "/crashmanager/rest/crashes/1/"]) -def test_rest_crashes_no_perm(user_noperm, api_client, method, url): +def test_rest_crashes_no_perm(user_noperm: str, api_client, method: str, url: str) -> None: """must yield forbidden without permission""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['forbidden'] @@ -83,12 +83,12 @@ def test_rest_crashes_no_perm(user_noperm, api_client, method, url): ("put", "/crashmanager/rest/crashes/1/", "normal"), ("put", "/crashmanager/rest/crashes/1/", "restricted"), ], indirect=["user"]) -def test_rest_crashes_methods(api_client, user, method, url): +def test_rest_crashes_methods(api_client, user: str, method: str, url: str) -> None: """must yield method-not-allowed for unsupported methods""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['method_not_allowed'] -def _compare_rest_result_to_crash(result, crash, raw=True): +def _compare_rest_result_to_crash(result, crash, raw: bool = True) -> None: expected_fields = { 'args', 'bucket', 'client', 'env', 'id', 'metadata', 'os', 'platform', 'product', 'product_version', @@ -117,7 +117,7 @@ def _compare_rest_result_to_crash(result, crash, raw=True): assert value == obj -def _compare_created_data_to_crash(data, crash, crash_address=None, short_signature=None): +def _compare_created_data_to_crash(data, crash, crash_address: str | None = None, short_signature: str | None = None) -> None: for field in ('rawStdout', 'rawStderr', 'rawCrashData'): assert getattr(crash, field) == data[field].strip() if 'testcase' in data: @@ -140,7 +140,7 @@ def _compare_created_data_to_crash(data, crash, crash_address=None, short_signat @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("ignore_toolfilter", [True, False]) @pytest.mark.parametrize("include_raw", [True, False]) -def test_rest_crashes_list(api_client, user, cm, ignore_toolfilter, include_raw): +def test_rest_crashes_list(api_client, user, cm, ignore_toolfilter: bool, include_raw: bool) -> None: """test that list returns the right crashes""" # if restricted or normal, must only list crashes in toolfilter buckets = [cm.create_bucket(shortDescription="bucket #1"), None] @@ -182,7 +182,7 @@ def test_rest_crashes_list(api_client, user, cm, ignore_toolfilter, include_raw) @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("ignore_toolfilter", [True, False]) @pytest.mark.parametrize("include_raw", [True, False]) -def test_rest_crashes_retrieve(api_client, user, cm, ignore_toolfilter, include_raw): +def test_rest_crashes_retrieve(api_client, user, cm, ignore_toolfilter: bool, include_raw: bool) -> None: """test that retrieve returns the right crash""" # if restricted or normal, must only list crashes in toolfilter buckets = [cm.create_bucket(shortDescription="bucket #1"), None] @@ -224,7 +224,7 @@ def test_rest_crashes_retrieve(api_client, user, cm, ignore_toolfilter, include_ ("restricted", None, None), ("restricted", 3, "tool1"), ], indirect=["user"]) -def test_rest_crashes_list_query(api_client, cm, user, expected, toolfilter): +def test_rest_crashes_list_query(api_client, cm, user, expected: int | None, toolfilter: str | None) -> None: """test that crashes can be queried""" buckets = [cm.create_bucket(shortDescription="bucket #1"), None, None, None] testcases = [cm.create_testcase("test1.txt", quality=5), @@ -308,7 +308,7 @@ def test_rest_crashes_list_query(api_client, cm, user, expected, toolfilter): 'tool': 'x', }, ]) -def test_rest_crashes_report_crash(api_client, user, data): +def test_rest_crashes_report_crash(api_client, user, data) -> None: """test that crash reporting works""" resp = api_client.post('/crashmanager/rest/crashes/', data=data) LOG.debug(resp) @@ -317,7 +317,7 @@ def test_rest_crashes_report_crash(api_client, user, data): _compare_created_data_to_crash(data, crash) -def test_rest_crashes_report_crash_long(api_client, user_normal): +def test_rest_crashes_report_crash_long(api_client, user_normal) -> None: """test that crash reporting works with fields interpreted as `long` in python 2""" data = { 'rawStdout': '', @@ -380,7 +380,7 @@ def test_rest_crashes_report_crash_long(api_client, user_normal): @patch('crashmanager.models.CrashEntry.save', new=Mock(side_effect=RuntimeError("crashentry failing intentionally"))) -def test_rest_crashes_report_bad_crash_removes_testcase(api_client, user_normal): +def test_rest_crashes_report_bad_crash_removes_testcase(api_client, user_normal) -> None: """test that reporting a bad crash doesn't leave an orphaned testcase""" data = { 'rawStdout': 'data on\nstdout', @@ -402,7 +402,7 @@ def test_rest_crashes_report_bad_crash_removes_testcase(api_client, user_normal) assert not cmTestCase.objects.exists() -def test_rest_crashes_report_crash_long_sig(api_client, user_normal): +def test_rest_crashes_report_crash_long_sig(api_client, user_normal) -> None: """test that crash reporting works with an assertion message too long for shortSignature""" data = { 'rawStdout': 'data on\nstdout', @@ -422,7 +422,7 @@ def test_rest_crashes_report_crash_long_sig(api_client, user_normal): _compare_created_data_to_crash(data, crash, short_signature=expected) -def test_rest_crash_update(api_client, cm, user_normal): +def test_rest_crash_update(api_client, cm, user_normal) -> None: """test that only allowed fields of CrashEntry can be updated""" test = cm.create_testcase("test.txt", quality=0) bucket = cm.create_bucket(shortDescription="bucket #1") @@ -449,7 +449,7 @@ def test_rest_crash_update(api_client, cm, user_normal): assert test.quality == 5 -def test_rest_crash_update_restricted(api_client, cm, user_restricted): +def test_rest_crash_update_restricted(api_client, cm, user_restricted) -> None: """test that restricted users cannot perform updates on CrashEntry""" test = cm.create_testcase("test.txt", quality=0) bucket = cm.create_bucket(shortDescription="bucket #1") From 4917272fbd2bb28a9a945f1a656c2b615088524b Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 29 Jan 2022 20:20:50 -0800 Subject: [PATCH 081/137] 1443 mypy issues left --- .../crashmanager/tests/test_crashes_rest.py | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index 4a9289bd4..e660162d1 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -16,10 +16,13 @@ import json import logging import os.path +from typing_extensions import TypedDict from unittest.mock import Mock, patch +from django.contrib.auth.models import User import pytest import requests +from rest_framework.test import APIClient from crashmanager.models import CrashEntry, TestCase as cmTestCase @@ -56,14 +59,14 @@ @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/crashes/", "/crashmanager/rest/crashes/1/"]) -def test_rest_crashes_no_auth(db: str, api_client, method: str, url: str) -> None: +def test_rest_crashes_no_auth(db: str, api_client: APIClient, method: str, url: str) -> None: """must yield unauthorized without authentication""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['unauthorized'] @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/crashes/", "/crashmanager/rest/crashes/1/"]) -def test_rest_crashes_no_perm(user_noperm: str, api_client, method: str, url: str) -> None: +def test_rest_crashes_no_perm(user_noperm: User, api_client: APIClient, method: str, url: str) -> None: """must yield forbidden without permission""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['forbidden'] @@ -83,7 +86,7 @@ def test_rest_crashes_no_perm(user_noperm: str, api_client, method: str, url: st ("put", "/crashmanager/rest/crashes/1/", "normal"), ("put", "/crashmanager/rest/crashes/1/", "restricted"), ], indirect=["user"]) -def test_rest_crashes_methods(api_client, user: str, method: str, url: str) -> None: +def test_rest_crashes_methods(api_client: APIClient, user: User, method: str, url: str) -> None: """must yield method-not-allowed for unsupported methods""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['method_not_allowed'] @@ -117,7 +120,25 @@ def _compare_rest_result_to_crash(result, crash, raw: bool = True) -> None: assert value == obj -def _compare_created_data_to_crash(data, crash, crash_address: str | None = None, short_signature: str | None = None) -> None: +class DataType(TypedDict): + """Type information for the data dictionary.""" + + rawStdout: str + rawStderr: str + rawCrashData: str + testcase: str + testcase_isbinary: bool + testcase_quality: int + testcase_ext: str + platform: str + product: str + product_version: str + os: str + client: str + tool: str + + +def _compare_created_data_to_crash(data: DataType, crash: CrashEntry, crash_address: str | None = None, short_signature: str | None = None) -> None: for field in ('rawStdout', 'rawStderr', 'rawCrashData'): assert getattr(crash, field) == data[field].strip() if 'testcase' in data: @@ -140,7 +161,7 @@ def _compare_created_data_to_crash(data, crash, crash_address: str | None = None @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("ignore_toolfilter", [True, False]) @pytest.mark.parametrize("include_raw", [True, False]) -def test_rest_crashes_list(api_client, user, cm, ignore_toolfilter: bool, include_raw: bool) -> None: +def test_rest_crashes_list(api_client: APIClient, user: User, cm, ignore_toolfilter: bool, include_raw: bool) -> None: """test that list returns the right crashes""" # if restricted or normal, must only list crashes in toolfilter buckets = [cm.create_bucket(shortDescription="bucket #1"), None] @@ -182,7 +203,7 @@ def test_rest_crashes_list(api_client, user, cm, ignore_toolfilter: bool, includ @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("ignore_toolfilter", [True, False]) @pytest.mark.parametrize("include_raw", [True, False]) -def test_rest_crashes_retrieve(api_client, user, cm, ignore_toolfilter: bool, include_raw: bool) -> None: +def test_rest_crashes_retrieve(api_client: APIClient, user: User, cm, ignore_toolfilter: bool, include_raw: bool) -> None: """test that retrieve returns the right crash""" # if restricted or normal, must only list crashes in toolfilter buckets = [cm.create_bucket(shortDescription="bucket #1"), None] @@ -224,7 +245,7 @@ def test_rest_crashes_retrieve(api_client, user, cm, ignore_toolfilter: bool, in ("restricted", None, None), ("restricted", 3, "tool1"), ], indirect=["user"]) -def test_rest_crashes_list_query(api_client, cm, user, expected: int | None, toolfilter: str | None) -> None: +def test_rest_crashes_list_query(api_client: APIClient, cm, user: User, expected: int | None, toolfilter: str | None) -> None: """test that crashes can be queried""" buckets = [cm.create_bucket(shortDescription="bucket #1"), None, None, None] testcases = [cm.create_testcase("test1.txt", quality=5), @@ -308,7 +329,7 @@ def test_rest_crashes_list_query(api_client, cm, user, expected: int | None, too 'tool': 'x', }, ]) -def test_rest_crashes_report_crash(api_client, user, data) -> None: +def test_rest_crashes_report_crash(api_client: APIClient, user: User, data: DataType) -> None: """test that crash reporting works""" resp = api_client.post('/crashmanager/rest/crashes/', data=data) LOG.debug(resp) @@ -317,9 +338,9 @@ def test_rest_crashes_report_crash(api_client, user, data) -> None: _compare_created_data_to_crash(data, crash) -def test_rest_crashes_report_crash_long(api_client, user_normal) -> None: +def test_rest_crashes_report_crash_long(api_client: APIClient, user_normal: User) -> None: """test that crash reporting works with fields interpreted as `long` in python 2""" - data = { + data: DataType = { 'rawStdout': '', 'rawStderr': '', 'rawCrashData': r'''GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 @@ -380,7 +401,7 @@ def test_rest_crashes_report_crash_long(api_client, user_normal) -> None: @patch('crashmanager.models.CrashEntry.save', new=Mock(side_effect=RuntimeError("crashentry failing intentionally"))) -def test_rest_crashes_report_bad_crash_removes_testcase(api_client, user_normal) -> None: +def test_rest_crashes_report_bad_crash_removes_testcase(api_client: APIClient, user_normal: User) -> None: """test that reporting a bad crash doesn't leave an orphaned testcase""" data = { 'rawStdout': 'data on\nstdout', @@ -402,9 +423,9 @@ def test_rest_crashes_report_bad_crash_removes_testcase(api_client, user_normal) assert not cmTestCase.objects.exists() -def test_rest_crashes_report_crash_long_sig(api_client, user_normal) -> None: +def test_rest_crashes_report_crash_long_sig(api_client: APIClient, user_normal: User) -> None: """test that crash reporting works with an assertion message too long for shortSignature""" - data = { + data: DataType = { 'rawStdout': 'data on\nstdout', 'rawStderr': 'data on\nstderr', 'rawCrashData': 'Assertion failure: ' + ('A' * 4096), @@ -422,7 +443,7 @@ def test_rest_crashes_report_crash_long_sig(api_client, user_normal) -> None: _compare_created_data_to_crash(data, crash, short_signature=expected) -def test_rest_crash_update(api_client, cm, user_normal) -> None: +def test_rest_crash_update(api_client: APIClient, cm, user_normal: User) -> None: """test that only allowed fields of CrashEntry can be updated""" test = cm.create_testcase("test.txt", quality=0) bucket = cm.create_bucket(shortDescription="bucket #1") @@ -449,7 +470,7 @@ def test_rest_crash_update(api_client, cm, user_normal) -> None: assert test.quality == 5 -def test_rest_crash_update_restricted(api_client, cm, user_restricted) -> None: +def test_rest_crash_update_restricted(api_client: APIClient, cm, user_restricted: User) -> None: """test that restricted users cannot perform updates on CrashEntry""" test = cm.create_testcase("test.txt", quality=0) bucket = cm.create_bucket(shortDescription="bucket #1") From a5103c877af98f4bb5cbde87ba9b417968041af8 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 29 Jan 2022 20:46:49 -0800 Subject: [PATCH 082/137] 1442 mypy issues left --- server/crashmanager/tests/test_crashes_rest.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index e660162d1..f76a41be6 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -16,6 +16,7 @@ import json import logging import os.path +from typing_extensions import NotRequired from typing_extensions import TypedDict from unittest.mock import Mock, patch @@ -91,7 +92,7 @@ def test_rest_crashes_methods(api_client: APIClient, user: User, method: str, ur assert getattr(api_client, method)(url, {}).status_code == requests.codes['method_not_allowed'] -def _compare_rest_result_to_crash(result, crash, raw: bool = True) -> None: +def _compare_rest_result_to_crash(result: dict[str, str], crash, raw: bool = True) -> None: expected_fields = { 'args', 'bucket', 'client', 'env', 'id', 'metadata', 'os', 'platform', 'product', 'product_version', @@ -126,10 +127,10 @@ class DataType(TypedDict): rawStdout: str rawStderr: str rawCrashData: str - testcase: str - testcase_isbinary: bool - testcase_quality: int - testcase_ext: str + testcase: NotRequired[str] + testcase_isbinary: NotRequired[bool] + testcase_quality: NotRequired[int] + testcase_ext: NotRequired[str] platform: str product: str product_version: str From 40c8674e16d1840b1914e9fb132060f3cdc46ef3 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 29 Jan 2022 21:36:57 -0800 Subject: [PATCH 083/137] 1423 mypy issues left --- server/crashmanager/tests/conftest.py | 236 +++++++++++++------------- 1 file changed, 122 insertions(+), 114 deletions(-) diff --git a/server/crashmanager/tests/conftest.py b/server/crashmanager/tests/conftest.py index 48a83cab1..1396c47c1 100644 --- a/server/crashmanager/tests/conftest.py +++ b/server/crashmanager/tests/conftest.py @@ -13,10 +13,13 @@ from __future__ import annotations import logging +from typing import cast + from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission from django.core.files.base import ContentFile import pytest +from rest_framework.test import APIClient from crashmanager.models import Bucket, BucketWatch, Bug, BugProvider, BugzillaTemplate, BugzillaTemplateMode, Client, \ CrashEntry, OS, Platform, Product, TestCase as cmTestCase, Tool, User as cmUser @@ -24,7 +27,7 @@ LOG = logging.getLogger("fm.crashmanager.tests") -def _create_user(username, email="test@mozilla.com", password="test", restricted=False, has_permission=True): +def _create_user(username: str, email: str = "test@mozilla.com", password: str = "test", restricted: bool = False, has_permission: bool = True) -> User: user = User.objects.create_user(username, email, password) user.user_permissions.clear() if has_permission: @@ -38,7 +41,7 @@ def _create_user(username, email="test@mozilla.com", password="test", restricted @pytest.fixture -def crashmanager_test(db): # pylint: disable=invalid-name,unused-argument +def crashmanager_test(db: str) -> None: # pylint: disable=invalid-name,unused-argument """Common testcase class for all crashmanager unittests""" # Create one unrestricted and one restricted test user _create_user("test") @@ -47,7 +50,7 @@ def crashmanager_test(db): # pylint: disable=invalid-name,unused-argument @pytest.fixture -def user_normal(db, api_client): # pylint: disable=invalid-name,unused-argument +def user_normal(db: str, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument """Create a normal, authenticated user""" user = _create_user("test") api_client.force_authenticate(user=user) @@ -55,7 +58,7 @@ def user_normal(db, api_client): # pylint: disable=invalid-name,unused-argument @pytest.fixture -def user_restricted(db, api_client): # pylint: disable=invalid-name,unused-argument +def user_restricted(db: str, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument """Create a restricted, authenticated user""" user = _create_user("test-restricted", restricted=True) api_client.force_authenticate(user=user) @@ -63,7 +66,7 @@ def user_restricted(db, api_client): # pylint: disable=invalid-name,unused-argu @pytest.fixture -def user_noperm(db, api_client): # pylint: disable=invalid-name,unused-argument +def user_noperm(db: str, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument """Create an authenticated user with no crashmanager ACL""" user = _create_user("test-noperm", has_permission=False) api_client.force_authenticate(user=user) @@ -82,174 +85,179 @@ def cm(): class _cm_result(object): # pylint: disable=invalid-name @staticmethod - def create_crash(tool="testtool", - platform="testplatform", - product="testproduct", - product_version=None, - os="testos", - testcase=None, - client="testclient", - bucket=None, - stdout="", - stderr="", - crashdata="", - metadata="", - env="", - args="", - crashAddress="", - crashAddressNumeric=None, - shortSignature="", - cachedCrashInfo="", - triagedOnce=False): + def create_crash(tool: str = "testtool", + platform: str = "testplatform", + product: str = "testproduct", + product_version: Product | None = None, + os: str = "testos", + testcase: cmTestCase | None = None, + client: str = "testclient", + bucket: Bucket | None = None, + stdout: str = "", + stderr: str = "", + crashdata: str = "", + metadata: str = "", + env: str = "", + args: str = "", + crashAddress: str = "", + crashAddressNumeric: int | None = None, + shortSignature: str = "", + cachedCrashInfo: str = "", + triagedOnce: bool = False) -> CrashEntry: # create tool tool, created = Tool.objects.get_or_create(name=tool) + assert isinstance(tool, Tool) if created: LOG.debug("Created Tool pk=%d", tool.pk) # create platform platform, created = Platform.objects.get_or_create(name=platform) + assert isinstance(platform, Platform) if created: LOG.debug("Created Platform pk=%d", platform.pk) # create product product, created = Product.objects.get_or_create(name=product) + assert isinstance(product, Product) if created: LOG.debug("Created Product pk=%d", product.pk) if product_version is not None: - product.version = product_version + product.version = str(product_version) product.save() # create os os, created = OS.objects.get_or_create(name=os) + assert isinstance(os, OS) if created: LOG.debug("Created OS pk=%d", os.pk) # create client client, created = Client.objects.get_or_create(name=client) + assert isinstance(client, Client) if created: LOG.debug("Created Client pk=%d", client.pk) - result = CrashEntry.objects.create(tool=tool, - platform=platform, - product=product, - os=os, - testcase=testcase, - client=client, - bucket=bucket, - rawStdout=stdout, - rawStderr=stderr, - rawCrashData=crashdata, - metadata=metadata, - env=env, - args=args, - crashAddress=crashAddress, - crashAddressNumeric=crashAddressNumeric, - shortSignature=shortSignature, - cachedCrashInfo=cachedCrashInfo, - triagedOnce=triagedOnce) + result = cast(CrashEntry, CrashEntry.objects.create(tool=tool, + platform=platform, + product=product, + os=os, + testcase=testcase, + client=client, + bucket=bucket, + rawStdout=stdout, + rawStderr=stderr, + rawCrashData=crashdata, + metadata=metadata, + env=env, + args=args, + crashAddress=crashAddress, + crashAddressNumeric=crashAddressNumeric, + shortSignature=shortSignature, + cachedCrashInfo=cachedCrashInfo, + triagedOnce=triagedOnce)) LOG.debug("Created CrashEntry pk=%d", result.pk) return result @staticmethod - def create_bugprovider(classname="BugzillaProvider", hostname="", urlTemplate="%s"): - result = BugProvider.objects.create(classname=classname, - hostname=hostname, - urlTemplate=urlTemplate) + def create_bugprovider(classname: str = "BugzillaProvider", hostname: str = "", urlTemplate: str = "%s") -> BugProvider: + result = cast(BugProvider, BugProvider.objects.create(classname=classname, + hostname=hostname, + urlTemplate=urlTemplate)) LOG.debug("Created BugProvider pk=%d", result.pk) return result @classmethod - def create_bug(cls, externalId, externalType=None, closed=None): + def create_bug(cls, externalId: str, externalType: BugProvider | None = None, closed: bool | None = None) -> Bug: if externalType is None: externalType = cls.create_bugprovider() - result = Bug.objects.create(externalId=externalId, externalType=externalType, closed=closed) + result = cast(Bug, Bug.objects.create(externalId=externalId, externalType=externalType, closed=closed)) LOG.debug("Created Bug pk=%d", result.pk) return result @staticmethod - def create_testcase(filename, - testdata="", - quality=0, - isBinary=False): + def create_testcase(filename: str, + testdata: str = "", + quality: int = 0, + isBinary: bool = False) -> cmTestCase: result = cmTestCase(quality=quality, isBinary=isBinary, size=len(testdata)) result.test.save(filename, ContentFile(testdata)) result.save() return result @staticmethod - def create_template(mode=BugzillaTemplateMode.Bug, - name="", - product="", - component="", - summary="", - version="", - description="", - whiteboard="", - keywords="", - op_sys="", - platform="", - priority="", - severity="", - alias="", - cc="", - assigned_to="", - qa_contact="", - target_milestone="", - attrs="", - security=False, - security_group="", - comment="", - testcase_filename="", - blocks="", - dependson=""): - result = BugzillaTemplate.objects.create(mode=mode, - name=name, - product=product, - component=component, - summary=summary, - version=version, - description=description, - whiteboard=whiteboard, - keywords=keywords, - op_sys=op_sys, - platform=platform, - priority=priority, - severity=severity, - alias=alias, - cc=cc, - assigned_to=assigned_to, - qa_contact=qa_contact, - target_milestone=target_milestone, - attrs=attrs, - security=security, - security_group=security_group, - comment=comment, - testcase_filename=testcase_filename) + def create_template(mode: str = BugzillaTemplateMode.Bug, + name: str = "", + product: str = "", + component: str = "", + summary: str = "", + version: str = "", + description: str = "", + whiteboard: str = "", + keywords: str = "", + op_sys: str = "", + platform: str = "", + priority: str = "", + severity: str = "", + alias: str = "", + cc: str = "", + assigned_to: str = "", + qa_contact: str = "", + target_milestone: str = "", + attrs: str = "", + security: bool = False, + security_group: str = "", + comment: str = "", + testcase_filename: str = "", + blocks: str = "", + dependson: str = "") -> BugzillaTemplate: + result = cast(BugzillaTemplate, BugzillaTemplate.objects.create(mode=mode, + name=name, + product=product, + component=component, + summary=summary, + version=version, + description=description, + whiteboard=whiteboard, + keywords=keywords, + op_sys=op_sys, + platform=platform, + priority=priority, + severity=severity, + alias=alias, + cc=cc, + assigned_to=assigned_to, + qa_contact=qa_contact, + target_milestone=target_milestone, + attrs=attrs, + security=security, + security_group=security_group, + comment=comment, + testcase_filename=testcase_filename)) LOG.debug("Created BugzillaTemplate pk=%d", result.pk) return result @staticmethod - def create_bucket(bug=None, - signature="", - shortDescription="", - frequent=False, - permanent=False): - result = Bucket.objects.create(bug=bug, - signature=signature, - shortDescription=shortDescription, - frequent=frequent, - permanent=permanent) + def create_bucket(bug: Bug | None = None, + signature: str = "", + shortDescription: str = "", + frequent: bool = False, + permanent: bool = False) -> Bucket: + result = cast(Bucket, Bucket.objects.create(bug=bug, + signature=signature, + shortDescription=shortDescription, + frequent=frequent, + permanent=permanent)) LOG.debug("Created Bucket pk=%d", result.pk) return result @staticmethod - def create_toolfilter(tool, user='test'): + def create_toolfilter(tool: str, user: str = 'test') -> None: user = User.objects.get(username=user) cmuser, _ = cmUser.objects.get_or_create(user=user) cmuser.defaultToolsFilter.add(Tool.objects.get(name=tool)) @staticmethod - def create_bucketwatch(bucket, crash=0): + def create_bucketwatch(bucket: Bucket, crash=0) -> BucketWatch: user = User.objects.get(username='test') cmuser, _ = cmUser.objects.get_or_create(user=user) if crash: crash = crash.pk - result = BucketWatch.objects.create(bucket=bucket, user=cmuser, lastCrash=crash) + result = cast(BucketWatch, BucketWatch.objects.create(bucket=bucket, user=cmuser, lastCrash=crash)) LOG.debug("Created BucketWatch pk=%d", result.pk) return result From e868d595d1f33cdb7ae4a49c219f9cbd4a57f002 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 30 Jan 2022 15:37:39 -0800 Subject: [PATCH 084/137] 1411 mypy issues left --- CovReporter/CovReporter.py | 43 +++++++-------------------- CovReporter/tests/test_CovReporter.py | 3 ++ 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/CovReporter/CovReporter.py b/CovReporter/CovReporter.py index f7c9f151a..1393e7d8a 100755 --- a/CovReporter/CovReporter.py +++ b/CovReporter/CovReporter.py @@ -23,6 +23,8 @@ import json import os import sys +from typing import Iterable +from typing import Mapping from FTB import CoverageHelper from Reporter.Reporter import remote_checks, Reporter # noqa @@ -34,25 +36,19 @@ class CovReporter(Reporter): - def __init__(self, serverHost=None, serverPort=None, - serverProtocol=None, serverAuthToken=None, - clientId=None, tool=None, repository=None): + def __init__(self, serverHost: str | None = None, serverPort: int | None = None, + serverProtocol: str | None = None, serverAuthToken: str | None = None, + clientId: str | None = None, tool: str | None = None, repository: str | None = None) -> None: ''' Initialize the Reporter. This constructor will also attempt to read a configuration file to populate any missing properties that have not been passed to this constructor. - @type serverHost: string @param serverHost: Server host to contact for refreshing signatures - @type serverPort: int @param serverPort: Server port to use when contacting server - @type serverAuthToken: string @param serverAuthToken: Token for server authentication - @type clientId: string @param clientId: Client ID stored in the server when submitting - @type tool: string @param tool: Name of the tool that created this coverage - @type repository: string @param repository: Name of the repository that this coverage was measured on ''' @@ -69,26 +65,16 @@ def __init__(self, serverHost=None, serverPort=None, self.repository = repository @remote_checks - def submit(self, coverage, preprocessed=False, version=None, description="", stats=None): + def submit(self, coverage: Mapping[str, object], preprocessed: bool = False, version: dict[str, str] | None = None, description: str = "", stats: dict[str, str] | None = None) -> None: ''' Send coverage data to server. - @type coverage: dict @param coverage: Coverage Data - - @type covformat: int - @param covformat: Format of the coverage data (COVERALLS or COVMAN). - - @type version: dict @param version: A dictionary containing keys 'revision' and 'branch', just as returned by version_info_from_coverage_data. If left empty, the implementation will attempt to extract the information from the coverage data itself. - - @type description: string @param description: Optional description for this coverage data - - @type stats: dict @param stats: An optional stats object as returned by create_combined_coverage ''' url = "%s://%s:%s/covmanager/rest/collections/" % (self.serverProtocol, self.serverHost, self.serverPort) @@ -128,17 +114,14 @@ def submit(self, coverage, preprocessed=False, version=None, description="", sta self.post(url, data) @staticmethod - def preprocess_coverage_data(coverage): + def preprocess_coverage_data(coverage: Mapping[str, object]) -> Mapping[str, object]: ''' Preprocess the given coverage data. Preprocessing includes structuring the coverage data by directory for better performance as well as computing coverage summaries per directory. - @type coverage: dict @param coverage: Coverage Data - - @rtype dict @return Preprocessed Coverage Data ''' @@ -148,6 +131,7 @@ def preprocess_coverage_data(coverage): # Coveralls format source_files = coverage["source_files"] + assert isinstance(source_files, Iterable) # Process every source file and store the coverage data in our tree structure for source_file in source_files: @@ -183,7 +167,7 @@ def preprocess_coverage_data(coverage): return ret @staticmethod - def version_info_from_coverage_data(coverage): + def version_info_from_coverage_data(coverage) -> dict[str, str]: ''' Extract various version fields from the given coverage data. @@ -196,11 +180,8 @@ def version_info_from_coverage_data(coverage): revision branch - @type coverage: string @param coverage: Coverage Data - @return Dictionary with version data - @rtype dict ''' ret = {} @@ -213,18 +194,14 @@ def version_info_from_coverage_data(coverage): raise RuntimeError("Unknown coverage format") @staticmethod - def create_combined_coverage(coverage_files, version=None): + def create_combined_coverage(coverage_files: list[int | str], version: dict[str, str] | None = None) -> tuple[Mapping[str, object] | None, Mapping[str, object] | None, Mapping[str, object] | None]: ''' Read coverage data from multiple files and return a single dictionary containing the merged data (already preprocessed). - @type coverage_files: list @param coverage_files: List of filenames containing coverage data - @type version: dict @param version: Dictionary containing branch and revision - @return Dictionary with combined coverage data, version information and debug statistics - @rtype tuple(dict,dict,dict) ''' ret = None stats = None diff --git a/CovReporter/tests/test_CovReporter.py b/CovReporter/tests/test_CovReporter.py index 12b660388..6aaccd1dc 100644 --- a/CovReporter/tests/test_CovReporter.py +++ b/CovReporter/tests/test_CovReporter.py @@ -68,6 +68,7 @@ def test_CovReporterPreprocessData() -> None: coveragePercent = "coveragePercent" # Check that we have all the topdirs + assert isinstance(result, dict) assert "topdir1" in result[children], "topdir1 missing in result" assert "topdir2" in result[children], "topdir2 missing in result" @@ -133,6 +134,7 @@ def test_CovReporterMergeData() -> None: os.remove(cov_file1) os.remove(cov_file2) + assert isinstance(version, dict) assert version['revision'] == "1a0d9545b9805f50a70de703a3c04fc0d22e3839" assert version['branch'] == "master" @@ -145,6 +147,7 @@ def test_CovReporterMergeData() -> None: coveragePercent = "coveragePercent" # Check that we have all the topdirs + assert isinstance(result, dict) assert "topdir1" in result[children], "topdir1 missing in result" assert "topdir2" in result[children], "topdir2 missing in result" assert "topdir3" in result[children], "topdir2 missing in result" From a45114d525f6fad50ba2fa0111a82269d415ef8a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 30 Jan 2022 16:49:53 -0800 Subject: [PATCH 085/137] 1400 mypy issues left --- Collector/Collector.py | 47 +++++++++++++++---- Collector/tests/test_Collector.py | 26 +++++----- FTB/ProgramConfiguration.py | 4 +- .../crashmanager/tests/test_crashes_rest.py | 22 +-------- server/server/tests/__init__.py | 2 +- 5 files changed, 56 insertions(+), 45 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index f41829a35..ee3200bde 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -30,6 +30,9 @@ from tempfile import mkstemp from zipfile import ZipFile +from typing_extensions import NotRequired +from typing_extensions import TypedDict + from FTB.ProgramConfiguration import ProgramConfiguration # noqa from FTB.Running.AutoRunner import AutoRunner # noqa from FTB.Signatures.CrashInfo import CrashInfo # noqa @@ -42,6 +45,28 @@ __updated__ = '2014-10-01' +class DataType(TypedDict): + """Type information for the data dictionary.""" + + rawStdout: NotRequired[str] + rawStderr: NotRequired[str] + rawCrashData: NotRequired[str] + testcase: NotRequired[bytes | str] + testcase_isbinary: NotRequired[bool] + testcase_quality: NotRequired[int] + testcase_ext: NotRequired[str] + testcase_size: NotRequired[int] + platform: NotRequired[str] + product: NotRequired[str] + product_version: NotRequired[str] + os: NotRequired[str] + client: NotRequired[str] + tool: NotRequired[str] + metadata: NotRequired[str] + env: NotRequired[str] + args: NotRequired[str] + + class Collector(Reporter): @remote_checks @signature_checks @@ -94,7 +119,7 @@ def submit( testCase: str | None = None, testCaseQuality: int = 0, testCaseSize: int | None = None, - metaData=None, + metaData: dict[str, object] | None = None, ): ''' Submit the given crash information and an optional testcase/metadata @@ -104,8 +129,6 @@ def submit( @param testCase: A file containing a testcase for reproduction @param testCaseQuality: A value indicating the quality of the test (less is better) @param testCaseSize: The size of the testcase to report. If None, use the file size. - - @type metaData: map @param metaData: A map containing arbitrary (application-specific) data which will be stored on the server in JSON format. This metadata is combined with possible metadata stored in the L{ProgramConfiguration} inside crashInfo. @@ -116,7 +139,7 @@ def submit( url = "%s://%s:%d/crashmanager/rest/crashes/" % (self.serverProtocol, self.serverHost, self.serverPort) # Serialize our crash information, testcase and metadata into a dictionary to POST - data = {} + data: DataType = {} data["rawStdout"] = os.linesep.join(crashInfo.rawStdout) data["rawStderr"] = os.linesep.join(crashInfo.rawStderr) @@ -151,7 +174,7 @@ def submit( data["tool"] = self.tool if crashInfo.configuration.metadata or metaData: - aggrMetaData = {} + aggrMetaData: dict[str, object] = {} if crashInfo.configuration.metadata: aggrMetaData.update(crashInfo.configuration.metadata) @@ -170,14 +193,12 @@ def submit( return self.post(url, data).json() @signature_checks - def search(self, crashInfo: CrashInfo): + def search(self, crashInfo: CrashInfo) -> tuple[str | None, dict[str, object] | None]: ''' Searches within the local signature cache directory for a signature matching the given crash. @param crashInfo: CrashInfo instance obtained from L{CrashInfo.fromRawCrashData} - - @rtype: tuple @return: Tuple containing filename of the signature and metadata matching, or None if no match. ''' assert self.sigCacheDir is not None @@ -448,10 +469,11 @@ def main(args: list[str] | None = None) -> int: crashInfo = None args = None env = None - metadata = {} + metadata: dict[str, object] | None = {} if opts.search or opts.generate or opts.submit or opts.autosubmit: if opts.metadata: + assert metadata is not None metadata.update(dict(kv.split('=', 1) for kv in opts.metadata)) if opts.autosubmit: @@ -560,7 +582,11 @@ def main(args: list[str] | None = None) -> int: return 1 if opts.download: - (retFile, retJSON) = collector.download(opts.download) + collector_download_ret_val = collector.download(opts.download) + if collector_download_ret_val: + (retFile, retJSON) = collector_download_ret_val + else: + raise AssertionError("collector.download function returned a None") if not retFile: print("Specified crash entry does not have a testcase", file=sys.stderr) return 1 @@ -579,6 +605,7 @@ def main(args: list[str] | None = None) -> int: if "metadata" in retJSON and retJSON["metadata"]: metadata = json.loads(retJSON["metadata"]) + assert metadata is not None print("== Metadata ==") for k, v in metadata.items(): print("%s = %s" % (k, v)) diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index acf437d67..68e1b6133 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -22,6 +22,7 @@ from unittest.mock import Mock, patch import zipfile +from django.contrib.auth.models import User import pytest import requests from six.moves.urllib.parse import urlsplit @@ -66,7 +67,7 @@ def test_collector_help(capsys: pytest.LogCaptureFixture) -> None: @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_collector_submit(mock_expanduser, live_server, tmp_path: Path, fm_user) -> None: +def test_collector_submit(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: '''Test crash submission''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used @@ -200,7 +201,7 @@ class response_t(object): raw = fp # this asserts the expected arguments and returns the open handle to out.zip as 'raw' which is read by refresh() - def myget(url, stream=None, headers=None): + def myget(url: str, stream: bool | None = None, headers: dict[str, str] | None = None) -> response_t: assert url == 'gopher://aol.com:70/crashmanager/rest/signatures/download/' assert stream is True assert headers == {'Authorization': 'Token token'} @@ -245,15 +246,15 @@ class response_t(object): # noqa with pytest.raises(zipfile.BadZipfile, match='not a zip file'): collector.refresh() - with outzip_path.open('r+b') as fp: + with outzip_path.open('r+b') as fp_2: # corrupt the CRC field for the signature file in the zip - fp.seek(0x42) - fp.write(b'\xFF') - with outzip_path.open('rb') as fp: + fp_2.seek(0x42) + fp_2.write(b'\xFF') + with outzip_path.open('rb') as fp_3: class response_t(object): # noqa status_code = requests.codes["ok"] text = "OK" - raw = fp + raw = fp_3 collector._session.get = lambda *_, **__: response_t() with pytest.raises(RuntimeError, match='Bad CRC'): @@ -281,6 +282,7 @@ def test_collector_generate_search(tmp_path: Path) -> None: assert meta is None # write metadata and make sure that's returned if it exists + assert sig is not None sigBase, _ = os.path.splitext(sig) with open(sigBase + '.metadata', 'w') as f: f.write('{}') @@ -312,7 +314,7 @@ class response1_t(object): status_code = requests.codes["ok"] text = 'OK' - def json(self): + def json(self) -> dict[str, object]: return {'id': 123, 'testcase': 'path/to/testcase.txt'} class response2_t(object): @@ -322,7 +324,7 @@ class response2_t(object): content = b'testcase\xFF' # myget1 mocks requests.get to return the rest response to the crashentry get - def myget1(url, headers=None): + def myget1(url: str, headers: dict[str, str] | None = None) -> response1_t: assert url == 'gopher://aol.com:70/crashmanager/rest/crashes/123/' assert headers == {'Authorization': 'Token token'} @@ -331,7 +333,7 @@ def myget1(url, headers=None): return response1_t() # myget2 mocks requests.get to return the testcase data specified in myget1 - def myget2(url, headers=None): + def myget2(url: str, headers: dict[str, str] | None = None) -> response2_t: assert url == 'gopher://aol.com:70/crashmanager/rest/crashes/123/download/' assert headers == {'Authorization': 'Token token'} return response2_t() @@ -358,7 +360,7 @@ class response1_t(object): # noqa status_code = requests.codes["ok"] text = 'OK' - def json(self): + def json(self) -> dict[str, str]: return {'testcase': ''} collector._session.get = myget1 result = collector.download(123) @@ -369,7 +371,7 @@ class response1_t(object): # noqa status_code = requests.codes["ok"] text = 'OK' - def json(self): + def json(self) -> list[str]: return [] collector._session.get = myget1 with pytest.raises(RuntimeError, match='malformed JSON'): diff --git a/FTB/ProgramConfiguration.py b/FTB/ProgramConfiguration.py index f266faefc..fa91f2767 100644 --- a/FTB/ProgramConfiguration.py +++ b/FTB/ProgramConfiguration.py @@ -32,7 +32,7 @@ def __init__( version: str | None = None, env: dict[str, str] | None = None, args: list[str] | None = None, - metadata: dict[str, str] | None = None, + metadata: dict[str, object] | None = None, ): ''' @param product: The name of the product/program/branch tested @@ -102,7 +102,7 @@ def addProgramArguments(self, args: list[str]) -> None: assert isinstance(args, list) self.args.extend(args) - def addMetadata(self, metadata: dict[str, str]) -> None: + def addMetadata(self, metadata: dict[str, object]) -> None: ''' Add (additional) metadata definitions. Existing definitions will be overwritten if they are redefined in the given metadata. diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index f76a41be6..774a178a9 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -16,14 +16,14 @@ import json import logging import os.path -from typing_extensions import NotRequired -from typing_extensions import TypedDict from unittest.mock import Mock, patch from django.contrib.auth.models import User import pytest import requests from rest_framework.test import APIClient + +from Collector.Collector import DataType from crashmanager.models import CrashEntry, TestCase as cmTestCase @@ -121,24 +121,6 @@ def _compare_rest_result_to_crash(result: dict[str, str], crash, raw: bool = Tru assert value == obj -class DataType(TypedDict): - """Type information for the data dictionary.""" - - rawStdout: str - rawStderr: str - rawCrashData: str - testcase: NotRequired[str] - testcase_isbinary: NotRequired[bool] - testcase_quality: NotRequired[int] - testcase_ext: NotRequired[str] - platform: str - product: str - product_version: str - os: str - client: str - tool: str - - def _compare_created_data_to_crash(data: DataType, crash: CrashEntry, crash_address: str | None = None, short_signature: str | None = None) -> None: for field in ('rawStdout', 'rawStderr', 'rawCrashData'): assert getattr(crash, field) == data[field].strip() diff --git a/server/server/tests/__init__.py b/server/server/tests/__init__.py index 594270576..9123c576c 100644 --- a/server/server/tests/__init__.py +++ b/server/server/tests/__init__.py @@ -10,7 +10,7 @@ @pytest.fixture -def fm_user(): +def fm_user() -> User: user = User.objects.create_user('fuzzmanager', 'test@example.com', 'test') content_type = ContentType.objects.get_for_model(CMUser) user.user_permissions.add(Permission.objects.get(content_type=content_type, codename='view_ec2spotmanager')) From bb0c152a98ef9de2769e4a5efef665082f702c5f Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 30 Jan 2022 18:13:44 -0800 Subject: [PATCH 086/137] 1396 mypy issues left --- Collector/tests/test_Collector.py | 4 ++-- EC2Reporter/tests/test_EC2Reporter.py | 20 ++++++++++--------- .../tests/test_TaskStatusReporter.py | 8 +++++--- .../tests/test_mgmt_get_auth_token.py | 4 ++-- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index 68e1b6133..ac934b7ea 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -57,7 +57,7 @@ pytest_plugins = ('server.tests',) -def test_collector_help(capsys: pytest.LogCaptureFixture) -> None: +def test_collector_help(capsys: pytest.CaptureFixture[str]) -> None: '''Test that help prints without throwing''' with pytest.raises(SystemExit): main() @@ -177,7 +177,7 @@ class response_t(object): collector.submit(crashInfo, str(testcase_path)) -def test_collector_refresh(capsys: pytest.LogCaptureFixture, tmp_path: Path) -> None: +def test_collector_refresh(capsys: pytest.CaptureFixture[str], tmp_path: Path) -> None: '''Test signature downloads''' # create a test signature zip test2_path = tmp_path / 'test2.signature' diff --git a/EC2Reporter/tests/test_EC2Reporter.py b/EC2Reporter/tests/test_EC2Reporter.py index 219698f21..49bb8e6f4 100644 --- a/EC2Reporter/tests/test_EC2Reporter.py +++ b/EC2Reporter/tests/test_EC2Reporter.py @@ -1,9 +1,11 @@ from __future__ import annotations +from pathlib import Path from unittest.mock import Mock, patch -import pytest +from django.contrib.auth.models import User from django.utils import timezone +import pytest from six.moves.urllib.parse import urlsplit from EC2Reporter.EC2Reporter import EC2Reporter, main @@ -15,7 +17,7 @@ pytest_plugins = 'server.tests' -def test_ec2reporter_help(capsys): +def test_ec2reporter_help(capsys: pytest.CaptureFixture[str]) -> None: '''Test that help prints without throwing''' with pytest.raises(SystemExit): main() @@ -25,7 +27,7 @@ def test_ec2reporter_help(capsys): @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_ec2reporter_report(mock_expanduser, live_server, tmp_path, fm_user): +def test_ec2reporter_report(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: '''Test report submission''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used @@ -58,13 +60,13 @@ def test_ec2reporter_report(mock_expanduser, live_server, tmp_path, fm_user): serverAuthToken=fm_user.token, clientId='host2') - with pytest.raises(RuntimeError, message="Server unexpectedly responded with status code 404: Not found"): + with pytest.raises(RuntimeError, match="Server unexpectedly responded with status code 404: Not found"): reporter.report('data') @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_ec2reporter_xable(mock_expanduser, live_server, tmp_path, fm_user): +def test_ec2reporter_xable(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: '''Test EC2Reporter enable/disable''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used @@ -86,7 +88,7 @@ def test_ec2reporter_xable(mock_expanduser, live_server, tmp_path, fm_user): pool = InstancePool.objects.get(pk=pool.pk) # re-read assert pool.isEnabled - with pytest.raises(RuntimeError, message="Server unexpectedly responded with status code 405: Not acceptable"): + with pytest.raises(RuntimeError, match="Server unexpectedly responded with status code 405: Not acceptable"): reporter.enable(pool.pk) pool = InstancePool.objects.get(pk=pool.pk) # re-read assert pool.isEnabled @@ -95,7 +97,7 @@ def test_ec2reporter_xable(mock_expanduser, live_server, tmp_path, fm_user): pool = InstancePool.objects.get(pk=pool.pk) # re-read assert not pool.isEnabled - with pytest.raises(RuntimeError, message="Server unexpectedly responded with status code 405: Not acceptable"): + with pytest.raises(RuntimeError, match="Server unexpectedly responded with status code 405: Not acceptable"): reporter.disable(pool.pk) pool = InstancePool.objects.get(pk=pool.pk) # re-read assert not pool.isEnabled @@ -103,7 +105,7 @@ def test_ec2reporter_xable(mock_expanduser, live_server, tmp_path, fm_user): @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_ec2reporter_cycle(mock_expanduser, live_server, tmp_path, fm_user): +def test_ec2reporter_cycle(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: """Test EC2Reporter cycle""" mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used @@ -121,7 +123,7 @@ def test_ec2reporter_cycle(mock_expanduser, live_server, tmp_path, fm_user): serverAuthToken=fm_user.token, clientId='host1') - with pytest.raises(RuntimeError, message="Server unexpectedly responded with status code 405: Not acceptable"): + with pytest.raises(RuntimeError, match="Server unexpectedly responded with status code 405: Not acceptable"): reporter.cycle(pool.pk) pool.isEnabled = True diff --git a/TaskStatusReporter/tests/test_TaskStatusReporter.py b/TaskStatusReporter/tests/test_TaskStatusReporter.py index af2419c08..67fab1502 100644 --- a/TaskStatusReporter/tests/test_TaskStatusReporter.py +++ b/TaskStatusReporter/tests/test_TaskStatusReporter.py @@ -1,8 +1,10 @@ from __future__ import annotations -import pytest +from pathlib import Path from unittest.mock import Mock, patch +from django.contrib.auth.models import User +import pytest from six.moves.urllib.parse import urlsplit from TaskStatusReporter.TaskStatusReporter import TaskStatusReporter, main @@ -14,7 +16,7 @@ pytest_plugins = 'server.tests' -def test_taskstatusreporter_help(capsys): +def test_taskstatusreporter_help(capsys: pytest.CaptureFixture[str]) -> None: '''Test that help prints without throwing''' with pytest.raises(SystemExit): main() @@ -25,7 +27,7 @@ def test_taskstatusreporter_help(capsys): #@pytest.mark.skipif(str is bytes, reason="TaskManager requires python3") @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_taskstatusreporter_report(mock_expanduser, live_server, tmp_path, fm_user): +def test_taskstatusreporter_report(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: '''Test report submission''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used diff --git a/server/crashmanager/tests/test_mgmt_get_auth_token.py b/server/crashmanager/tests/test_mgmt_get_auth_token.py index ecdc200fd..bb3504ac9 100644 --- a/server/crashmanager/tests/test_mgmt_get_auth_token.py +++ b/server/crashmanager/tests/test_mgmt_get_auth_token.py @@ -32,7 +32,7 @@ def test_no_such_user() -> None: call_command("get_auth_token", "user") -def test_one_user(capsys): +def test_one_user(capsys: pytest.CaptureFixture[str]) -> None: user = User.objects.create_user("test", "test@example.com", "test") call_command("get_auth_token", "test") out, _ = capsys.readouterr() @@ -43,7 +43,7 @@ def test_one_user(capsys): assert len(key) > 32 # just check that it's reasonably long -def test_two_users(capsys): +def test_two_users(capsys: pytest.CaptureFixture[str]) -> None: users = (User.objects.create_user("test", "test@example.com", "test"), User.objects.create_user("test2", "test2@example.com", "test2")) call_command("get_auth_token", "test", "test2") From 5ca38c149123b593ba9c829c5b2809a9deb9485b Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 30 Jan 2022 22:35:33 -0800 Subject: [PATCH 087/137] 1395 mypy issues left --- Collector/tests/test_Collector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index ac934b7ea..6b66f008d 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -194,11 +194,11 @@ def test_collector_refresh(capsys: pytest.CaptureFixture[str], tmp_path: Path) - (sigs_path / 'other.txt').touch() assert {f.name for f in sigs_path.iterdir()} == {'test1.signature', 'other.txt'} - with outzip_path.open('rb') as fp: + with outzip_path.open('rb') as fp2: class response_t(object): status_code = requests.codes["ok"] text = "OK" - raw = fp + raw = fp2 # this asserts the expected arguments and returns the open handle to out.zip as 'raw' which is read by refresh() def myget(url: str, stream: bool | None = None, headers: dict[str, str] | None = None) -> response_t: From fba6789458bc1b8ab609b8d9d128221bd594109f Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 2 Feb 2022 15:34:41 -0800 Subject: [PATCH 088/137] 1374 mypy issues left --- Collector/Collector.py | 6 ++++-- Collector/tests/test_Collector.py | 4 ++-- FTB/Running/AutoRunner.py | 34 +++++++++++++++++-------------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index ee3200bde..2907187e6 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -28,6 +28,8 @@ import shutil import sys from tempfile import mkstemp +from typing import Dict +from typing import cast from zipfile import ZipFile from typing_extensions import NotRequired @@ -120,7 +122,7 @@ def submit( testCaseQuality: int = 0, testCaseSize: int | None = None, metaData: dict[str, object] | None = None, - ): + ) -> dict[str, object]: ''' Submit the given crash information and an optional testcase/metadata to the server for processing and storage. @@ -190,7 +192,7 @@ def submit( if crashInfo.configuration.args: data["args"] = json.dumps(crashInfo.configuration.args) - return self.post(url, data).json() + return cast(Dict[str, object], self.post(url, data).json()) @signature_checks def search(self, crashInfo: CrashInfo) -> tuple[str | None, dict[str, object] | None]: diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index 6b66f008d..c4a458394 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -132,7 +132,7 @@ def test_collector_submit(mock_expanduser, live_server, tmp_path: Path, fm_user: crashdata_path = tmp_path / 'crashdata.txt' with crashdata_path.open('w') as fp: fp.write(asanTraceCrash) - result = main([ + result_return_code = main([ '--submit', '--tool', 'tool2', '--product', 'mozilla-inbound', @@ -148,7 +148,7 @@ def test_collector_submit(mock_expanduser, live_server, tmp_path: Path, fm_user: '--stderr', str(stderr_path), '--crashdata', str(crashdata_path), ]) - assert result == 0 + assert result_return_code == 0 entry = CrashEntry.objects.get(pk__gt=entry.id) # newer than the last result, will fail if the test db is active assert entry.rawStdout == 'stdout data' assert entry.rawStderr == 'stderr data' diff --git a/FTB/Running/AutoRunner.py b/FTB/Running/AutoRunner.py index 7087276ba..cf6f6088d 100644 --- a/FTB/Running/AutoRunner.py +++ b/FTB/Running/AutoRunner.py @@ -26,6 +26,7 @@ import six +from FTB.ProgramConfiguration import ProgramConfiguration from FTB.Signatures.CrashInfo import CrashInfo @@ -35,7 +36,7 @@ class AutoRunner(): Abstract base class that provides a method to instantiate the right sub class for running the given program and obtaining crash information. """ - def __init__(self, binary, args=None, env=None, cwd=None, stdin=None): + def __init__(self, binary: str, args: list[str] | None = None, env=None, cwd=None, stdin=None) -> None: self.binary = binary self.cwd = cwd self.stdin = stdin @@ -62,18 +63,18 @@ def __init__(self, binary, args=None, env=None, cwd=None, stdin=None): assert isinstance(self.args, list) # The command that we will run for obtaining crash information - self.cmdArgs = [] + self.cmdArgs: list[str] = [] # These will hold our results from running - self.stdout = None - self.stderr = None - self.auxCrashData = None + self.stdout: str | None = None + self.stderr: list[str] | str | None = None + self.auxCrashData: list[str] | str | None = None - def getCrashInfo(self, configuration): + def getCrashInfo(self, configuration: ProgramConfiguration) -> CrashInfo: return CrashInfo.fromRawCrashData(self.stdout, self.stderr, configuration, self.auxCrashData) @staticmethod - def fromBinaryArgs(binary, args=None, env=None, cwd=None, stdin=None): + def fromBinaryArgs(binary: str, args: list[str] | None = None, env=None, cwd=None, stdin=None) -> ASanRunner | GDBRunner: process = subprocess.Popen( ["nm", "-g", binary], stdin=subprocess.PIPE, @@ -84,18 +85,18 @@ def fromBinaryArgs(binary, args=None, env=None, cwd=None, stdin=None): ) (stdout, _) = process.communicate() - stdout = stdout.decode("utf-8", errors="ignore") + stdout_decoded = stdout.decode("utf-8", errors="ignore") force_gdb = bool(os.environ.get('FTB_FORCE_GDB', False)) - if not force_gdb and (stdout.find(" __asan_init") >= 0 or stdout.find("__ubsan_default_options") >= 0): + if not force_gdb and (stdout_decoded.find(" __asan_init") >= 0 or stdout_decoded.find("__ubsan_default_options") >= 0): return ASanRunner(binary, args, env, cwd, stdin) return GDBRunner(binary, args, env, cwd, stdin) class GDBRunner(AutoRunner): - def __init__(self, binary, args=None, env=None, cwd=None, core=None, stdin=None): + def __init__(self, binary: str, args: list[str] | None = None, env=None, cwd=None, core=None, stdin=None) -> None: AutoRunner.__init__(self, binary, args, env, cwd, stdin) # This can be used to force GDBRunner to first generate a core and then @@ -134,11 +135,13 @@ def __init__(self, binary, args=None, env=None, cwd=None, core=None, stdin=None) if core is not None: self.cmdArgs.append(core) else: + assert self.args is not None self.cmdArgs.extend(self.args) - def run(self): + def run(self) -> bool: if self.force_core: plainCmdArgs = [self.binary] + assert self.args is not None plainCmdArgs.extend(self.args) process = subprocess.Popen( @@ -204,10 +207,11 @@ def run(self): class ASanRunner(AutoRunner): - def __init__(self, binary, args=None, env=None, cwd=None, stdin=None): + def __init__(self, binary: str, args: list[str] | None = None, env=None, cwd=None, stdin=None) -> None: AutoRunner.__init__(self, binary, args, env, cwd, stdin) self.cmdArgs.append(self.binary) + assert self.args is not None self.cmdArgs.extend(self.args) if "ASAN_SYMBOLIZER_PATH" not in self.env: @@ -245,7 +249,7 @@ def __init__(self, binary, args=None, env=None, cwd=None, stdin=None): # This is helpful when assertions are hit in debug builds. self.env["ASAN_OPTIONS"] = "allocator_may_return_null=1:handle_abort=1" - def run(self): + def run(self) -> bool: process = subprocess.Popen( self.cmdArgs, stdin=subprocess.PIPE, @@ -258,14 +262,14 @@ def run(self): (stdout, stderr) = process.communicate(input=self.stdin) self.stdout = stdout.decode("utf-8", errors="ignore") - stderr = stderr.decode("utf-8", errors="ignore") + stderr_decoded = stderr.decode("utf-8", errors="ignore") inASanTrace = False inUBSanTrace = False inTSanTrace = False self.auxCrashData = [] self.stderr = [] - for line in stderr.splitlines(): + for line in stderr_decoded.splitlines(): if inASanTrace or inUBSanTrace or inTSanTrace: self.auxCrashData.append(line) if (inASanTrace or inUBSanTrace) and line.find("==ABORTING") >= 0: From fa5d4ebb681fb37d2abc68d4d036e8736d1ae3c7 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Wed, 2 Feb 2022 18:04:59 -0800 Subject: [PATCH 089/137] 1320 mypy issues left --- Collector/tests/test_Collector.py | 4 ++- EC2Reporter/tests/test_EC2Reporter.py | 7 +++-- FTB/Signatures/CrashSignature.py | 23 ++++++++++---- FTB/Signatures/Matchers.py | 30 +++++++++++-------- FTB/Signatures/Symptom.py | 30 +++++++++++-------- FTB/tests/test_CoverageHelper.py | 2 +- .../tests/test_TaskStatusReporter.py | 4 ++- server/crashmanager/tests/test_rest_live.py | 14 +++++---- server/server/tests/__init__.py | 4 ++- 9 files changed, 74 insertions(+), 44 deletions(-) diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index c4a458394..eb0fdeec4 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -24,6 +24,7 @@ from django.contrib.auth.models import User import pytest +from pytest_django.live_server_helper import LiveServer import requests from six.moves.urllib.parse import urlsplit @@ -67,7 +68,7 @@ def test_collector_help(capsys: pytest.CaptureFixture[str]) -> None: @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_collector_submit(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: +def test_collector_submit(mock_expanduser: Mock, live_server: LiveServer, tmp_path: Path, fm_user: User) -> None: '''Test crash submission''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used @@ -112,6 +113,7 @@ def test_collector_submit(mock_expanduser, live_server, tmp_path: Path, fm_user: assert entry.args == '' # create a test config + assert url.port is not None with (tmp_path / ".fuzzmanagerconf").open("w") as fp: fp.write('[Main]\n') fp.write('serverhost = %s\n' % url.hostname) diff --git a/EC2Reporter/tests/test_EC2Reporter.py b/EC2Reporter/tests/test_EC2Reporter.py index 49bb8e6f4..c705c6b11 100644 --- a/EC2Reporter/tests/test_EC2Reporter.py +++ b/EC2Reporter/tests/test_EC2Reporter.py @@ -6,6 +6,7 @@ from django.contrib.auth.models import User from django.utils import timezone import pytest +from pytest_django.live_server_helper import LiveServer from six.moves.urllib.parse import urlsplit from EC2Reporter.EC2Reporter import EC2Reporter, main @@ -27,7 +28,7 @@ def test_ec2reporter_help(capsys: pytest.CaptureFixture[str]) -> None: @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_ec2reporter_report(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: +def test_ec2reporter_report(mock_expanduser: Mock, live_server: LiveServer, tmp_path: Path, fm_user: User) -> None: '''Test report submission''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used @@ -66,7 +67,7 @@ def test_ec2reporter_report(mock_expanduser, live_server, tmp_path: Path, fm_use @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_ec2reporter_xable(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: +def test_ec2reporter_xable(mock_expanduser: Mock, live_server: LiveServer, tmp_path: Path, fm_user: User) -> None: '''Test EC2Reporter enable/disable''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used @@ -105,7 +106,7 @@ def test_ec2reporter_xable(mock_expanduser, live_server, tmp_path: Path, fm_user @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_ec2reporter_cycle(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: +def test_ec2reporter_cycle(mock_expanduser: Mock, live_server: LiveServer, tmp_path: Path, fm_user: User) -> None: """Test EC2Reporter cycle""" mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used diff --git a/FTB/Signatures/CrashSignature.py b/FTB/Signatures/CrashSignature.py index 1f34d4651..91a4f7644 100644 --- a/FTB/Signatures/CrashSignature.py +++ b/FTB/Signatures/CrashSignature.py @@ -19,6 +19,9 @@ import difflib import json from pathlib import Path +from typing import Sequence +from typing_extensions import NotRequired +from typing_extensions import TypedDict from FTB.Signatures import JSONHelper from FTB.Signatures.CrashInfo import CrashInfo @@ -26,6 +29,13 @@ OutputSymptom +class SymptomsDiffType(TypedDict): + """Type information for SymptomsDiff""" + offending: bool + proposed: NotRequired[Symptom] + symptom: Symptom + + class CrashSignature(object): def __init__(self, rawSignature: str) -> None: ''' @@ -79,6 +89,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: @return: True if the signature matches, False otherwise ''' + assert crashInfo.configuration is not None if self.platforms is not None and crashInfo.configuration.platform not in self.platforms: return False @@ -143,7 +154,7 @@ def getRequiredOutputSources(self) -> list[str]: return ret - def getDistance(self, crashInfo): + def getDistance(self, crashInfo: CrashInfo) -> int: distance = 0 for symptom in self.symptoms: @@ -158,6 +169,7 @@ def getDistance(self, crashInfo): if not symptom.matches(crashInfo): distance += 1 + assert crashInfo.configuration is not None if self.platforms is not None and crashInfo.configuration.platform not in self.platforms: distance += 1 @@ -171,7 +183,7 @@ def getDistance(self, crashInfo): def fit(self, crashInfo: CrashInfo) -> CrashSignature | None: sigObj = {} - sigSymptoms = [] + sigSymptoms: list[dict[str, object]] = [] sigObj['symptoms'] = sigSymptoms @@ -198,8 +210,9 @@ def fit(self, crashInfo: CrashInfo) -> CrashSignature | None: return CrashSignature(json.dumps(sigObj, indent=2, sort_keys=True)) - def getSymptomsDiff(self, crashInfo: CrashInfo): - symptomsDiff = [] + + def getSymptomsDiff(self, crashInfo: CrashInfo) -> list[SymptomsDiffType]: + symptomsDiff: list[SymptomsDiffType] = [] for symptom in self.symptoms: if symptom.matches(crashInfo): symptomsDiff.append({'offending': False, 'symptom': symptom}) @@ -216,7 +229,7 @@ def getSymptomsDiff(self, crashInfo: CrashInfo): symptomsDiff.append({'offending': True, 'symptom': symptom}) return symptomsDiff - def getSignatureUnifiedDiffTuples(self, crashInfo: CrashInfo): + def getSignatureUnifiedDiffTuples(self, crashInfo: CrashInfo) -> Sequence[tuple[str, list[str] | str]]: diffTuples = [] # go through dumps(loads()) to standardize the format. diff --git a/FTB/Signatures/Matchers.py b/FTB/Signatures/Matchers.py index 03712321e..989a8989c 100644 --- a/FTB/Signatures/Matchers.py +++ b/FTB/Signatures/Matchers.py @@ -29,15 +29,15 @@ class Match(object): @abstractmethod - def matches(self, value): + def matches(self, value: bytes | int | str | None) -> re.Match[str] | bool | None: pass class StringMatch(Match): - def __init__(self, obj) -> None: + def __init__(self, obj: bytes | int | numbers.Integral | str) -> None: self.isPCRE = False - self.compiledValue = None + self.compiledValue: re.Pattern[str] | None = None self.patternContainsSlash = False if isinstance(obj, bytes): @@ -71,27 +71,28 @@ def __init__(self, obj) -> None: else: raise RuntimeError("Unknown match operator specified: %s" % matchType) - def matches(self, value, windowsSlashWorkaround=False): + def matches(self, value: bytes | int | str | None, windowsSlashWorkaround: bool = False) -> re.Match[str] | bool | None: if isinstance(value, bytes): # If the input is not already unicode, try to interpret it as UTF-8 # If there are errors, replace them with U+FFFD so we neither raise nor false positive. - value = value.decode("utf-8", errors="replace") + value_decoded = value.decode("utf-8", errors="replace") if self.isPCRE: - if self.compiledValue.search(value) is not None: + assert self.compiledValue is not None + if self.compiledValue.search(value_decoded) is not None: return True elif windowsSlashWorkaround and self.patternContainsSlash: # NB this will fail if the pattern is supposed to match a backslash and a windows-style path # in the same line - return self.compiledValue.search(value.replace("\\", "/")) is not None + return self.compiledValue.search(value_decoded.replace("\\", "/")) is not None return False else: - return self.value in value + return self.value in value_decoded - def __str__(self): + def __str__(self) -> str: return self.value - def __repr__(self): + def __repr__(self) -> str: if self.isPCRE: return '/%s/' % self.value @@ -104,8 +105,9 @@ class NumberMatchType(object): class NumberMatch(Match): - def __init__(self, obj) -> None: - self.matchType = None + def __init__(self, obj: bytes | int | numbers.Integral | str) -> None: + self.matchType: int | None = None + self.value: int | numbers.Integral | None if isinstance(obj, bytes): obj = obj.decode("utf-8") @@ -147,10 +149,12 @@ def __init__(self, obj) -> None: else: raise RuntimeError("Invalid type %s in NumberMatch." % type(obj)) - def matches(self, value): + def matches(self, value: bytes | int | str | None) -> bool: if value is None: return self.value is None + assert isinstance(value, int) + assert isinstance(self.value, int) if self.matchType == NumberMatchType.GE: return value >= self.value elif self.matchType == NumberMatchType.GT: diff --git a/FTB/Signatures/Symptom.py b/FTB/Signatures/Symptom.py index c863c71ac..c3a4b3f7e 100644 --- a/FTB/Signatures/Symptom.py +++ b/FTB/Signatures/Symptom.py @@ -18,6 +18,7 @@ from abc import ABCMeta, abstractmethod import json +from typing import Sequence import six @@ -32,16 +33,16 @@ class Symptom(object): Abstract base class that provides a method to instantiate the right sub class. It also supports generating a CrashSignature based on the stored information. ''' - def __init__(self, jsonObj) -> None: + def __init__(self, jsonObj: dict[str, object]) -> None: # Store the original source so we can return it if someone wants to stringify us self.jsonsrc = json.dumps(jsonObj, indent=2) self.jsonobj = jsonObj - def __str__(self): + def __str__(self) -> str: return self.jsonsrc @staticmethod - def fromJSONObject(obj) -> Symptom: + def fromJSONObject(obj: dict[str, object]) -> Symptom: ''' Create the appropriate Symptom based on the given object (decoded from JSON) @@ -85,7 +86,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class OutputSymptom(Symptom): - def __init__(self, obj) -> None: + def __init__(self, obj: dict[str, object]) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -119,6 +120,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: else: checkedOutput = crashInfo.rawCrashData + assert crashInfo.configuration is not None windowsSlashWorkaround = crashInfo.configuration.os == "windows" for line in reversed(checkedOutput): if self.output.matches(line, windowsSlashWorkaround=windowsSlashWorkaround): @@ -128,7 +130,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class StackFrameSymptom(Symptom): - def __init__(self, obj) -> None: + def __init__(self, obj: dict[str, object]) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -161,7 +163,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class StackSizeSymptom(Symptom): - def __init__(self, obj) -> None: + def __init__(self, obj: dict[str, object]) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -180,7 +182,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class CrashAddressSymptom(Symptom): - def __init__(self, obj) -> None: + def __init__(self, obj: dict[str, object]) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -201,7 +203,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class InstructionSymptom(Symptom): - def __init__(self, obj) -> None: + def __init__(self, obj: dict[str, object]) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -239,7 +241,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class TestcaseSymptom(Symptom): - def __init__(self, obj) -> None: + def __init__(self, obj: dict[str, object]) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -269,7 +271,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: class StackFramesSymptom(Symptom): - def __init__(self, obj) -> None: + def __init__(self, obj: dict[str, object]) -> None: ''' Private constructor, called by L{Symptom.fromJSONObject}. Do not use directly. ''' @@ -292,13 +294,14 @@ def matches(self, crashInfo: CrashInfo) -> bool: return StackFramesSymptom._match(crashInfo.backtrace, self.functionNames) - def diff(self, crashInfo: CrashInfo): + def diff(self, crashInfo: CrashInfo) -> tuple[int | None, StackFramesSymptom | None]: if self.matches(crashInfo): return (0, None) for depth in range(1, 4): (bestDepth, bestGuess) = StackFramesSymptom._diff(crashInfo.backtrace, self.functionNames, 0, 1, depth) if bestDepth is not None: + assert bestGuess is not None guessedFunctionNames = [repr(x) for x in bestGuess] # Remove trailing wildcards as they are of no use @@ -314,7 +317,7 @@ def diff(self, crashInfo: CrashInfo): return (None, None) @staticmethod - def _diff(stack, signatureGuess, startIdx, depth, maxDepth): + def _diff(stack: list[str], signatureGuess: list[StringMatch], startIdx: int, depth: int, maxDepth: int) -> tuple[int | None, list[StringMatch] | None]: singleWildcardMatch = StringMatch("?") newSignatureGuess = [] @@ -394,12 +397,13 @@ def _diff(stack, signatureGuess, startIdx, depth, maxDepth): return (bestDepth, bestGuess) @staticmethod - def _match(partialStack, partialFunctionNames): + def _match(partialStack: Sequence[StringMatch | str], partialFunctionNames: Sequence[StringMatch | str]) -> bool: while True: # Process as many non-wildcard chars as we can find iteratively for performance reasons while partialFunctionNames and partialStack and str(partialFunctionNames[0]) not in {'?', '???'}: + assert isinstance(partialFunctionNames[0], StringMatch) if not partialFunctionNames[0].matches(partialStack[0]): return False diff --git a/FTB/tests/test_CoverageHelper.py b/FTB/tests/test_CoverageHelper.py index 9b81df58c..5c314a91b 100644 --- a/FTB/tests/test_CoverageHelper.py +++ b/FTB/tests/test_CoverageHelper.py @@ -242,6 +242,6 @@ def test_CoverageHelperApplyDirectivesMakeEmpty() -> None: result = CoverageHelper.get_flattened_names(node, prefix="") - expected_names = [] + expected_names: list[str] = [] assert result == set(expected_names) diff --git a/TaskStatusReporter/tests/test_TaskStatusReporter.py b/TaskStatusReporter/tests/test_TaskStatusReporter.py index 67fab1502..d941d271b 100644 --- a/TaskStatusReporter/tests/test_TaskStatusReporter.py +++ b/TaskStatusReporter/tests/test_TaskStatusReporter.py @@ -1,10 +1,12 @@ from __future__ import annotations from pathlib import Path +from platform import libc_ver from unittest.mock import Mock, patch from django.contrib.auth.models import User import pytest +from pytest_django.live_server_helper import LiveServer from six.moves.urllib.parse import urlsplit from TaskStatusReporter.TaskStatusReporter import TaskStatusReporter, main @@ -27,7 +29,7 @@ def test_taskstatusreporter_help(capsys: pytest.CaptureFixture[str]) -> None: #@pytest.mark.skipif(str is bytes, reason="TaskManager requires python3") @patch('os.path.expanduser') @patch('time.sleep', new=Mock()) -def test_taskstatusreporter_report(mock_expanduser, live_server, tmp_path: Path, fm_user: User) -> None: +def test_taskstatusreporter_report(mock_expanduser: Mock, live_server: LiveServer, tmp_path: Path, fm_user: User) -> None: '''Test report submission''' mock_expanduser.side_effect = lambda path: str(tmp_path) # ensure fuzzmanager config is not used diff --git a/server/crashmanager/tests/test_rest_live.py b/server/crashmanager/tests/test_rest_live.py index 673ebfc60..4a106d5fe 100644 --- a/server/crashmanager/tests/test_rest_live.py +++ b/server/crashmanager/tests/test_rest_live.py @@ -15,7 +15,9 @@ from __future__ import annotations +from django.contrib.auth.models import User import pytest +from pytest_django.live_server_helper import LiveServer import requests from six.moves.urllib.parse import urlsplit @@ -25,9 +27,9 @@ @pytest.mark.skip -def test_RESTCrashEntryInterface(live_server, fm_user): - url = urlsplit(live_server.url) - url = "%s://%s:%s/crashmanager/rest/crashes/" % (url.scheme, url.hostname, url.port) +def test_RESTCrashEntryInterface(live_server: LiveServer, fm_user: User) -> None: + url_split = urlsplit(live_server.url) + url = "%s://%s:%s/crashmanager/rest/crashes/" % (url_split.scheme, url_split.hostname, url_split.port) # Must yield forbidden without authentication assert requests.get(url).status_code == requests.codes["unauthorized"] @@ -67,9 +69,9 @@ def test_RESTCrashEntryInterface(live_server, fm_user): assert json[lengthBeforePost]["product_version"] == "ba0bc4f26681" -def test_RESTSignatureInterface(live_server): - url = urlsplit(live_server.url) - url = "%s://%s:%s/crashmanager/rest/signatures/" % (url.scheme, url.hostname, url.port) +def test_RESTSignatureInterface(live_server: LiveServer) -> None: + url_split = urlsplit(live_server.url) + url = "%s://%s:%s/crashmanager/rest/signatures/" % (url_split.scheme, url_split.hostname, url_split.port) # Must yield forbidden without authentication assert requests.get(url).status_code == requests.codes["not_found"] diff --git a/server/server/tests/__init__.py b/server/server/tests/__init__.py index 9123c576c..2633649e5 100644 --- a/server/server/tests/__init__.py +++ b/server/server/tests/__init__.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import cast + import pytest from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission @@ -23,4 +25,4 @@ def fm_user() -> User: token.save() user.token = token.key - return user + return cast(User, user) From 83e0d836214ae9edfeb8ff6f69b7701390294ee4 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 4 Feb 2022 17:23:16 -0800 Subject: [PATCH 090/137] 1296 mypy issues left --- FTB/Signatures/CrashInfo.py | 31 +++++++++++++++----------- FTB/Signatures/tests/test_CrashInfo.py | 5 +++-- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 9954556f7..adbe41168 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -17,6 +17,7 @@ from __future__ import annotations +from collections.abc import Mapping from abc import ABCMeta import json import os @@ -382,7 +383,7 @@ def createCrashSignature(self, forceCrashAddress: bool = False, forceCrashInstru else: numFrames = len(self.backtrace) - symptomArr = [] + symptomArr: list[Mapping[str, object]] = [] # Memorize where we find our abort messages abortMsgInCrashdata = False @@ -414,8 +415,8 @@ def createCrashSignature(self, forceCrashAddress: bool = False, forceCrashInstru if not isinstance(abortMsgs, list): abortMsgs = [abortMsgs] - for abortMsg in abortMsgs: - abortMsg = AssertionHelper.getSanitizedAssertionPattern(abortMsg) + for msg in abortMsgs: + abortMsg = AssertionHelper.getSanitizedAssertionPattern(msg) abortMsgSrc = "stderr" if abortMsgInCrashdata: abortMsgSrc = "crashdata" @@ -424,6 +425,7 @@ def createCrashSignature(self, forceCrashAddress: bool = False, forceCrashInstru # Versions below 1.2 only support the full object PCRE style, # for anything newer, use the short form with forward slashes # to increase the readability of the signatures. + symptomObj: dict[str, object] if minimumSupportedVersion < 12: stringObj = {"value": abortMsg, "matchType": "pcre"} symptomObj = {"type": "output", "src": abortMsgSrc, "value": stringObj} @@ -980,6 +982,7 @@ def __init__( if crashData: gdbOutput = crashData else: + assert stderr is not None gdbOutput = stderr gdbFramePatterns = [ @@ -1070,6 +1073,7 @@ def __init__( # This is a workaround for GDB throwing an error while resolving function arguments # in the trace and aborting. We try to remove the error message to at least recover # the function name properly. + assert functionName is not None gdbErrorIdx = functionName.find(" (/build/buildd/gdb") if gdbErrorIdx > 0: functionName = functionName[:gdbErrorIdx] @@ -1105,7 +1109,7 @@ def __init__( def calculateCrashAddress( crashInstruction: str, registerMap: dict[str, int], - ) -> int: + ) -> str | int | None: ''' Calculate the crash address given the crash instruction and register contents @@ -1288,12 +1292,12 @@ def calculateDerefOpAddress(derefOp: str) -> tuple[int | None, str | None]: if "(" in parts[0] and ")" in parts[2]: complexDerefOp = parts[0] + "," + parts[1] + "," + parts[2] - (result, reason) = GDBCrashInfo.calculateComplexDerefOpAddress(complexDerefOp, registerMap) + (result_parts_3, reason) = GDBCrashInfo.calculateComplexDerefOpAddress(complexDerefOp, registerMap) - if result is None: + if result_parts_3 is None: failureReason = reason else: - return result + return result_parts_3 else: raise RuntimeError("Unexpected instruction pattern: %s" % crashInstruction) elif len(parts) == 4: @@ -1302,12 +1306,12 @@ def calculateDerefOpAddress(derefOp: str) -> tuple[int | None, str | None]: elif "(" not in parts[0] and ")" not in parts[0]: complexDerefOp = parts[1] + "," + parts[2] + "," + parts[3] - (result, reason) = GDBCrashInfo.calculateComplexDerefOpAddress(complexDerefOp, registerMap) + (result_parts_4, reason) = GDBCrashInfo.calculateComplexDerefOpAddress(complexDerefOp, registerMap) - if result is None: + if result_parts_4 is None: failureReason = reason else: - return result + return result_parts_4 else: raise RuntimeError("Unexpected length after splitting operands of this instruction: %s" % crashInstruction) @@ -1365,11 +1369,11 @@ def calculateARMDerefOpAddress(derefOp: str) -> tuple[int | None, str | None]: # Load/Store instruction match = re.match("^\\s*\\[(.*)\\]$", parts[1]) if match is not None: - (result, reason) = calculateARMDerefOpAddress(match.group(1)) - if result is None: + (result_parts_2, reason) = calculateARMDerefOpAddress(match.group(1)) + if result_parts_2 is None: failureReason += " (%s)" % reason else: - return result + return result_parts_2 else: failureReason = "Architecture is not supported." @@ -1439,6 +1443,7 @@ def __init__( if crashData: minidumpOuput = crashData else: + assert stderr is not None minidumpOuput = stderr crashThread = None diff --git a/FTB/Signatures/tests/test_CrashInfo.py b/FTB/Signatures/tests/test_CrashInfo.py index 93c5e6941..8adfd7922 100644 --- a/FTB/Signatures/tests/test_CrashInfo.py +++ b/FTB/Signatures/tests/test_CrashInfo.py @@ -1017,7 +1017,7 @@ def test_ASanParserTestDebugAssertion() -> None: ("", tsanTraceCrash), ("", ubsanTraceGenericCrash), ]) -def test_ASanDetectionTest(stderr, crashdata): +def test_ASanDetectionTest(stderr: str, crashdata: str) -> None: config = ProgramConfiguration("test", "x86", "linux") crashInfo = CrashInfo.fromRawCrashData( [], @@ -1070,6 +1070,7 @@ def test_ASanParserTestTruncatedTrace() -> None: # Confirm that generating a crash signature will fail crashSig = crashInfo.createCrashSignature() assert crashSig is None + assert crashInfo.failureReason is not None assert "Insufficient data" in crashInfo.failureReason @@ -1268,7 +1269,7 @@ def test_CrashSignatureOutputTest() -> None: outputSignature1Neg = CrashSignature(crashSignature1Neg) outputSignature2 = CrashSignature(crashSignature2) - gdbOutput = [] + gdbOutput: list[str] = [] stdout = [] stderr = [] From 5bfa4d070af9eb928fddcd9143712e09fa03ad3a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 4 Feb 2022 17:51:37 -0800 Subject: [PATCH 091/137] 1281 mypy issues left --- server/covmanager/tests/test_repositories.py | 65 ++++++++++--------- .../tests/test_repositories_rest.py | 29 +++++---- 2 files changed, 48 insertions(+), 46 deletions(-) diff --git a/server/covmanager/tests/test_repositories.py b/server/covmanager/tests/test_repositories.py index 1799baa94..c53f2f4bf 100644 --- a/server/covmanager/tests/test_repositories.py +++ b/server/covmanager/tests/test_repositories.py @@ -16,6 +16,7 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse @@ -25,7 +26,7 @@ @pytest.mark.parametrize("name", ["covmanager:repositories", "covmanager:repositories_search_api"]) -def test_repositories_no_login(name, client): +def test_repositories_no_login(name: str, client: Client) -> None: """Request without login hits the login redirect""" path = reverse(name) response = client.get(path, follow=False) @@ -33,7 +34,7 @@ def test_repositories_no_login(name, client): assert response.url == "/login/?next=" + path -def test_repositories_view_simpleget(client): +def test_repositories_view_simpleget(client: Client) -> None: """No errors are thrown in template""" client.login(username='test', password='test') response = client.get(reverse("covmanager:repositories")) @@ -41,7 +42,7 @@ def test_repositories_view_simpleget(client): assert response.status_code == requests.codes['ok'] -def test_repositories_view_list(client, cm): +def test_repositories_view_list(client: Client, cm) -> None: """Repositories are listed""" client.login(username='test', password='test') repos = [] @@ -59,7 +60,7 @@ def test_repositories_view_list(client, cm): assert set(response.context['repositories']) == set(repos) -def test_repositories_search_view_simpleget(client): +def test_repositories_search_view_simpleget(client: Client) -> None: """No errors are thrown in template""" client.login(username='test', password='test') response = client.get(reverse("covmanager:repositories_search_api")) @@ -67,37 +68,37 @@ def test_repositories_search_view_simpleget(client): assert response.status_code == requests.codes['ok'] -def test_repositories_search_view_search_git(client, cm): +def test_repositories_search_view_search_git(client: Client, cm) -> None: cm.create_repository("git", name="gittest1") cm.create_repository("git", name="gittest2") client.login(username='test', password='test') - response = client.get(reverse("covmanager:repositories_search_api"), {"name": "blah"}) - LOG.debug(response) - assert response.status_code == requests.codes['ok'] - response = json.loads(response.content.decode('utf-8')) - assert set(response.keys()) == {"results"} - assert response["results"] == [] - response = client.get(reverse("covmanager:repositories_search_api"), {"name": "test"}) - LOG.debug(response) - assert response.status_code == requests.codes['ok'] - response = json.loads(response.content.decode('utf-8')) - assert set(response.keys()) == {"results"} - assert set(response["results"]) == {"gittest1", "gittest2"} - - -def test_repositories_search_view_search_hg(client, cm): + response_blah = client.get(reverse("covmanager:repositories_search_api"), {"name": "blah"}) + LOG.debug(response_blah) + assert response_blah.status_code == requests.codes['ok'] + response_blah_json = json.loads(response_blah.content.decode('utf-8')) + assert set(response_blah_json.keys()) == {"results"} + assert response_blah_json["results"] == [] + response_test = client.get(reverse("covmanager:repositories_search_api"), {"name": "test"}) + LOG.debug(response_test) + assert response_test.status_code == requests.codes['ok'] + response_test_json = json.loads(response_test.content.decode('utf-8')) + assert set(response_test_json.keys()) == {"results"} + assert set(response_test_json["results"]) == {"gittest1", "gittest2"} + + +def test_repositories_search_view_search_hg(client: Client, cm) -> None: cm.create_repository("hg", name="hgtest1") cm.create_repository("hg", name="hgtest2") client.login(username='test', password='test') - response = client.get(reverse("covmanager:repositories_search_api"), {"name": "blah"}) - LOG.debug(response) - assert response.status_code == requests.codes['ok'] - response = json.loads(response.content.decode('utf-8')) - assert set(response.keys()) == {"results"} - assert response["results"] == [] - response = client.get(reverse("covmanager:repositories_search_api"), {"name": "test"}) - LOG.debug(response) - assert response.status_code == requests.codes['ok'] - response = json.loads(response.content.decode('utf-8')) - assert set(response.keys()) == {"results"} - assert set(response["results"]) == {"hgtest1", "hgtest2"} + response_blah = client.get(reverse("covmanager:repositories_search_api"), {"name": "blah"}) + LOG.debug(response_blah) + assert response_blah.status_code == requests.codes['ok'] + response_blah_json = json.loads(response_blah.content.decode('utf-8')) + assert set(response_blah_json.keys()) == {"results"} + assert response_blah_json["results"] == [] + response_test = client.get(reverse("covmanager:repositories_search_api"), {"name": "test"}) + LOG.debug(response_test) + assert response_test.status_code == requests.codes['ok'] + response_test_json = json.loads(response_test.content.decode('utf-8')) + assert set(response_test_json.keys()) == {"results"} + assert set(response_test_json["results"]) == {"hgtest1", "hgtest2"} diff --git a/server/covmanager/tests/test_repositories_rest.py b/server/covmanager/tests/test_repositories_rest.py index 11356742b..21c26f818 100644 --- a/server/covmanager/tests/test_repositories_rest.py +++ b/server/covmanager/tests/test_repositories_rest.py @@ -16,6 +16,7 @@ import logging import pytest import requests +from rest_framework.test import APIClient from django.contrib.auth.models import User @@ -23,7 +24,7 @@ pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name -def test_rest_repositories_no_auth(api_client): +def test_rest_repositories_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/covmanager/rest/repositories/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -33,7 +34,7 @@ def test_rest_repositories_no_auth(api_client): assert api_client.delete(url).status_code == requests.codes['unauthorized'] -def test_rest_repositories_no_perm(api_client): +def test_rest_repositories_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -45,7 +46,7 @@ def test_rest_repositories_no_perm(api_client): assert api_client.delete(url).status_code == requests.codes['forbidden'] -def test_rest_repositories_patch(api_client): +def test_rest_repositories_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -53,7 +54,7 @@ def test_rest_repositories_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repositories_post(api_client): +def test_rest_repositories_post(api_client: APIClient) -> None: """post should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -61,7 +62,7 @@ def test_rest_repositories_post(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repositories_put(api_client): +def test_rest_repositories_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -69,7 +70,7 @@ def test_rest_repositories_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repositories_delete(api_client): +def test_rest_repositories_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -77,7 +78,7 @@ def test_rest_repositories_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repositories_get(api_client, cm): +def test_rest_repositories_get(api_client: APIClient, cm) -> None: """get should be allowed""" cm.create_repository("git", name='testrepo') user = User.objects.get(username='test') @@ -95,7 +96,7 @@ def test_rest_repositories_get(api_client, cm): assert resp['name'] == 'testrepo' -def test_rest_repository_no_auth(api_client): +def test_rest_repository_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/covmanager/rest/repositories/1/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -105,7 +106,7 @@ def test_rest_repository_no_auth(api_client): assert api_client.delete(url).status_code == requests.codes['unauthorized'] -def test_rest_repository_no_perm(api_client): +def test_rest_repository_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -117,7 +118,7 @@ def test_rest_repository_no_perm(api_client): assert api_client.delete(url).status_code == requests.codes['forbidden'] -def test_rest_repository_patch(api_client): +def test_rest_repository_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -125,7 +126,7 @@ def test_rest_repository_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repository_post(api_client): +def test_rest_repository_post(api_client: APIClient) -> None: """post should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -133,7 +134,7 @@ def test_rest_repository_post(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repository_put(api_client): +def test_rest_repository_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -141,7 +142,7 @@ def test_rest_repository_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repository_delete(api_client): +def test_rest_repository_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -149,7 +150,7 @@ def test_rest_repository_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repository_get(api_client, cm): +def test_rest_repository_get(api_client: APIClient, cm) -> None: """get should be allowed""" repo = cm.create_repository("git", name='testrepo') user = User.objects.get(username='test') From 4d615d77deb04cf0e0b1d219df922665b0ad1e0f Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 5 Feb 2022 15:14:31 -0800 Subject: [PATCH 092/137] 1267 mypy issues left --- .../covmanager/tests/test_collections_rest.py | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/server/covmanager/tests/test_collections_rest.py b/server/covmanager/tests/test_collections_rest.py index 64900aa90..b17048860 100644 --- a/server/covmanager/tests/test_collections_rest.py +++ b/server/covmanager/tests/test_collections_rest.py @@ -17,8 +17,10 @@ import logging import pytest import requests +from typing_extensions import TypedDict from django.contrib.auth.models import User from django.utils import dateparse, timezone +from rest_framework.test import APIClient from covmanager.models import Collection @@ -26,7 +28,7 @@ pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name -def test_rest_collections_no_auth(api_client): +def test_rest_collections_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/covmanager/rest/collections/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -36,7 +38,7 @@ def test_rest_collections_no_auth(api_client): assert api_client.delete(url).status_code == requests.codes['unauthorized'] -def test_rest_collections_no_perm(api_client): +def test_rest_collections_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -48,7 +50,7 @@ def test_rest_collections_no_perm(api_client): assert api_client.delete(url).status_code == requests.codes['forbidden'] -def test_rest_collections_patch(api_client): +def test_rest_collections_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -57,12 +59,23 @@ def test_rest_collections_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collections_post(api_client, cm): +def test_rest_collections_post(api_client: APIClient, cm) -> None: """post should be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) repo = cm.create_repository("git", name="testrepo") - cov = {"linesTotal": 0, + + class covType(TypedDict): + """Type information for cov""" + + children: dict[str, str] + coveragePercent: float + linesCovered: int + linesMissed: int + linesTotal: int + name: str | None + + cov: covType = {"linesTotal": 0, "name": None, "coveragePercent": 0.0, "children": {}, @@ -90,7 +103,7 @@ def test_rest_collections_post(api_client, cm): assert json.load(codecs.getreader('utf-8')(result.coverage.file)) == cov -def test_rest_collections_put(api_client): +def test_rest_collections_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -99,7 +112,7 @@ def test_rest_collections_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collections_delete(api_client): +def test_rest_collections_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -108,7 +121,7 @@ def test_rest_collections_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collections_get(api_client, cm): +def test_rest_collections_get(api_client: APIClient, cm) -> None: """get should be allowed""" repo = cm.create_repository('git', name='testrepo') coll = cm.create_collection(repo, branch='master', description='testdesc', revision='abc') @@ -131,6 +144,7 @@ def test_rest_collections_get(api_client, cm): assert resp['repository'] == 'testrepo' created = dateparse.parse_datetime(resp['created']) LOG.debug('time now: %s', timezone.now()) + assert created is not None assert (timezone.now() - created).total_seconds() < 60 assert resp['description'] == 'testdesc' assert resp['client'] == 'testclient' @@ -139,7 +153,7 @@ def test_rest_collections_get(api_client, cm): assert resp['coverage'] == coll.coverage.file -def test_rest_collection_no_auth(api_client): +def test_rest_collection_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/covmanager/rest/collections/1/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -149,7 +163,7 @@ def test_rest_collection_no_auth(api_client): assert api_client.delete(url).status_code == requests.codes['unauthorized'] -def test_rest_collection_no_perm(api_client): +def test_rest_collection_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -161,7 +175,7 @@ def test_rest_collection_no_perm(api_client): assert api_client.delete(url).status_code == requests.codes['forbidden'] -def test_rest_collection_patch(api_client): +def test_rest_collection_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -170,7 +184,7 @@ def test_rest_collection_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collection_post(api_client): +def test_rest_collection_post(api_client: APIClient) -> None: """post should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -179,7 +193,7 @@ def test_rest_collection_post(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collection_put(api_client): +def test_rest_collection_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -188,7 +202,7 @@ def test_rest_collection_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collection_delete(api_client): +def test_rest_collection_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -197,7 +211,7 @@ def test_rest_collection_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collection_get(api_client, cm): +def test_rest_collection_get(api_client: APIClient, cm) -> None: """get should not be allowed""" repo = cm.create_repository('git', name='testrepo') coll = cm.create_collection(repo, branch='master', description='testdesc', revision='abc') @@ -214,6 +228,7 @@ def test_rest_collection_get(api_client, cm): assert resp['repository'] == 'testrepo' created = dateparse.parse_datetime(resp['created']) LOG.debug('time now: %s', timezone.now()) + assert created is not None assert (timezone.now() - created).total_seconds() < 60 assert resp['description'] == 'testdesc' assert resp['client'] == 'testclient' From 956a7b95f3c842690a614046d63e1cbfe1fa8fcd Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 5 Feb 2022 16:52:56 -0800 Subject: [PATCH 093/137] 1255 mypy issues left --- server/covmanager/tests/conftest.py | 102 +++++++++++++----- .../covmanager/tests/test_collections_rest.py | 20 ++-- server/crashmanager/tests/conftest.py | 87 ++++++++++++++- .../crashmanager/tests/test_crashes_rest.py | 2 +- 4 files changed, 164 insertions(+), 47 deletions(-) diff --git a/server/covmanager/tests/conftest.py b/server/covmanager/tests/conftest.py index d11eab5b9..bd20fc7a2 100644 --- a/server/covmanager/tests/conftest.py +++ b/server/covmanager/tests/conftest.py @@ -18,8 +18,13 @@ import subprocess import tempfile import pytest +from typing import Iterator, cast +from typing_extensions import TypedDict from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType +from django.core.files.storage import Storage +import py as py_package +from pytest_django.fixtures import SettingsWrapper from covmanager.models import Collection, CollectionFile, Repository from crashmanager.models import Client, Tool, User as cmUser @@ -54,7 +59,7 @@ def _check_hg() -> bool: @pytest.fixture -def covmanager_test(db): # pylint: disable=invalid-name,unused-argument +def covmanager_test(db: None) -> None: # pylint: disable=invalid-name,unused-argument """Common setup/teardown tasks for all server unittests""" user = User.objects.create_user('test', 'test@mozilla.com', 'test') user.user_permissions.clear() @@ -65,15 +70,57 @@ def covmanager_test(db): # pylint: disable=invalid-name,unused-argument user_np.user_permissions.clear() +class covType(TypedDict): + """Type information for cov""" + + children: dict[str, str] + coveragePercent: float + linesCovered: int + linesMissed: int + linesTotal: int + name: str | None + + +class _result(object): # pylint: disable=invalid-name + @classmethod + def create_repository(cls, repotype: str, name: str = "testrepo") -> Repository: + ... + @staticmethod + def create_collection_file(data: str) -> CollectionFile: + ... + @classmethod + def create_collection(cls, + created: bool | None = None, + description: str = "", + repository: Repository | None = None, + revision: str = "", + branch: str = "", + tools: tuple[str]=("testtool",), + client_str: str = "testclient", + coverage_str: str = '{"linesTotal":0,' + '"name":null,' + '"coveragePercent":0.0,' + '"children":{},' + '"linesMissed":0,' + '"linesCovered":0}') -> Collection: + ... + @staticmethod + def git(repo: Repository, *args: str) -> str: + ... + @staticmethod + def hg(repo: Repository, *args: str) -> str: + ... + + @pytest.fixture -def cm(request, settings, tmpdir): +def cm(request: pytest.FixtureRequest, settings: Iterator[SettingsWrapper], tmpdir: py_package.path.local): class _result(object): have_git = HAVE_GIT have_hg = HAVE_HG @classmethod - def create_repository(cls, repotype, name="testrepo"): + def create_repository(cls, repotype: str, name: str = "testrepo") -> Repository: location = tempfile.mkdtemp(prefix='testrepo', dir=os.path.dirname(__file__)) request.addfinalizer(lambda: shutil.rmtree(location)) if repotype == "git": @@ -86,7 +133,7 @@ def create_repository(cls, repotype, name="testrepo"): classname = "HGSourceCodeProvider" else: raise Exception("unknown repository type: %s (expecting git or hg)" % repotype) - result = Repository.objects.create(classname=classname, name=name, location=location) + result = cast(Repository, Repository.objects.create(classname=classname, name=name, location=location)) LOG.debug("Created Repository pk=%d", result.pk) if repotype == "git": cls.git(result, "init") @@ -95,62 +142,63 @@ def create_repository(cls, repotype, name="testrepo"): return result @staticmethod - def create_collection_file(data): + def create_collection_file(data: str) -> CollectionFile: # Use a specific temporary directory to upload covmanager files # This is required as Django now needs a path relative to that folder in FileField location = str(tmpdir) + assert isinstance(CollectionFile.file.field.storage, Storage) CollectionFile.file.field.storage.location = location tmp_fd, path = tempfile.mkstemp(suffix=".data", dir=location) os.close(tmp_fd) with open(path, "w") as fp: fp.write(data) - result = CollectionFile.objects.create(file=os.path.basename(path)) + result = cast(CollectionFile, CollectionFile.objects.create(file=os.path.basename(path))) LOG.debug("Created CollectionFile pk=%d", result.pk) return result @classmethod def create_collection(cls, - created=None, - description="", - repository=None, - revision="", - branch="", - tools=("testtool",), - client="testclient", - coverage='{"linesTotal":0,' + created: bool | None = None, + description: str = "", + repository: Repository | None = None, + revision: str = "", + branch: str = "", + tools: tuple[str]=("testtool",), + client_str: str = "testclient", + coverage_str: str = '{"linesTotal":0,' '"name":null,' '"coveragePercent":0.0,' '"children":{},' '"linesMissed":0,' - '"linesCovered":0}'): + '"linesCovered":0}') -> Collection: # create collectionfile - coverage = cls.create_collection_file(coverage) + coverage = cls.create_collection_file(coverage_str) # create client - client, created = Client.objects.get_or_create(name=client) + client, created = Client.objects.get_or_create(name=client_str) if created: LOG.debug("Created Client pk=%d", client.pk) # create repository if repository is None: repository = cls.create_repository("git") - result = Collection.objects.create(description=description, - repository=repository, - revision=revision, - branch=branch, - client=client, - coverage=coverage) + result = cast(Collection, Collection.objects.create(description=description, + repository=repository, + revision=revision, + branch=branch, + client=client, + coverage=coverage)) LOG.debug("Created Collection pk=%d", result.pk) # create tools - for tool in tools: - tool, created = Tool.objects.get_or_create(name=tool) + for single_tool in tools: + tool, created = Tool.objects.get_or_create(name=single_tool) if created: LOG.debug("Created Tool pk=%d", tool.pk) result.tools.add(tool) return result @staticmethod - def git(repo, *args): + def git(repo: Repository, *args: str) -> str: path = os.getcwd() try: os.chdir(repo.location) @@ -159,7 +207,7 @@ def git(repo, *args): os.chdir(path) @staticmethod - def hg(repo, *args): + def hg(repo: Repository, *args: str) -> str: path = os.getcwd() try: os.chdir(repo.location) diff --git a/server/covmanager/tests/test_collections_rest.py b/server/covmanager/tests/test_collections_rest.py index b17048860..39636f0d4 100644 --- a/server/covmanager/tests/test_collections_rest.py +++ b/server/covmanager/tests/test_collections_rest.py @@ -17,12 +17,14 @@ import logging import pytest import requests -from typing_extensions import TypedDict from django.contrib.auth.models import User from django.utils import dateparse, timezone from rest_framework.test import APIClient from covmanager.models import Collection +from .conftest import _result +from .conftest import covType + LOG = logging.getLogger("fm.covmanager.tests.collections.rest") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name @@ -59,22 +61,12 @@ def test_rest_collections_patch(api_client: APIClient) -> None: assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collections_post(api_client: APIClient, cm) -> None: +def test_rest_collections_post(api_client: APIClient, cm: _result) -> None: """post should be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) repo = cm.create_repository("git", name="testrepo") - class covType(TypedDict): - """Type information for cov""" - - children: dict[str, str] - coveragePercent: float - linesCovered: int - linesMissed: int - linesTotal: int - name: str | None - cov: covType = {"linesTotal": 0, "name": None, "coveragePercent": 0.0, @@ -121,7 +113,7 @@ def test_rest_collections_delete(api_client: APIClient) -> None: assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collections_get(api_client: APIClient, cm) -> None: +def test_rest_collections_get(api_client: APIClient, cm: _result) -> None: """get should be allowed""" repo = cm.create_repository('git', name='testrepo') coll = cm.create_collection(repo, branch='master', description='testdesc', revision='abc') @@ -211,7 +203,7 @@ def test_rest_collection_delete(api_client: APIClient) -> None: assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_collection_get(api_client: APIClient, cm) -> None: +def test_rest_collection_get(api_client: APIClient, cm: _result) -> None: """get should not be allowed""" repo = cm.create_repository('git', name='testrepo') coll = cm.create_collection(repo, branch='master', description='testdesc', revision='abc') diff --git a/server/crashmanager/tests/conftest.py b/server/crashmanager/tests/conftest.py index 1396c47c1..b70f74766 100644 --- a/server/crashmanager/tests/conftest.py +++ b/server/crashmanager/tests/conftest.py @@ -41,7 +41,7 @@ def _create_user(username: str, email: str = "test@mozilla.com", password: str = @pytest.fixture -def crashmanager_test(db: str) -> None: # pylint: disable=invalid-name,unused-argument +def crashmanager_test(db: None) -> None: # pylint: disable=invalid-name,unused-argument """Common testcase class for all crashmanager unittests""" # Create one unrestricted and one restricted test user _create_user("test") @@ -50,7 +50,7 @@ def crashmanager_test(db: str) -> None: # pylint: disable=invalid-name,unused-a @pytest.fixture -def user_normal(db: str, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument +def user_normal(db: None, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument """Create a normal, authenticated user""" user = _create_user("test") api_client.force_authenticate(user=user) @@ -58,7 +58,7 @@ def user_normal(db: str, api_client: APIClient) -> User: # pylint: disable=inva @pytest.fixture -def user_restricted(db: str, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument +def user_restricted(db: None, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument """Create a restricted, authenticated user""" user = _create_user("test-restricted", restricted=True) api_client.force_authenticate(user=user) @@ -66,7 +66,7 @@ def user_restricted(db: str, api_client: APIClient) -> User: # pylint: disable= @pytest.fixture -def user_noperm(db: str, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument +def user_noperm(db: None, api_client: APIClient) -> User: # pylint: disable=invalid-name,unused-argument """Create an authenticated user with no crashmanager ACL""" user = _create_user("test-noperm", has_permission=False) api_client.force_authenticate(user=user) @@ -79,6 +79,82 @@ def user(request): return request.getfixturevalue("user_" + request.param) +class _cm_result(object): # pylint: disable=invalid-name + @staticmethod + def create_crash(tool: str = "testtool", + platform: str = "testplatform", + product: str = "testproduct", + product_version: Product | None = None, + os: str = "testos", + testcase: cmTestCase | None = None, + client: str = "testclient", + bucket: Bucket | None = None, + stdout: str = "", + stderr: str = "", + crashdata: str = "", + metadata: str = "", + env: str = "", + args: str = "", + crashAddress: str = "", + crashAddressNumeric: int | None = None, + shortSignature: str = "", + cachedCrashInfo: str = "", + triagedOnce: bool = False) -> CrashEntry: + ... + @staticmethod + def create_bugprovider(classname: str = "BugzillaProvider", hostname: str = "", urlTemplate: str = "%s") -> BugProvider: + ... + @classmethod + def create_bug(cls, externalId: str, externalType: BugProvider | None = None, closed: bool | None = None) -> Bug: + ... + @staticmethod + def create_testcase(filename: str, + testdata: str = "", + quality: int = 0, + isBinary: bool = False) -> cmTestCase: + ... + @staticmethod + def create_template(mode: str = BugzillaTemplateMode.Bug, + name: str = "", + product: str = "", + component: str = "", + summary: str = "", + version: str = "", + description: str = "", + whiteboard: str = "", + keywords: str = "", + op_sys: str = "", + platform: str = "", + priority: str = "", + severity: str = "", + alias: str = "", + cc: str = "", + assigned_to: str = "", + qa_contact: str = "", + target_milestone: str = "", + attrs: str = "", + security: bool = False, + security_group: str = "", + comment: str = "", + testcase_filename: str = "", + blocks: str = "", + dependson: str = "") -> BugzillaTemplate: + ... + @staticmethod + def create_bucket(bug: Bug | None = None, + signature: str = "", + shortDescription: str = "", + frequent: bool = False, + permanent: bool = False) -> Bucket: + ... + @staticmethod + def create_toolfilter(tool: str, user: str = 'test') -> None: + ... + @staticmethod + def create_bucketwatch(bucket: Bucket, crash: CrashEntry | int = 0) -> BucketWatch: + ... + + @pytest.fixture def cm(): @@ -252,10 +328,11 @@ def create_toolfilter(tool: str, user: str = 'test') -> None: cmuser.defaultToolsFilter.add(Tool.objects.get(name=tool)) @staticmethod - def create_bucketwatch(bucket: Bucket, crash=0) -> BucketWatch: + def create_bucketwatch(bucket: Bucket, crash: CrashEntry | int = 0) -> BucketWatch: user = User.objects.get(username='test') cmuser, _ = cmUser.objects.get_or_create(user=user) if crash: + assert isinstance(crash, CrashEntry) crash = crash.pk result = cast(BucketWatch, BucketWatch.objects.create(bucket=bucket, user=cmuser, lastCrash=crash)) LOG.debug("Created BucketWatch pk=%d", result.pk) diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index 774a178a9..7a1ec414a 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -60,7 +60,7 @@ @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/crashes/", "/crashmanager/rest/crashes/1/"]) -def test_rest_crashes_no_auth(db: str, api_client: APIClient, method: str, url: str) -> None: +def test_rest_crashes_no_auth(db: None, api_client: APIClient, method: str, url: str) -> None: """must yield unauthorized without authentication""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['unauthorized'] From 27382e961a2e1894692a15a6b81f36304e6b8c44 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 5 Feb 2022 18:23:18 -0800 Subject: [PATCH 094/137] 1239 mypy issues left --- server/covmanager/tests/conftest.py | 41 ++++++++++--------- server/covmanager/tests/test_collections.py | 27 +++++++----- server/covmanager/tests/test_repositories.py | 8 ++-- .../tests/test_repositories_rest.py | 6 ++- 4 files changed, 47 insertions(+), 35 deletions(-) diff --git a/server/covmanager/tests/conftest.py b/server/covmanager/tests/conftest.py index bd20fc7a2..0906c5268 100644 --- a/server/covmanager/tests/conftest.py +++ b/server/covmanager/tests/conftest.py @@ -82,6 +82,9 @@ class covType(TypedDict): class _result(object): # pylint: disable=invalid-name + have_git: bool + have_hg: bool + @classmethod def create_repository(cls, repotype: str, name: str = "testrepo") -> Repository: ... @@ -96,13 +99,13 @@ def create_collection(cls, revision: str = "", branch: str = "", tools: tuple[str]=("testtool",), - client_str: str = "testclient", - coverage_str: str = '{"linesTotal":0,' - '"name":null,' - '"coveragePercent":0.0,' - '"children":{},' - '"linesMissed":0,' - '"linesCovered":0}') -> Collection: + client: str = "testclient", + coverage: str = '{"linesTotal":0,' + '"name":null,' + '"coveragePercent":0.0,' + '"children":{},' + '"linesMissed":0,' + '"linesCovered":0}') -> Collection: ... @staticmethod def git(repo: Repository, *args: str) -> str: @@ -166,19 +169,19 @@ def create_collection(cls, revision: str = "", branch: str = "", tools: tuple[str]=("testtool",), - client_str: str = "testclient", - coverage_str: str = '{"linesTotal":0,' - '"name":null,' - '"coveragePercent":0.0,' - '"children":{},' - '"linesMissed":0,' - '"linesCovered":0}') -> Collection: + client: str = "testclient", + coverage: str = '{"linesTotal":0,' + '"name":null,' + '"coveragePercent":0.0,' + '"children":{},' + '"linesMissed":0,' + '"linesCovered":0}') -> Collection: # create collectionfile - coverage = cls.create_collection_file(coverage_str) + coverage_ = cls.create_collection_file(coverage) # create client - client, created = Client.objects.get_or_create(name=client_str) + client_, created = Client.objects.get_or_create(name=client) if created: - LOG.debug("Created Client pk=%d", client.pk) + LOG.debug("Created Client pk=%d", client_.pk) # create repository if repository is None: repository = cls.create_repository("git") @@ -186,8 +189,8 @@ def create_collection(cls, repository=repository, revision=revision, branch=branch, - client=client, - coverage=coverage)) + client=client_, + coverage=coverage_)) LOG.debug("Created Collection pk=%d", result.pk) # create tools for single_tool in tools: diff --git a/server/covmanager/tests/test_collections.py b/server/covmanager/tests/test_collections.py index 8e5875fa4..8e19684bb 100644 --- a/server/covmanager/tests/test_collections.py +++ b/server/covmanager/tests/test_collections.py @@ -18,8 +18,11 @@ import re import pytest import requests +from django.test.client import Client from django.urls import reverse +from .conftest import _result + LOG = logging.getLogger("fm.covmanager.tests.collections") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name @@ -29,7 +32,7 @@ "covmanager:collections_api", "covmanager:collections_diff", "covmanager:collections_patch"]) -def test_collections_no_login(name, client): +def test_collections_no_login(name: str, client: Client) -> None: """Request without login hits the login redirect""" path = reverse(name) response = client.get(path, follow=False) @@ -41,7 +44,7 @@ def test_collections_no_login(name, client): "covmanager:collections_api", "covmanager:collections_diff", "covmanager:collections_patch"]) -def test_collections_view_simple_get(name, client): +def test_collections_view_simple_get(name: str, client: Client) -> None: """No errors are thrown in template""" client.login(username='test', password='test') response = client.get(reverse(name)) @@ -49,7 +52,7 @@ def test_collections_view_simple_get(name, client): assert response.status_code == requests.codes["ok"] -def test_collections_diff_no_login(client): +def test_collections_diff_no_login(client: Client) -> None: """Request without login hits the login redirect""" path = reverse("covmanager:collections_diff_api", kwargs={'path': ''}) response = client.get(path, follow=False) @@ -57,7 +60,7 @@ def test_collections_diff_no_login(client): assert response.url == "/login/?next=" + path -def test_collections_diff_simple_get(client, cm): +def test_collections_diff_simple_get(client: Client, cm: _result) -> None: """No errors are thrown in template""" repo = cm.create_repository("git") col1 = cm.create_collection(repository=repo, coverage=json.dumps({"children": []})) @@ -69,7 +72,7 @@ def test_collections_diff_simple_get(client, cm): assert response.status_code == requests.codes['ok'] -def test_collections_patch_no_login(client): +def test_collections_patch_no_login(client: Client) -> None: """Request without login hits the login redirect""" path = reverse("covmanager:collections_patch_api", kwargs={'collectionid': 0, 'patch_revision': 'abc'}) response = client.get(path, follow=False) @@ -77,7 +80,7 @@ def test_collections_patch_no_login(client): assert response.url == "/login/?next=" + path -def test_collections_patch_simple_get(client, cm): +def test_collections_patch_simple_get(client: Client, cm: _result) -> None: """No errors are thrown in template""" client.login(username='test', password='test') repo = cm.create_repository("hg") @@ -95,14 +98,16 @@ def test_collections_patch_simple_get(client, cm): with open(os.path.join(repo.location, "test.c"), "w") as fp: fp.write("world") cm.hg(repo, "commit", "-m", "update") - rev = re.match(r"changeset: 1:([0-9a-f]+)", cm.hg(repo, "log")).group(1) + re_match = re.match(r"changeset: 1:([0-9a-f]+)", cm.hg(repo, "log")) + assert re_match is not None + rev = re_match.group(1) response = client.get(reverse("covmanager:collections_patch_api", kwargs={'collectionid': col.pk, 'patch_revision': rev})) LOG.debug(response) assert response.status_code == requests.codes['ok'] -def test_collections_browse_no_login(client): +def test_collections_browse_no_login(client: Client) -> None: """Request without login hits the login redirect""" path = reverse("covmanager:collections_browse", kwargs={'collectionid': 0}) response = client.get(path, follow=False) @@ -110,7 +115,7 @@ def test_collections_browse_no_login(client): assert response.url == "/login/?next=" + path -def test_collections_browse_simple_get(client): +def test_collections_browse_simple_get(client: Client) -> None: """No errors are thrown in template""" client.login(username='test', password='test') response = client.get(reverse("covmanager:collections_browse", kwargs={'collectionid': 0})) @@ -118,7 +123,7 @@ def test_collections_browse_simple_get(client): assert response.status_code == requests.codes['ok'] -def test_collections_browse_api_no_login(client): +def test_collections_browse_api_no_login(client: Client) -> None: """Request without login hits the login redirect""" path = reverse("covmanager:collections_browse_api", kwargs={'collectionid': 0, 'path': ''}) response = client.get(path, follow=False) @@ -126,7 +131,7 @@ def test_collections_browse_api_no_login(client): assert response.url == "/login/?next=" + path -def test_collections_browse_api_simple_get(client, cm): +def test_collections_browse_api_simple_get(client: Client, cm: _result) -> None: """No errors are thrown in template""" client.login(username='test', password='test') repo = cm.create_repository("git") diff --git a/server/covmanager/tests/test_repositories.py b/server/covmanager/tests/test_repositories.py index c53f2f4bf..2c410b6ab 100644 --- a/server/covmanager/tests/test_repositories.py +++ b/server/covmanager/tests/test_repositories.py @@ -19,6 +19,8 @@ from django.test.client import Client from django.urls import reverse +from .conftest import _result + LOG = logging.getLogger("fm.covmanager.tests.repos") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name @@ -42,7 +44,7 @@ def test_repositories_view_simpleget(client: Client) -> None: assert response.status_code == requests.codes['ok'] -def test_repositories_view_list(client: Client, cm) -> None: +def test_repositories_view_list(client: Client, cm: _result) -> None: """Repositories are listed""" client.login(username='test', password='test') repos = [] @@ -68,7 +70,7 @@ def test_repositories_search_view_simpleget(client: Client) -> None: assert response.status_code == requests.codes['ok'] -def test_repositories_search_view_search_git(client: Client, cm) -> None: +def test_repositories_search_view_search_git(client: Client, cm: _result) -> None: cm.create_repository("git", name="gittest1") cm.create_repository("git", name="gittest2") client.login(username='test', password='test') @@ -86,7 +88,7 @@ def test_repositories_search_view_search_git(client: Client, cm) -> None: assert set(response_test_json["results"]) == {"gittest1", "gittest2"} -def test_repositories_search_view_search_hg(client: Client, cm) -> None: +def test_repositories_search_view_search_hg(client: Client, cm: _result) -> None: cm.create_repository("hg", name="hgtest1") cm.create_repository("hg", name="hgtest2") client.login(username='test', password='test') diff --git a/server/covmanager/tests/test_repositories_rest.py b/server/covmanager/tests/test_repositories_rest.py index 21c26f818..6bf48f2a6 100644 --- a/server/covmanager/tests/test_repositories_rest.py +++ b/server/covmanager/tests/test_repositories_rest.py @@ -19,6 +19,8 @@ from rest_framework.test import APIClient from django.contrib.auth.models import User +from .conftest import _result + LOG = logging.getLogger("fm.covmanager.tests.repos.rest") # pylint: disable=invalid-name pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name @@ -78,7 +80,7 @@ def test_rest_repositories_delete(api_client: APIClient) -> None: assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repositories_get(api_client: APIClient, cm) -> None: +def test_rest_repositories_get(api_client: APIClient, cm: _result) -> None: """get should be allowed""" cm.create_repository("git", name='testrepo') user = User.objects.get(username='test') @@ -150,7 +152,7 @@ def test_rest_repository_delete(api_client: APIClient) -> None: assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_repository_get(api_client: APIClient, cm) -> None: +def test_rest_repository_get(api_client: APIClient, cm: _result) -> None: """get should be allowed""" repo = cm.create_repository("git", name='testrepo') user = User.objects.get(username='test') From 8f1c67e4ac67ae6f67ad1e372efc6335bd5ec180 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 5 Feb 2022 20:26:57 -0800 Subject: [PATCH 095/137] 1162 mypy issues left --- server/covmanager/tests/test_collections.py | 2 +- .../covmanager/tests/test_collections_rest.py | 4 +- server/covmanager/tests/test_repositories.py | 2 +- .../tests/test_repositories_rest.py | 2 +- server/crashmanager/models.py | 6 +-- server/crashmanager/tests/conftest.py | 6 +-- .../tests/test_bugproviders_rest.py | 18 ++++++--- server/crashmanager/tests/test_bugs.py | 24 ++++++----- server/crashmanager/tests/test_crashes.py | 12 +++--- .../crashmanager/tests/test_crashes_rest.py | 11 ++--- server/crashmanager/tests/test_inbox_rest.py | 17 ++++---- server/crashmanager/tests/test_signatures.py | 40 ++++++++++--------- .../tests/test_signatures_rest.py | 36 +++++++++-------- server/crashmanager/tests/test_stats.py | 15 ++++--- .../crashmanager/tests/test_templates_rest.py | 17 +++++--- .../crashmanager/tests/test_user_settings.py | 8 ++-- 16 files changed, 125 insertions(+), 95 deletions(-) diff --git a/server/covmanager/tests/test_collections.py b/server/covmanager/tests/test_collections.py index 8e19684bb..b4438c85b 100644 --- a/server/covmanager/tests/test_collections.py +++ b/server/covmanager/tests/test_collections.py @@ -21,7 +21,7 @@ from django.test.client import Client from django.urls import reverse -from .conftest import _result +from covmanager.tests.conftest import _result LOG = logging.getLogger("fm.covmanager.tests.collections") diff --git a/server/covmanager/tests/test_collections_rest.py b/server/covmanager/tests/test_collections_rest.py index 39636f0d4..d23bde904 100644 --- a/server/covmanager/tests/test_collections_rest.py +++ b/server/covmanager/tests/test_collections_rest.py @@ -22,8 +22,8 @@ from rest_framework.test import APIClient from covmanager.models import Collection -from .conftest import _result -from .conftest import covType +from covmanager.tests.conftest import _result +from covmanager.tests.conftest import covType LOG = logging.getLogger("fm.covmanager.tests.collections.rest") diff --git a/server/covmanager/tests/test_repositories.py b/server/covmanager/tests/test_repositories.py index 2c410b6ab..d4f1779f6 100644 --- a/server/covmanager/tests/test_repositories.py +++ b/server/covmanager/tests/test_repositories.py @@ -19,7 +19,7 @@ from django.test.client import Client from django.urls import reverse -from .conftest import _result +from covmanager.tests.conftest import _result LOG = logging.getLogger("fm.covmanager.tests.repos") diff --git a/server/covmanager/tests/test_repositories_rest.py b/server/covmanager/tests/test_repositories_rest.py index 6bf48f2a6..4febc15a1 100644 --- a/server/covmanager/tests/test_repositories_rest.py +++ b/server/covmanager/tests/test_repositories_rest.py @@ -19,7 +19,7 @@ from rest_framework.test import APIClient from django.contrib.auth.models import User -from .conftest import _result +from covmanager.tests.conftest import _result LOG = logging.getLogger("fm.covmanager.tests.repos.rest") # pylint: disable=invalid-name diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index 78327a822..7ff523b3f 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -600,14 +600,14 @@ class Meta: ("view_taskmanager", "Can see TaskManager app"), ) - user = models.OneToOneField(DjangoUser, on_delete=models.deletion.CASCADE) + user = cast(DjangoUser, models.OneToOneField(DjangoUser, on_delete=models.deletion.CASCADE)) # Explicitly do not store this as a ForeignKey to e.g. BugzillaTemplate # because the bug provider has to decide how to interpret this ID. defaultTemplateId = int(str(models.IntegerField(default=0))) defaultProviderId = int(str(models.IntegerField(default=1))) - defaultToolsFilter = models.ManyToManyField(Tool) + defaultToolsFilter = cast(Tool, models.ManyToManyField(Tool)) restricted = bool(models.BooleanField(blank=False, default=False)) - bucketsWatching = models.ManyToManyField(Bucket, through='BucketWatch') + bucketsWatching = cast(Bucket, models.ManyToManyField(Bucket, through='BucketWatch')) # Notifications inaccessible_bug = bool(models.BooleanField(blank=False, default=False)) diff --git a/server/crashmanager/tests/conftest.py b/server/crashmanager/tests/conftest.py index b70f74766..9f6e4522c 100644 --- a/server/crashmanager/tests/conftest.py +++ b/server/crashmanager/tests/conftest.py @@ -74,7 +74,7 @@ def user_noperm(db: None, api_client: APIClient) -> User: # pylint: disable=inv @pytest.fixture -def user(request): +def user(request) -> User: assert request.param in {"normal", "restricted", "noperm"} return request.getfixturevalue("user_" + request.param) @@ -84,7 +84,7 @@ class _cm_result(object): # pylint: disable=invalid-name def create_crash(tool: str = "testtool", platform: str = "testplatform", product: str = "testproduct", - product_version: Product | None = None, + product_version: Product | str | None = None, os: str = "testos", testcase: cmTestCase | None = None, client: str = "testclient", @@ -164,7 +164,7 @@ class _cm_result(object): # pylint: disable=invalid-name def create_crash(tool: str = "testtool", platform: str = "testplatform", product: str = "testproduct", - product_version: Product | None = None, + product_version: Product | str | None = None, os: str = "testos", testcase: cmTestCase | None = None, client: str = "testclient", diff --git a/server/crashmanager/tests/test_bugproviders_rest.py b/server/crashmanager/tests/test_bugproviders_rest.py index 9c25f8ec1..ae2493319 100644 --- a/server/crashmanager/tests/test_bugproviders_rest.py +++ b/server/crashmanager/tests/test_bugproviders_rest.py @@ -6,12 +6,18 @@ import pytest import requests +from django.contrib.auth.models import User +from rest_framework.test import APIClient + +from crashmanager.models import BugProvider +from crashmanager.tests.conftest import _cm_result + LOG = logging.getLogger("fm.crashmanager.tests.bugproviders.rest") @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) -def test_rest_bugproviders_no_auth(db, api_client, method): +def test_rest_bugproviders_no_auth(db: None, api_client: APIClient, method: str) -> None: """must yield unauthorized without authentication""" assert getattr(api_client, method)( "/crashmanager/rest/bugproviders/", {} @@ -19,7 +25,7 @@ def test_rest_bugproviders_no_auth(db, api_client, method): @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) -def test_rest_bugproviders_no_perm(user_noperm, api_client, method): +def test_rest_bugproviders_no_perm(user_noperm: User, api_client: APIClient, method: str) -> None: """must yield forbidden without permission""" assert getattr(api_client, method)( "/crashmanager/rest/bugproviders/", {} @@ -36,7 +42,7 @@ def test_rest_bugproviders_no_perm(user_noperm, api_client, method): ("put", "/crashmanager/rest/bugproviders/", "normal"), ("put", "/crashmanager/rest/bugproviders/", "restricted"), ], indirect=["user"]) -def test_rest_bugproviders_methods(api_client, user, method, url): +def test_rest_bugproviders_methods(api_client: APIClient, user: User, method: str, url: str) -> None: """must yield method-not-allowed for unsupported methods""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['method_not_allowed'] @@ -53,12 +59,12 @@ def test_rest_bugproviders_methods(api_client, user, method, url): ("put", "/crashmanager/rest/bugproviders/1/", "normal"), ("put", "/crashmanager/rest/bugproviders/1/", "restricted"), ], indirect=["user"]) -def test_rest_bugproviders_methods_not_found(api_client, user, method, url): +def test_rest_bugproviders_methods_not_found(api_client: APIClient, user: User, method: str, url: str) -> None: """must yield not-found for undeclared methods""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['not_found'] -def _compare_rest_result_to_bugprovider(result, provider): +def _compare_rest_result_to_bugprovider(result: dict[str, object], provider: BugProvider) -> None: expected_fields = {"id", "classname", "hostname", "urlTemplate"} assert set(result) == expected_fields for key, value in result.items(): @@ -66,7 +72,7 @@ def _compare_rest_result_to_bugprovider(result, provider): @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) -def test_rest_bugproviders_list(api_client, user, cm): +def test_rest_bugproviders_list(api_client: APIClient, user: User, cm: _cm_result) -> None: """test that list returns the right bug providers""" expected = 4 providers = [cm.create_bugprovider(hostname="test-provider%d.com" % (i + 1), diff --git a/server/crashmanager/tests/test_bugs.py b/server/crashmanager/tests/test_bugs.py index 36cdbe951..051a21be3 100644 --- a/server/crashmanager/tests/test_bugs.py +++ b/server/crashmanager/tests/test_bugs.py @@ -15,8 +15,10 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse from crashmanager.models import BugzillaTemplate +from crashmanager.tests.conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.bugs") @@ -31,7 +33,7 @@ ("crashmanager:bugproviderview", {'providerId': 0}), ("crashmanager:createbug", {'crashid': 0}), ("crashmanager:createbugcomment", {'crashid': 0})]) -def test_bug_providers_no_login(client, name, kwargs): +def test_bug_providers_no_login(client: Client, name: str, kwargs: dict[str, int]) -> None: """Request without login hits the login redirect""" path = reverse(name, kwargs=kwargs) resp = client.get(path) @@ -46,7 +48,7 @@ def test_bug_providers_no_login(client, name, kwargs): ("crashmanager:templateedit", {'templateId': 0}), ("crashmanager:templatedup", {'templateId': 0}), ("crashmanager:templatedel", {'templateId': 0})]) -def test_bugzilla_templates_no_login(client, name, kwargs): +def test_bugzilla_templates_no_login(client: Client, name: str, kwargs: dict[str, int]) -> None: """Request without login hits the login redirect""" path = reverse(name, kwargs=kwargs) resp = client.get(path) @@ -60,7 +62,7 @@ def test_bugzilla_templates_no_login(client, name, kwargs): ("crashmanager:bugproviderdel", {'providerId': 0}), ("crashmanager:bugprovideredit", {'providerId': 0}), ("crashmanager:bugproviderview", {'providerId': 0})]) -def test_bug_providers_simple_get(client, cm, name, kwargs): +def test_bug_providers_simple_get(client: Client, cm: _cm_result, name: str, kwargs: dict[str, int]) -> None: """No errors are thrown in template""" client.login(username='test', password='test') if 'providerId' in kwargs: @@ -76,7 +78,7 @@ def test_bug_providers_simple_get(client, cm, name, kwargs): ("crashmanager:templatecreatecomment", {}), ("crashmanager:templateedit", {'templateId': 0}), ("crashmanager:templatedel", {'templateId': 0})]) -def test_bugzilla_templates_simple_get(client, cm, name, kwargs): +def test_bugzilla_templates_simple_get(client: Client, cm: _cm_result, name: str, kwargs: dict[str, int]) -> None: """No errors are thrown in template""" client.login(username='test', password='test') if 'templateId' in kwargs: @@ -86,7 +88,7 @@ def test_bugzilla_templates_simple_get(client, cm, name, kwargs): assert response.status_code == requests.codes['ok'] -def test_template_edit(client, cm): +def test_template_edit(client: Client, cm: _cm_result) -> None: """No errors are thrown in template""" pk = cm.create_template().pk assert len(BugzillaTemplate.objects.all()) == 1 @@ -137,7 +139,7 @@ def test_template_edit(client, cm): assert template.version == "1.0" -def test_template_dup(client, cm): +def test_template_dup(client: Client, cm: _cm_result) -> None: """No errors are thrown in template""" pk = cm.create_template().pk assert len(BugzillaTemplate.objects.all()) == 1 @@ -159,7 +161,7 @@ def test_template_dup(client, cm): assert getattr(template, field) == getattr(clone, field) -def test_template_del(client, cm): +def test_template_del(client: Client, cm: _cm_result) -> None: """No errors are thrown in template""" pk = cm.create_template().pk assert len(BugzillaTemplate.objects.all()) == 1 @@ -172,7 +174,7 @@ def test_template_del(client, cm): assert len(BugzillaTemplate.objects.all()) == 0 -def test_template_create_bug_post(client, cm): +def test_template_create_bug_post(client: Client, cm: _cm_result) -> None: """No errors are thrown in template""" assert len(BugzillaTemplate.objects.all()) == 0 client.login(username='test', password='test') @@ -195,7 +197,7 @@ def test_template_create_bug_post(client, cm): assert template.version == "1.0" -def test_template_create_comment_post(client, cm): +def test_template_create_comment_post(client: Client, cm: _cm_result) -> None: """No errors are thrown in template""" assert len(BugzillaTemplate.objects.all()) == 0 client.login(username='test', password='test') @@ -214,7 +216,7 @@ def test_template_create_comment_post(client, cm): assert template.comment == "A comment" -def test_create_external_bug_simple_get(client, cm): +def test_create_external_bug_simple_get(client: Client, cm: _cm_result) -> None: """No errors are thrown in template""" client.login(username='test', password='test') bucket = cm.create_bucket() @@ -225,7 +227,7 @@ def test_create_external_bug_simple_get(client, cm): assert response.status_code == requests.codes['ok'] -def test_create_external_bug_comment_simple_get(client, cm): +def test_create_external_bug_comment_simple_get(client: Client, cm: _cm_result) -> None: """No errors are thrown in template""" client.login(username='test', password='test') crash = cm.create_crash() diff --git a/server/crashmanager/tests/test_crashes.py b/server/crashmanager/tests/test_crashes.py index 42301a5d8..b3f4bb1b8 100644 --- a/server/crashmanager/tests/test_crashes.py +++ b/server/crashmanager/tests/test_crashes.py @@ -15,7 +15,9 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse +from crashmanager.tests.conftest import _cm_result from . import assert_contains @@ -23,7 +25,7 @@ pytestmark = pytest.mark.usefixtures("crashmanager_test") # pylint: disable=invalid-name -def test_crashes_view(client): # pylint: disable=invalid-name +def test_crashes_view(client: Client) -> None: # pylint: disable=invalid-name """Check that the Vue component is called""" client.login(username='test', password='test') response = client.get(reverse("crashmanager:crashes")) @@ -38,7 +40,7 @@ def test_crashes_view(client): # pylint: disable=invalid-name ("crashmanager:crashdel", {'crashid': 0}), ("crashmanager:crashedit", {'crashid': 0}), ("crashmanager:crashview", {'crashid': 0})]) -def test_crashes_no_login(client, name, kwargs): +def test_crashes_no_login(client: Client, name: str, kwargs: dict[str, int]) -> None: """Request without login hits the login redirect""" path = reverse(name, kwargs=kwargs) resp = client.get(path) @@ -50,7 +52,7 @@ def test_crashes_no_login(client, name, kwargs): ["crashmanager:crashdel", "crashmanager:crashedit", "crashmanager:crashview"]) -def test_crash_simple_get(client, cm, name): # pylint: disable=invalid-name +def test_crash_simple_get(client: Client, cm: _cm_result, name: str) -> None: # pylint: disable=invalid-name """No errors are thrown in template""" client.login(username='test', password='test') crash = cm.create_crash() @@ -59,7 +61,7 @@ def test_crash_simple_get(client, cm, name): # pylint: disable=invalid-name assert response.status_code == requests.codes['ok'] -def test_delete_testcase(cm): +def test_delete_testcase(cm: _cm_result) -> None: """Testcases should be delete when TestCase object is removed""" testcase = cm.create_testcase("test.txt", "hello world") test_file = testcase.test.name @@ -71,7 +73,7 @@ def test_delete_testcase(cm): raise AssertionError("file should have been deleted with TestCase: %r" % (test_file,)) -def test_delete_testcase_crash(cm): +def test_delete_testcase_crash(cm: _cm_result) -> None: """Testcases should be delete when CrashInfo object is removed""" testcase = cm.create_testcase("test.txt", "hello world") test_file = testcase.test.name diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index 7a1ec414a..eac99db53 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -25,6 +25,7 @@ from Collector.Collector import DataType from crashmanager.models import CrashEntry, TestCase as cmTestCase +from crashmanager.tests.conftest import _cm_result # What should be allowed: @@ -144,7 +145,7 @@ def _compare_created_data_to_crash(data: DataType, crash: CrashEntry, crash_addr @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("ignore_toolfilter", [True, False]) @pytest.mark.parametrize("include_raw", [True, False]) -def test_rest_crashes_list(api_client: APIClient, user: User, cm, ignore_toolfilter: bool, include_raw: bool) -> None: +def test_rest_crashes_list(api_client: APIClient, user: User, cm: _cm_result, ignore_toolfilter: bool, include_raw: bool) -> None: """test that list returns the right crashes""" # if restricted or normal, must only list crashes in toolfilter buckets = [cm.create_bucket(shortDescription="bucket #1"), None] @@ -186,7 +187,7 @@ def test_rest_crashes_list(api_client: APIClient, user: User, cm, ignore_toolfil @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("ignore_toolfilter", [True, False]) @pytest.mark.parametrize("include_raw", [True, False]) -def test_rest_crashes_retrieve(api_client: APIClient, user: User, cm, ignore_toolfilter: bool, include_raw: bool) -> None: +def test_rest_crashes_retrieve(api_client: APIClient, user: User, cm: _cm_result, ignore_toolfilter: bool, include_raw: bool) -> None: """test that retrieve returns the right crash""" # if restricted or normal, must only list crashes in toolfilter buckets = [cm.create_bucket(shortDescription="bucket #1"), None] @@ -228,7 +229,7 @@ def test_rest_crashes_retrieve(api_client: APIClient, user: User, cm, ignore_too ("restricted", None, None), ("restricted", 3, "tool1"), ], indirect=["user"]) -def test_rest_crashes_list_query(api_client: APIClient, cm, user: User, expected: int | None, toolfilter: str | None) -> None: +def test_rest_crashes_list_query(api_client: APIClient, cm: _cm_result, user: User, expected: int | None, toolfilter: str | None) -> None: """test that crashes can be queried""" buckets = [cm.create_bucket(shortDescription="bucket #1"), None, None, None] testcases = [cm.create_testcase("test1.txt", quality=5), @@ -426,7 +427,7 @@ def test_rest_crashes_report_crash_long_sig(api_client: APIClient, user_normal: _compare_created_data_to_crash(data, crash, short_signature=expected) -def test_rest_crash_update(api_client: APIClient, cm, user_normal: User) -> None: +def test_rest_crash_update(api_client: APIClient, cm: _cm_result, user_normal: User) -> None: """test that only allowed fields of CrashEntry can be updated""" test = cm.create_testcase("test.txt", quality=0) bucket = cm.create_bucket(shortDescription="bucket #1") @@ -453,7 +454,7 @@ def test_rest_crash_update(api_client: APIClient, cm, user_normal: User) -> None assert test.quality == 5 -def test_rest_crash_update_restricted(api_client: APIClient, cm, user_restricted: User) -> None: +def test_rest_crash_update_restricted(api_client: APIClient, cm: _cm_result, user_restricted: User) -> None: """test that restricted users cannot perform updates on CrashEntry""" test = cm.create_testcase("test.txt", quality=0) bucket = cm.create_bucket(shortDescription="bucket #1") diff --git a/server/crashmanager/tests/test_inbox_rest.py b/server/crashmanager/tests/test_inbox_rest.py index 2cca5aa4d..acce6ca81 100644 --- a/server/crashmanager/tests/test_inbox_rest.py +++ b/server/crashmanager/tests/test_inbox_rest.py @@ -12,6 +12,7 @@ from __future__ import annotations +from django.contrib.auth.models import User from django.urls import reverse from notifications.models import Notification from notifications.signals import notify @@ -19,15 +20,17 @@ import logging import pytest import requests +from rest_framework.test import APIClient from crashmanager.models import Bucket, Bug, BugProvider, Client, CrashEntry, OS, Platform, \ Product, Tool +from crashmanager.tests.conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.inbox.rest") @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) -def test_rest_notifications_no_auth(db, api_client, method): +def test_rest_notifications_no_auth(db: None, api_client: APIClient, method: str) -> None: """must yield unauthorized without authentication""" assert getattr(api_client, method)( "/crashmanager/rest/inbox/", {} @@ -35,7 +38,7 @@ def test_rest_notifications_no_auth(db, api_client, method): @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) -def test_rest_notifications_no_perm(user_noperm, api_client, method): +def test_rest_notifications_no_perm(user_noperm: User, api_client: APIClient, method: str) -> None: """must yield forbidden without permission""" assert getattr(api_client, method)( "/crashmanager/rest/inbox/", {} @@ -52,7 +55,7 @@ def test_rest_notifications_no_perm(user_noperm, api_client, method): ("put", "/crashmanager/rest/inbox/", "normal"), ("put", "/crashmanager/rest/inbox/", "restricted"), ], indirect=["user"]) -def test_rest_notifications_methods(api_client, user, method, url): +def test_rest_notifications_methods(api_client: APIClient, user: User, method: str, url: str) -> None: """must yield method-not-allowed for unsupported methods""" assert getattr(api_client, method)(url, {}).status_code == requests.codes["method_not_allowed"] @@ -69,13 +72,13 @@ def test_rest_notifications_methods(api_client, user, method, url): ("put", "/crashmanager/rest/inbox/1/", "normal"), ("put", "/crashmanager/rest/inbox/1/", "restricted"), ], indirect=["user"]) -def test_rest_notifications_methods_not_found(api_client, user, method, url): +def test_rest_notifications_methods_not_found(api_client: APIClient, user: User, method: str, url: str) -> None: """must yield not-found for undeclared methods""" assert getattr(api_client, method)(url, {}).status_code == requests.codes["not_found"] @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) -def test_rest_notifications_list_unread(api_client, user, cm): +def test_rest_notifications_list_unread(api_client: APIClient, user: User, cm: _cm_result) -> None: """test that list returns the right notifications""" provider = BugProvider.objects.create(classname="BugzillaProvider", hostname="provider.com", @@ -131,7 +134,7 @@ def test_rest_notifications_list_unread(api_client, user, cm): @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) -def test_rest_notifications_mark_as_read(api_client, user, cm): +def test_rest_notifications_mark_as_read(api_client: APIClient, user: User, cm: _cm_result) -> None: """test that mark_as_read only marks the targetted notification as read""" bucket = Bucket.objects.create(signature=json.dumps( {"symptoms": [{"src": "stderr", "type": "output", "value": "/match/"}]} @@ -161,7 +164,7 @@ def test_rest_notifications_mark_as_read(api_client, user, cm): @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) -def test_rest_notifications_mark_all_as_read(api_client, user, cm): +def test_rest_notifications_mark_all_as_read(api_client: APIClient, user: User, cm: _cm_result) -> None: """test that mark_all_as_read marks all user notifications as read""" bucket = Bucket.objects.create(signature=json.dumps( {"symptoms": [{"src": "stderr", "type": "output", "value": "/match/"}]} diff --git a/server/crashmanager/tests/test_signatures.py b/server/crashmanager/tests/test_signatures.py index 3ae644479..979962e8a 100644 --- a/server/crashmanager/tests/test_signatures.py +++ b/server/crashmanager/tests/test_signatures.py @@ -17,8 +17,10 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse from crashmanager.models import Bucket, BucketWatch, CrashEntry +from crashmanager.tests.conftest import _cm_result from . import assert_contains @@ -32,7 +34,7 @@ ("crashmanager:sigtry", {'sigid': 0, 'crashid': 0}), ("crashmanager:signew", {}), ("crashmanager:sigedit", {'sigid': 1})]) -def test_signatures_no_login(client, name, kwargs): +def test_signatures_no_login(client: Client, name: str, kwargs: dict[str, int]) -> None: """Request without login hits the login redirect""" path = reverse(name, kwargs=kwargs) resp = client.get(path) @@ -40,7 +42,7 @@ def test_signatures_no_login(client, name, kwargs): assert resp.url == '/login/?next=' + path -def test_signatures_view(client): # pylint: disable=invalid-name +def test_signatures_view(client: Client) -> None: # pylint: disable=invalid-name """Check that the Vue component is called""" client.login(username='test', password='test') response = client.get(reverse("crashmanager:signatures")) @@ -49,7 +51,7 @@ def test_signatures_view(client): # pylint: disable=invalid-name assert_contains(response, 'signatureslist') -def test_del_signature_simple_get(client, cm): # pylint: disable=invalid-name +def test_del_signature_simple_get(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """No errors are thrown in template""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription='bucket #1') @@ -66,7 +68,7 @@ def test_del_signature_simple_get(client, cm): # pylint: disable=invalid-name assert_contains(response, "Also delete all %d entries with this bucket" % 1) -def test_find_signature_simple_get(client, cm): # pylint: disable=invalid-name +def test_find_signature_simple_get(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """No errors are thrown in template""" client.login(username='test', password='test') crash = cm.create_crash() @@ -80,7 +82,7 @@ def test_find_signature_simple_get(client, cm): # pylint: disable=invalid-name assert response.status_code == requests.codes['ok'] -def test_opt_signature_simple_get(client, cm): # pylint: disable=invalid-name +def test_opt_signature_simple_get(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """No errors are thrown in template""" client.login(username='test', password='test') bucket = cm.create_bucket(signature=json.dumps({"symptoms": [ @@ -92,7 +94,7 @@ def test_opt_signature_simple_get(client, cm): # pylint: disable=invalid-name assert response.status_code == requests.codes['ok'] -def test_try_signature_simple_get(client, cm): # pylint: disable=invalid-name +def test_try_signature_simple_get(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """No errors are thrown in template""" client.login(username='test', password='test') bucket = cm.create_bucket(signature=json.dumps({"symptoms": [ @@ -105,7 +107,7 @@ def test_try_signature_simple_get(client, cm): # pylint: disable=invalid-name assert response.status_code == requests.codes['ok'] -def test_new_signature_view(client): +def test_new_signature_view(client: Client) -> None: """Check that the Vue component is called""" client.login(username='test', password='test') response = client.get(reverse("crashmanager:signew")) @@ -114,7 +116,7 @@ def test_new_signature_view(client): assert_contains(response, 'createoredit') -def test_edit_signature_view(client, cm): # pylint: disable=invalid-name +def test_edit_signature_view(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Check that the Vue component is called""" client.login(username='test', password='test') sig = json.dumps({ @@ -132,7 +134,7 @@ def test_edit_signature_view(client, cm): # pylint: disable=invalid-name assert response.context['bucketId'] == bucket.pk -def test_del_signature_empty(client, cm): # pylint: disable=invalid-name +def test_del_signature_empty(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Test deleting a signature with no crashes""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription='bucket #1') @@ -143,7 +145,7 @@ def test_del_signature_empty(client, cm): # pylint: disable=invalid-name assert not Bucket.objects.count() -def test_del_signature_leave_entries(client, cm): # pylint: disable=invalid-name +def test_del_signature_leave_entries(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Test deleting a signature with crashes and leave entries""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription='bucket #1') @@ -157,7 +159,7 @@ def test_del_signature_leave_entries(client, cm): # pylint: disable=invalid-nam assert crash.bucket is None -def test_del_signature_del_entries(client, cm): # pylint: disable=invalid-name +def test_del_signature_del_entries(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Test deleting a signature with crashes and removing entries""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription='bucket #1') @@ -170,7 +172,7 @@ def test_del_signature_del_entries(client, cm): # pylint: disable=invalid-name assert not CrashEntry.objects.count() -def test_watch_signature_empty(client): +def test_watch_signature_empty(client: Client) -> None: """If no watched signatures, that should be shown""" client.login(username='test', password='test') response = client.get(reverse('crashmanager:sigwatch')) @@ -178,7 +180,7 @@ def test_watch_signature_empty(client): assert_contains(response, "Displaying 0 watched signature entries from the database.") -def test_watch_signature_buckets(client, cm): # pylint: disable=invalid-name +def test_watch_signature_buckets(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Watched signatures should be listed""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription='bucket #1') @@ -191,7 +193,7 @@ def test_watch_signature_buckets(client, cm): # pylint: disable=invalid-name assert siglist[0] == bucket -def test_watch_signature_buckets_new_crashes(client, cm): # pylint: disable=invalid-name +def test_watch_signature_buckets_new_crashes(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Watched signatures should show new crashes""" client.login(username='test', password='test') buckets = (cm.create_bucket(shortDescription='bucket #1'), @@ -212,7 +214,7 @@ def test_watch_signature_buckets_new_crashes(client, cm): # pylint: disable=inv assert not siglist[1].newCrashes -def test_watch_signature_del(client, cm): # pylint: disable=invalid-name +def test_watch_signature_del(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Deleting a signature watch""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription='bucket #1') @@ -229,7 +231,7 @@ def test_watch_signature_del(client, cm): # pylint: disable=invalid-name assert response.url == reverse('crashmanager:sigwatch') -def test_watch_signature_delsig(client, cm): # pylint: disable=invalid-name +def test_watch_signature_delsig(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Deleting a watched signature""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription='bucket #1') @@ -238,7 +240,7 @@ def test_watch_signature_delsig(client, cm): # pylint: disable=invalid-name assert not BucketWatch.objects.count() -def test_watch_signature_update(client, cm): # pylint: disable=invalid-name +def test_watch_signature_update(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Updating a signature watch""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription="bucket #1") @@ -255,7 +257,7 @@ def test_watch_signature_update(client, cm): # pylint: disable=invalid-name assert watch.lastCrash == crash2.pk -def test_watch_signature_new(client, cm): # pylint: disable=invalid-name +def test_watch_signature_new(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Creating a signature watch""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription="bucket #1") @@ -270,7 +272,7 @@ def test_watch_signature_new(client, cm): # pylint: disable=invalid-name assert watch.lastCrash == crash.pk -def test_watch_signature_crashes(client, cm): # pylint: disable=invalid-name +def test_watch_signature_crashes(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Crashes in a signature watch should be shown correctly.""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription='bucket #1') diff --git a/server/crashmanager/tests/test_signatures_rest.py b/server/crashmanager/tests/test_signatures_rest.py index 29d88636f..a8af967fd 100644 --- a/server/crashmanager/tests/test_signatures_rest.py +++ b/server/crashmanager/tests/test_signatures_rest.py @@ -16,10 +16,12 @@ import logging import pytest import requests +from django.contrib.auth.models import User as DjangoUser from django.urls import reverse +from rest_framework.test import APIClient from rest_framework import status -from crashmanager.models import Bucket, Bug, CrashEntry -from .conftest import _create_user +from crashmanager.models import Bucket, Bug, CrashEntry, User +from crashmanager.tests.conftest import _cm_result, _create_user # What should be allowed: # @@ -52,7 +54,7 @@ LOG = logging.getLogger("fm.crashmanager.tests.signatures.rest") -def _compare_rest_result_to_bucket(result, bucket, size, quality, best_entry=None, latest=None, hist=[], vue=False): +def _compare_rest_result_to_bucket(result: dict[str, object], bucket: Bucket, size: int, quality: int, best_entry: int | None = None, latest: int | None = None, hist: list[dict[str, object]] = [], vue: bool = False) -> None: attributes = { 'best_entry', 'best_quality', 'bug', 'frequent', 'id', 'permanent', 'shortDescription', 'signature', 'size', 'has_optimization', 'latest_entry', @@ -87,14 +89,14 @@ def _compare_rest_result_to_bucket(result, bucket, size, quality, best_entry=Non @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/buckets/", "/crashmanager/rest/buckets/1/"]) -def test_rest_signatures_no_auth(db, api_client, method, url): +def test_rest_signatures_no_auth(db: None, api_client: APIClient, method: str, url: str) -> None: """must yield unauthorized without authentication""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['unauthorized'] @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/buckets/", "/crashmanager/rest/buckets/1/"]) -def test_rest_signatures_no_perm(user_noperm, api_client, method, url): +def test_rest_signatures_no_perm(user_noperm: User, api_client: APIClient, method: str, url: str) -> None: """must yield forbidden without permission""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['forbidden'] @@ -114,7 +116,7 @@ def test_rest_signatures_no_perm(user_noperm, api_client, method, url): ("put", "/crashmanager/rest/buckets/1/", "normal"), ("put", "/crashmanager/rest/buckets/1/", "restricted"), ], indirect=["user"]) -def test_rest_signatures_methods(api_client, user, method, url): +def test_rest_signatures_methods(api_client: APIClient, user: User, method: str, url: str) -> None: """must yield method-not-allowed for unsupported methods""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['method_not_allowed'] @@ -122,7 +124,7 @@ def test_rest_signatures_methods(api_client, user, method, url): @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("ignore_toolfilter", [True, False]) @pytest.mark.parametrize("vue", [True, False]) -def test_rest_signatures_list(api_client, cm, user, ignore_toolfilter, vue): +def test_rest_signatures_list(api_client: APIClient, cm: _cm_result, user: DjangoUser, ignore_toolfilter: bool, vue: bool) -> None: """test that buckets can be listed""" bucket1 = cm.create_bucket(shortDescription="bucket #1") bucket2 = cm.create_bucket(shortDescription="bucket #2") @@ -179,7 +181,7 @@ def test_rest_signatures_list(api_client, cm, user, ignore_toolfilter, vue): @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("ignore_toolfilter", [True, False]) -def test_rest_signatures_retrieve(api_client, cm, user, ignore_toolfilter): +def test_rest_signatures_retrieve(api_client: APIClient, cm: _cm_result, user: DjangoUser, ignore_toolfilter: bool) -> None: """test that individual Signature can be fetched""" bucket1 = cm.create_bucket(shortDescription="bucket #1") bucket2 = cm.create_bucket(shortDescription="bucket #2") @@ -230,7 +232,7 @@ def test_rest_signatures_retrieve(api_client, cm, user, ignore_toolfilter): @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("from_crash", [False, True]) -def test_new_signature_create(api_client, cm, user, from_crash): # pylint: disable=invalid-name +def test_new_signature_create(api_client: APIClient, cm: _cm_result, user: DjangoUser, from_crash: bool) -> None: # pylint: disable=invalid-name if from_crash: if user.username == 'test-restricted': _create_user('test') @@ -279,7 +281,7 @@ def test_new_signature_create(api_client, cm, user, from_crash): # pylint: disa @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("many", [False, True]) -def test_new_signature_create_w_reassign(api_client, cm, user, many): # pylint: disable=invalid-name +def test_new_signature_create_w_reassign(api_client: APIClient, cm: _cm_result, user: User, many: bool) -> None: # pylint: disable=invalid-name if many: crashes = [cm.create_crash(shortSignature='crash #1', stderr="blah") for _ in range(201)] else: @@ -320,7 +322,7 @@ def test_new_signature_create_w_reassign(api_client, cm, user, many): # pylint: @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) @pytest.mark.parametrize("many", [False, True]) -def test_new_signature_preview(api_client, cm, user, many): # pylint: disable=invalid-name +def test_new_signature_preview(api_client: APIClient, cm: _cm_result, user: User, many: bool) -> None: # pylint: disable=invalid-name if many: crashes = [cm.create_crash(shortSignature='crash #1', stderr="blah") for _ in range(201)] else: @@ -367,7 +369,7 @@ def test_new_signature_preview(api_client, cm, user, many): # pylint: disable=i @pytest.mark.parametrize("user", ["normal"], indirect=True) -def test_edit_signature_edit(api_client, cm, user): # pylint: disable=invalid-name +def test_edit_signature_edit(api_client: APIClient, cm: _cm_result, user: User) -> None: # pylint: disable=invalid-name bucket = cm.create_bucket() crash = cm.create_crash(shortSignature='crash #1', stderr="blah") sig = json.dumps({ @@ -401,7 +403,7 @@ def test_edit_signature_edit(api_client, cm, user): # pylint: disable=invalid-n @pytest.mark.parametrize("user", ["normal"], indirect=True) @pytest.mark.parametrize("many", [False, True]) -def test_edit_signature_edit_w_reassign(api_client, cm, user, many): # pylint: disable=invalid-name +def test_edit_signature_edit_w_reassign(api_client: APIClient, cm: _cm_result, user: User, many: bool) -> None: # pylint: disable=invalid-name bucket = cm.create_bucket() if many: crashes = [cm.create_crash(shortSignature='crash #1', stderr="blah") for _ in range(201)] @@ -443,7 +445,7 @@ def test_edit_signature_edit_w_reassign(api_client, cm, user, many): # pylint: @pytest.mark.parametrize("user", ["normal"], indirect=True) @pytest.mark.parametrize("many", [False, True]) -def test_edit_signature_edit_preview(api_client, cm, user, many): # pylint: disable=invalid-name +def test_edit_signature_edit_preview(api_client: APIClient, cm: _cm_result, user: User, many: bool) -> None: # pylint: disable=invalid-name bucket = cm.create_bucket() if many: crashes1 = [cm.create_crash(shortSignature='crash #1', stderr="foo", bucket=bucket) for _ in range(201)] @@ -501,7 +503,7 @@ def test_edit_signature_edit_preview(api_client, cm, user, many): # pylint: dis assert in_list[0]['id'] == crash2.pk -def test_edit_signature_set_frequent(api_client, cm, user_normal): +def test_edit_signature_set_frequent(api_client: APIClient, cm: _cm_result, user_normal: User) -> None: """test that partial_update action marks a signature frequent without touching anything else""" bug = cm.create_bug('123') sig = json.dumps({ @@ -524,7 +526,7 @@ def test_edit_signature_set_frequent(api_client, cm, user_normal): assert bucket.bug == bug -def test_edit_signature_unassign_external_bug(api_client, cm, user_normal): +def test_edit_signature_unassign_external_bug(api_client: APIClient, cm: _cm_result, user_normal: User) -> None: """test that partial_update action marks a signature frequent without touching anything else""" bug = cm.create_bug('123') sig = json.dumps({ @@ -545,7 +547,7 @@ def test_edit_signature_unassign_external_bug(api_client, cm, user_normal): assert bucket.bug is None -def test_edit_signature_assign_external_bug(api_client, cm, user_normal): +def test_edit_signature_assign_external_bug(api_client: APIClient, cm: _cm_result, user_normal: User) -> None: """test that partial_update action create a new Bug and assign it to this Bucket""" provider = cm.create_bugprovider(hostname='test-provider.com', urlTemplate='test-provider.com/template') sig = json.dumps({ diff --git a/server/crashmanager/tests/test_stats.py b/server/crashmanager/tests/test_stats.py index 5949d00ce..5c48c3065 100644 --- a/server/crashmanager/tests/test_stats.py +++ b/server/crashmanager/tests/test_stats.py @@ -19,6 +19,11 @@ from django.urls import reverse from . import assert_contains +from django.contrib.auth.models import User +from django.test.client import Client + +from crashmanager.tests.conftest import _cm_result + LOG = logging.getLogger("fm.crashmanager.tests.stats") VIEW_NAME = "crashmanager:stats" @@ -26,7 +31,7 @@ pytestmark = pytest.mark.usefixtures("crashmanager_test") # pylint: disable=invalid-name -def test_stats_view_no_login(client): +def test_stats_view_no_login(client: Client) -> None: """Request without login hits the login redirect""" path = reverse(VIEW_NAME) resp = client.get(path) @@ -34,7 +39,7 @@ def test_stats_view_no_login(client): assert resp.url == '/login/?next=' + path -def test_stats_view_no_crashes(client): +def test_stats_view_no_crashes(client: Client) -> None: """If no crashes in db, an appropriate message is shown.""" client.login(username='test', password='test') response = client.get(reverse(VIEW_NAME)) @@ -44,7 +49,7 @@ def test_stats_view_no_crashes(client): assert not response.context['frequentBuckets'] -def test_stats_view_with_crash(client, cm): # pylint: disable=invalid-name +def test_stats_view_with_crash(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Insert one crash and check that it is shown ok.""" client.login(username='test', password='test') cm.create_crash(shortSignature="crash #1") @@ -55,7 +60,7 @@ def test_stats_view_with_crash(client, cm): # pylint: disable=invalid-name assert not response.context['frequentBuckets'] -def test_stats_view_with_crashes(client, cm): # pylint: disable=invalid-name +def test_stats_view_with_crashes(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Insert crashes and check that they are shown ok.""" client.login(username='test', password='test') bucket = cm.create_bucket(shortDescription="bucket #1") @@ -74,7 +79,7 @@ def test_stats_view_with_crashes(client, cm): # pylint: disable=invalid-name assert response_buckets[0].rph == 2 -def test_stats_view_old(client, cm): # pylint: disable=invalid-name +def test_stats_view_old(client: Client, cm: _cm_result) -> None: # pylint: disable=invalid-name """Insert one crash in the past and check that it is not shown.""" client.login(username='test', password='test') crash = cm.create_crash(shortSignature="crash #1") diff --git a/server/crashmanager/tests/test_templates_rest.py b/server/crashmanager/tests/test_templates_rest.py index 13cbf2f7a..e809abe37 100644 --- a/server/crashmanager/tests/test_templates_rest.py +++ b/server/crashmanager/tests/test_templates_rest.py @@ -5,6 +5,11 @@ import logging import pytest import requests +from rest_framework.test import APIClient + +from django.contrib.auth.models import User +from crashmanager.models import BugzillaTemplate +from crashmanager.tests.conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.templates.rest") @@ -12,14 +17,14 @@ @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/bugzilla/templates/", "/crashmanager/rest/bugzilla/templates/1/"]) -def test_rest_templates_no_auth(db, api_client, method, url): +def test_rest_templates_no_auth(db: None, api_client: APIClient, method: str, url: str) -> None: """must yield unauthorized without authentication""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['unauthorized'] @pytest.mark.parametrize("method", ["delete", "get", "patch", "post", "put"]) @pytest.mark.parametrize("url", ["/crashmanager/rest/bugzilla/templates/", "/crashmanager/rest/bugzilla/templates/1/"]) -def test_rest_templates_no_perm(user_noperm, api_client, method, url): +def test_rest_templates_no_perm(user_noperm: User, api_client: APIClient, method: str, url: str) -> None: """must yield forbidden without permission""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['forbidden'] @@ -42,12 +47,12 @@ def test_rest_templates_no_perm(user_noperm, api_client, method, url): ("put", "/crashmanager/rest/bugzilla/templates/1/", "normal"), ("put", "/crashmanager/rest/bugzilla/templates/1/", "restricted"), ], indirect=["user"]) -def test_rest_templates_methods(api_client, user, method, url): +def test_rest_templates_methods(api_client: APIClient, user: str, method: str, url: str) -> None: """must yield method-not-allowed for unsupported methods""" assert getattr(api_client, method)(url, {}).status_code == requests.codes['method_not_allowed'] -def _compare_rest_result_to_template(result, template): +def _compare_rest_result_to_template(result: dict[str, str], template: BugzillaTemplate) -> None: expected_fields = { "id", "mode", "name", "comment", "product", "component", "summary", "version", "description", "op_sys", "platform", "priority", "severity", "alias", "cc", @@ -63,7 +68,7 @@ def _compare_rest_result_to_template(result, template): @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) -def test_rest_templates_list(api_client, user, cm): +def test_rest_templates_list(api_client: APIClient, user: str, cm: _cm_result) -> None: """test that list returns the right templates""" expected = 4 templates = [cm.create_template(name="template #%d" % (i + 1), @@ -86,7 +91,7 @@ def test_rest_templates_list(api_client, user, cm): @pytest.mark.parametrize("user", ["normal", "restricted"], indirect=True) -def test_rest_templates_retrieve(api_client, user, cm): +def test_rest_templates_retrieve(api_client: APIClient, user: str, cm: _cm_result) -> None: """test that retrieve returns the right template""" expected = 4 templates = [cm.create_template(name="template #%d" % (i + 1), diff --git a/server/crashmanager/tests/test_user_settings.py b/server/crashmanager/tests/test_user_settings.py index 0b8a78166..41405d369 100644 --- a/server/crashmanager/tests/test_user_settings.py +++ b/server/crashmanager/tests/test_user_settings.py @@ -15,7 +15,9 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse +from crashmanager.tests.conftest import _cm_result from crashmanager.models import Tool, User @@ -23,7 +25,7 @@ pytestmark = pytest.mark.usefixtures("crashmanager_test") -def test_user_settings_no_login(client) -> None: +def test_user_settings_no_login(client: Client) -> None: """Request without login hits the login redirect""" path = reverse("crashmanager:usersettings") resp = client.get(path) @@ -31,7 +33,7 @@ def test_user_settings_no_login(client) -> None: assert resp.url == '/login/?next=' + path -def test_user_settings_simple_get(client) -> None: +def test_user_settings_simple_get(client: Client) -> None: """No errors are thrown in template""" client.login(username='test', password='test') path = reverse("crashmanager:usersettings") @@ -41,7 +43,7 @@ def test_user_settings_simple_get(client) -> None: assert response.context['user'] == User.objects.get(user__username='test').user -def test_user_settings_edit(client, cm) -> None: +def test_user_settings_edit(client: Client, cm: _cm_result) -> None: """No errors are thrown in template""" tools = [Tool.objects.create(name="Tool #%d" % (i + 1)) for i in range(2)] providers = [ From 8780df0672e41bec3cd6d32b5faca8ad220fda9b Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 5 Feb 2022 20:33:47 -0800 Subject: [PATCH 096/137] 1157 mypy issues left --- server/crashmanager/tests/test_stats.py | 1 - server/ec2spotmanager/tests/test_status_rest.py | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/crashmanager/tests/test_stats.py b/server/crashmanager/tests/test_stats.py index 5c48c3065..f87e315e0 100644 --- a/server/crashmanager/tests/test_stats.py +++ b/server/crashmanager/tests/test_stats.py @@ -19,7 +19,6 @@ from django.urls import reverse from . import assert_contains -from django.contrib.auth.models import User from django.test.client import Client from crashmanager.tests.conftest import _cm_result diff --git a/server/ec2spotmanager/tests/test_status_rest.py b/server/ec2spotmanager/tests/test_status_rest.py index 374262b86..43d6d38d6 100644 --- a/server/ec2spotmanager/tests/test_status_rest.py +++ b/server/ec2spotmanager/tests/test_status_rest.py @@ -19,6 +19,7 @@ import pytest from django.contrib.auth.models import User from ec2spotmanager.models import Instance +from rest_framework.test import APIClient from . import create_instance @@ -26,7 +27,7 @@ pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") # pylint: disable=invalid-name -def test_rest_status_no_auth(api_client): +def test_rest_status_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/ec2spotmanager/rest/report/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -36,7 +37,7 @@ def test_rest_status_no_auth(api_client): assert api_client.delete(url, {}).status_code == requests.codes['unauthorized'] -def test_rest_status_no_perm(api_client): +def test_rest_status_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -48,7 +49,7 @@ def test_rest_status_no_perm(api_client): assert api_client.delete(url, {}).status_code == requests.codes['forbidden'] -def test_rest_status_get(api_client): +def test_rest_status_get(api_client: APIClient) -> None: """get always returns an empty object""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -58,7 +59,7 @@ def test_rest_status_get(api_client): assert resp == {} -def test_rest_status_report(api_client): +def test_rest_status_report(api_client: APIClient) -> None: """post should update the status field on the instance""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -79,7 +80,7 @@ def test_rest_status_report(api_client): assert resp.status_code == requests.codes['not_found'] -def test_rest_status_report2(api_client): +def test_rest_status_report2(api_client: APIClient) -> None: """post should update the status field on the instance""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -101,7 +102,7 @@ def test_rest_status_report2(api_client): assert host1.status_data == 'data' -def test_rest_status_put(api_client): +def test_rest_status_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -109,7 +110,7 @@ def test_rest_status_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_status_delete(api_client): +def test_rest_status_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -117,7 +118,7 @@ def test_rest_status_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_status_patch(api_client): +def test_rest_status_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) From 2c8a9ae006243e4678fb3f28b59efaad09ec9dc4 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 6 Feb 2022 20:20:22 -0800 Subject: [PATCH 097/137] 1037 mypy issues left --- server/ec2spotmanager/models.py | 8 ++-- server/ec2spotmanager/tests/__init__.py | 33 +++++++-------- .../ec2spotmanager/tests/test_configs_rest.py | 41 ++++++++++--------- .../ec2spotmanager/tests/test_status_rest.py | 12 +++--- 4 files changed, 48 insertions(+), 46 deletions(-) diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index 185bfc6b0..6e08dcf87 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -27,7 +27,7 @@ class FlatObject(dict): class OverwritingStorage(FileSystemStorage): - def get_available_name(self, name, max_length=None): + def get_available_name(self, name: str, max_length: int | None = None) -> str: if self.exists(name): os.remove(os.path.join(getattr(settings, 'USERDATA_STORAGE', None), name)) return name @@ -66,7 +66,7 @@ class PoolConfiguration(models.Model): def __init__(self, *args, **kwargs) -> None: # These variables can hold temporarily deserialized data self.instance_tags_dict = None - self.instance_tags_override = None + self.instance_tags_override: bool | None = None self.ec2_raw_config_dict = None self.ec2_raw_config_override = None self.ec2_userdata_macros_dict = None @@ -140,7 +140,7 @@ def __init__(self, *args, **kwargs) -> None: super(PoolConfiguration, self).__init__(*args, **kwargs) - def flatten(self, cache=None): + def flatten(self, cache=None) -> FlatObject: # cache is optionally a prefetched {config_id: config} dictionary used for parent lookups if self.isCyclic(cache): raise RuntimeError("Attempted to flatten a cyclic configuration") @@ -212,7 +212,7 @@ def flatten(self, cache=None): return flat_parent_config - def save(self, *args, **kwargs): + def save(self, *args, **kwargs) -> None: # Reserialize data, then call regular save method for field in self.dict_config_fields: obj = getattr(self, field + "_dict") diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index c9e53e5b3..3fdc269bf 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -13,6 +13,7 @@ from __future__ import annotations import logging +from typing import cast from django.core.files.base import ContentFile from django.http.response import HttpResponse from django.test import SimpleTestCase as DjangoTestCase @@ -43,14 +44,14 @@ def runTest(self) -> None: def create_config(name, parent=None, size=None, cycle_interval=None, ec2_key_name=None, ec2_security_groups=None, ec2_instance_types=None, ec2_image_name=None, ec2_userdata_macros=None, ec2_allowed_regions=None, max_price=None, instance_tags=None, ec2_raw_config=None, ec2_userdata=None, gce_image_name=None, - gce_container_name=None, gce_disk_size=None): - result = PoolConfiguration.objects.create(name=name, parent=parent, size=size, cycle_interval=cycle_interval, - ec2_key_name=ec2_key_name, - ec2_image_name=ec2_image_name, - max_price=max_price, - gce_image_name=gce_image_name, - gce_disk_size=gce_disk_size, - gce_container_name=gce_container_name) + gce_container_name=None, gce_disk_size=None) -> PoolConfiguration: + result = cast(PoolConfiguration, PoolConfiguration.objects.create(name=name, parent=parent, size=size, cycle_interval=cycle_interval, + ec2_key_name=ec2_key_name, + ec2_image_name=ec2_image_name, + max_price=max_price, + gce_image_name=gce_image_name, + gce_disk_size=gce_disk_size, + gce_container_name=gce_container_name)) if ec2_security_groups is not None: result.ec2_security_groups_list = ec2_security_groups if ec2_instance_types is not None: @@ -72,14 +73,14 @@ def create_config(name, parent=None, size=None, cycle_interval=None, ec2_key_nam return result -def create_pool(config, enabled=False, last_cycled=None): - result = InstancePool.objects.create(config=config, isEnabled=enabled, last_cycled=last_cycled) +def create_pool(config, enabled=False, last_cycled=None) -> InstancePool: + result = cast(InstancePool, InstancePool.objects.create(config=config, isEnabled=enabled, last_cycled=last_cycled)) LOG.debug("Created InstancePool pk=%d", result.pk) return result -def create_poolmsg(pool): - result = PoolStatusEntry.objects.create(pool=pool, type=0) +def create_poolmsg(pool) -> PoolStatusEntry: + result = cast(PoolStatusEntry, PoolStatusEntry.objects.create(pool=pool, type=0)) LOG.debug("Created PoolStatusEntry pk=%d", result.pk) return result @@ -93,11 +94,11 @@ def create_instance(hostname, ec2_zone="", size=1, created=None, - provider='EC2Spot'): + provider='EC2Spot') -> Instance: if created is None: created = timezone.now() - result = Instance.objects.create(pool=pool, hostname=hostname, status_code=status_code, status_data=status_data, - instance_id=ec2_instance_id, region=ec2_region, zone=ec2_zone, size=size, - created=created, provider=provider) + result = cast(Instance, Instance.objects.create(pool=pool, hostname=hostname, status_code=status_code, status_data=status_data, + instance_id=ec2_instance_id, region=ec2_region, zone=ec2_zone, size=size, + created=created, provider=provider)) LOG.debug("Created Instance pk=%d", result.pk) return result diff --git a/server/ec2spotmanager/tests/test_configs_rest.py b/server/ec2spotmanager/tests/test_configs_rest.py index 017cc1675..cb0769524 100644 --- a/server/ec2spotmanager/tests/test_configs_rest.py +++ b/server/ec2spotmanager/tests/test_configs_rest.py @@ -18,6 +18,7 @@ import requests from django.contrib.auth.models import User import pytest +from rest_framework.test import APIClient from . import create_config @@ -25,7 +26,7 @@ pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") # pylint: disable=invalid-name -def test_rest_pool_configs_no_auth(api_client): +def test_rest_pool_configs_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/ec2spotmanager/rest/configurations/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -35,7 +36,7 @@ def test_rest_pool_configs_no_auth(api_client): assert api_client.delete(url).status_code == requests.codes['unauthorized'] -def test_rest_pool_configs_no_perm(api_client): +def test_rest_pool_configs_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -47,7 +48,7 @@ def test_rest_pool_configs_no_perm(api_client): assert api_client.delete(url).status_code == requests.codes['forbidden'] -def test_rest_pool_configs_auth(api_client): +def test_rest_pool_configs_auth(api_client: APIClient) -> None: """test that authenticated requests work""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -55,7 +56,7 @@ def test_rest_pool_configs_auth(api_client): assert resp.status_code == requests.codes['ok'] -def test_rest_pool_configs_patch(api_client): +def test_rest_pool_configs_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -63,7 +64,7 @@ def test_rest_pool_configs_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_configs_put(api_client): +def test_rest_pool_configs_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -71,7 +72,7 @@ def test_rest_pool_configs_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_configs_post(api_client): +def test_rest_pool_configs_post(api_client: APIClient) -> None: """post should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -79,7 +80,7 @@ def test_rest_pool_configs_post(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_configs_delete(api_client): +def test_rest_pool_configs_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -87,7 +88,7 @@ def test_rest_pool_configs_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_configs_list_no_configs(api_client): +def test_rest_pool_configs_list_no_configs(api_client: APIClient) -> None: """test empty response to config list""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -102,7 +103,7 @@ def test_rest_pool_configs_list_no_configs(api_client): assert len(resp) == 0 -def test_rest_pool_configs_list_configs(api_client): +def test_rest_pool_configs_list_configs(api_client: APIClient) -> None: """test that configs can be listed""" cfg1 = create_config(name='config #1', size=1234567, @@ -158,7 +159,7 @@ def test_rest_pool_configs_list_configs(api_client): assert not resp[0]['ec2_userdata_macros_override'] -def test_rest_pool_config_no_auth(api_client): +def test_rest_pool_config_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/ec2spotmanager/rest/configurations/1/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -168,7 +169,7 @@ def test_rest_pool_config_no_auth(api_client): assert api_client.delete(url).status_code == requests.codes['unauthorized'] -def test_rest_pool_config_no_perm(api_client): +def test_rest_pool_config_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -180,7 +181,7 @@ def test_rest_pool_config_no_perm(api_client): assert api_client.delete(url).status_code == requests.codes['forbidden'] -def test_rest_pool_config_auth(api_client): +def test_rest_pool_config_auth(api_client: APIClient) -> None: """test that authenticated requests work""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -188,7 +189,7 @@ def test_rest_pool_config_auth(api_client): assert resp.status_code == requests.codes['ok'] -def test_rest_pool_config_delete(api_client): +def test_rest_pool_config_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -196,7 +197,7 @@ def test_rest_pool_config_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_config_patch(api_client): +def test_rest_pool_config_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -204,7 +205,7 @@ def test_rest_pool_config_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_config_put(api_client): +def test_rest_pool_config_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -212,7 +213,7 @@ def test_rest_pool_config_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_config_post(api_client): +def test_rest_pool_config_post(api_client: APIClient) -> None: """post should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -220,7 +221,7 @@ def test_rest_pool_config_post(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_config_get_0(api_client): +def test_rest_pool_config_get_0(api_client: APIClient) -> None: """test that non-existent PoolConfiguration is error""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -228,7 +229,7 @@ def test_rest_pool_config_get_0(api_client): assert resp.status_code == requests.codes['not_found'] -def test_rest_pool_config_get_1(api_client): +def test_rest_pool_config_get_1(api_client: APIClient) -> None: """test that individual PoolConfiguration can be fetched""" cfg1 = create_config(name='config #1', size=1234567, @@ -278,7 +279,7 @@ def test_rest_pool_config_get_1(api_client): assert not resp['ec2_userdata_macros_override'] -def test_rest_pool_config_get_sub(api_client): +def test_rest_pool_config_get_sub(api_client: APIClient) -> None: """test that inherited Signature can be fetched unflattened""" cfg1 = create_config(name='config #1', size=1234567, @@ -329,7 +330,7 @@ def test_rest_pool_config_get_sub(api_client): assert not resp['ec2_userdata_macros_override'] -def test_rest_pool_config_get_sub_flat(api_client): +def test_rest_pool_config_get_sub_flat(api_client: APIClient) -> None: """test that inherited Signature can be fetched flattened""" cfg1 = create_config(name='config #1', size=1234567, diff --git a/server/ec2spotmanager/tests/test_status_rest.py b/server/ec2spotmanager/tests/test_status_rest.py index 43d6d38d6..b1af3c474 100644 --- a/server/ec2spotmanager/tests/test_status_rest.py +++ b/server/ec2spotmanager/tests/test_status_rest.py @@ -64,9 +64,9 @@ def test_rest_status_report(api_client: APIClient) -> None: user = User.objects.get(username='test') api_client.force_authenticate(user=user) host = create_instance('host1') - resp = api_client.post('/ec2spotmanager/rest/report/', {'client': 'host1', 'status_data': 'data'}) - assert resp.status_code == requests.codes['created'] - resp = json.loads(resp.content.decode('utf-8')) + resp_response = api_client.post('/ec2spotmanager/rest/report/', {'client': 'host1', 'status_data': 'data'}) + assert resp_response.status_code == requests.codes['created'] + resp = json.loads(resp_response.content.decode('utf-8')) assert resp == {'status_data': 'data'} host = Instance.objects.get(pk=host.pk) # re-read assert host.status_data == 'data' @@ -86,9 +86,9 @@ def test_rest_status_report2(api_client: APIClient) -> None: api_client.force_authenticate(user=user) host1 = create_instance('host1') host2 = create_instance('host2') - resp = api_client.post('/ec2spotmanager/rest/report/', {'client': 'host1', 'status_data': 'data'}) - assert resp.status_code == requests.codes['created'] - resp = json.loads(resp.content.decode('utf-8')) + resp_response = api_client.post('/ec2spotmanager/rest/report/', {'client': 'host1', 'status_data': 'data'}) + assert resp_response.status_code == requests.codes['created'] + resp = json.loads(resp_response.content.decode('utf-8')) assert resp == {'status_data': 'data'} host1 = Instance.objects.get(pk=host1.pk) # re-read assert host1.status_data == 'data' From d44b5862b396473dd189bd0cba348823ba3a6a3a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 6 Feb 2022 21:25:10 -0800 Subject: [PATCH 098/137] 928 mypy issues left --- .../management/commands/export_signatures.py | 3 +- server/crashmanager/templatetags/extratags.py | 12 +-- .../tests/test_mgmt_bug_update_status.py | 3 +- .../CloudProvider/CloudProvider.py | 98 ++++--------------- server/ec2spotmanager/cron.py | 6 +- server/ec2spotmanager/tests/test_configs.py | 25 ++--- .../ec2spotmanager/tests/test_pools_rest.py | 71 +++++++------- server/taskmanager/tests/__init__.py | 13 +-- server/taskmanager/tests/test_pools_rest.py | 15 +-- server/taskmanager/tests/test_tasks_rest.py | 24 ++--- 10 files changed, 110 insertions(+), 160 deletions(-) diff --git a/server/crashmanager/management/commands/export_signatures.py b/server/crashmanager/management/commands/export_signatures.py index 2ea9faf53..b3f294029 100644 --- a/server/crashmanager/management/commands/export_signatures.py +++ b/server/crashmanager/management/commands/export_signatures.py @@ -1,5 +1,6 @@ from __future__ import annotations +import argparse import json from typing import Any from zipfile import ZipFile @@ -14,7 +15,7 @@ class Command(BaseCommand): help = "Export signatures and their metadata." - def add_arguments(self, parser): + def add_arguments(self, parser: argparse.ArgumentParser) -> None: parser.add_argument("filename", help="output filename to write signatures zip to") @mgmt_lock_required diff --git a/server/crashmanager/templatetags/extratags.py b/server/crashmanager/templatetags/extratags.py index 85081c0b2..b5874b382 100644 --- a/server/crashmanager/templatetags/extratags.py +++ b/server/crashmanager/templatetags/extratags.py @@ -8,12 +8,12 @@ @register.filter -def basename(value): +def basename(value: str) -> str: return os.path.basename(value) @register.filter -def linejoin(value): +def linejoin(value: list[str]) -> str: if value: return "\n".join(value) else: @@ -21,12 +21,12 @@ def linejoin(value): @register.filter -def varformat(arg, val): +def varformat(arg: int, val: int) -> int: return arg % val @register.filter -def listcsv(value): +def listcsv(value: list[str]) -> str: if value: return ", ".join(value) else: @@ -34,7 +34,7 @@ def listcsv(value): @register.filter -def dictcsv(value): +def dictcsv(value: dict[str, object]) -> str: if value: return ", ".join("%s=%s" % x for x in value.items()) else: @@ -42,7 +42,7 @@ def dictcsv(value): @register.filter -def jsonparse(value): +def jsonparse(value: str): if value: return json.loads(value) else: diff --git a/server/crashmanager/tests/test_mgmt_bug_update_status.py b/server/crashmanager/tests/test_mgmt_bug_update_status.py index 64e4db2b0..96c753948 100644 --- a/server/crashmanager/tests/test_mgmt_bug_update_status.py +++ b/server/crashmanager/tests/test_mgmt_bug_update_status.py @@ -19,6 +19,7 @@ from django.core.management import call_command, CommandError from notifications.models import Notification import pytest +from pytest_mock import MockerFixture from crashmanager.models import Bucket, Bug, BugProvider, Client, CrashEntry, OS, Platform, \ Product, Tool, User as cmUser @@ -37,7 +38,7 @@ def test_none() -> None: @patch('crashmanager.Bugtracker.BugzillaProvider.BugzillaProvider.getBugStatus', return_value={"0": None}) -def test_fake_with_notification(mock_get_bug_status): +def test_fake_with_notification(mock_get_bug_status: MockerFixture) -> None: provider = BugProvider.objects.create(classname="BugzillaProvider", hostname="provider.com", urlTemplate="%s") diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index 8fa417e06..fa9842a25 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -26,6 +26,8 @@ import six +from ec2spotmanager.models import FlatObject + INSTANCE_STATE_CODE = {-1: "requested", 0: "pending", 16: "running", 32: "shutting-down", 48: "terminated", 64: "stopping", 80: "stopped"} INSTANCE_STATE = dict((val, key) for key, val in INSTANCE_STATE_CODE.items()) @@ -38,7 +40,7 @@ class CloudProviderError(Exception): TYPE: str = 'unclassified' - def __init__(self, message) -> None: + def __init__(self, message: str) -> None: self.message = message def __str__(self) -> str: @@ -77,65 +79,45 @@ class CloudProvider(): Abstract base class that defines what interfaces Cloud Providers must implement ''' @abstractmethod - def terminate_instances(self, instances_ids_by_region): + def terminate_instances(self, instances_ids_by_region: dict[str, int]) -> None: ''' Take a list of running instances and stop them in the cloud provider. - @ptype instances_ids_by_region: dictionary @param instances_ids_by_region: keys are regions and values are instances. - - @rtype: none - @return: none ''' return @abstractmethod - def cancel_requests(self, requested_instances_by_region): + def cancel_requests(self, requested_instances_by_region: dict[str, int]) -> None: ''' Cancel requests that have not become running instances. - @ptype requested_instances_region: dictionary @param requested_instances_region: keys are regions and values are request ids. ''' return @abstractmethod - def start_instances(self, config, region, zone, userdata, image, instance_type, count, tags): + def start_instances(self, config: FlatObject, region: str, zone: str, userdata, image: str, instance_type: str, count: int, tags: dict[str, str]) -> None: ''' Start instances using specified configuration. - @ptype config: FlatObject @param config: flattened config. We use this for any cloud provider specific fields needed to create an instance - - @ptype region: string @param region: region where instances are to be started - - @ptype zone: string @param zone: zone the instances will be started in @ptype userdata: UserData object @param userdata: userdata script for instances - - @ptype image: string @param image: image reference used to start instances - - @ptype instance_type: string @param instance_type: type of instance - - @ptype count: int @param count: number of instances to start - - @ptype tags: dictionary @param tags: instance tags. - - @rtype: list @return: Request IDs given to us by the cloud provider. This can be the instance ID if the provider does not use different IDs for instances and requests. ''' return @abstractmethod - def check_instances_requests(self, region, instances, tags): + def check_instances_requests(self, region: str, instances: list[str], tags: dict[str, str]) -> None: ''' Take a list of requested instances and determines the state of each instance. Since this is the first point we see an actual running instance @@ -148,57 +130,40 @@ def check_instances_requests(self, region, instances, tags): Failed requests will have an action and instance type. Currently, we support actions of 'blacklist' and disable_pool. - @ptype region: string @param region: the region the instances are in - - @ptype instances: list - @param isntances: instance request IDs - - @ptype tags: dictionary + @param instances: instance request IDs @param tags: instance tags. - - @rtype: tuple @return: tuple containing 2 dicts: successful request IDs and failed request IDs. ''' return @abstractmethod - def check_instances_state(self, pool_id, region): + def check_instances_state(self, pool_id: int, region: str) -> None: ''' Takes a pool ID, searches the cloud provider for instances in that pool (using the tag) and returns a dictionary of instances with their state as value. - @ptype pool_id: int @param list of pool instances are located in. We search for instances using the poolID tag - - @ptype region: string @param region: region where instances are located - - @rtype: dictionary @return: running instances and their states. State must comply with INSTANCE_STATE defined in CloudProvider ''' return @abstractmethod - def get_image(self, region, config): + def get_image(self, region: str, config: FlatObject) -> None: ''' Takes a configuration and returns a provider specific image name. - @ptype region: string @param region: region - - @ptype config: FlatObject @param config: flattened config - - @rtype: string @return: cloud provider ID for image ''' return @staticmethod @abstractmethod - def get_cores_per_instance() -> dict[str, int]: + def get_cores_per_instance() -> None: ''' returns dictionary of instance types and their number of cores @@ -208,77 +173,62 @@ def get_cores_per_instance() -> dict[str, int]: @staticmethod @abstractmethod - def get_allowed_regions(config): + def get_allowed_regions(config: FlatObject) -> None: ''' Takes a configuration and returns cloud provider specific regions. - @ptype config: FlatObject @param config: pulling regions from config - - @rtype: list @return: regions pulled from config ''' return @staticmethod @abstractmethod - def get_image_name(config): + def get_image_name(config: FlatObject) -> None: ''' Takes a configuration and returns cloud provider specific image name. - @ptype config: FlatObject @param config: pulling image name from config - - @rtype: string @return: cloud specific image name from config ''' return @staticmethod @abstractmethod - def get_instance_types(config): + def get_instance_types(config: FlatObject) -> None: ''' Takes a configuration and returns a list of cloud provider specific instance_types. - @ptype config: FlatObject @param config: pulling instance types from config - - @rtype: list @return: list of cloud specific instance_types from config ''' return @staticmethod @abstractmethod - def get_max_price(config): + def get_max_price(config: FlatObject) -> None: ''' Takes a configuration and returns the cloud provider specific max_price. - @ptype config: FlatObject @param config: pulling max_price from config - - @rtype: float @return: cloud specific max_price ''' return @staticmethod @abstractmethod - def get_tags(config): + def get_tags(config: FlatObject) -> None: ''' Takes a configuration and returns a dictionary of cloud provider specific tags. - @ptype config: FlatObject @param config: pulling tags field - - @rtype: dictionary @return: cloud specific tags field ''' return @staticmethod @abstractmethod - def get_name() -> str: + def get_name() -> None: ''' used to return name of cloud provider @@ -288,38 +238,30 @@ def get_name() -> str: @staticmethod @abstractmethod - def config_supported(config): + def config_supported(config: FlatObject) -> None: '''Compares the fields provided in the config with those required by the cloud provider. If any field is missing, return False. - @ptype config: FlatObject @param config: Flattened config - - @rtype: bool @return: True if all required cloud specific fields in config ''' return @abstractmethod - def get_prices_per_region(self, region_name, instance_types): + def get_prices_per_region(self, region_name: str, instance_types: list[str]) -> None: ''' takes region and instance_types and returns a dictionary of prices prices are stored with keys like 'provider:price:{instance-type}' and values {region: {zone (if used): [price value, ...]}} - @ptype region_name: string @param region_name: region to grab prices - - @ptype instance_types: list @param instance_types: list of instance_types - - @rtype: dictionary @return: dictionary of prices as specified above. ''' return @staticmethod - def get_instance(provider): + def get_instance(provider: str): ''' This is a method that is used to instantiate the provider class. ''' diff --git a/server/ec2spotmanager/cron.py b/server/ec2spotmanager/cron.py index ff11f0339..c87a17f97 100644 --- a/server/ec2spotmanager/cron.py +++ b/server/ec2spotmanager/cron.py @@ -63,7 +63,7 @@ def update_stats() -> None: # Now check if we need to aggregate some of the detail entries we have entries = PoolUptimeDetailedEntry.objects.filter(pool=pool).order_by('created') - n = entries.count() - (STATS_TOTAL_DETAILED * 60 * 60) / STATS_DELTA_SECS + n = int(entries.count() - (STATS_TOTAL_DETAILED * 60 * 60) / STATS_DELTA_SECS) if n > 0: # We need to aggregate some entries entriesAggr = entries[:n] @@ -109,7 +109,7 @@ def update_stats() -> None: @app.task -def _release_lock(lock_key): +def _release_lock(lock_key: str) -> None: cache = redis.StrictRedis.from_url(settings.REDIS_URL) lock = RedisLock(cache, "ec2spotmanager:check_instance_pools", unique_id=lock_key) if not lock.release(): @@ -265,7 +265,7 @@ def update_prices() -> None: if not regions: continue - prices = {} + prices: dict[str, dict[str, str]] = {} for region in regions: for instance_type, price_data in cloud_provider.get_prices_per_region(region).items(): prices.setdefault(instance_type, {}) diff --git a/server/ec2spotmanager/tests/test_configs.py b/server/ec2spotmanager/tests/test_configs.py index 359788ea4..ef05fd865 100644 --- a/server/ec2spotmanager/tests/test_configs.py +++ b/server/ec2spotmanager/tests/test_configs.py @@ -17,6 +17,7 @@ import json import logging import requests +from django.test.client import Client from django.urls import reverse import pytest from ec2spotmanager.models import PoolConfiguration @@ -33,7 +34,7 @@ ("ec2spotmanager:configview", {'configid': 0}), ("ec2spotmanager:configedit", {'configid': 0}), ("ec2spotmanager:configdel", {'configid': 0})]) -def test_configs_no_login(client, name, kwargs): +def test_configs_no_login(client: Client, name: str, kwargs: dict[str, object]) -> None: """Request without login hits the login redirect""" path = reverse(name, kwargs=kwargs) response = client.get(path) @@ -42,7 +43,7 @@ def test_configs_no_login(client, name, kwargs): assert response.url == '/login/?next=' + path -def test_configs_view_no_configs(client): +def test_configs_view_no_configs(client: Client) -> None: """If no configs in db, an appropriate message is shown.""" client.login(username='test', password='test') response = client.get(reverse("ec2spotmanager:configs")) @@ -52,7 +53,7 @@ def test_configs_view_no_configs(client): assert len(configtree) == 0 # 0 configs -def test_configs_view_config(client): +def test_configs_view_config(client: Client) -> None: """Create config and see that it is shown.""" client.login(username='test', password='test') config = create_config("config #1") @@ -66,7 +67,7 @@ def test_configs_view_config(client): assert_contains(response, "config #1") -def test_configs_view_configs(client): +def test_configs_view_configs(client: Client) -> None: """Create configs and see that they are shown.""" client.login(username='test', password='test') configs = (create_config("config #1"), @@ -83,7 +84,7 @@ def test_configs_view_configs(client): assert_contains(response, "config #2") -def test_configs_view_config_tree(client): +def test_configs_view_config_tree(client: Client) -> None: """Create nested configs and see that they are shown.""" client.login(username='test', password='test') config1 = create_config("config #1") @@ -115,7 +116,7 @@ def test_configs_view_config_tree(client): assert_contains(response, "config #3") -def test_create_config_view_create_form(client): +def test_create_config_view_create_form(client: Client) -> None: """Config creation form should be shown""" client.login(username='test', password='test') response = client.get(reverse("ec2spotmanager:configcreate")) @@ -127,7 +128,7 @@ def test_create_config_view_create_form(client): assert_contains(response, 'name="cycle_interval"') -def test_create_config_view_create(client): +def test_create_config_view_create(client: Client) -> None: """Config created via form should be added to db""" client.login(username='test', password='test') response = client.post(reverse("ec2spotmanager:configcreate"), @@ -181,7 +182,7 @@ def test_create_config_view_create(client): assert json.loads(cfg.gce_raw_config) == {'tag3': 'value3', 'tag4': 'value4'} -def test_create_config_view_clone(client): +def test_create_config_view_clone(client: Client) -> None: """Creation form should contain source data""" client.login(username='test', password='test') cfg = create_config(name='config #1', @@ -216,7 +217,7 @@ def test_create_config_view_clone(client): assert_contains(response, 'hello=world') -def test_view_config_view(client): +def test_view_config_view(client: Client) -> None: """Create a config and view it""" cfg = create_config(name='config #1', size=1234567, @@ -250,7 +251,7 @@ def test_view_config_view(client): assert_contains(response, 'hello=world') -def test_edit_config_view(client): +def test_edit_config_view(client: Client) -> None: """Edit an existing config""" cfg = create_config(name='config #1', size=1234567, @@ -285,7 +286,7 @@ def test_edit_config_view(client): assert_contains(response, 'hello=world') -def test_del_config_view_delete(client): +def test_del_config_view_delete(client: Client) -> None: """Delete an existing config""" cfg = create_config(name='config #1') client.login(username='test', password='test') @@ -296,7 +297,7 @@ def test_del_config_view_delete(client): assert PoolConfiguration.objects.count() == 0 -def test_del_config_view_simple_get(client): +def test_del_config_view_simple_get(client: Client) -> None: """No errors are thrown in template""" cfg = create_config(name='config #1') client.login(username='test', password='test') diff --git a/server/ec2spotmanager/tests/test_pools_rest.py b/server/ec2spotmanager/tests/test_pools_rest.py index 78495803f..37f3b76cd 100644 --- a/server/ec2spotmanager/tests/test_pools_rest.py +++ b/server/ec2spotmanager/tests/test_pools_rest.py @@ -21,6 +21,7 @@ from django.urls import reverse from django.utils import timezone from ec2spotmanager.models import InstancePool +from rest_framework.test import APIClient from . import create_config, create_pool @@ -28,7 +29,7 @@ pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") # pylint: disable=invalid-name -def test_rest_pool_cycle_no_auth(api_client): +def test_rest_pool_cycle_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/ec2spotmanager/rest/pool/1/cycle/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -38,7 +39,7 @@ def test_rest_pool_cycle_no_auth(api_client): assert api_client.delete(url, {}).status_code == requests.codes['unauthorized'] -def test_rest_pool_cycle_no_perm(api_client): +def test_rest_pool_cycle_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -50,7 +51,7 @@ def test_rest_pool_cycle_no_perm(api_client): assert api_client.delete(url, {}).status_code == requests.codes['forbidden'] -def test_rest_pool_cycle_patch(api_client): +def test_rest_pool_cycle_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -59,7 +60,7 @@ def test_rest_pool_cycle_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_cycle_post(api_client): +def test_rest_pool_cycle_post(api_client: APIClient) -> None: """post should reset last_cycled""" config = create_config('testconfig') pool = create_pool(config, last_cycled=timezone.now()) @@ -78,7 +79,7 @@ def test_rest_pool_cycle_post(api_client): assert pool.last_cycled is None -def test_rest_pool_cycle_put(api_client): +def test_rest_pool_cycle_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -87,7 +88,7 @@ def test_rest_pool_cycle_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_cycle_delete(api_client): +def test_rest_pool_cycle_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -96,7 +97,7 @@ def test_rest_pool_cycle_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_cycle_get(api_client): +def test_rest_pool_cycle_get(api_client: APIClient) -> None: """get should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -105,7 +106,7 @@ def test_rest_pool_cycle_get(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_enable_no_auth(api_client): +def test_rest_pool_enable_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/ec2spotmanager/rest/pool/1/enable/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -115,7 +116,7 @@ def test_rest_pool_enable_no_auth(api_client): assert api_client.delete(url, {}).status_code == requests.codes['unauthorized'] -def test_rest_pool_enable_no_perm(api_client): +def test_rest_pool_enable_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -127,7 +128,7 @@ def test_rest_pool_enable_no_perm(api_client): assert api_client.delete(url, {}).status_code == requests.codes['forbidden'] -def test_rest_pool_enable_patch(api_client): +def test_rest_pool_enable_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -136,7 +137,7 @@ def test_rest_pool_enable_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_enable_post(api_client): +def test_rest_pool_enable_post(api_client: APIClient) -> None: """post should flip isEnabled""" config = create_config('testconfig') pool = create_pool(config) @@ -154,7 +155,7 @@ def test_rest_pool_enable_post(api_client): assert pool.isEnabled -def test_rest_pool_enable_put(api_client): +def test_rest_pool_enable_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -163,7 +164,7 @@ def test_rest_pool_enable_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_enable_delete(api_client): +def test_rest_pool_enable_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -172,7 +173,7 @@ def test_rest_pool_enable_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_enable_get(api_client): +def test_rest_pool_enable_get(api_client: APIClient) -> None: """get should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -181,7 +182,7 @@ def test_rest_pool_enable_get(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_disable_no_auth(api_client): +def test_rest_pool_disable_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = '/ec2spotmanager/rest/pool/1/disable/' assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -191,7 +192,7 @@ def test_rest_pool_disable_no_auth(api_client): assert api_client.delete(url, {}).status_code == requests.codes['unauthorized'] -def test_rest_pool_disable_no_perm(api_client): +def test_rest_pool_disable_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -203,7 +204,7 @@ def test_rest_pool_disable_no_perm(api_client): assert api_client.delete(url, {}).status_code == requests.codes['forbidden'] -def test_rest_pool_disable_patch(api_client): +def test_rest_pool_disable_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -212,7 +213,7 @@ def test_rest_pool_disable_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_disable_post(api_client): +def test_rest_pool_disable_post(api_client: APIClient) -> None: """post should flip isEnabled""" config = create_config('testconfig') pool = create_pool(config, enabled=True) @@ -230,7 +231,7 @@ def test_rest_pool_disable_post(api_client): assert not pool.isEnabled -def test_rest_pool_disable_put(api_client): +def test_rest_pool_disable_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -239,7 +240,7 @@ def test_rest_pool_disable_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_disable_delete(api_client): +def test_rest_pool_disable_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -248,7 +249,7 @@ def test_rest_pool_disable_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] -def test_rest_pool_disable_get(api_client): +def test_rest_pool_disable_get(api_client: APIClient) -> None: """get should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -261,7 +262,7 @@ def test_rest_pool_disable_get(api_client): class TestRestPoolChartDetailed(object): @staticmethod - def test_rest_pool_chart_detailed_no_auth(api_client): + def test_rest_pool_chart_detailed_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = reverse('ec2spotmanager:line_chart_json_detailed', kwargs={'poolid': 1}) assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -271,7 +272,7 @@ def test_rest_pool_chart_detailed_no_auth(api_client): assert api_client.delete(url, {}).status_code == requests.codes['unauthorized'] @staticmethod - def test_rest_pool_chart_detailed_no_perm(api_client): + def test_rest_pool_chart_detailed_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -283,7 +284,7 @@ def test_rest_pool_chart_detailed_no_perm(api_client): assert api_client.delete(url, {}).status_code == requests.codes['forbidden'] @staticmethod - def test_rest_pool_chart_detailed_patch(api_client): + def test_rest_pool_chart_detailed_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -292,7 +293,7 @@ def test_rest_pool_chart_detailed_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] @staticmethod - def test_rest_pool_chart_detailed_post(api_client): + def test_rest_pool_chart_detailed_post(api_client: APIClient) -> None: """post should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -301,7 +302,7 @@ def test_rest_pool_chart_detailed_post(api_client): assert resp.status_code == requests.codes['method_not_allowed'] @staticmethod - def test_rest_pool_chart_detailed_put(api_client): + def test_rest_pool_chart_detailed_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -310,7 +311,7 @@ def test_rest_pool_chart_detailed_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] @staticmethod - def test_rest_pool_chart_detailed_delete(api_client): + def test_rest_pool_chart_detailed_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -319,7 +320,7 @@ def test_rest_pool_chart_detailed_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] @staticmethod - def test_rest_pool_chart_detailed_get(api_client): + def test_rest_pool_chart_detailed_get(api_client: APIClient) -> None: """get should not be allowed""" pool = create_pool(create_config('testconfig', size=1)) user = User.objects.get(username='test') @@ -335,7 +336,7 @@ def test_rest_pool_chart_detailed_get(api_client): class TestRestPoolChartAccumulated(object): @staticmethod - def test_rest_pool_chart_accumulated_no_auth(api_client): + def test_rest_pool_chart_accumulated_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = reverse('ec2spotmanager:line_chart_json_accumulated', kwargs={'poolid': 1}) assert api_client.get(url).status_code == requests.codes['unauthorized'] @@ -345,7 +346,7 @@ def test_rest_pool_chart_accumulated_no_auth(api_client): assert api_client.delete(url, {}).status_code == requests.codes['unauthorized'] @staticmethod - def test_rest_pool_chart_accumulated_no_perm(api_client): + def test_rest_pool_chart_accumulated_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username='test-noperm') api_client.force_authenticate(user=user) @@ -357,7 +358,7 @@ def test_rest_pool_chart_accumulated_no_perm(api_client): assert api_client.delete(url, {}).status_code == requests.codes['forbidden'] @staticmethod - def test_rest_pool_chart_accumulated_patch(api_client): + def test_rest_pool_chart_accumulated_patch(api_client: APIClient) -> None: """patch should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -366,7 +367,7 @@ def test_rest_pool_chart_accumulated_patch(api_client): assert resp.status_code == requests.codes['method_not_allowed'] @staticmethod - def test_rest_pool_chart_accumulated_post(api_client): + def test_rest_pool_chart_accumulated_post(api_client: APIClient) -> None: """post should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -375,7 +376,7 @@ def test_rest_pool_chart_accumulated_post(api_client): assert resp.status_code == requests.codes['method_not_allowed'] @staticmethod - def test_rest_pool_chart_accumulated_put(api_client): + def test_rest_pool_chart_accumulated_put(api_client: APIClient) -> None: """put should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -384,7 +385,7 @@ def test_rest_pool_chart_accumulated_put(api_client): assert resp.status_code == requests.codes['method_not_allowed'] @staticmethod - def test_rest_pool_chart_accumulated_delete(api_client): + def test_rest_pool_chart_accumulated_delete(api_client: APIClient) -> None: """delete should not be allowed""" user = User.objects.get(username='test') api_client.force_authenticate(user=user) @@ -393,7 +394,7 @@ def test_rest_pool_chart_accumulated_delete(api_client): assert resp.status_code == requests.codes['method_not_allowed'] @staticmethod - def test_rest_pool_chart_accumulated_get(api_client): + def test_rest_pool_chart_accumulated_get(api_client: APIClient) -> None: """get should be allowed""" pool = create_pool(create_config('testconfig')) user = User.objects.get(username='test') diff --git a/server/taskmanager/tests/__init__.py b/server/taskmanager/tests/__init__.py index e94cc0540..3bc318b28 100644 --- a/server/taskmanager/tests/__init__.py +++ b/server/taskmanager/tests/__init__.py @@ -2,6 +2,7 @@ import datetime import logging +from typing import cast from django.utils import timezone from taskmanager.models import Pool, Task @@ -9,22 +10,22 @@ LOG = logging.getLogger("fm.taskmanager.tests") -def create_pool(): - pool = Pool.objects.create( +def create_pool() -> Pool: + pool = cast(Pool, Pool.objects.create( pool_id="pool1", pool_name="Test Pool", platform="linux", size=1, cpu="x64", cycle_time=datetime.timedelta(days=31), - ) + )) LOG.debug("Create Pool pk=%d", pool.pk) return pool -def create_task(pool=None, task_id="TASK123", run_id=1): +def create_task(pool: Pool | None = None, task_id: str = "TASK123", run_id: int = 1) -> Task: task_time = timezone.now() - task = Task.objects.create( + task = cast(Task, Task.objects.create( pool=pool, task_id=task_id, decision_id="DECISION123", @@ -35,6 +36,6 @@ def create_task(pool=None, task_id="TASK123", run_id=1): started=task_time + datetime.timedelta(minutes=5), resolved=task_time + datetime.timedelta(minutes=10), expires=task_time + datetime.timedelta(minutes=15), - ) + )) LOG.debug("Create Task pk=%d", task.pk) return task diff --git a/server/taskmanager/tests/test_pools_rest.py b/server/taskmanager/tests/test_pools_rest.py index 9c240422d..6186d1b6e 100644 --- a/server/taskmanager/tests/test_pools_rest.py +++ b/server/taskmanager/tests/test_pools_rest.py @@ -19,6 +19,7 @@ import pytest import requests from django.contrib.auth.models import User +from rest_framework.test import APIClient from . import create_pool, create_task @@ -26,7 +27,7 @@ pytestmark = pytest.mark.usefixtures("taskmanager_test") # pylint: disable=invalid-name -def test_rest_pools_no_auth(api_client): +def test_rest_pools_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = "/taskmanager/rest/pools/" assert api_client.get(url).status_code == requests.codes["unauthorized"] @@ -36,7 +37,7 @@ def test_rest_pools_no_auth(api_client): assert api_client.delete(url).status_code == requests.codes["unauthorized"] -def test_rest_pools_no_perm(api_client): +def test_rest_pools_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username="test-noperm") api_client.force_authenticate(user=user) @@ -49,7 +50,7 @@ def test_rest_pools_no_perm(api_client): @pytest.mark.parametrize(("method", "item"), itertools.product(["post", "patch", "put", "delete"], [True, False])) -def test_rest_pool_methods(api_client, method, item): +def test_rest_pool_methods(api_client: APIClient, method: str, item: bool) -> None: """post/put/patch/delete should not be allowed""" user = User.objects.get(username="test") api_client.force_authenticate(user=user) @@ -59,14 +60,14 @@ def test_rest_pool_methods(api_client, method, item): else: url = "/taskmanager/rest/pools/" - method = getattr(api_client, method) - resp = method(url) + method_ = getattr(api_client, method) + resp = method_(url) LOG.debug(resp) assert resp.status_code == requests.codes["method_not_allowed"] @pytest.mark.parametrize("item", [True, False]) -def test_rest_pool_read(api_client, item): +def test_rest_pool_read(api_client: APIClient, item: bool) -> None: user = User.objects.get(username="test") api_client.force_authenticate(user=user) pool = create_pool() @@ -100,7 +101,7 @@ def test_rest_pool_read(api_client, item): assert datetime.timedelta(seconds=int(resp["cycle_time"])) == pool.cycle_time -def test_rest_pool_running_status(api_client): +def test_rest_pool_running_status(api_client: APIClient) -> None: user = User.objects.get(username="test") api_client.force_authenticate(user=user) pool = create_pool() diff --git a/server/taskmanager/tests/test_tasks_rest.py b/server/taskmanager/tests/test_tasks_rest.py index cf1d7ced8..7bd90f5a6 100644 --- a/server/taskmanager/tests/test_tasks_rest.py +++ b/server/taskmanager/tests/test_tasks_rest.py @@ -12,6 +12,7 @@ from __future__ import annotations +from collections.abc import Callable import itertools import json import logging @@ -19,6 +20,7 @@ import requests from django.contrib.auth.models import User from django.utils import dateparse +from rest_framework.test import APIClient from taskmanager.models import Task from . import create_pool, create_task @@ -26,7 +28,7 @@ pytestmark = pytest.mark.usefixtures("taskmanager_test") # pylint: disable=invalid-name -def test_rest_tasks_no_auth(api_client): +def test_rest_tasks_no_auth(api_client: APIClient) -> None: """must yield forbidden without authentication""" url = "/taskmanager/rest/tasks/" assert api_client.get(url).status_code == requests.codes["unauthorized"] @@ -36,7 +38,7 @@ def test_rest_tasks_no_auth(api_client): assert api_client.delete(url).status_code == requests.codes["unauthorized"] -def test_rest_tasks_no_perm(api_client): +def test_rest_tasks_no_perm(api_client: APIClient) -> None: """must yield forbidden without permission""" user = User.objects.get(username="test-noperm") api_client.force_authenticate(user=user) @@ -49,7 +51,7 @@ def test_rest_tasks_no_perm(api_client): @pytest.mark.parametrize(("method", "item"), itertools.product(["post", "put", "patch", "delete"], [True, False])) -def test_rest_task_methods(api_client, method, item): +def test_rest_task_methods(api_client: APIClient, method: str, item: bool) -> None: """post/put/patch/delete should not be allowed""" user = User.objects.get(username="test") api_client.force_authenticate(user=user) @@ -60,14 +62,14 @@ def test_rest_task_methods(api_client, method, item): else: url = "/taskmanager/rest/tasks/" - method = getattr(api_client, method) - resp = method(url) + method_ = getattr(api_client, method) + resp = method_(url) LOG.debug(resp) assert resp.status_code == requests.codes["method_not_allowed"] @pytest.mark.parametrize("method", ["get", "put", "patch", "delete"]) -def test_rest_task_status_methods(api_client, method): +def test_rest_task_status_methods(api_client: APIClient, method: str) -> None: """post/put/patch/delete should not be allowed""" user = User.objects.get(username="test") api_client.force_authenticate(user=user) @@ -75,8 +77,8 @@ def test_rest_task_status_methods(api_client, method): create_task(pool=pool) url = "/taskmanager/rest/tasks/update_status/" - method = getattr(api_client, method) - resp = method(url) + method_ = getattr(api_client, method) + resp = method_(url) LOG.debug(resp) assert resp.status_code == requests.codes["method_not_allowed"] @@ -130,7 +132,7 @@ def test_rest_task_status_methods(api_client, method): ), ], ) -def test_rest_task_status(api_client, make_data, result, status_data): +def test_rest_task_status(api_client: APIClient, make_data: Callable[..., dict[str, str]], result: int, status_data: str) -> None: """post should require well-formed parameters""" user = User.objects.get(username="test") api_client.force_authenticate(user=user) @@ -145,7 +147,7 @@ def test_rest_task_status(api_client, make_data, result, status_data): assert task.status_data == status_data -def test_rest_task_status_unknown(api_client): +def test_rest_task_status_unknown(api_client: APIClient) -> None: """post should require well-formed parameters""" user = User.objects.get(username="test") api_client.force_authenticate(user=user) @@ -164,7 +166,7 @@ def test_rest_task_status_unknown(api_client): @pytest.mark.parametrize("item", [True, False]) -def test_rest_task_read(api_client, item): +def test_rest_task_read(api_client: APIClient, item: bool) -> None: user = User.objects.get(username="test") api_client.force_authenticate(user=user) pool = create_pool() From 91a73fa08df6bec640d7b34ccff3de111cb4213d Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 7 Feb 2022 01:28:20 -0800 Subject: [PATCH 099/137] 822 mypy issues left --- FTB/Running/PersistentApplication.py | 26 ++++++---- FTB/Running/tests/test_persistent.py | 19 ++++---- FTB/Running/tests/test_shell.py | 3 +- server/covmanager/tests/conftest.py | 3 +- server/crashmanager/tests/test_stats.py | 3 +- server/ec2spotmanager/tests/test_pools.py | 25 +++++----- server/ec2spotmanager/tests/test_tasks.py | 48 ++++++++++--------- server/taskmanager/tests/test_update_pools.py | 5 +- 8 files changed, 74 insertions(+), 58 deletions(-) diff --git a/FTB/Running/PersistentApplication.py b/FTB/Running/PersistentApplication.py index 556d1460e..298d6cb0c 100644 --- a/FTB/Running/PersistentApplication.py +++ b/FTB/Running/PersistentApplication.py @@ -72,7 +72,7 @@ class PersistentApplication(): Abstract base class that defines the interface ''' def __init__(self, binary, args=None, env=None, cwd=None, persistentMode=PersistentMode.NONE, - processingTimeout=10, inputFile=None): + processingTimeout=10, inputFile=None) -> None: self.binary = binary self.cwd = cwd @@ -111,19 +111,20 @@ def __init__(self, binary, args=None, env=None, cwd=None, persistentMode=Persist self.spfpPrefix = "" self.spfpSuffix = "" # To support - def start(self, test=None): + def start(self, test: str | None = None) -> int: pass def stop(self) -> None: pass - def runTest(self, test): + def runTest(self, test: str) -> int: pass def status(self) -> None: pass - def _crashed(self): + def _crashed(self) -> bool: + assert self.process is not None if self.process.returncode < 0: crashSignals = [ # POSIX.1-1990 signals @@ -146,7 +147,7 @@ def _crashed(self): class SimplePersistentApplication(PersistentApplication): def __init__(self, binary, args=None, env=None, cwd=None, persistentMode=PersistentMode.NONE, - processingTimeout=10, inputFile=None): + processingTimeout=10, inputFile=None) -> None: PersistentApplication.__init__(self, binary, args, env, cwd, persistentMode, processingTimeout, inputFile) @@ -157,7 +158,8 @@ def __init__(self, binary, args=None, env=None, cwd=None, persistentMode=Persist self.outCollector = None self.errCollector = None - def _write_log_test(self, test): + def _write_log_test(self, test: str) -> None: + assert self.testLog is not None self.testLog.append(test) if self.inputFile: @@ -177,7 +179,8 @@ def _write_log_test(self, test): self.process.stdin.write(test) self.process.stdin.close() - def _wait_child_stopped(self): + def _wait_child_stopped(self) -> bool: + assert self.process is not None monitor = WaitpidMonitor(self.process.pid, os.WUNTRACED) monitor.start() monitor.join(self.processingTimeout) @@ -192,10 +195,11 @@ def _wait_child_stopped(self): return True - def start(self, test=None): + def start(self, test: str | None = None) -> int: assert self.process is None or self.process.poll() is not None # Reset the test log + assert self.testLog is not None self.testLog = [] if self.persistentMode == PersistentMode.NONE: @@ -293,7 +297,7 @@ def stop(self) -> None: self.stdout = self.outCollector.output self.stderr = self.errCollector.output - def runTest(self, test): + def runTest(self, test: str) -> int: if self.process is None or self.process.poll() is not None: self.start() @@ -304,6 +308,7 @@ def runTest(self, test): try: response = self.responseQueue.get(block=True, timeout=self.processingTimeout) except queue.Empty: + assert self.process is not None if self.process.poll() is None: # The process is still running, force it to stop and return timeout code self.stop() @@ -330,6 +335,8 @@ def runTest(self, test): self.process.returncode) # Update stdout/err available for the last run + assert self.errCollector is not None + assert self.outCollector is not None self.stdout = self.outCollector.output self.stderr = self.errCollector.output @@ -341,6 +348,7 @@ def runTest(self, test): raise RuntimeError("SPFP Error: Unsupported application response: %s" % response) elif self.persistentMode == PersistentMode.SIGSTOP: # Resume the process + assert self.process is not None os.kill(self.process.pid, signal.SIGCONT) # Wait for process to stop itself again diff --git a/FTB/Running/tests/test_persistent.py b/FTB/Running/tests/test_persistent.py index 8b5d945b7..650e5fbc1 100644 --- a/FTB/Running/tests/test_persistent.py +++ b/FTB/Running/tests/test_persistent.py @@ -16,6 +16,7 @@ from __future__ import annotations import os +from pathlib import Path import sys import time import pytest @@ -25,13 +26,14 @@ TEST_PATH = os.path.dirname(__file__) -def test_PersistentApplicationTestModeNone(tmp_path): - def _check(spa): +def test_PersistentApplicationTestModeNone(tmp_path: Path) -> None: + def _check(spa: SimplePersistentApplication) -> None: try: ret = spa.start("aa") assert ret == ApplicationStatus.OK + assert spa.stdout is not None assert spa.stdout[0] == "Stdout test1" assert spa.stdout[1] == "Stdout test2" @@ -65,8 +67,8 @@ def _check(spa): @pytest.mark.xfail -def test_PersistentApplicationTestOtherModes(tmp_path): - def _check(spa): +def test_PersistentApplicationTestOtherModes(tmp_path: Path) -> None: + def _check(spa: SimplePersistentApplication) -> None: try: ret = spa.start() @@ -121,11 +123,12 @@ def _check(spa): @pytest.mark.xfail -def test_PersistentApplicationTestPerf(tmp_path): - def _check(spa): +def test_PersistentApplicationTestPerf(tmp_path: Path) -> None: + def _check(spa: SimplePersistentApplication) -> None: try: spa.start() + assert spa.process is not None oldPid = spa.process.pid startTime = time.time() @@ -154,7 +157,7 @@ def _check(spa): inputFile=str(inputFile))) -def test_PersistentApplicationTestFaultySigstop(tmp_path): +def test_PersistentApplicationTestFaultySigstop(tmp_path: Path) -> None: inputFile = tmp_path / "input.tmp" inputFile.touch() spa = SimplePersistentApplication(sys.executable, [os.path.join(TEST_PATH, "test_shell.py"), "faulty_sigstop", @@ -165,7 +168,7 @@ def test_PersistentApplicationTestFaultySigstop(tmp_path): spa.start() -def test_PersistentApplicationTestStopWithoutStart(tmp_path): +def test_PersistentApplicationTestStopWithoutStart(tmp_path: Path) -> None: inputFile = tmp_path / "input.tmp" inputFile.touch() spa = SimplePersistentApplication(sys.executable, [os.path.join(TEST_PATH, "test_shell.py"), "faulty_sigstop", diff --git a/FTB/Running/tests/test_shell.py b/FTB/Running/tests/test_shell.py index 57a08eaf3..5cea13486 100644 --- a/FTB/Running/tests/test_shell.py +++ b/FTB/Running/tests/test_shell.py @@ -18,6 +18,7 @@ import signal import sys import time +from typing import TextIO def crash() -> None: @@ -36,7 +37,7 @@ def stop() -> None: os.kill(os.getpid(), signal.SIGSTOP) -def processInput(mode, inputFd): +def processInput(mode: str, inputFd: TextIO) -> None: received_aa = False if mode == "none": diff --git a/server/covmanager/tests/conftest.py b/server/covmanager/tests/conftest.py index 0906c5268..d8e8f78aa 100644 --- a/server/covmanager/tests/conftest.py +++ b/server/covmanager/tests/conftest.py @@ -18,7 +18,8 @@ import subprocess import tempfile import pytest -from typing import Iterator, cast +from typing import Iterator +from typing import cast from typing_extensions import TypedDict from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType diff --git a/server/crashmanager/tests/test_stats.py b/server/crashmanager/tests/test_stats.py index f87e315e0..e9c2cf2dc 100644 --- a/server/crashmanager/tests/test_stats.py +++ b/server/crashmanager/tests/test_stats.py @@ -16,11 +16,10 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse from . import assert_contains -from django.test.client import Client - from crashmanager.tests.conftest import _cm_result diff --git a/server/ec2spotmanager/tests/test_pools.py b/server/ec2spotmanager/tests/test_pools.py index 2f27261ff..057ef38b4 100644 --- a/server/ec2spotmanager/tests/test_pools.py +++ b/server/ec2spotmanager/tests/test_pools.py @@ -15,6 +15,7 @@ import logging import requests +from django.test.client import Client from django.urls import reverse import pytest from . import assert_contains, create_config, create_pool, create_poolmsg @@ -35,7 +36,7 @@ ("ec2spotmanager:pooldisable", {'poolid': 0}), ("ec2spotmanager:poolcycle", {'poolid': 0}), ("ec2spotmanager:poolmsgdel", {'msgid': 0})]) -def test_pools_no_login(client, name, kwargs): +def test_pools_no_login(client: Client, name: str, kwargs: dict[str, object]) -> None: """Request without login hits the login redirect""" path = reverse(name, kwargs=kwargs) resp = client.get(path) @@ -43,7 +44,7 @@ def test_pools_no_login(client, name, kwargs): assert resp.url == '/login/?next=' + path -def test_pools_view_no_pools(client): +def test_pools_view_no_pools(client: Client) -> None: """If no pools in db, an appropriate message is shown.""" client.login(username='test', password='test') response = client.get(reverse("ec2spotmanager:pools")) @@ -54,7 +55,7 @@ def test_pools_view_no_pools(client): assert_contains(response, POOLS_ENTRIES_FMT % 0) -def test_pools_view_pool(client): +def test_pools_view_pool(client: Client) -> None: """Create pool and see that it is shown.""" config = create_config(name='config #1') pool = create_pool(config=config) @@ -68,7 +69,7 @@ def test_pools_view_pool(client): assert set(poollist) == {pool} -def test_pools_view_pools(client): +def test_pools_view_pools(client: Client) -> None: """Create pool and see that it is shown.""" configs = (create_config(name='config #1'), create_config(name='config #2')) @@ -83,7 +84,7 @@ def test_pools_view_pools(client): assert set(poollist) == set(pools) -def test_create_pool_view_simple_get(client): +def test_create_pool_view_simple_get(client: Client) -> None: """No errors are thrown in template""" client.login(username='test', password='test') response = client.get(reverse("ec2spotmanager:poolcreate")) @@ -91,7 +92,7 @@ def test_create_pool_view_simple_get(client): assert response.status_code == requests.codes['ok'] -def test_view_pool_view_simple_get(client): +def test_view_pool_view_simple_get(client: Client) -> None: """No errors are thrown in template""" cfg = create_config(name='config #1') pool = create_pool(config=cfg) @@ -101,7 +102,7 @@ def test_view_pool_view_simple_get(client): assert response.status_code == requests.codes['ok'] -def test_pool_prices_view_simple_get(client): +def test_pool_prices_view_simple_get(client: Client) -> None: """No errors are thrown in template""" cfg = create_config(name='config #1', ec2_instance_types=['c4.2xlarge']) @@ -112,7 +113,7 @@ def test_pool_prices_view_simple_get(client): assert response.status_code == requests.codes['ok'] -def test_delete_pool_view_simple_get(client): +def test_delete_pool_view_simple_get(client: Client) -> None: """No errors are thrown in template""" cfg = create_config(name='config #1') pool = create_pool(config=cfg) @@ -122,7 +123,7 @@ def test_delete_pool_view_simple_get(client): assert response.status_code == requests.codes['ok'] -def test_enable_pool_view_simple_get(client): +def test_enable_pool_view_simple_get(client: Client) -> None: """No errors are thrown in template""" cfg = create_config(name='config #1') pool = create_pool(config=cfg) @@ -132,7 +133,7 @@ def test_enable_pool_view_simple_get(client): assert response.status_code == requests.codes['ok'] -def test_disable_pool_view_simple_get(client): +def test_disable_pool_view_simple_get(client: Client) -> None: """No errors are thrown in template""" cfg = create_config(name='config #1') pool = create_pool(config=cfg) @@ -142,7 +143,7 @@ def test_disable_pool_view_simple_get(client): assert response.status_code == requests.codes['ok'] -def test_cycle_pool_view_simple_get(client): +def test_cycle_pool_view_simple_get(client: Client) -> None: """No errors are thrown in template""" cfg = create_config(name='config #1') pool = create_pool(config=cfg) @@ -152,7 +153,7 @@ def test_cycle_pool_view_simple_get(client): assert response.status_code == requests.codes['ok'] -def test_delete_pool_message_view_simple_get(client): +def test_delete_pool_message_view_simple_get(client: Client) -> None: """No errors are thrown in template""" cfg = create_config(name='config #1') pool = create_pool(config=cfg) diff --git a/server/ec2spotmanager/tests/test_tasks.py b/server/ec2spotmanager/tests/test_tasks.py index ea728fcd8..f77aca117 100644 --- a/server/ec2spotmanager/tests/test_tasks.py +++ b/server/ec2spotmanager/tests/test_tasks.py @@ -15,16 +15,18 @@ import datetime import logging +from typing import Iterable import boto.ec2 import pytest from django.utils import timezone +from pytest_mock import MockerFixture + from . import UncatchableException, create_config, create_instance, create_pool from ec2spotmanager.tasks import update_requests, update_instances, cycle_and_terminate_disabled, \ check_and_resize_pool, _terminate_instance_ids, _terminate_instance_request_ids, SPOTMGR_TAG from ec2spotmanager.models import Instance # PoolStatusEntry from ec2spotmanager.CloudProvider.CloudProvider import INSTANCE_STATE, CloudProviderTemporaryFailure - LOG = logging.getLogger('fm.ec2spotmanager.tests.tasks') @@ -60,10 +62,10 @@ def test_bad_config() -> None: assert not Instance.objects.exists() -def test_create_instance(mocker): +def test_create_instance(mocker: MockerFixture) -> None: """spot instance requests are created when required""" # set-up redis mock to return price data and image name - def _mock_redis_get(key): + def _mock_redis_get(key: str) -> bool | str | None: if ":blacklist:redmond:mshq:" in key: return True if ":blacklist:" in key: @@ -104,19 +106,19 @@ def _mock_redis_get(key): assert instance.instance_id == 'req123' -def test_fulfilled_spot_instance(mocker): +def test_fulfilled_spot_instance(mocker: MockerFixture) -> None: """spot instance requests are turned into instances when fulfilled""" # ensure EC2Manager returns a request ID class _MockInstance(boto.ec2.instance.Instance): - def __init__(self, *args, **kwds) -> None: + def __init__(self, *args: str, **kwds: str) -> None: super(_MockInstance, self).__init__(*args, **kwds) - self._test_tags = {} + self._test_tags: dict[str, str] = {} @property - def state_code(self): + def state_code(self) -> int: return INSTANCE_STATE['running'] - def add_tags(self, tags, dry_run=False): + def add_tags(self, tags: Iterable[tuple[str, str]], dry_run: bool = False) -> None: self._test_tags.update(tags) boto_instance = _MockInstance() boto_instance.id = 'i-123' @@ -148,20 +150,20 @@ def add_tags(self, tags, dry_run=False): assert boto_instance._test_tags == {SPOTMGR_TAG + '-Updatable': '1'} # pylint: disable=protected-access -def test_instance_shutting_down(mocker): +def test_instance_shutting_down(mocker: MockerFixture) -> None: """instances are replaced when shut down or terminated""" # ensure EC2Manager returns a request ID class _MockInstance(boto.ec2.instance.Instance): @property - def state_code(self): + def state_code(self) -> int: return INSTANCE_STATE['shutting-down'] - def add_tags(self, _tags, _dry_run=False): + def add_tags(self, _tags: Iterable[tuple[str, str]], _dry_run: bool = False) -> None: pass class _MockInstance2(_MockInstance): @property - def state_code(self): + def state_code(self) -> int: return INSTANCE_STATE['terminated'] boto_instance1 = _MockInstance() boto_instance1.id = 'i-123' @@ -176,7 +178,7 @@ def state_code(self): mock_ec2mgr.return_value.find.return_value = (boto_instance1, boto_instance2) # set-up redis mock to return price data and image name - def _mock_redis_get(key): + def _mock_redis_get(key: str) -> str | None: if ":blacklist:" in key: return None if ":price:" in key: @@ -226,12 +228,12 @@ def _mock_redis_get(key): assert not remaining -def test_instance_not_updatable(mocker): +def test_instance_not_updatable(mocker: MockerFixture) -> None: """instances are not touched while they are not tagged Updatable""" # ensure EC2Manager returns a request ID class _MockInstance(boto.ec2.instance.Instance): @property - def state_code(self): + def state_code(self) -> int: return INSTANCE_STATE['stopping'] boto_instance = _MockInstance() @@ -266,10 +268,10 @@ def state_code(self): assert count == 1 -def test_instance_price_high(mocker): +def test_instance_price_high(mocker: MockerFixture) -> None: """check that instances are not created if the price is too high""" # set-up redis mock to return price data and image name - def _mock_redis_get(key): + def _mock_redis_get(key: str) -> str | None: if ":blacklist:" in key: return None if ":price:" in key: @@ -302,14 +304,14 @@ def _mock_redis_get(key): assert not Instance.objects.exists() -def test_spot_instance_blacklist(mocker): +def test_spot_instance_blacklist(mocker: MockerFixture) -> None: """check that spot requests being cancelled will result in temporary blacklisting""" # ensure EC2Manager returns a request ID class _status_code(object): code = 'instance-terminated-by-service' class _MockReq(boto.ec2.spotinstancerequest.SpotInstanceRequest): - def __init__(self, *args, **kwds) -> None: + def __init__(self, *args: str, **kwds: str) -> None: super(_MockReq, self).__init__(*args, **kwds) self.state = 'cancelled' self.status = _status_code @@ -321,7 +323,7 @@ def __init__(self, *args, **kwds) -> None: mock_ec2mgr.return_value.check_spot_requests.return_value = (req,) # set-up redis mock to return price data and image name - def _mock_redis_get(key): + def _mock_redis_get(key: str) -> bool | str: if ":blacklist:" in key: return True if ":price:" in key: @@ -330,7 +332,7 @@ def _mock_redis_get(key): return 'warp' raise UncatchableException("unhandle key in mock_get(): %s" % (key,)) - def _mock_redis_set(key, value, ex=None): + def _mock_redis_set(key: str, value: str, ex: str | None = None) -> None: assert ":blacklist:redmond:mshq:" in key mock_redis = mocker.patch('redis.StrictRedis.from_url') mock_redis.return_value.get = mocker.Mock(side_effect=_mock_redis_get) @@ -363,7 +365,7 @@ def _mock_redis_set(key, value, ex=None): assert len(mock_redis.return_value.set.mock_calls) == 1 -def test_pool_disabled(mocker): +def test_pool_disabled(mocker: MockerFixture) -> None: """check that pool disabled results in running and pending instances being terminated""" # ensure EC2Manager returns a request ID mock_ec2mgr = mocker.patch('ec2spotmanager.CloudProvider.EC2SpotCloudProvider.EC2Manager') @@ -419,7 +421,7 @@ def test_pool_trim() -> None: @pytest.mark.parametrize("term_task,provider_func", [(_terminate_instance_ids, "terminate_instances"), (_terminate_instance_request_ids, "cancel_requests")]) -def test_terminate(mocker, term_task, provider_func): +def test_terminate(mocker: MockerFixture, term_task, provider_func) -> None: """check that terminate instances task works properly""" fake_provider_cls = mocker.patch('ec2spotmanager.tasks.CloudProvider') fake_provider = fake_provider_cls.get_instance.return_value = mocker.Mock() diff --git a/server/taskmanager/tests/test_update_pools.py b/server/taskmanager/tests/test_update_pools.py index e6673b798..f1eeb3eb4 100644 --- a/server/taskmanager/tests/test_update_pools.py +++ b/server/taskmanager/tests/test_update_pools.py @@ -18,6 +18,7 @@ import pytest import sys from dateutil.parser import isoparse +from pytest_mock import MockerFixture # from taskmanager.cron import delete_expired from taskmanager.tasks import update_task, update_pool_defns from taskmanager.models import Pool, Task @@ -244,7 +245,7 @@ @pytest.mark.parametrize("pulse_data, expected", TASK_EVENT_DATA.values()) -def test_update_task_0(mocker, settings, pulse_data, expected): +def test_update_task_0(mocker: MockerFixture, settings, pulse_data: str, expected: dict[str, dict[str, object]]) -> None: """test that Task events update the DB""" settings.TC_EXTRA_POOLS = ["extra"] settings.TC_ROOT_URL = "https://allizom.org/tc" @@ -268,7 +269,7 @@ def test_update_task_0(mocker, settings, pulse_data, expected): assert getattr(task_obj, field) == value -def test_update_pool_defns_0(mocker, settings): +def test_update_pool_defns_0(mocker: MockerFixture, settings) -> None: """test that Pool definition is read from GH""" settings.TC_FUZZING_CFG_STORAGE = os.path.join(os.path.dirname(__file__), "fixtures", "pool1") settings.TC_FUZZING_CFG_REPO = "git@allizom.org:allizom/fuzzing-config.git" From b93b828852ef6d74e9bbc0d4b1b4aa7c2b8eb02a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 11 Feb 2022 19:19:22 -0800 Subject: [PATCH 100/137] 799 mypy issues left --- TaskStatusReporter/tests/test_TaskStatusReporter.py | 2 +- .../tests/test_sourcecodeprovider.py | 5 +++-- server/covmanager/tests/conftest.py | 3 +-- server/covmanager/tests/test_covmanager.py | 5 +++-- server/crashmanager/tests/test_crashmanager.py | 9 +++++---- .../tests/test_mgmt_cleanup_old_crashes.py | 7 ++++--- server/ec2spotmanager/tests/test_ec2spotmanager.py | 7 ++++--- server/ec2spotmanager/tests/test_task_graph.py | 7 ++++--- server/taskmanager/tests/test_taskmanager.py | 12 +++++++----- 9 files changed, 32 insertions(+), 25 deletions(-) diff --git a/TaskStatusReporter/tests/test_TaskStatusReporter.py b/TaskStatusReporter/tests/test_TaskStatusReporter.py index d941d271b..ca001c527 100644 --- a/TaskStatusReporter/tests/test_TaskStatusReporter.py +++ b/TaskStatusReporter/tests/test_TaskStatusReporter.py @@ -59,5 +59,5 @@ def test_taskstatusreporter_report(mock_expanduser: Mock, live_server: LiveServe serverAuthToken=fm_user.token, clientId='host2') - with pytest.raises(RuntimeError, message="Server unexpectedly responded with status code 404: Not found"): + with pytest.raises(RuntimeError, match="Server unexpectedly responded with status code 404: Not found"): reporter.report('data') diff --git a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py index ebcc8ffc2..67e543916 100644 --- a/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py +++ b/server/covmanager/SourceCodeProvider/tests/test_sourcecodeprovider.py @@ -19,13 +19,14 @@ from pathlib import Path import pytest import shutil +from typing import Iterator from covmanager.SourceCodeProvider.GITSourceCodeProvider import GITSourceCodeProvider from covmanager.SourceCodeProvider.HGSourceCodeProvider import HGSourceCodeProvider from covmanager.SourceCodeProvider.SourceCodeProvider import Utils @pytest.fixture() -def git_repo(tmp_path: Path): +def git_repo(tmp_path: Path) -> Iterator[str]: shutil.copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test-git"), str(tmp_path / "test-git")) (tmp_path / "test-git" / "git").rename(tmp_path / "test-git" / ".git") @@ -33,7 +34,7 @@ def git_repo(tmp_path: Path): @pytest.fixture() -def hg_repo(tmp_path: Path): +def hg_repo(tmp_path: Path) -> Iterator[str]: shutil.copytree(os.path.join(os.path.dirname(os.path.abspath(__file__)), "test-hg"), str(tmp_path / "test-hg")) (tmp_path / "test-hg" / "hg").rename(tmp_path / "test-hg" / ".hg") diff --git a/server/covmanager/tests/conftest.py b/server/covmanager/tests/conftest.py index d8e8f78aa..8ca76a853 100644 --- a/server/covmanager/tests/conftest.py +++ b/server/covmanager/tests/conftest.py @@ -18,7 +18,6 @@ import subprocess import tempfile import pytest -from typing import Iterator from typing import cast from typing_extensions import TypedDict from django.contrib.auth.models import User, Permission @@ -117,7 +116,7 @@ def hg(repo: Repository, *args: str) -> str: @pytest.fixture -def cm(request: pytest.FixtureRequest, settings: Iterator[SettingsWrapper], tmpdir: py_package.path.local): +def cm(request: pytest.FixtureRequest, settings: SettingsWrapper, tmpdir: py_package.path.local): class _result(object): have_git = HAVE_GIT diff --git a/server/covmanager/tests/test_covmanager.py b/server/covmanager/tests/test_covmanager.py index da0e13f72..7041b3f72 100644 --- a/server/covmanager/tests/test_covmanager.py +++ b/server/covmanager/tests/test_covmanager.py @@ -15,6 +15,7 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse @@ -22,7 +23,7 @@ pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name -def test_covmanager_index(client): +def test_covmanager_index(client: Client) -> None: """Request of root url redirects to pools view""" client.login(username='test', password='test') resp = client.get(reverse('covmanager:index')) @@ -30,7 +31,7 @@ def test_covmanager_index(client): assert resp.url == reverse('covmanager:collections') -def test_covmanager_noperm(client): +def test_covmanager_noperm(client: Client) -> None: """Request without permission results in 403""" client.login(username='test-noperm', password='test') resp = client.get(reverse('covmanager:index')) diff --git a/server/crashmanager/tests/test_crashmanager.py b/server/crashmanager/tests/test_crashmanager.py index b53c11ab7..b59709c09 100644 --- a/server/crashmanager/tests/test_crashmanager.py +++ b/server/crashmanager/tests/test_crashmanager.py @@ -15,6 +15,7 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse @@ -22,14 +23,14 @@ pytestmark = pytest.mark.usefixtures("crashmanager_test") # pylint: disable=invalid-name -def test_crashmanager_redirect(client): +def test_crashmanager_redirect(client: Client) -> None: """Request without login hits the login redirect""" resp = client.get('/') assert resp.status_code == requests.codes['found'] assert resp.url == '/login/?next=/' -def test_crashmanager_no_login(client): +def test_crashmanager_no_login(client: Client) -> None: """Request of root url redirects to crashes view""" client.login(username='test', password='test') resp = client.get('/') @@ -37,7 +38,7 @@ def test_crashmanager_no_login(client): assert resp.url == reverse('crashmanager:index') -def test_crashmanager_logout(client): +def test_crashmanager_logout(client: Client) -> None: """Logout url actually logs us out""" client.login(username='test', password='test') assert client.get(reverse('crashmanager:crashes')).status_code == requests.codes['ok'] @@ -49,7 +50,7 @@ def test_crashmanager_logout(client): assert response.url == '/login/?next=/' -def test_crashmanager_noperm(client): +def test_crashmanager_noperm(client: Client) -> None: """Request without permission results in 403""" client.login(username='test-noperm', password='test') resp = client.get(reverse('crashmanager:index')) diff --git a/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py b/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py index 81573ec2a..5d53b2dc5 100644 --- a/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py +++ b/server/crashmanager/tests/test_mgmt_cleanup_old_crashes.py @@ -17,6 +17,7 @@ from typing import cast import pytest +from pytest_django.fixtures import SettingsWrapper from django.core.management import call_command, CommandError from django.utils import timezone from crashmanager.models import Bucket, Bug, BugProvider, Client, CrashEntry, OS, Platform, Product, Tool @@ -47,7 +48,7 @@ def test_bug_cleanup() -> None: assert Bug.objects.count() == 0 -def test_closed_bugs(settings) -> None: +def test_closed_bugs(settings: SettingsWrapper) -> None: """all buckets that have been closed for x days""" settings.CLEANUP_CRASHES_AFTER_DAYS = 4 settings.CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 2 @@ -65,7 +66,7 @@ def test_closed_bugs(settings) -> None: assert set(CrashEntry.objects.values_list('pk', flat=True)) == {o.pk for o in crashes[:-1]} -def test_empty_bucket(settings) -> None: +def test_empty_bucket(settings: SettingsWrapper) -> None: """all buckets that are empty""" settings.CLEANUP_CRASHES_AFTER_DAYS = 4 settings.CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 2 @@ -80,7 +81,7 @@ def test_empty_bucket(settings) -> None: assert Bug.objects.count() == 1 -def test_old_crashes(settings) -> None: +def test_old_crashes(settings: SettingsWrapper) -> None: """all entries that are older than x days and not in any bucket or bucket has no bug associated with it""" settings.CLEANUP_CRASHES_AFTER_DAYS = 3 settings.CLEANUP_FIXED_BUCKETS_AFTER_DAYS = 1 diff --git a/server/ec2spotmanager/tests/test_ec2spotmanager.py b/server/ec2spotmanager/tests/test_ec2spotmanager.py index 4cdf1a644..f2f4e175e 100644 --- a/server/ec2spotmanager/tests/test_ec2spotmanager.py +++ b/server/ec2spotmanager/tests/test_ec2spotmanager.py @@ -15,6 +15,7 @@ import logging import requests +from django.test.client import Client from django.urls import reverse import pytest @@ -23,7 +24,7 @@ pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") # pylint: disable=invalid-name -def test_ec2spotmanager_index(client): +def test_ec2spotmanager_index(client: Client) -> None: """Request of root url redirects to pools view""" client.login(username='test', password='test') response = client.get(reverse('ec2spotmanager:index')) @@ -32,7 +33,7 @@ def test_ec2spotmanager_index(client): assert response.url == reverse('ec2spotmanager:pools') -def test_ec2spotmanager_logout(client): +def test_ec2spotmanager_logout(client: Client) -> None: """Logout url actually logs us out""" client.login(username='test', password='test') index = reverse('ec2spotmanager:pools') @@ -44,7 +45,7 @@ def test_ec2spotmanager_logout(client): assert response.url == '/login/?next=' + index -def test_ec2spotmanager_noperm(client): +def test_ec2spotmanager_noperm(client: Client) -> None: """Request without permission results in 403""" client.login(username='test-noperm', password='test') resp = client.get(reverse('ec2spotmanager:index')) diff --git a/server/ec2spotmanager/tests/test_task_graph.py b/server/ec2spotmanager/tests/test_task_graph.py index c7599b5df..731b92a15 100644 --- a/server/ec2spotmanager/tests/test_task_graph.py +++ b/server/ec2spotmanager/tests/test_task_graph.py @@ -17,6 +17,7 @@ from unittest.mock import call import pytest +from pytest_mock import MockerFixture from ec2spotmanager.cron import check_instance_pools from ec2spotmanager.tasks import terminate_instances from ec2spotmanager.CloudProvider.CloudProvider import INSTANCE_STATE @@ -26,7 +27,7 @@ pytestmark = pytest.mark.usefixtures('ec2spotmanager_test', 'mock_provider') # pylint: disable=invalid-name -def test_update_pool_graph(mocker): +def test_update_pool_graph(mocker: MockerFixture) -> None: mock_group = mocker.patch('celery.group') mock_chain = mocker.patch('celery.chain') mock_chord = mocker.patch('celery.chord') @@ -147,7 +148,7 @@ def test_update_pool_graph(mocker): assert mock_chain.return_value.on_error.return_value.call_args == call() -def test_update_pool_graph_unsupported_running(mocker): +def test_update_pool_graph_unsupported_running(mocker: MockerFixture) -> None: """check that unsupported but running instances are still updated eg. if a config is edited to exclude a provider, but there are already instances. we should still update them. """ @@ -236,7 +237,7 @@ def test_update_pool_graph_unsupported_running(mocker): assert mock_chain.return_value.on_error.return_value.call_args == call() -def test_terminate_instances(mocker): +def test_terminate_instances(mocker: MockerFixture) -> None: """test that terminate instances triggers the appropriate subtasks""" mock_group = mocker.patch('celery.group') mock_term_instance = mocker.patch('ec2spotmanager.tasks._terminate_instance_ids') diff --git a/server/taskmanager/tests/test_taskmanager.py b/server/taskmanager/tests/test_taskmanager.py index 72982f3fb..112b0c2bf 100644 --- a/server/taskmanager/tests/test_taskmanager.py +++ b/server/taskmanager/tests/test_taskmanager.py @@ -15,7 +15,9 @@ import logging import pytest import requests +from django.test.client import Client from django.urls import reverse +from pytest_django.fixtures import SettingsWrapper from . import create_pool LOG = logging.getLogger("fm.taskmanager.tests.views") @@ -24,7 +26,7 @@ @pytest.mark.parametrize("name", ["taskmanager:index", "taskmanager:pool-list-ui"]) -def test_views_no_login(name, client): +def test_views_no_login(name: str, client: Client) -> None: """Request without login hits the login redirect""" path = reverse(name) response = client.get(path, follow=False) @@ -32,7 +34,7 @@ def test_views_no_login(name, client): assert response.url == "/login/?next=" + path -def test_index_simple_get(client): +def test_index_simple_get(client: Client) -> None: """Index redirects""" client.login(username='test', password='test') response = client.get(reverse("taskmanager:index")) @@ -41,7 +43,7 @@ def test_index_simple_get(client): assert response["Location"] == reverse("taskmanager:pool-list-ui") -def test_view_simple_get(client): +def test_view_simple_get(client: Client) -> None: """No errors are thrown in template""" client.login(username='test', password='test') response = client.get(reverse("taskmanager:pool-list-ui")) @@ -49,7 +51,7 @@ def test_view_simple_get(client): assert response.status_code == requests.codes["ok"] -def test_detail_view_no_login(client): +def test_detail_view_no_login(client: Client) -> None: pool = create_pool() path = reverse("taskmanager:pool-view-ui", args=(pool.pk,)) response = client.get(path, follow=False) @@ -57,7 +59,7 @@ def test_detail_view_no_login(client): assert response.url == "/login/?next=" + path -def test_detail_view_simple_get(client, settings): +def test_detail_view_simple_get(client: Client, settings: SettingsWrapper) -> None: settings.TC_EXTRA_POOLS = ["extra"] pool = create_pool() path = reverse("taskmanager:pool-view-ui", args=(pool.pk,)) From 6fd17db1c1e155fc24f41d912cf5927d3e5f96a8 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 11 Feb 2022 20:16:18 -0800 Subject: [PATCH 101/137] 749 mypy issues left --- server/ec2spotmanager/models.py | 60 ++++++------ server/ec2spotmanager/views.py | 93 ++++++++++--------- server/server/views.py | 3 +- server/taskmanager/migrations/0001_initial.py | 2 +- 4 files changed, 83 insertions(+), 75 deletions(-) diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index 6e08dcf87..5da157aad 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -36,14 +36,14 @@ def get_available_name(self, name: str, max_length: int | None = None) -> str: class PoolConfiguration(models.Model): parent = models.ForeignKey('self', blank=True, null=True, on_delete=models.deletion.CASCADE) name = str(models.CharField(max_length=255, blank=False)) - size = int(str(models.IntegerField(default=1, blank=True, null=True))) - cycle_interval = int(str(models.IntegerField(default=86400, blank=True, null=True))) + size: int | None = int(str(models.IntegerField(default=1, blank=True, null=True))) + cycle_interval: int | None = int(str(models.IntegerField(default=86400, blank=True, null=True))) max_price = models.DecimalField(max_digits=12, decimal_places=6, blank=True, null=True) instance_tags = str(models.CharField(max_length=1023, blank=True, null=True)) - ec2_key_name = str(models.CharField(max_length=255, blank=True, null=True)) + ec2_key_name: str | None = str(models.CharField(max_length=255, blank=True, null=True)) ec2_security_groups = str(models.CharField(max_length=255, blank=True, null=True)) ec2_instance_types = str(models.TextField(blank=True, null=True)) - ec2_image_name = str(models.CharField(max_length=255, blank=True, null=True)) + ec2_image_name: str | None = str(models.CharField(max_length=255, blank=True, null=True)) ec2_userdata_file = \ models.FileField(storage=OverwritingStorage(location=getattr(settings, 'USERDATA_STORAGE', None)), upload_to=get_storage_path, blank=True, null=True) @@ -51,10 +51,10 @@ class PoolConfiguration(models.Model): ec2_allowed_regions = str(models.CharField(max_length=1023, blank=True, null=True)) ec2_raw_config = str(models.TextField(blank=True, null=True)) gce_machine_types = str(models.TextField(blank=True, null=True)) - gce_image_name = str(models.CharField(max_length=255, blank=True, null=True)) - gce_container_name = str(models.CharField(max_length=512, blank=True, null=True)) + gce_image_name: str | None = str(models.CharField(max_length=255, blank=True, null=True)) + gce_container_name: str | None = str(models.CharField(max_length=512, blank=True, null=True)) gce_docker_privileged = bool(models.BooleanField(default=False)) - gce_disk_size = int(str(models.IntegerField(blank=True, null=True))) + gce_disk_size: int | None = int(str(models.IntegerField(blank=True, null=True))) gce_cmd = str(models.TextField(blank=True, null=True)) gce_args = str(models.TextField(blank=True, null=True)) gce_env = str(models.TextField(blank=True, null=True)) @@ -65,29 +65,29 @@ class PoolConfiguration(models.Model): def __init__(self, *args, **kwargs) -> None: # These variables can hold temporarily deserialized data - self.instance_tags_dict = None + self.instance_tags_dict: dict[str, str] | None = None self.instance_tags_override: bool | None = None - self.ec2_raw_config_dict = None - self.ec2_raw_config_override = None - self.ec2_userdata_macros_dict = None - self.ec2_userdata_macros_override = None + self.ec2_raw_config_dict: dict[str, str] | None = None + self.ec2_raw_config_override: bool | None = None + self.ec2_userdata_macros_dict: dict[str, str] | None = None + self.ec2_userdata_macros_override: bool | None = None self.ec2_userdata = None - self.ec2_security_groups_list = None - self.ec2_security_groups_override = None - self.ec2_allowed_regions_list = None - self.ec2_allowed_regions_override = None - self.ec2_instance_types_list = None - self.ec2_instance_types_override = None - self.gce_machine_types_list = None - self.gce_machine_types_override = None - self.gce_cmd_list = None - self.gce_cmd_override = None - self.gce_args_list = None - self.gce_args_override = None - self.gce_env_dict = None - self.gce_env_override = None - self.gce_raw_config_dict = None - self.gce_raw_config_override = None + self.ec2_security_groups_list: list[str] | None = None + self.ec2_security_groups_override: bool | None = None + self.ec2_allowed_regions_list: list[str] | None = None + self.ec2_allowed_regions_override: bool | None = None + self.ec2_instance_types_list: list[str] | None = None + self.ec2_instance_types_override: bool | None = None + self.gce_machine_types_list: list[str] | None = None + self.gce_machine_types_override: bool | None = None + self.gce_cmd_list: list[str] | None = None + self.gce_cmd_override: bool | None = None + self.gce_args_list: list[str] | None = None + self.gce_args_override: bool | None = None + self.gce_env_dict: dict[str, str] | None = None + self.gce_env_override: bool | None = None + self.gce_raw_config_dict: dict[str, str] | None = None + self.gce_raw_config_override: bool | None = None # This list is used to update the parent configuration with our own # values and to check for missing fields in our flat config. @@ -278,7 +278,7 @@ def _cache_parent(self, cache): return self.parent return cache.get(self.parent_id) - def isCyclic(self, cache=None): + def isCyclic(self, cache=None) -> bool: # cache is optionally a prefetched {config_id: config} dictionary used for parent lookups if self._cache_parent(cache) is None: return False @@ -291,7 +291,7 @@ def isCyclic(self, cache=None): hare = hare._cache_parent(cache)._cache_parent(cache) return tortoise == hare - def getMissingParameters(self): + def getMissingParameters(self) -> list[str]: flat_config = self.flatten() ec2_missing_fields = [] gce_missing_fields = [] diff --git a/server/ec2spotmanager/views.py b/server/ec2spotmanager/views.py index 9d0b20a4b..e47aa39d9 100644 --- a/server/ec2spotmanager/views.py +++ b/server/ec2spotmanager/views.py @@ -9,34 +9,40 @@ from django.core.files.base import ContentFile from django.db.models import Q from django.db.models.aggregates import Count, Sum +from django.http import HttpResponse +from django.http.request import HttpRequest from django.http.response import Http404 # noqa +from django.http.response import HttpResponsePermanentRedirect +from django.http.response import HttpResponseRedirect from django.shortcuts import render, redirect, get_object_or_404 from django.utils.timezone import now, timedelta import fasteners import redis from rest_framework import mixins, serializers, status, viewsets from rest_framework.authentication import SessionAuthentication, TokenAuthentication +from rest_framework.request import Request from rest_framework.response import Response from rest_framework.views import APIView from server.auth import CheckAppPermission from server.views import deny_restricted_users +from typing import Any, Sequence from .models import InstancePool, PoolConfiguration, Instance, PoolStatusEntry, ProviderStatusEntry from .models import PoolUptimeDetailedEntry, PoolUptimeAccumulatedEntry from .serializers import MachineStatusSerializer, PoolConfigurationSerializer from .CloudProvider.CloudProvider import INSTANCE_STATE, INSTANCE_STATE_CODE, PROVIDERS, CloudProvider -def renderError(request, err): +def renderError(request: HttpRequest, err: str) -> HttpResponse: return render(request, 'error.html', {'error_message': err}) @deny_restricted_users -def index(request): +def index(request: HttpRequest) -> HttpResponsePermanentRedirect | HttpResponseRedirect: return redirect('ec2spotmanager:pools') @deny_restricted_users -def pools(request): +def pools(request: HttpRequest) -> HttpResponse: filters = {} isSearch = True @@ -88,11 +94,11 @@ def pools(request): entry.msgs.append(status_entry) break - provider_msgs = {} + provider_msgs: dict[str, list[ProviderStatusEntry]] = {} for msg in ProviderStatusEntry.objects.all().order_by('-created'): provider_msgs.setdefault(msg.provider, []).append(msg) - provider_pools = {} + provider_pools: dict[str, set[int]] = {} for pool in entries: flattened_config = pool.config.flatten(configs) for provider in provider_msgs: @@ -127,7 +133,7 @@ def pools(request): @deny_restricted_users -def viewPool(request, poolid): +def viewPool(request: HttpRequest, poolid: int) -> HttpResponse: pool = get_object_or_404(InstancePool, pk=poolid) instances = Instance.objects.filter(pool=poolid) @@ -150,7 +156,7 @@ def viewPool(request, poolid): pool.msgs = PoolStatusEntry.objects.filter(pool=pool).order_by('-created') - provider_msgs = {} + provider_msgs: dict[str, list[str]] = {} relevant_providers = {} for msg in ProviderStatusEntry.objects.all().order_by('-created'): # a status provider is relevant to this pool if it is supported by the config, @@ -178,7 +184,7 @@ def viewPool(request, poolid): @deny_restricted_users -def viewPoolPrices(request, poolid): +def viewPoolPrices(request: HttpRequest, poolid: int) -> HttpResponse: cache = redis.StrictRedis.from_url(settings.REDIS_URL) pool = get_object_or_404(InstancePool, pk=poolid) @@ -192,13 +198,13 @@ def viewPoolPrices(request, poolid): cores_per_instance = cloud_provider.get_cores_per_instance() allowed_regions = set(cloud_provider.get_allowed_regions(config)) zones = set() - latest_price_by_zone = {} + latest_price_by_zone: dict[str, int] = {} for instance_type in cloud_provider.get_instance_types(config): - prices = cache.get('%s:price:%s' % (cloud_provider.get_name(), instance_type)) - if prices is None: + prices_ = cache.get('%s:price:%s' % (cloud_provider.get_name(), instance_type)) + if prices_ is None: continue - prices = json.loads(prices) + prices = json.loads(prices_) for region in prices: if region not in allowed_regions: continue @@ -214,7 +220,7 @@ def viewPoolPrices(request, poolid): @deny_restricted_users -def disablePool(request, poolid): +def disablePool(request: HttpRequest, poolid: int) -> HttpResponse: pool = get_object_or_404(InstancePool, pk=poolid) if not pool.isEnabled: @@ -232,7 +238,7 @@ def disablePool(request, poolid): @deny_restricted_users -def enablePool(request, poolid): +def enablePool(request: HttpRequest, poolid: int) -> HttpResponse: pool = get_object_or_404(InstancePool, pk=poolid) # Safety check: Figure out if any parameters are missing @@ -262,7 +268,7 @@ def enablePool(request, poolid): @deny_restricted_users -def forceCyclePool(request, poolid): +def forceCyclePool(request: HttpRequest, poolid: int) -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: pool = get_object_or_404(InstancePool, pk=poolid) if not pool.isEnabled: @@ -280,10 +286,10 @@ def forceCyclePool(request, poolid): @deny_restricted_users -def forceCyclePoolsByConfig(request, configid): +def forceCyclePoolsByConfig(request: HttpRequest, configid: int) -> list[PoolConfiguration] | HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: config = get_object_or_404(PoolConfiguration, pk=configid) - def recurse_get_dependent_configurations(config): + def recurse_get_dependent_configurations(config: PoolConfiguration) -> list[int]: config_pks = [config.pk] configs = PoolConfiguration.objects.filter(parent=config) @@ -313,7 +319,7 @@ def recurse_get_dependent_configurations(config): @deny_restricted_users -def createPool(request): +def createPool(request: HttpRequest) -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: if request.method == 'POST': pool = InstancePool() config = get_object_or_404(PoolConfiguration, pk=int(request.POST['config'])) @@ -328,11 +334,11 @@ def createPool(request): @deny_restricted_users -def viewConfigs(request): +def viewConfigs(request: HttpRequest) -> HttpResponse: configs = PoolConfiguration.objects.all() roots = configs.filter(parent=None) - def add_children(node): + def add_children(node: PoolConfiguration) -> None: node.children = [] children = configs.filter(parent=node) for child in children: @@ -348,7 +354,7 @@ def add_children(node): @deny_restricted_users -def viewConfig(request, configid): +def viewConfig(request: HttpRequest, configid: int) -> HttpResponse: config = get_object_or_404(PoolConfiguration, pk=configid) config.deserializeFields() @@ -356,7 +362,7 @@ def viewConfig(request, configid): return render(request, 'config/view.html', {'config': config}) -def __handleConfigPOST(request, config): +def __handleConfigPOST(request: HttpRequest, config: PoolConfiguration) -> HttpResponsePermanentRedirect | HttpResponseRedirect: if int(request.POST['parent']) < 0: config.parent = None else: @@ -488,6 +494,7 @@ def __handleConfigPOST(request, config): config.ec2_userdata_file.save("default.sh", ContentFile("")) config.ec2_userdata = request.POST['ec2_userdata'] if request.POST.get('ec2_userdata_ff', 'unix') == 'unix': + assert config.ec2_userdata is not None config.ec2_userdata = config.ec2_userdata.replace('\r\n', '\n') config.storeTestAndSave() else: @@ -500,7 +507,7 @@ def __handleConfigPOST(request, config): @deny_restricted_users -def createConfig(request): +def createConfig(request: HttpRequest) -> HttpResponse: if request.method == 'POST': config = PoolConfiguration() return __handleConfigPOST(request, config) @@ -529,7 +536,7 @@ def createConfig(request): @deny_restricted_users -def editConfig(request, configid): +def editConfig(request: HttpRequest, configid: int) -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: config = get_object_or_404(PoolConfiguration, pk=configid) config.deserializeFields() @@ -547,7 +554,7 @@ def editConfig(request, configid): @deny_restricted_users -def deletePool(request, poolid): +def deletePool(request: HttpRequest, poolid: int) -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: pool = get_object_or_404(InstancePool, pk=poolid) if pool.isEnabled: @@ -581,7 +588,7 @@ def deletePool(request, poolid): @deny_restricted_users -def deletePoolMsg(request, msgid, from_pool='0'): +def deletePoolMsg(request: HttpRequest, msgid: int, from_pool: str = '0') -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: entry = get_object_or_404(PoolStatusEntry, pk=msgid) if request.method == 'POST': from_pool = int(request.POST['from_pool']) @@ -599,7 +606,7 @@ def deletePoolMsg(request, msgid, from_pool='0'): @deny_restricted_users -def deleteProviderMsg(request, msgid): +def deleteProviderMsg(request: HttpRequest, msgid: int) -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: entry = get_object_or_404(ProviderStatusEntry, pk=msgid) if request.method == 'POST': entry.delete() @@ -611,7 +618,7 @@ def deleteProviderMsg(request, msgid): @deny_restricted_users -def deleteConfig(request, configid): +def deleteConfig(request: HttpRequest, configid: int) -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: config = get_object_or_404(PoolConfiguration, pk=configid) pools = InstancePool.objects.filter(config=config) @@ -643,7 +650,7 @@ def deleteConfig(request, configid): class UptimeChartViewDetailed(JSONView): authentication_classes = (SessionAuthentication,) # noqa - def get_context_data(self, **kwargs): + def get_context_data(self, **kwargs: Any) -> dict[str, object]: context = super(UptimeChartViewDetailed, self).get_context_data(**kwargs) pool = InstancePool.objects.get(pk=int(kwargs['poolid'])) pool.flat_config = pool.config.flatten() @@ -661,7 +668,7 @@ def get_context_data(self, **kwargs): def get_colors(self): return next_color() - def get_data_colors(self, entries): + def get_data_colors(self, entries) -> list[str]: colors = [] red = (204, 0, 0) yellow = (255, 204, 0) @@ -677,7 +684,7 @@ def get_data_colors(self, entries): return colors - def get_options(self, pool, entries): + def get_options(self, pool, entries) -> dict[str, object]: if entries: scaleSteps = max(entries, key=attrgetter('target')).target + 1 else: @@ -710,14 +717,14 @@ def get_datasets(self, pool, entries): datasets.append(dataset) return datasets - def get_labels(self, pool, entries): + def get_labels(self, pool, entries) -> list[str]: return [x.created.strftime("%H:%M") for x in entries] class UptimeChartViewAccumulated(JSONView): authentication_classes = (SessionAuthentication,) # noqa - def get_context_data(self, **kwargs): + def get_context_data(self, **kwargs: Any): context = super(UptimeChartViewAccumulated, self).get_context_data(**kwargs) pool = InstancePool.objects.get(pk=int(kwargs['poolid'])) pool.flat_config = pool.config.flatten() @@ -735,7 +742,7 @@ def get_context_data(self, **kwargs): def get_colors(self): return next_color() - def get_data_colors(self, entries): + def get_data_colors(self, entries) -> list[str]: colors = [] red = (204, 0, 0) orange = (255, 128, 0) @@ -754,7 +761,7 @@ def get_data_colors(self, entries): return colors - def get_options(self, pool, entries): + def get_options(self, pool, entries) -> dict[str, object]: # Scale to 100% but use 110 so the red bar is actually visible scaleSteps = 11 return { @@ -786,19 +793,19 @@ def get_datasets(self, pool, entries): datasets.append(dataset) return datasets - def get_labels(self, pool, entries): + def get_labels(self, pool, entries) -> list[str]: return [x.created.strftime("%b %d") for x in entries] class MachineStatusViewSet(APIView): authentication_classes = (TokenAuthentication,) # noqa - def get(self, request, *args, **kwargs): - result = {} + def get(self, request: Request, *args: Any, **kwargs: Any) -> Response: + result: dict[str, object] = {} response = Response(result, status=status.HTTP_200_OK) return response - def post(self, request, *args, **kwargs): + def post(self, request: Request, *args: Any, **kwargs: Any) -> Response: if 'client' not in request.data: return Response({"error": '"client" is required.'}, status=status.HTTP_400_BAD_REQUEST) @@ -821,7 +828,7 @@ class PoolConfigurationViewSet(mixins.RetrieveModelMixin, queryset = PoolConfiguration.objects.all() # noqa serializer_class = PoolConfigurationSerializer - def retrieve(self, request, *args, **kwds): + def retrieve(self, request: Request, *args: Any, **kwds: Any) -> Response: flatten = request.query_params.get('flatten', '0') try: flatten = int(flatten) @@ -836,7 +843,7 @@ class PoolCycleView(APIView): authentication_classes = (TokenAuthentication,) # noqa permission_classes = (CheckAppPermission,) - def post(self, request, poolid, format=None): + def post(self, request: Request, poolid: int, format: str | None = None) -> Response: pool = get_object_or_404(InstancePool, pk=poolid) if not pool.isEnabled: @@ -852,7 +859,7 @@ class PoolEnableView(APIView): authentication_classes = (TokenAuthentication,) # noqa permission_classes = (CheckAppPermission,) - def post(self, request, poolid, format=None): + def post(self, request: Request, poolid: int, format: str | None = None) -> Response: pool = get_object_or_404(InstancePool, pk=poolid) if pool.isEnabled: @@ -869,7 +876,7 @@ class PoolDisableView(APIView): authentication_classes = (TokenAuthentication,) # noqa permission_classes = (CheckAppPermission,) - def post(self, request, poolid, format=None): + def post(self, request: Request, poolid: int, format: str | None = None) -> Response: pool = get_object_or_404(InstancePool, pk=poolid) if not pool.isEnabled: diff --git a/server/server/views.py b/server/server/views.py index b3f7b60fb..3e7fe40b2 100644 --- a/server/server/views.py +++ b/server/server/views.py @@ -20,6 +20,7 @@ import json from rest_framework import filters import six +from typing import Any from typing import TypeVar from typing import cast @@ -48,7 +49,7 @@ def login(request: HttpRequest): return LoginView.as_view()(request) -def deny_restricted_users(wrapped): +def deny_restricted_users(wrapped: collections.abc.Callable[..., Any]) -> collections.abc.Callable[..., Any]: @functools.wraps(wrapped) def decorator(request, *args, **kwargs): user = User.get_or_create_restricted(request.user)[0] diff --git a/server/taskmanager/migrations/0001_initial.py b/server/taskmanager/migrations/0001_initial.py index 641fcf3c3..e1027dfab 100644 --- a/server/taskmanager/migrations/0001_initial.py +++ b/server/taskmanager/migrations/0001_initial.py @@ -10,7 +10,7 @@ class Migration(migrations.Migration): initial = True - dependencies: list[str] = [] + dependencies: list[tuple[str, str]] = [] operations = [ migrations.CreateModel( From 78d09f19acd75343cc2e4d85cfc18ce3a55ad8a5 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 11 Feb 2022 20:24:21 -0800 Subject: [PATCH 102/137] 746 mypy issues left --- FTB/Running/AutoRunner.py | 4 +++- server/covmanager/SourceCodeProvider/SourceCodeProvider.py | 5 +++-- .../migrations/0001_squashed_0013_add_gce_fields.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/FTB/Running/AutoRunner.py b/FTB/Running/AutoRunner.py index cf6f6088d..637f36611 100644 --- a/FTB/Running/AutoRunner.py +++ b/FTB/Running/AutoRunner.py @@ -220,7 +220,9 @@ def __init__(self, binary: str, args: list[str] | None = None, env=None, cwd=Non else: self.env["ASAN_SYMBOLIZER_PATH"] = os.path.join(os.path.dirname(binary), "llvm-symbolizer") if not os.path.isfile(self.env["ASAN_SYMBOLIZER_PATH"]): - self.env["ASAN_SYMBOLIZER_PATH"] = spawn.find_executable("llvm-symbolizer") + spawn_find_llvm_symbolizer = spawn.find_executable("llvm-symbolizer") + assert spawn_find_llvm_symbolizer is not None + self.env["ASAN_SYMBOLIZER_PATH"] = spawn_find_llvm_symbolizer if not self.env["ASAN_SYMBOLIZER_PATH"]: raise RuntimeError("Unable to locate llvm-symbolizer") diff --git a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py index 224c7e7d8..f153fc1b8 100644 --- a/server/covmanager/SourceCodeProvider/SourceCodeProvider.py +++ b/server/covmanager/SourceCodeProvider/SourceCodeProvider.py @@ -17,6 +17,7 @@ from abc import ABCMeta, abstractmethod import six +from typing_extensions import NotRequired from typing_extensions import TypedDict @@ -109,8 +110,8 @@ class CObj(TypedDict): filename: str | None locations: list[int] - missed: list[int] - not_coverable: list[int] + missed: NotRequired[list[int]] + not_coverable: NotRequired[list[int]] class Utils(): diff --git a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py index ca4cffa0f..92b72ced1 100644 --- a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py +++ b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py @@ -32,7 +32,7 @@ class Migration(migrations.Migration): initial = True - dependencies: list[str] = [] + dependencies: list[tuple[str, str]] = [] operations = [ migrations.CreateModel( From 105390dc1f662d281806d5981824dd2aa961ce96 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 18 Feb 2022 17:27:46 -0800 Subject: [PATCH 103/137] 727 mypy issues left --- FTB/Running/StreamCollector.py | 7 +++-- .../simulations/best_every_n_hours.py | 2 +- misc/ec2prices/simulations/choose_once.py | 2 +- misc/ec2prices/simulations/common.py | 31 ++++++++++++++----- server/covmanager/templatetags/recurseroot.py | 8 ++--- .../management/commands/get_auth_token.py | 2 +- .../ec2spotmanager/templatetags/datetags.py | 4 ++- 7 files changed, 38 insertions(+), 18 deletions(-) diff --git a/FTB/Running/StreamCollector.py b/FTB/Running/StreamCollector.py index 2e44e39e5..0c76cd908 100644 --- a/FTB/Running/StreamCollector.py +++ b/FTB/Running/StreamCollector.py @@ -16,12 +16,13 @@ from __future__ import annotations import threading +from typing import TextIO from six.moves import queue class StreamCollector(threading.Thread): - def __init__(self, fd, responseQueue, logResponses=False, maxBacklog=None): + def __init__(self, fd: TextIO, responseQueue: queue.Queue, logResponses: bool = False, maxBacklog: int | None = None) -> None: assert callable(fd.readline) assert isinstance(responseQueue, queue.Queue) @@ -29,8 +30,8 @@ def __init__(self, fd, responseQueue, logResponses=False, maxBacklog=None): self.fd = fd self.queue = responseQueue - self.output = [] - self.responsePrefixes = [] + self.output: list[str] = [] + self.responsePrefixes: list[str] = [] self.logResponses = logResponses self.maxBacklog = maxBacklog diff --git a/misc/ec2prices/simulations/best_every_n_hours.py b/misc/ec2prices/simulations/best_every_n_hours.py index ee79177c6..0cafc36d4 100644 --- a/misc/ec2prices/simulations/best_every_n_hours.py +++ b/misc/ec2prices/simulations/best_every_n_hours.py @@ -21,7 +21,7 @@ from .common import select_better -def run(data, sim_config, main_config): +def run(data, sim_config: dict[str, str], main_config: dict[str, str]) -> int | None: region = list(data.keys())[0] zone = list(data[region].keys())[0] instance_type = list(data[region][zone].keys())[0] diff --git a/misc/ec2prices/simulations/choose_once.py b/misc/ec2prices/simulations/choose_once.py index 5bbfecae9..7f0b2af32 100644 --- a/misc/ec2prices/simulations/choose_once.py +++ b/misc/ec2prices/simulations/choose_once.py @@ -21,7 +21,7 @@ from .common import select_better -def run(data, sim_config, main_config): +def run(data, sim_config: dict[str, str], main_config: dict[str, str]) -> int: fixed_region = None fixed_instance_type = None diff --git a/misc/ec2prices/simulations/common.py b/misc/ec2prices/simulations/common.py index 314de0089..8b6bea3f2 100644 --- a/misc/ec2prices/simulations/common.py +++ b/misc/ec2prices/simulations/common.py @@ -16,19 +16,32 @@ from __future__ import annotations +from typing_extensions import NotRequired +from typing_extensions import TypedDict -def select_better(data, current_price=None, region=None, zone=None, instance_type=None, instance_time=None, indent=1, - verbose=False): + +class RetType(TypedDict): + """Type information for ret.""" + + instance_type: NotRequired[str] + price: NotRequired[int] + region: NotRequired[str] + zone: NotRequired[str] + + +def select_better(data, current_price: int | None = None, region: str | None = None, zone: str | None = None, instance_type: str | None = None, instance_time: int | None = None, indent: int = 1, + verbose: bool = False) -> RetType: best_region = region best_zone = zone best_instance_type = instance_type best_price = current_price - def print_indent(s): + def print_indent(s: RetType | str) -> None: if verbose: print("%s%s" % ("*" * indent, s)) if region is None: + assert best_price is not None for region_name in data: ret = select_better(data, best_price, region_name, zone, instance_type, instance_time, indent + 1) if (best_price is None or best_price > ret["price"]): @@ -62,7 +75,11 @@ def print_indent(s): if current_time <= instance_time: (_, best_price, _) = data[region][zone][instance_type][current_time] - new_ret = {} + assert best_region is not None + assert best_zone is not None + assert best_instance_type is not None + assert best_price is not None + new_ret: RetType = {} new_ret["region"] = best_region new_ret["zone"] = best_zone new_ret["instance_type"] = best_instance_type @@ -71,9 +88,9 @@ def print_indent(s): return new_ret -def get_price_median(data): +def get_price_median(data: list[float]) -> float: sdata = sorted(data) n = len(sdata) if not n % 2: - return (sdata[n / 2] + sdata[n / 2 - 1]) / 2.0 - return sdata[n / 2] + return (sdata[int(n / 2)] + sdata[int(n / 2) - 1]) / 2.0 + return sdata[int(n / 2)] diff --git a/server/covmanager/templatetags/recurseroot.py b/server/covmanager/templatetags/recurseroot.py index ad6928aac..25e884860 100644 --- a/server/covmanager/templatetags/recurseroot.py +++ b/server/covmanager/templatetags/recurseroot.py @@ -7,11 +7,11 @@ class RecurseReportSummaryTree(template.Node): - def __init__(self, template_nodes, config_var) -> None: + def __init__(self, template_nodes: template.NodeList, config_var: template.Variable) -> None: self.template_nodes = template_nodes self.config_var = config_var - def _render_node(self, context, node): + def _render_node(self, context: template.context.Context, node: template.Node) -> str: context.push() context['node'] = node if "children" in node: @@ -21,12 +21,12 @@ def _render_node(self, context, node): context.pop() return rendered - def render(self, context): + def render(self, context: template.context.Context) -> str: return self._render_node(context, self.config_var.resolve(context)) @register.tag -def recurseroot(parser, token): +def recurseroot(parser: template.base.Parser, token: template.base.Token) -> RecurseReportSummaryTree: bits = token.contents.split() if len(bits) != 2: raise template.TemplateSyntaxError(_('%s tag requires a root') % bits[0]) # noqa diff --git a/server/crashmanager/management/commands/get_auth_token.py b/server/crashmanager/management/commands/get_auth_token.py index e53080f73..1d4cdf899 100644 --- a/server/crashmanager/management/commands/get_auth_token.py +++ b/server/crashmanager/management/commands/get_auth_token.py @@ -9,7 +9,7 @@ class Command(LabelCommand): help = "Provides the REST interface authentication token for the specified user(s)." - def handle_label(self, label, **options): + def handle_label(self, label: str, **options: str) -> None: user = User.objects.get(username=label) (token, created) = Token.objects.get_or_create(user=user) diff --git a/server/ec2spotmanager/templatetags/datetags.py b/server/ec2spotmanager/templatetags/datetags.py index ec18df981..4e01b0f0a 100644 --- a/server/ec2spotmanager/templatetags/datetags.py +++ b/server/ec2spotmanager/templatetags/datetags.py @@ -1,5 +1,7 @@ from __future__ import annotations +from datetime import datetime + from django import template from django.utils import timezone @@ -7,7 +9,7 @@ @register.filter -def date_ago(d): +def date_ago(d: datetime) -> str: delta = timezone.now() - d days = delta.days From 119aac3b3c9311c091ff108df11df37ce8f5e3c6 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 18 Feb 2022 17:47:53 -0800 Subject: [PATCH 104/137] 725 mypy issues left --- server/conftest.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/server/conftest.py b/server/conftest.py index 5ae82acd9..e4280980f 100644 --- a/server/conftest.py +++ b/server/conftest.py @@ -13,10 +13,14 @@ from __future__ import annotations import logging +from pathlib import Path + from django.apps import apps from django.db import connection from django.db.migrations.executor import MigrationExecutor import pytest +from pytest_django.fixtures import SettingsWrapper +from rest_framework.request import Request from rest_framework.test import APIClient logging.getLogger("django").setLevel(logging.WARNING) @@ -27,19 +31,19 @@ @pytest.fixture(autouse=True) -def dj_static_tmp(tmp_path, settings): +def dj_static_tmp(tmp_path: Path, settings: SettingsWrapper) -> None: dj_static = tmp_path / "dj-static" dj_static.mkdir() settings.STATIC_ROOT = str(dj_static) @pytest.fixture -def api_client(): +def api_client() -> APIClient: return APIClient() @pytest.fixture -def migration_hook(request): +def migration_hook(request: Request): ''' Pause migration at the migration named in @pytest.mark.migrate_from('0001-initial-migration') @@ -63,7 +67,9 @@ def migration_hook(request): assert len(migrate_to_mark.args) == 1, 'migrate_to mark expects 1 arg' assert not migrate_to_mark.kwargs, 'migrate_to mark takes no keywords' - app = apps.get_containing_app_config(request.module.__name__).name + apps_get_containing_app_config = apps.get_containing_app_config(request.module.__name__) + assert apps_get_containing_app_config is not None + app = apps_get_containing_app_config.name migrate_from = [(app, migrate_from_mark.args[0])] migrate_to = [(app, migrate_to_mark.args[0])] From d4139e2fcd48ffd4b414f8c3cc99bb93e312856a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 19 Feb 2022 17:32:02 -0800 Subject: [PATCH 105/137] 651 mypy issues left --- EC2Reporter/EC2Reporter.py | 3 +- TaskStatusReporter/TaskStatusReporter.py | 3 +- misc/afl_libfuzzer/S3Manager.py | 4 +- server/crashmanager/forms.py | 6 +- server/crashmanager/models.py | 56 ++++++++++--------- server/crashmanager/tasks.py | 2 +- .../CloudProvider/CloudProvider.py | 27 ++++----- .../CloudProvider/GCECloudProvider.py | 52 +++++++++-------- server/ec2spotmanager/models.py | 5 +- server/ec2spotmanager/tasks.py | 28 +++++----- .../templatetags/recursetags.py | 8 +-- server/server/auth.py | 8 ++- server/server/utils.py | 4 +- server/taskmanager/models.py | 14 +++-- server/taskmanager/serializers.py | 6 +- server/taskmanager/tasks.py | 5 +- server/taskmanager/tests/conftest.py | 8 ++- 17 files changed, 131 insertions(+), 108 deletions(-) diff --git a/EC2Reporter/EC2Reporter.py b/EC2Reporter/EC2Reporter.py index 9fd1a5b75..a1c04b37d 100755 --- a/EC2Reporter/EC2Reporter.py +++ b/EC2Reporter/EC2Reporter.py @@ -25,6 +25,7 @@ import random import sys import time +from typing import Any from fasteners import InterProcessLock import requests @@ -40,7 +41,7 @@ class EC2Reporter(Reporter): @functools.wraps(Reporter.__init__) - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: kwargs.setdefault('tool', 'N/A') # tool is required by remote_checks, but unused by EC2Reporter super(EC2Reporter, self).__init__(*args, **kwargs) diff --git a/TaskStatusReporter/TaskStatusReporter.py b/TaskStatusReporter/TaskStatusReporter.py index 49ffde041..3b53ad632 100755 --- a/TaskStatusReporter/TaskStatusReporter.py +++ b/TaskStatusReporter/TaskStatusReporter.py @@ -25,6 +25,7 @@ import random import sys import time +from typing import Any from fasteners import InterProcessLock import requests @@ -40,7 +41,7 @@ class TaskStatusReporter(Reporter): @functools.wraps(Reporter.__init__) - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: kwargs.setdefault('tool', 'N/A') # tool is required by remote_checks, but unused by TaskStatusReporter super(TaskStatusReporter, self).__init__(*args, **kwargs) diff --git a/misc/afl_libfuzzer/S3Manager.py b/misc/afl_libfuzzer/S3Manager.py index af49eec43..f4902420e 100644 --- a/misc/afl_libfuzzer/S3Manager.py +++ b/misc/afl_libfuzzer/S3Manager.py @@ -59,8 +59,8 @@ def __init__(self, bucket_name: str, project_name: str, build_project_name: str # Memorize which files we have uploaded/downloaded before, so we never attempt to # re-upload them to a different queue or re-download them after a local merge. - self.uploaded_files = set() - self.downloaded_files = set() + self.uploaded_files: set[str] = set() + self.downloaded_files: set[str] = set() def upload_libfuzzer_queue_dir(self, base_dir: str, corpus_dir: str, original_corpus: list[str]) -> None: ''' diff --git a/server/crashmanager/forms.py b/server/crashmanager/forms.py index fc7ab6d65..131fe2d7a 100644 --- a/server/crashmanager/forms.py +++ b/server/crashmanager/forms.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Any + from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, Layout, Div, Field, Submit from django.conf import settings @@ -196,7 +198,7 @@ class Meta: 'bucket_hit' ] - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: self.user = kwargs.pop('user', None) super().__init__(*args, **kwargs) @@ -224,7 +226,7 @@ def clean_defaultProviderId(self): data = self.cleaned_data['defaultProviderId'].id return data - def save(self, *args, **kwargs): + def save(self, *args: Any, **kwargs: Any) -> User: self.instance.user.email = self.cleaned_data['email'] self.instance.user.save() return super().save(*args, **kwargs) diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index 7ff523b3f..851372eed 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -1,5 +1,6 @@ from __future__ import annotations +from datetime import datetime import json import logging import re @@ -76,6 +77,7 @@ def loadTest(self) -> None: self.test.close() def storeTestAndSave(self) -> None: + assert self.content is not None self.size = len(self.content) self.test.open(mode='w') self.test.write(self.content) @@ -107,10 +109,10 @@ def __str__(self) -> str: class Bug(models.Model): externalId = str(models.CharField(max_length=255, blank=True)) externalType = cast(BugProvider, models.ForeignKey(BugProvider, on_delete=models.deletion.CASCADE)) - closed = models.DateTimeField(blank=True, null=True) + closed = cast(datetime, models.DateTimeField(blank=True, null=True)) @property - def tools_filter_users(self): + def tools_filter_users(self) -> QuerySet[DjangoUser]: ids = User.objects.filter( defaultToolsFilter__crashentry__bucket__in=self.bucket_set.all(), inaccessible_bug=True, @@ -127,7 +129,7 @@ class Bucket(models.Model): permanent = bool(models.BooleanField(blank=False, default=False)) @property - def watchers(self): + def watchers(self) -> QuerySet[DjangoUser]: ids = User.objects.filter( bucketwatch__bucket=self, bucket_hit=True @@ -154,7 +156,7 @@ def save(self, *args: Any, **kwargs: Any) -> None: super(Bucket, self).save(*args, **kwargs) - def reassign(self, submitSave): + def reassign(self, submitSave: bool): """ Assign all unassigned issues that match our signature to this bucket. Furthermore, remove all non-matching issues from our bucket. @@ -222,7 +224,7 @@ def reassign(self, submitSave): return inList, outList, inListCount, outListCount - def optimizeSignature(self, unbucketed_entries) -> tuple[CrashSignature | None, list[CrashEntry]]: + def optimizeSignature(self, unbucketed_entries: QuerySet[CrashEntry]) -> tuple[CrashSignature | None, list[CrashEntry]]: buckets = Bucket.objects.all() signature = self.getSignature() @@ -241,7 +243,7 @@ def optimizeSignature(self, unbucketed_entries) -> tuple[CrashSignature | None, for entry in entries: entry.crashinfo = entry.getCrashInfo(attachTestcase=signature.matchRequiresTest(), - requiredOutputSources=requiredOutputs) + requiredOutputSources=tuple(requiredOutputs)) # For optimization, disregard any issues that directly match since those could be # incoming new issues and we don't want these to block the optimization. @@ -255,7 +257,7 @@ def optimizeSignature(self, unbucketed_entries) -> tuple[CrashSignature | None, # broad and we should not consider it (or later rate it worse than others). matchesInOtherBuckets = False nonMatchesInOtherBuckets = 0 # noqa - otherMatchingBucketIds = [] # noqa + otherMatchingBucketIds: list[int] = [] # noqa for otherBucket in buckets: if otherBucket.pk == self.pk: continue @@ -267,11 +269,13 @@ def optimizeSignature(self, unbucketed_entries) -> tuple[CrashSignature | None, if otherBucket.pk not in firstEntryPerBucketCache: c = CrashEntry.objects.filter(bucket=otherBucket).select_related("product", "platform", "os") c = CrashEntry.deferRawFields(c, requiredOutputs) - c = c.first() - firstEntryPerBucketCache[otherBucket.pk] = c - if c: + c_first = c.first() + assert c_first is not None + c_ = c_first + firstEntryPerBucketCache[otherBucket.pk] = c_ + if c_: # Omit testcase for performance reasons for now - firstEntryPerBucketCache[otherBucket.pk] = c.getCrashInfo( + firstEntryPerBucketCache[otherBucket.pk] = c_.getCrashInfo( attachTestcase=False, requiredOutputSources=requiredOutputs ) @@ -290,7 +294,7 @@ def optimizeSignature(self, unbucketed_entries) -> tuple[CrashSignature | None, else: for otherEntry in entries: otherEntry.crashinfo = otherEntry.getCrashInfo(attachTestcase=False, - requiredOutputSources=requiredOutputs) + requiredOutputSources=tuple(requiredOutputs)) if optimizedSignature.matches(otherEntry.crashinfo): matchingEntries.append(otherEntry) @@ -303,18 +307,18 @@ def optimizeSignature(self, unbucketed_entries) -> tuple[CrashSignature | None, return (optimizedSignature, matchingEntries) -def buckethit_default_range_begin(): +def buckethit_default_range_begin() -> datetime: return timezone.now().replace(microsecond=0, second=0, minute=0) class BucketHit(models.Model): bucket = cast(Bucket, models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE)) tool = cast(Tool, models.ForeignKey(Tool, on_delete=models.deletion.CASCADE)) - begin = models.DateTimeField(default=buckethit_default_range_begin) + begin = cast(datetime, models.DateTimeField(default=buckethit_default_range_begin)) count = int(str(models.IntegerField(default=0))) @classmethod - def decrement_count(cls, bucket_id, tool_id, begin): + def decrement_count(cls, bucket_id: int, tool_id: int, begin: datetime) -> None: begin = begin.replace(microsecond=0, second=0, minute=0) counter = cls.objects.filter( bucket_id=bucket_id, @@ -326,7 +330,7 @@ def decrement_count(cls, bucket_id, tool_id, begin): counter.save() @classmethod - def increment_count(cls, bucket_id, tool_id, begin): + def increment_count(cls, bucket_id: int, tool_id: int, begin: datetime) -> None: begin = begin.replace(microsecond=0, second=0, minute=0) counter, _ = cls.objects.get_or_create( bucket_id=bucket_id, begin=begin, tool_id=tool_id @@ -336,7 +340,7 @@ def increment_count(cls, bucket_id, tool_id, begin): class CrashEntry(models.Model): - created = models.DateTimeField(default=timezone.now) + created = cast(datetime, models.DateTimeField(default=timezone.now)) tool = cast(Tool, models.ForeignKey(Tool, on_delete=models.deletion.CASCADE)) platform = cast(Platform, models.ForeignKey(Platform, on_delete=models.deletion.CASCADE)) product = cast(Product, models.ForeignKey(Product, on_delete=models.deletion.CASCADE)) @@ -351,12 +355,12 @@ class CrashEntry(models.Model): env = str(models.TextField(blank=True)) args = str(models.TextField(blank=True)) crashAddress = str(models.CharField(max_length=255, blank=True)) - crashAddressNumeric = models.BigIntegerField(blank=True, null=True) + crashAddressNumeric = int(str(models.BigIntegerField(blank=True, null=True))) shortSignature = str(models.CharField(max_length=255, blank=True)) cachedCrashInfo = str(models.TextField(blank=True, null=True)) triagedOnce = bool(models.BooleanField(blank=False, default=False)) - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: # These variables can hold temporarily deserialized data self.argsList = None self.envList = None @@ -378,7 +382,7 @@ def from_db(cls, db, field_names, values): instance._original_bucket = instance.bucket_id return instance - def save(self, *args, **kwargs) -> None: + def save(self, *args: Any, **kwargs: Any) -> None: if self.pk is None and not getattr(settings, 'DB_ISUTF8MB4', False): # Replace 4-byte UTF-8 characters with U+FFFD if our database # doesn't support them. By default, MySQL utf-8 does not support these. @@ -438,7 +442,7 @@ def deserializeFields(self) -> None: metadataDict = json.loads(self.metadata) self.metadataList = ["%s=%s" % (s, metadataDict[s]) for s in metadataDict.keys()] - def getCrashInfo(self, attachTestcase: bool = False, requiredOutputSources: tuple[str, str, str] = ("stdout", "stderr", "crashdata")) -> CrashInfo: + def getCrashInfo(self, attachTestcase: bool = False, requiredOutputSources: tuple[str, ...] = ("stdout", "stderr", "crashdata")) -> CrashInfo: # TODO: This should be cached at some level # TODO: Need to include environment and program arguments here configuration = ProgramConfiguration(self.product.name, self.platform.name, self.os.name, self.product.version) @@ -515,7 +519,7 @@ def deferRawFields( # is also deleted when the CrashEntry is gone. It also explicitly # deletes the file on the filesystem which would otherwise remain. @receiver(post_delete, sender=CrashEntry) -def CrashEntry_delete(sender, instance, **kwargs): +def CrashEntry_delete(sender, instance, **kwargs) -> None: if instance.testcase: instance.testcase.delete(False) if instance.bucket_id is not None: @@ -523,13 +527,13 @@ def CrashEntry_delete(sender, instance, **kwargs): @receiver(post_delete, sender=TestCase) -def TestCase_delete(sender, instance, **kwargs): +def TestCase_delete(sender, instance, **kwargs) -> None: if instance.test: instance.test.delete(False) @receiver(post_save, sender=CrashEntry) -def CrashEntry_save(sender, instance, created, **kwargs): +def CrashEntry_save(sender, instance, created, **kwargs) -> None: if getattr(settings, 'USE_CELERY', None): if created and not instance.triagedOnce: triage_new_crash.delay(instance.pk) @@ -587,7 +591,7 @@ class BugzillaTemplate(models.Model): blocks = str(models.TextField(blank=True)) dependson = str(models.TextField(blank=True)) - def __str__(self): + def __str__(self) -> str: return self.name @@ -623,7 +627,7 @@ def get_or_create_restricted(request_user: AbstractBaseUser | AnonymousUser) -> @receiver(post_save, sender=DjangoUser) -def add_default_perms(sender, instance, created, **kwargs): +def add_default_perms(sender, instance, created, **kwargs) -> None: if created: log = logging.getLogger('crashmanager') for perm in getattr(settings, 'DEFAULT_PERMISSIONS', []): diff --git a/server/crashmanager/tasks.py b/server/crashmanager/tasks.py index aed8a4099..ae43e9323 100644 --- a/server/crashmanager/tasks.py +++ b/server/crashmanager/tasks.py @@ -7,5 +7,5 @@ @app.task(ignore_result=True) -def triage_new_crash(pk): +def triage_new_crash(pk: int) -> None: call_command('triage_new_crash', pk) diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index fa9842a25..0db936df9 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -14,6 +14,7 @@ from __future__ import annotations +from decimal import Decimal import functools import logging import socket @@ -26,7 +27,7 @@ import six -from ec2spotmanager.models import FlatObject +from ec2spotmanager.models import PoolConfiguration INSTANCE_STATE_CODE = {-1: "requested", 0: "pending", 16: "running", 32: "shutting-down", 48: "terminated", 64: "stopping", 80: "stopped"} @@ -97,7 +98,7 @@ def cancel_requests(self, requested_instances_by_region: dict[str, int]) -> None return @abstractmethod - def start_instances(self, config: FlatObject, region: str, zone: str, userdata, image: str, instance_type: str, count: int, tags: dict[str, str]) -> None: + def start_instances(self, config: PoolConfiguration, region: str, zone: str, userdata, image: str, instance_type: str, count: int, tags: dict[str, str]) -> None: ''' Start instances using specified configuration. @@ -117,7 +118,7 @@ def start_instances(self, config: FlatObject, region: str, zone: str, userdata, return @abstractmethod - def check_instances_requests(self, region: str, instances: list[str], tags: dict[str, str]) -> None: + def check_instances_requests(self, region: str, instances: list[str], tags: dict[str, str]) -> tuple[dict[str, str], dict[str, str]]: ''' Take a list of requested instances and determines the state of each instance. Since this is the first point we see an actual running instance @@ -151,7 +152,7 @@ def check_instances_state(self, pool_id: int, region: str) -> None: return @abstractmethod - def get_image(self, region: str, config: FlatObject) -> None: + def get_image(self, region: str, config: PoolConfiguration) -> str | None: ''' Takes a configuration and returns a provider specific image name. @@ -163,7 +164,7 @@ def get_image(self, region: str, config: FlatObject) -> None: @staticmethod @abstractmethod - def get_cores_per_instance() -> None: + def get_cores_per_instance() -> dict[str, float]: ''' returns dictionary of instance types and their number of cores @@ -173,7 +174,7 @@ def get_cores_per_instance() -> None: @staticmethod @abstractmethod - def get_allowed_regions(config: FlatObject) -> None: + def get_allowed_regions(config: PoolConfiguration) -> list[str]: ''' Takes a configuration and returns cloud provider specific regions. @@ -184,7 +185,7 @@ def get_allowed_regions(config: FlatObject) -> None: @staticmethod @abstractmethod - def get_image_name(config: FlatObject) -> None: + def get_image_name(config: PoolConfiguration) -> str | None: ''' Takes a configuration and returns cloud provider specific image name. @@ -195,7 +196,7 @@ def get_image_name(config: FlatObject) -> None: @staticmethod @abstractmethod - def get_instance_types(config: FlatObject) -> None: + def get_instance_types(config: PoolConfiguration) -> str: ''' Takes a configuration and returns a list of cloud provider specific instance_types. @@ -206,7 +207,7 @@ def get_instance_types(config: FlatObject) -> None: @staticmethod @abstractmethod - def get_max_price(config: FlatObject) -> None: + def get_max_price(config: PoolConfiguration) -> Decimal: ''' Takes a configuration and returns the cloud provider specific max_price. @@ -217,7 +218,7 @@ def get_max_price(config: FlatObject) -> None: @staticmethod @abstractmethod - def get_tags(config: FlatObject) -> None: + def get_tags(config: PoolConfiguration) -> str: ''' Takes a configuration and returns a dictionary of cloud provider specific tags. @@ -228,7 +229,7 @@ def get_tags(config: FlatObject) -> None: @staticmethod @abstractmethod - def get_name() -> None: + def get_name() -> str: ''' used to return name of cloud provider @@ -238,7 +239,7 @@ def get_name() -> None: @staticmethod @abstractmethod - def config_supported(config: FlatObject) -> None: + def config_supported(config: PoolConfiguration) -> bool: '''Compares the fields provided in the config with those required by the cloud provider. If any field is missing, return False. @@ -248,7 +249,7 @@ def config_supported(config: FlatObject) -> None: return @abstractmethod - def get_prices_per_region(self, region_name: str, instance_types: list[str]) -> None: + def get_prices_per_region(self, region_name: str, instance_types: list[str] | None) -> dict[str, dict[str, dict[str, float]]]: ''' takes region and instance_types and returns a dictionary of prices prices are stored with keys like 'provider:price:{instance-type}' diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index e94a4e610..20cfaa9ba 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -14,14 +14,17 @@ from __future__ import annotations +from decimal import Decimal import logging import requests import time +from typing import Any import yaml from django.conf import settings from laniakea.core.providers.gce import ComputeEngineManager, ComputeEngineManagerException from .CloudProvider import (CloudProvider, CloudProviderTemporaryFailure, INSTANCE_STATE, INSTANCE_STATE_CODE, wrap_provider_errors) +from ..models import PoolConfiguration from ..tasks import SPOTMGR_TAG from ..common.gce import CORES_PER_INSTANCE, RAM_PER_INSTANCE @@ -36,7 +39,7 @@ class _LowercaseDict(dict): - def __init__(self, *args, **kwds) -> None: + def __init__(self, *args: Any, **kwds: Any) -> None: super(_LowercaseDict, self).__init__() if len(args) > 1: raise TypeError("dict expected at most 1 arguments, got %d" % (len(args),)) @@ -51,13 +54,13 @@ def __init__(self, *args, **kwds) -> None: for (k, v) in kwds.items(): self[k] = v - def __getitem__(self, key): + def __getitem__(self, key: str): return super(_LowercaseDict, self).__getitem__(key.lower()) - def __setitem__(self, key, value): + def __setitem__(self, key: str, value: str): return super(_LowercaseDict, self).__setitem__(key.lower(), value.lower()) - def __delitem__(self, key): + def __delitem__(self, key: str): return super(_LowercaseDict, self).__delitem__(key.lower()) def __contains__(self, item): @@ -80,7 +83,7 @@ def __init__(self) -> None: self.logger = logging.getLogger("ec2spotmanager.gce") self.cluster = None - def _connect(self): + def _connect(self) -> ComputeEngineManager: if self.cluster is None: self.cluster = ComputeEngineManager(settings.GCE_CLIENT_EMAIL, settings.GCE_PRIVATE_KEY, @@ -88,6 +91,7 @@ def _connect(self): retries = [1, 5, 10, 30, None] for retry in retries: try: + assert self.cluster is not None self.cluster.connect(credential_file=settings.GCE_AUTH_CACHE) break except ComputeEngineManagerException as error: @@ -99,7 +103,7 @@ def _connect(self): return self.cluster @wrap_provider_errors - def terminate_instances(self, instances_ids_by_region): + def terminate_instances(self, instances_ids_by_region: dict[str, list[int]]) -> None: for region, instance_ids in instances_ids_by_region.items(): assert region == "global", "Invalid region name for GCE: %s (only 'global' supported)" % (region,) cluster = self._connect() @@ -114,7 +118,7 @@ def terminate_instances(self, instances_ids_by_region): cluster.terminate_nowait(nodes) @wrap_provider_errors - def cancel_requests(self, requested_instances_by_region): + def cancel_requests(self, requested_instances_by_region: dict[str, list[int]]) -> None: # no difference in how pending nodes are terminated in GCE self.logger.info("Canceling %d requests in GCE", len(requested_instances_by_region)) self.terminate_instances(requested_instances_by_region) @@ -128,7 +132,7 @@ def _node_to_instance(self, node): return instance @wrap_provider_errors - def start_instances(self, config, region, zone, _userdata, image, instance_type, count, tags): + def start_instances(self, config, region: str, zone: str, _userdata: str, image: str, instance_type: str, count: int, tags: dict[str, str]): assert region == "global", "Invalid region name for GCE: %s (only 'global' supported)" % (region,) self.logger.info("Using machine type %s in GCE availability zone %s.", instance_type, zone) cluster = self._connect() @@ -173,16 +177,16 @@ def start_instances(self, config, region, zone, _userdata, image, instance_type, disk = cluster.build_bootdisk(image, config.gce_disk_size, True) conf = cluster.build_container_vm(yaml.safe_dump(container_spec), disk, zone=zone, preemptible=True) - tags = _LowercaseDict(tags) - tags[SPOTMGR_TAG + "-Updatable"] = "1" - conf["ex_labels"] = tags + tags_ = _LowercaseDict(tags) + tags_[SPOTMGR_TAG + "-Updatable"] = "1" + conf["ex_labels"] = tags_ self.logger.info("Creating %dx %s instances... (%d cores total)", count, instance_type, count * CORES_PER_INSTANCE[instance_type]) nodes = cluster.create(instance_type, count, conf, image=image) return {node.name: self._node_to_instance(node) for node in nodes} @wrap_provider_errors - def check_instances_requests(self, region, instances, tags): + def check_instances_requests(self, region: str, instances: list[str], tags: dict[str, str]) -> tuple[dict[str, str], dict[str, str]]: # this isn't a spot provider, and tags were already set at instance creation assert region == "global", "Invalid region name for GCE: %s (only 'global' supported)" % (region,) cluster = self._connect() @@ -205,7 +209,7 @@ def check_instances_requests(self, region, instances, tags): return (requests, {}) @wrap_provider_errors - def check_instances_state(self, pool_id, region): + def check_instances_state(self, pool_id: int, region: str): # TODO: if we could return a hostname, `check_instances_requests` would be unnecessary for this provider assert region == "global", "Invalid region name for GCE: %s (only 'global' supported)" % (region,) @@ -230,32 +234,32 @@ def check_instances_state(self, pool_id, region): return instance_states - def get_image(self, region, config): + def get_image(self, region: str, config: PoolConfiguration) -> str | None: assert region == "global", "Invalid region name for GCE: %s (only 'global' supported)" % (region,) return config.gce_image_name @staticmethod - def get_cores_per_instance() -> int: + def get_cores_per_instance() -> dict[str, float]: return CORES_PER_INSTANCE @staticmethod - def get_allowed_regions(_config): + def get_allowed_regions(_config: PoolConfiguration) -> list[str]: return ["global"] @staticmethod - def get_image_name(config): + def get_image_name(config: PoolConfiguration) -> str | None: return config.gce_image_name @staticmethod - def get_instance_types(config): + def get_instance_types(config: PoolConfiguration) -> str: return config.gce_machine_types @staticmethod - def get_max_price(config): + def get_max_price(config: PoolConfiguration) -> Decimal: return config.max_price @staticmethod - def get_tags(config): + def get_tags(config: PoolConfiguration) -> str: return config.instance_tags @staticmethod @@ -263,12 +267,12 @@ def get_name() -> str: return 'GCE' @staticmethod - def config_supported(config): + def config_supported(config) -> bool: fields = ['gce_machine_types', 'max_price', 'gce_image_name', 'gce_container_name', 'gce_disk_size'] return all(config.get(key) for key in fields) - def get_prices_per_region(self, region_name, instance_types=None): + def get_prices_per_region(self, region_name: str, instance_types: list[str] | None = None) -> dict[str, dict[str, dict[str, float]]]: # Pricing information is not perfect. The API Zones don't map to the data provided by Cloud Billing # API. We usually get one price per zone (eg. us-east1), so we just assume that -a, -b, and -c have # the same price. In some cases we do get details like "price in Tokyo" and "price in Japan" @@ -357,7 +361,7 @@ def _get_skus_paginated(): zonedata.setdefault(what, []).append(price) # now we have all the data, and just have to calculate for our instance types and return - result = {} # {instance-type: {region: {az: [prices]}}} + result: dict[str, dict[str, dict[str, float]]] = {} # {instance-type: {region: {az: [prices]}}} for instance_type, cores in CORES_PER_INSTANCE.items(): mem = RAM_PER_INSTANCE[instance_type] @@ -385,7 +389,7 @@ def _get_skus_paginated(): # since we can't distinguish between zones using the billing API (see TODO above) # return the pricing data for all zones within the GCE region - all_zones_result = {} + all_zones_result: dict[str, dict[str, dict[str, float]]] = {} for instance_type, all_regions in result.items(): for region, region_data in all_regions.items(): all_zones_result[instance_type] = {} diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index 5da157aad..4b5caa9e4 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -1,5 +1,6 @@ from __future__ import annotations +from decimal import Decimal import json import os from typing import cast @@ -38,7 +39,7 @@ class PoolConfiguration(models.Model): name = str(models.CharField(max_length=255, blank=False)) size: int | None = int(str(models.IntegerField(default=1, blank=True, null=True))) cycle_interval: int | None = int(str(models.IntegerField(default=86400, blank=True, null=True))) - max_price = models.DecimalField(max_digits=12, decimal_places=6, blank=True, null=True) + max_price = cast(Decimal, models.DecimalField(max_digits=12, decimal_places=6, blank=True, null=True)) instance_tags = str(models.CharField(max_length=1023, blank=True, null=True)) ec2_key_name: str | None = str(models.CharField(max_length=255, blank=True, null=True)) ec2_security_groups = str(models.CharField(max_length=255, blank=True, null=True)) @@ -391,4 +392,4 @@ class PoolUptimeAccumulatedEntry(models.Model): pool = cast(InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE)) created = models.DateTimeField(default=timezone.now) accumulated_count = int(str(models.IntegerField(default=0))) - uptime_percentage = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True) + uptime_percentage = cast(Decimal, models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True)) diff --git a/server/ec2spotmanager/tasks.py b/server/ec2spotmanager/tasks.py index cde387438..dc4672eb9 100644 --- a/server/ec2spotmanager/tasks.py +++ b/server/ec2spotmanager/tasks.py @@ -12,7 +12,6 @@ from celeryconf import app from . import cron # noqa ensure cron tasks get registered from .common.prices import get_price_median -from .models import Pool from .CloudProvider.CloudProvider import INSTANCE_STATE, PROVIDERS, CloudProvider, CloudProviderError @@ -44,19 +43,19 @@ def _terminate_instance_request_ids(provider: str, region: str, request_ids: str _update_provider_status(provider, 'unclassified', str(msg)) -def _determine_best_location(config, count, cache=None): +def _determine_best_location(config, count: int, cache=None) -> tuple[str | None, str | None, str | None, str | None, dict[str, int]]: from .models import Instance, ProviderStatusEntry if cache is None: cache = redis.StrictRedis.from_url(settings.REDIS_URL) - best_provider = None - best_zone = None - best_region = None - best_type = None - best_median = None - best_instances = None - rejected_prices = {} + best_provider: str | None = None + best_zone: str | None = None + best_region: str | None = None + best_type: str | None = None + best_median: int | None = None + best_instances: int | None = None + rejected_prices: dict[str, int] = {} for provider in PROVIDERS: cloud_provider = CloudProvider.get_instance(provider) @@ -70,7 +69,7 @@ def _determine_best_location(config, count, cache=None): cores_per_instance = cloud_provider.get_cores_per_instance() # Filter machine sizes that would put us over the number of cores required. If all do, then choose the smallest. - smallest = [] + smallest: list[str] = [] smallest_size = None acceptable_types = [] for instance_type in cloud_provider.get_instance_types(config): @@ -120,6 +119,7 @@ def _determine_best_location(config, count, cache=None): if best_median is None or median <= best_median: # don't care about excluding stopped/stopping, as we just want to know how "busy" the zone is instances = int(Instance.objects.filter(provider=provider, region=region, zone=zone).count()) + assert best_instances is not None if median == best_median and instances >= best_instances: continue best_provider = provider @@ -134,7 +134,7 @@ def _determine_best_location(config, count, cache=None): return (best_provider, best_region, best_zone, best_type, rejected_prices) -def _start_pool_instances(pool: Pool, config, count: int = 1) -> None: +def _start_pool_instances(pool, config, count: int = 1) -> None: """ Start an instance with the given configuration """ from .models import Instance, PoolStatusEntry, POOL_STATUS_ENTRY_TYPE @@ -159,6 +159,7 @@ def _start_pool_instances(pool: Pool, config, count: int = 1) -> None: elif priceLowEntries: priceLowEntries.delete() + assert provider is not None cloud_provider = CloudProvider.get_instance(provider) image_name = cloud_provider.get_image_name(config) cores_per_instance = cloud_provider.get_cores_per_instance() @@ -220,6 +221,7 @@ def _start_pool_instances(pool: Pool, config, count: int = 1) -> None: instance.instance_id = instance_name instance.hostname = requested_instance['hostname'] instance.region = region + assert zone is not None instance.zone = zone instance.status_code = requested_instance['status_code'] instance.pool = pool @@ -489,7 +491,7 @@ def cycle_and_terminate_disabled(provider: str, region: str) -> None: # check if the pool has any instances to be terminated requests_to_terminate = [] instances_to_terminate = [] - instances_by_pool = {} + instances_by_pool: dict[str, int] = {} pool_disable = {} # pool_id -> reason (or blank for enabled) for instance in Instance.objects.filter(provider=provider, region=region): if instance.pool_id not in pool_disable: @@ -571,7 +573,7 @@ def check_and_resize_pool(pool_id: int) -> list[int]: instance_cores_missing = config.size running_instances = [] - instances = Instance.objects.filter(pool=pool) + instances = list(Instance.objects.filter(pool=pool)) for instance in instances: if instance.status_code in [INSTANCE_STATE['running'], INSTANCE_STATE['pending'], diff --git a/server/ec2spotmanager/templatetags/recursetags.py b/server/ec2spotmanager/templatetags/recursetags.py index 4b90b6a0e..11aaa501e 100644 --- a/server/ec2spotmanager/templatetags/recursetags.py +++ b/server/ec2spotmanager/templatetags/recursetags.py @@ -7,11 +7,11 @@ class RecurseConfigTree(template.Node): - def __init__(self, template_nodes, config_var) -> None: + def __init__(self, template_nodes: template.NodeList, config_var: template.Variable) -> None: self.template_nodes = template_nodes self.config_var = config_var - def _render_node(self, context, node): + def _render_node(self, context: template.context.Context, node: template.Node) -> str: context.push() context['node'] = node children = [self._render_node(context, x) for x in node.children] @@ -21,12 +21,12 @@ def _render_node(self, context, node): context.pop() return rendered - def render(self, context): + def render(self, context: template.context.Context) -> str: return self._render_node(context, self.config_var.resolve(context)) @register.tag -def recurseconfig(parser, token): +def recurseconfig(parser: template.base.Parser, token: template.base.Token) -> RecurseConfigTree: bits = token.contents.split() if len(bits) != 2: raise template.TemplateSyntaxError(_('%s tag requires a start configuration') % bits[0]) # noqa diff --git a/server/server/auth.py b/server/server/auth.py index fc3a678a9..63e5106a4 100644 --- a/server/server/auth.py +++ b/server/server/auth.py @@ -6,20 +6,22 @@ import unicodedata from django.conf import settings +from rest_framework.request import Request +from rest_framework.views import APIView from rest_framework import permissions if getattr(settings, 'USE_OIDC', False): from mozilla_django_oidc.auth import OIDCAuthenticationBackend # noqa - def generate_username(email): + def generate_username(email: str) -> str: # Using Python 3 and Django 1.11, usernames can contain alphanumeric # (ascii and unicode), _, @, +, . and - characters. So we normalize # it and slice at 150 characters. return unicodedata.normalize('NFKC', email)[:150] class FMOIDCAB(OIDCAuthenticationBackend): - def verify_claims(self, claims): + def verify_claims(self, claims: dict[str, str]) -> bool: verified = super(FMOIDCAB, self).verify_claims(claims) if not verified: @@ -34,7 +36,7 @@ class CheckAppPermission(permissions.BasePermission): Check that user has permission to view this app, whether via REST or web UI. """ - def has_permission(self, request, view): + def has_permission(self, request: Request, view: APIView) -> bool: if request.user and request.user.is_authenticated: app = view.__module__.split('.', 1)[0] diff --git a/server/server/utils.py b/server/server/utils.py index 3de1d2551..c0456787a 100644 --- a/server/server/utils.py +++ b/server/server/utils.py @@ -18,7 +18,7 @@ class RedisLock(object): Not using RedLock because it isn't passable as a celery argument, so we can't release the lock in an async chain. """ - def __init__(self, conn, name: str, unique_id: str | None = None): + def __init__(self, conn: redis.Redis[bytes], name: str, unique_id: str | None = None) -> None: self.conn = conn self.name = name if unique_id is None: @@ -26,7 +26,7 @@ def __init__(self, conn, name: str, unique_id: str | None = None): else: self.unique_id = unique_id - def acquire(self, acquire_timeout: int = 10, lock_expiry=None) -> str | None: + def acquire(self, acquire_timeout: int = 10, lock_expiry: int | None = None) -> str | None: end = time.time() + acquire_timeout while time.time() < end: if self.conn.set(self.name, self.unique_id, ex=lock_expiry, nx=True): diff --git a/server/taskmanager/models.py b/server/taskmanager/models.py index 8712179a9..782600fb2 100644 --- a/server/taskmanager/models.py +++ b/server/taskmanager/models.py @@ -2,6 +2,8 @@ from __future__ import annotations +from datetime import datetime +from datetime import timedelta from typing import cast from django.db import models @@ -13,8 +15,8 @@ class Pool(models.Model): platform = str(models.CharField(max_length=15)) size = int(str(models.PositiveIntegerField(null=True))) cpu = str(models.CharField(max_length=15, null=True)) - cycle_time = models.DurationField(null=True) - max_run_time = models.DurationField(null=True) + cycle_time = cast(timedelta, models.DurationField(null=True)) + max_run_time = cast(timedelta, models.DurationField(null=True)) class Task(models.Model): @@ -23,11 +25,11 @@ class Task(models.Model): decision_id = str(models.CharField(max_length=64, null=True)) run_id = int(str(models.PositiveIntegerField())) state = str(models.CharField(max_length=15)) - created = models.DateTimeField(null=True) + created = cast(datetime, models.DateTimeField(null=True)) status_data = str(models.CharField(max_length=4095, blank=True)) - started = models.DateTimeField(null=True) - resolved = models.DateTimeField(null=True) - expires = models.DateTimeField() + started = cast(datetime, models.DateTimeField(null=True)) + resolved = cast(datetime, models.DateTimeField(null=True)) + expires = cast(datetime, models.DateTimeField()) class Meta: unique_together = (("task_id", "run_id"),) diff --git a/server/taskmanager/serializers.py b/server/taskmanager/serializers.py index 4ad2d27bb..64f78fe1a 100644 --- a/server/taskmanager/serializers.py +++ b/server/taskmanager/serializers.py @@ -82,14 +82,14 @@ class Meta(PoolSerializer.Meta): 'view_url', ) - def get_hook_url(self, pool): + def get_hook_url(self, pool: Pool) -> str: if pool.pool_id in settings.TC_EXTRA_POOLS: hook = pool.pool_id else: hook = f"{pool.platform}-{pool.pool_id}" return f"{settings.TC_ROOT_URL}hooks/project-{settings.TC_PROJECT}/{hook}" - def get_view_url(self, pool): + def get_view_url(self, pool: Pool) -> str: return reverse('taskmanager:pool-view-ui', kwargs={'pk': pool.id}) @@ -114,5 +114,5 @@ class Meta(TaskSerializer.Meta): 'task_url', ) - def get_task_url(self, task): + def get_task_url(self, task: Task) -> str: return f"{settings.TC_ROOT_URL}tasks/{task.task_id}/runs/{task.run_id}" diff --git a/server/taskmanager/tasks.py b/server/taskmanager/tasks.py index 228253ae2..7217366c2 100644 --- a/server/taskmanager/tasks.py +++ b/server/taskmanager/tasks.py @@ -6,6 +6,7 @@ from logging import getLogger from pathlib import Path from subprocess import check_output + from django.conf import settings from celeryconf import app # noqa from . import cron # noqa ensure cron tasks get registered @@ -14,7 +15,7 @@ LOG = getLogger("taskmanager.tasks") -def get_or_create_pool(worker_type): +def get_or_create_pool(worker_type: str): from .models import Pool params = {} @@ -100,7 +101,7 @@ def update_pool_defns() -> None: @app.task(ignore_result=True) -def update_task(pulse_data): +def update_task(pulse_data) -> None: import taskcluster from .models import Task diff --git a/server/taskmanager/tests/conftest.py b/server/taskmanager/tests/conftest.py index 064a42b45..79cecd1bb 100644 --- a/server/taskmanager/tests/conftest.py +++ b/server/taskmanager/tests/conftest.py @@ -13,14 +13,16 @@ from __future__ import annotations +from typing import cast + from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission import pytest from crashmanager.models import User as cmUser -def _create_user(username, email="test@mozilla.com", password="test", has_permission=True): - user = User.objects.create_user(username, email, password) +def _create_user(username: str, email: str = "test@mozilla.com", password: str = "test", has_permission: bool = True) -> User: + user = cast(User, User.objects.create_user(username, email, password)) user.user_permissions.clear() if has_permission: content_type = ContentType.objects.get_for_model(cmUser) @@ -32,7 +34,7 @@ def _create_user(username, email="test@mozilla.com", password="test", has_permis @pytest.fixture -def taskmanager_test(db): # pylint: disable=invalid-name,unused-argument +def taskmanager_test(db: None) -> None: # pylint: disable=invalid-name,unused-argument """Common testcase class for all taskmanager unittests""" # Create one unrestricted and one restricted test user _create_user("test") From b8b6bed985116fa25013614915d5785f4f3bcf94 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 19 Feb 2022 18:03:52 -0800 Subject: [PATCH 106/137] 640 mypy issues left --- server/crashmanager/Bugtracker/BugzillaProvider.py | 14 ++++++++------ server/crashmanager/Bugtracker/BugzillaREST.py | 10 +++++----- server/crashmanager/Bugtracker/Provider.py | 11 +++++++---- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/server/crashmanager/Bugtracker/BugzillaProvider.py b/server/crashmanager/Bugtracker/BugzillaProvider.py index 13cdc9471..7e1b42630 100644 --- a/server/crashmanager/Bugtracker/BugzillaProvider.py +++ b/server/crashmanager/Bugtracker/BugzillaProvider.py @@ -14,20 +14,21 @@ from __future__ import annotations +from django.db.models.query import QuerySet from django.forms.models import model_to_dict from django.shortcuts import get_object_or_404 from django.utils import dateparse from .BugzillaREST import BugzillaREST from .Provider import Provider -from ..models import BugzillaTemplate, User +from ..models import BugzillaTemplate, CrashEntry, User class BugzillaProvider(Provider): - def __init__(self, pk, hostname) -> None: + def __init__(self, pk: int, hostname: str) -> None: super(BugzillaProvider, self).__init__(pk, hostname) - def getTemplateForUser(self, request, crashEntry): + def getTemplateForUser(self, request, crashEntry: CrashEntry): if 'template' in request.GET: obj = get_object_or_404(BugzillaTemplate, pk=request.GET['template']) template = model_to_dict(obj) @@ -51,18 +52,19 @@ def getTemplateForUser(self, request, crashEntry): return template - def getTemplateList(self): + def getTemplateList(self) -> QuerySet[BugzillaTemplate]: return BugzillaTemplate.objects.all() - def getBugData(self, bugId, username=None, password=None, api_key=None): + def getBugData(self, bugId: str, username: str | None = None, password: str | None = None, api_key: str | None = None) -> str | None: bz = BugzillaREST(self.hostname, username, password, api_key) return bz.getBug(bugId) - def getBugStatus(self, bugIds, username=None, password=None, api_key=None): + def getBugStatus(self, bugIds: list[str], username: str | None = None, password: str | None = None, api_key: str | None = None): ret = {} bz = BugzillaREST(self.hostname, username, password, api_key) bugs = bz.getBugStatus(bugIds) + assert bugs is not None for bugId in bugs: if bugs[bugId]["is_open"]: ret[bugId] = None diff --git a/server/crashmanager/Bugtracker/BugzillaREST.py b/server/crashmanager/Bugtracker/BugzillaREST.py index e71d0d95b..5ada60dab 100644 --- a/server/crashmanager/Bugtracker/BugzillaREST.py +++ b/server/crashmanager/Bugtracker/BugzillaREST.py @@ -18,7 +18,7 @@ class BugzillaREST(): - def __init__(self, hostname, username=None, password=None, api_key=None): + def __init__(self, hostname: str, username: str | None = None, password: str | None = None, api_key: str | None = None) -> None: self.hostname = hostname self.baseUrl = 'https://%s/rest' % self.hostname self.username = username @@ -38,7 +38,7 @@ def __init__(self, hostname, username=None, password=None, api_key=None): # it in the URI for additional security. self.request_headers['X-BUGZILLA-API-KEY'] = self.api_key - def login(self, loginRequired=True, forceLogin=False): + def login(self, loginRequired: bool = True, forceLogin: bool = False) -> bool: if (self.username is None or self.password is None) and self.api_key is None: if loginRequired: raise RuntimeError("Need username/password or API key to login.") @@ -66,7 +66,7 @@ def login(self, loginRequired=True, forceLogin=False): self.authToken = json["token"] return True - def getBug(self, bugId): + def getBug(self, bugId: str) -> str | None: bugs = self.getBugs([bugId]) if not bugs: @@ -74,10 +74,10 @@ def getBug(self, bugId): return bugs[int(bugId)] - def getBugStatus(self, bugIds): + def getBugStatus(self, bugIds: list[str]): return self.getBugs(bugIds, include_fields=["id", "is_open", "resolution", "dupe_of", "cf_last_resolved"]) - def getBugs(self, bugIds, include_fields=None, exclude_fields=None): + def getBugs(self, bugIds: list[str] | str, include_fields: list[str] | None = None, exclude_fields: list[str] | None = None): if not isinstance(bugIds, list): bugIds = [bugIds] diff --git a/server/crashmanager/Bugtracker/Provider.py b/server/crashmanager/Bugtracker/Provider.py index 7a4015e6c..eaf08d87b 100644 --- a/server/crashmanager/Bugtracker/Provider.py +++ b/server/crashmanager/Bugtracker/Provider.py @@ -16,8 +16,11 @@ from abc import ABCMeta, abstractmethod +from django.db.models.query import QuerySet import six +from ..models import BugzillaTemplate + @six.add_metaclass(ABCMeta) class Provider(): @@ -25,18 +28,18 @@ class Provider(): Abstract base class that defines what interfaces Bug Providers must implement ''' - def __init__(self, pk, hostname) -> None: + def __init__(self, pk: int, hostname: str) -> None: self.pk = pk self.hostname = hostname @abstractmethod - def getTemplateList(self) -> None: + def getTemplateList(self) -> QuerySet[BugzillaTemplate]: return @abstractmethod - def getBugData(self, bugId, username=None, password=None): + def getBugData(self, bugId: str, username: str | None = None, password: str | None = None) -> str | None: return @abstractmethod - def getBugStatus(self, bugIds, username=None, password=None): + def getBugStatus(self, bugIds: list[str], username: str | None = None, password: str | None = None): return From 550d8970abe9ebfd01cd4d6e0db9b027e4999334 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 20 Feb 2022 02:00:17 -0800 Subject: [PATCH 107/137] 624 mypy issues left --- server/covmanager/views.py | 39 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/server/covmanager/views.py b/server/covmanager/views.py index a5ddcf58f..28cffed29 100644 --- a/server/covmanager/views.py +++ b/server/covmanager/views.py @@ -1,11 +1,12 @@ from __future__ import annotations -from datetime import datetime +from typing import Any from typing import cast from django.conf import settings from django.core.exceptions import SuspiciousOperation, PermissionDenied from django.db.models import Q +from django.db.models.query import QuerySet from django.http import Http404 from django.http.request import HttpRequest from django.http.response import HttpResponse @@ -18,7 +19,9 @@ from rest_framework import mixins, viewsets, filters from rest_framework.authentication import TokenAuthentication, \ SessionAuthentication -from typing_extensions import TypedDict +from rest_framework.request import Request +from rest_framework.response import Response +from rest_framework.views import APIView from wsgiref.util import FileWrapper from server.views import JsonQueryFilterBackend, SimpleQueryFilterBackend @@ -161,7 +164,7 @@ def collections_download(request: HttpRequest, collectionid: str) -> HttpRespons return response -def collections_browse_api(request: HttpRequest, collectionid: str, path) -> HttpResponse: +def collections_browse_api(request: HttpRequest, collectionid: str, path: str) -> HttpResponse: collection = get_object_or_404(Collection, pk=collectionid) if not collection.coverage: @@ -192,13 +195,6 @@ def collections_browse_api(request: HttpRequest, collectionid: str, path) -> Htt return HttpResponse(json.dumps(data), content_type='application/json') -class CTooltipDataType(TypedDict): - """ctooltipdata type specification.""" - id: int - label: str - created: datetime - - def collections_diff_api(request: HttpRequest, path: str) -> HttpResponse: collections: list[Collection] @@ -224,7 +220,7 @@ def collections_diff_api(request: HttpRequest, path: str) -> HttpResponse: # else: # raise Http404("NYI") - tooltipdata: list[CTooltipDataType] = [] + tooltipdata = [] for collection in collections: if not collection.coverage: @@ -253,7 +249,7 @@ def collections_diff_api(request: HttpRequest, path: str) -> HttpResponse: coverages.append(coverage) - ctooltipdata: CTooltipDataType = {} + ctooltipdata = {} for k in coverage: if k != "children": ctooltipdata[k] = coverage[k] @@ -312,7 +308,7 @@ def collections_patch(request: HttpRequest) -> HttpResponse: return render(request, 'collections/patch.html', {}) -def collections_patch_api(request: HttpRequest, collectionid: str, patch_revision) -> HttpResponse: +def collections_patch_api(request: HttpRequest, collectionid: str, patch_revision: str) -> HttpResponse: collection = get_object_or_404(Collection, pk=collectionid) if not collection.coverage: @@ -347,6 +343,7 @@ def collections_patch_api(request: HttpRequest, collectionid: str, patch_revisio prepatch_source = provider.getSource(filename, diff_revision) coll_source = provider.getSource(filename, collection.revision) + assert filename is not None if prepatch_source != coll_source: response = {"error": "Source code mismatch."} response["filename"] = filename @@ -471,21 +468,21 @@ def collections_reportsummary_api(request: HttpRequest, collectionid: str) -> Ht def repositories_search_api(request: HttpRequest) -> HttpResponse: - results = [] + results: list[Repository] = [] if "name" in request.GET: name = request.GET["name"] - results = Repository.objects.filter(name__contains=name).values_list('name', flat=True) + results = list(Repository.objects.filter(name__contains=name).values_list('name', flat=True)) return HttpResponse(json.dumps({"results": list(results)}), content_type='application/json') def tools_search_api(request: HttpRequest) -> HttpResponse: - results = [] + results: list[Tool] = [] if "name" in request.GET: name = request.GET["name"] - results = Tool.objects.filter(name__contains=name).values_list('name', flat=True) + results = list(Tool.objects.filter(name__contains=name).values_list('name', flat=True)) return HttpResponse(json.dumps({"results": list(results)}), content_type='application/json') @@ -600,7 +597,7 @@ class CollectionFilterBackend(filters.BaseFilterBackend): """ Accepts filtering with several collection-specific fields from the URL """ - def filter_queryset(self, request: HttpRequest, queryset, view): + def filter_queryset(self, request: Request, queryset, view: APIView): """ Return a filtered queryset. """ @@ -660,7 +657,7 @@ class ReportFilterBackend(filters.BaseFilterBackend): """ Accepts broad filtering by q parameter to search multiple fields """ - def filter_queryset(self, request: HttpRequest, queryset, view): + def filter_queryset(self, request: Request, queryset, view: APIView): """ Return a filtered queryset. """ @@ -704,7 +701,7 @@ class ReportViewSet(mixins.UpdateModelMixin, paginate_by_param = 'limit' filter_backends = [ReportFilterBackend] - def partial_update(self, request, *args, **kwargs): + def partial_update(self, request: Request, *args: Any, **kwargs: Any) -> Response: if (not request.user or not request.user.is_authenticated or not request.user.has_perm('crashmanager.view_crashmanager')): raise PermissionDenied() @@ -728,7 +725,7 @@ class ReportConfigurationFilterBackend(filters.BaseFilterBackend): """ Accepts broad filtering by q parameter to search multiple fields """ - def filter_queryset(self, request: HttpRequest, queryset, view): + def filter_queryset(self, request: Request, queryset, view: APIView): """ Return a filtered queryset. """ From 84137bf7f5821b9eddbe0ab536080104b29a8d76 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 20 Feb 2022 02:02:31 -0800 Subject: [PATCH 108/137] 620 mypy issues left --- server/taskmanager/cron.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/taskmanager/cron.py b/server/taskmanager/cron.py index 6c8a50acf..aecc79168 100644 --- a/server/taskmanager/cron.py +++ b/server/taskmanager/cron.py @@ -28,9 +28,9 @@ def update_tasks() -> None: # normal, try to update the task directly from taskcluster task_status = {} - done = set() + done: set[tuple[int, int]] = set() - def _update_task_run(task_id, run_id): + def _update_task_run(task_id: int, run_id: int) -> None: if (task_id, run_id) in done: return From 2f72b6d2f1d4ff83998ab4d3c6b7f0123f5a4ed5 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 21 Feb 2022 00:16:05 -0800 Subject: [PATCH 109/137] 589 mypy issues left --- CovReporter/CovReporter.py | 2 +- FTB/ConfigurationFiles.py | 2 +- FTB/Running/AutoRunner.py | 10 +- FTB/Signatures/tests/test_CrashSignature.py | 1 + misc/afl_libfuzzer/afl-libfuzzer-daemon.py | 22 ++-- misc/libfuzzer/libfuzzer.py | 2 +- server/covmanager/cron.py | 6 +- server/covmanager/models.py | 22 ++-- server/covmanager/serializers.py | 14 ++- server/covmanager/tasks.py | 7 +- .../covmanager/tests/test_collections_rest.py | 2 + server/covmanager/views.py | 10 +- .../Bugtracker/BugzillaProvider.py | 11 +- server/crashmanager/Bugtracker/Provider.py | 2 +- server/crashmanager/models.py | 29 ++--- server/crashmanager/serializers.py | 35 +++--- .../tests/test_signatures_rest.py | 3 +- server/crashmanager/views.py | 106 ++++++++++-------- .../CloudProvider/GCECloudProvider.py | 2 +- server/ec2spotmanager/common/prices.py | 4 +- server/ec2spotmanager/models.py | 56 ++++----- server/ec2spotmanager/serializers.py | 6 +- server/ec2spotmanager/tasks.py | 5 +- server/ec2spotmanager/tests/__init__.py | 36 +++--- server/ec2spotmanager/tests/conftest.py | 16 +-- server/ec2spotmanager/views.py | 17 +-- server/server/middleware.py | 29 +++-- server/server/views.py | 22 ++-- .../commands/taskmanager_scrape_task_group.py | 6 +- server/taskmanager/serializers.py | 2 +- server/taskmanager/views.py | 18 ++- 31 files changed, 291 insertions(+), 214 deletions(-) diff --git a/CovReporter/CovReporter.py b/CovReporter/CovReporter.py index 1393e7d8a..f8117660d 100755 --- a/CovReporter/CovReporter.py +++ b/CovReporter/CovReporter.py @@ -194,7 +194,7 @@ def version_info_from_coverage_data(coverage) -> dict[str, str]: raise RuntimeError("Unknown coverage format") @staticmethod - def create_combined_coverage(coverage_files: list[int | str], version: dict[str, str] | None = None) -> tuple[Mapping[str, object] | None, Mapping[str, object] | None, Mapping[str, object] | None]: + def create_combined_coverage(coverage_files: list[int | str], version: dict[str, str] | None = None): ''' Read coverage data from multiple files and return a single dictionary containing the merged data (already preprocessed). diff --git a/FTB/ConfigurationFiles.py b/FTB/ConfigurationFiles.py index 5dffb9e63..12950465c 100755 --- a/FTB/ConfigurationFiles.py +++ b/FTB/ConfigurationFiles.py @@ -45,7 +45,7 @@ def __init__(self, configFiles: list[str]) -> None: if sections: print("Warning: Ignoring the following config file sections: %s" % " ".join(sections), file=sys.stderr) - def getSectionMap(self, section: str) -> str: + def getSectionMap(self, section: str) -> dict[str, str]: ret = {} try: options = self.parser.options(section) diff --git a/FTB/Running/AutoRunner.py b/FTB/Running/AutoRunner.py index 637f36611..7cac10d7c 100644 --- a/FTB/Running/AutoRunner.py +++ b/FTB/Running/AutoRunner.py @@ -36,7 +36,7 @@ class AutoRunner(): Abstract base class that provides a method to instantiate the right sub class for running the given program and obtaining crash information. """ - def __init__(self, binary: str, args: list[str] | None = None, env=None, cwd=None, stdin=None) -> None: + def __init__(self, binary: str, args: list[str] | None = None, env: dict[str, str] | None = None, cwd: str | None = None, stdin: bytes | None = None) -> None: self.binary = binary self.cwd = cwd self.stdin = stdin @@ -63,7 +63,7 @@ def __init__(self, binary: str, args: list[str] | None = None, env=None, cwd=Non assert isinstance(self.args, list) # The command that we will run for obtaining crash information - self.cmdArgs: list[str] = [] + self.cmdArgs: list[str | bytes] = [] # These will hold our results from running self.stdout: str | None = None @@ -74,7 +74,7 @@ def getCrashInfo(self, configuration: ProgramConfiguration) -> CrashInfo: return CrashInfo.fromRawCrashData(self.stdout, self.stderr, configuration, self.auxCrashData) @staticmethod - def fromBinaryArgs(binary: str, args: list[str] | None = None, env=None, cwd=None, stdin=None) -> ASanRunner | GDBRunner: + def fromBinaryArgs(binary: str, args: list[str] | None = None, env: dict[str, str] | None = None, cwd: str | None = None, stdin: bytes | None = None) -> ASanRunner | GDBRunner: process = subprocess.Popen( ["nm", "-g", binary], stdin=subprocess.PIPE, @@ -96,7 +96,7 @@ def fromBinaryArgs(binary: str, args: list[str] | None = None, env=None, cwd=Non class GDBRunner(AutoRunner): - def __init__(self, binary: str, args: list[str] | None = None, env=None, cwd=None, core=None, stdin=None) -> None: + def __init__(self, binary: str, args: list[str] | None = None, env: dict[str, str] | None = None, cwd: str | None = None, core: bytes | None = None, stdin: bytes | None = None) -> None: AutoRunner.__init__(self, binary, args, env, cwd, stdin) # This can be used to force GDBRunner to first generate a core and then @@ -207,7 +207,7 @@ def run(self) -> bool: class ASanRunner(AutoRunner): - def __init__(self, binary: str, args: list[str] | None = None, env=None, cwd=None, stdin=None) -> None: + def __init__(self, binary: str, args: list[str] | None = None, env: dict[str, str] | None = None, cwd: str | None = None, stdin: bytes | None = None) -> None: AutoRunner.__init__(self, binary, args, env, cwd, stdin) self.cmdArgs.append(self.binary) diff --git a/FTB/Signatures/tests/test_CrashSignature.py b/FTB/Signatures/tests/test_CrashSignature.py index e06d555b3..e3e3c1802 100644 --- a/FTB/Signatures/tests/test_CrashSignature.py +++ b/FTB/Signatures/tests/test_CrashSignature.py @@ -555,6 +555,7 @@ def test_SignatureStackFramesAlgorithmsTest() -> None: (actualDepth, actualSig) = StackFramesSymptom._diff(stack, [StringMatch(x) for x in rawSig], 0, 1, maxDepth) assert expectedDepth == actualDepth + assert actualSig is not None assert expectedSig == [str(x) for x in actualSig] diff --git a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py index ff259fc7d..a7c147a13 100755 --- a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py +++ b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py @@ -58,13 +58,13 @@ class LibFuzzerMonitor(threading.Thread): - def __init__(self, process: subprocess.Popen[str], killOnOOM: bool = True, mid: int | None = None, mqueue = None) -> None: + def __init__(self, process: subprocess.Popen[str], killOnOOM: bool = True, mid: int | None = None, mqueue: queue.Queue[int] | None = None) -> None: threading.Thread.__init__(self) self.process = process self.fd = process.stderr self.trace: list[str] = [] - self.stderr = collections.deque([], 128) + self.stderr: collections.deque[str] = collections.deque([], 128) self.inTrace: bool = False self.testcase: str | None = None self.killOnOOM = killOnOOM @@ -90,6 +90,7 @@ def run(self) -> None: try: while True: + assert self.fd is not None line = self.fd.readline(4096) if not line: @@ -157,6 +158,7 @@ def run(self) -> None: self.exc = e finally: if self.mqueue is not None: + assert self.mid is not None self.mqueue.put(self.mid) def getASanTrace(self) -> list[str]: @@ -165,7 +167,7 @@ def getASanTrace(self) -> list[str]: def getTestcase(self) -> str | None: return self.testcase - def getStderr(self) -> list[collections.deque[int]]: + def getStderr(self) -> list[str]: return list(self.stderr) def terminate(self) -> None: @@ -188,7 +190,7 @@ def terminate(self) -> None: self.process.wait() -def command_file_to_list(cmd_file: str) -> tuple[int, list[str]]: +def command_file_to_list(cmd_file: str) -> tuple[int | None, list[str]]: ''' Open and parse custom command line file @@ -384,10 +386,10 @@ def write_aggregated_stats_libfuzzer(outfile: str, stats, monitors: list[LibFuzz ] # Which fields to aggregate by mean - wanted_fields_mean = [] + wanted_fields_mean: list[str] = [] # Which fields should be displayed per fuzzer instance - wanted_fields_all = [] + wanted_fields_all: list[str] = [] # Which fields should be aggregated by max wanted_fields_max = ['last_new', 'last_new_pc'] @@ -458,7 +460,7 @@ def write_aggregated_stats_libfuzzer(outfile: str, stats, monitors: list[LibFuzz def scan_crashes(base_dir: str, collector: Collector, cmdline_path: str | None = None, env_path: str | None = None, test_path: str | None = None, firefox: str | None = None, - firefox_prefs: str | None = None, firefox_extensions: str | None = None, firefox_testpath: str | None = None, transform: str | None = None): + firefox_prefs: str | None = None, firefox_extensions: str | None = None, firefox_testpath: str | None = None, transform: str | None = None) -> int: ''' Scan the base directory for crash tests and submit them to FuzzManager. @@ -520,6 +522,7 @@ def scan_crashes(base_dir: str, collector: Collector, cmdline_path: str | None = return 2 if firefox: + assert firefox_testpath is not None (ffpInst, ffCmd, ffEnv) = setup_firefox(cmdline[0], firefox_prefs, firefox_extensions, firefox_testpath) cmdline = ffCmd base_env.update(ffEnv) @@ -541,6 +544,7 @@ def scan_crashes(base_dir: str, collector: Collector, cmdline_path: str | None = if test_idx is not None: cmdline[test_idx] = orig_test_arg.replace('@@', crash_file) elif test_in_env is not None: + assert env is not None env[test_in_env] = env[test_in_env].replace('@@', crash_file) elif test_path is not None: shutil.copy(crash_file, test_path) @@ -1147,7 +1151,7 @@ def warn_local() -> None: print(rarg, file=fd) monitors = [None] * opts.libfuzzer_instances - monitor_queue = queue.Queue() + monitor_queue: queue.Queue[int] = queue.Queue() # Keep track how often we crash to abort in certain situations crashes_per_minute_interval = 0 @@ -1204,6 +1208,7 @@ def warn_local() -> None: # so we cache it here to avoid running listdir multiple times. corpus_size = len(os.listdir(corpus_dir)) + assert corpus_size is not None if corpus_auto_reduce_threshold is not None and corpus_size >= corpus_auto_reduce_threshold: print("Preparing automated merge...", file=sys.stderr) @@ -1297,6 +1302,7 @@ def warn_local() -> None: continue monitor = monitors[result] + assert monitor is not None monitor.join(20) if monitor.is_alive(): raise RuntimeError("Monitor %s still alive although it signaled termination." % result) diff --git a/misc/libfuzzer/libfuzzer.py b/misc/libfuzzer/libfuzzer.py index 010e2c968..076ac5f64 100755 --- a/misc/libfuzzer/libfuzzer.py +++ b/misc/libfuzzer/libfuzzer.py @@ -214,7 +214,7 @@ def main(argv: list[str] | None = None) -> int | None: crashInfo = CrashInfo.fromRawCrashData([], [], configuration, auxCrashData=trace) - (sigfile, metadata) = collector.search(crashInfo) + (sigfile, _metadata) = collector.search(crashInfo) if sigfile is not None: if last_signature == sigfile: diff --git a/server/covmanager/cron.py b/server/covmanager/cron.py index b6596b4d7..c8c3ac9f6 100644 --- a/server/covmanager/cron.py +++ b/server/covmanager/cron.py @@ -22,7 +22,7 @@ # a summarized report for your testing efforts. -def create_weekly_report_mc(revision): +def create_weekly_report_mc(revision: str) -> None: from crashmanager.models import Client from .models import Collection, Repository, Report from .tasks import aggregate_coverage_data @@ -38,7 +38,9 @@ def create_weekly_report_mc(revision): Q(revision=revision) | Q(revision=short_revision)).filter( repository=repository, coverage__isnull=False) - last_monday = collections.first().created + relativedelta(weekday=MO(-1)) + collections_first = collections.first() + assert collections_first is not None + last_monday = collections_first.created + relativedelta(weekday=MO(-1)) mergedCollection = Collection() mergedCollection.description = "Weekly Report (Week of %s, %s reports)" % ( diff --git a/server/covmanager/models.py b/server/covmanager/models.py index 09b278244..309f079f2 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -6,11 +6,13 @@ from django.contrib.auth.models import User as DjangoUser # noqa from django.core.files.storage import FileSystemStorage from django.db import models +from django.db.models.query import QuerySet from django.db.models.signals import post_delete, post_save from django.dispatch.dispatcher import receiver from django.utils import timezone import codecs import json +from typing import Any from typing import cast from crashmanager.models import Client, Tool @@ -45,11 +47,11 @@ class Collection(models.Model): repository = cast(Repository, models.ForeignKey(Repository, on_delete=models.deletion.CASCADE)) revision = str(models.CharField(max_length=255, blank=False)) branch = str(models.CharField(max_length=255, blank=True)) - tools = cast(Tool, models.ManyToManyField(Tool)) + tools = cast(QuerySet[Tool], models.ManyToManyField(Tool)) client = cast(Client, models.ForeignKey(Client, on_delete=models.deletion.CASCADE)) - coverage = cast(CollectionFile, models.ForeignKey(CollectionFile, blank=True, null=True, on_delete=models.deletion.CASCADE)) + coverage: CollectionFile | None = cast(CollectionFile, models.ForeignKey(CollectionFile, blank=True, null=True, on_delete=models.deletion.CASCADE)) - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: # This variable can hold the deserialized contents of the coverage blob self.content = None @@ -71,6 +73,7 @@ def __init__(self, *args, **kwargs) -> None: super(Collection, self).__init__(*args, **kwargs) def loadCoverage(self) -> None: + assert self.coverage is not None self.coverage.file.open(mode='rb') self.content = json.load(codecs.getreader('utf-8')(self.coverage.file)) self.coverage.file.close() @@ -124,6 +127,7 @@ def subset(self, path: str, report_configuration=None): names[0] = "" try: + assert self.content is not None ret = self.content["children"] for name in names[:-1]: ret = ret[name]["children"] @@ -156,7 +160,7 @@ def remove_childrens_children(coverage): coverage["children"][child]["children"] = True @staticmethod - def strip(coverage): + def strip(coverage) -> None: """ This method strips all detailed coverage information from the given coverage data. Only the summarized coverage fields are left intact. @@ -181,7 +185,7 @@ def strip(coverage): # This post_delete handler ensures that the corresponding coverage # file is deleted when the Collection is gone. @receiver(post_delete, sender=Collection) -def Collection_delete(sender, instance, **kwargs): +def Collection_delete(sender: Collection, instance: Collection, **kwargs: Any) -> None: if instance.coverage: instance.coverage.file.delete(False) instance.coverage.delete(False) @@ -190,7 +194,7 @@ def Collection_delete(sender, instance, **kwargs): # post_save handler for celery integration if getattr(settings, 'USE_CELERY', None): @receiver(post_save, sender=Collection) - def Collection_save(sender, instance, **kwargs): + def Collection_save(sender: Collection, instance: Collection, **kwargs: Any) -> None: check_revision_update.delay(instance.pk) @@ -199,16 +203,16 @@ class ReportConfiguration(models.Model): repository = cast(Repository, models.ForeignKey(Repository, on_delete=models.deletion.CASCADE)) directives = str(models.TextField()) public = bool(models.BooleanField(blank=False, default=False)) - logical_parent = models.ForeignKey("self", blank=True, null=True, on_delete=models.deletion.CASCADE) + logical_parent = cast("ReportConfiguration", models.ForeignKey("self", blank=True, null=True, on_delete=models.deletion.CASCADE)) - def apply(self, collection): + def apply(self, collection: Collection) -> None: CoverageHelper.apply_include_exclude_directives(collection, self.directives.splitlines()) CoverageHelper.calculate_summary_fields(collection) class ReportSummary(models.Model): collection = cast(Collection, models.OneToOneField(Collection, on_delete=models.deletion.CASCADE)) - cached_result = str(models.TextField(null=True, blank=True)) + cached_result: str | None = str(models.TextField(null=True, blank=True)) class Report(models.Model): diff --git a/server/covmanager/serializers.py b/server/covmanager/serializers.py index d978df13f..2495b7bc8 100644 --- a/server/covmanager/serializers.py +++ b/server/covmanager/serializers.py @@ -1,5 +1,7 @@ from __future__ import annotations +from typing import Any + from django.core.exceptions import MultipleObjectsReturned # noqa from django.core.files.base import ContentFile import hashlib @@ -46,7 +48,7 @@ def to_representation(self, obj): return serialized - def create(self, attrs): + def create(self, attrs) -> Collection: ''' Create a Collection instance based on the given dictionary of values received. We need to unflatten foreign relationships like repository, @@ -108,7 +110,7 @@ class Meta: ) read_only_fields = ('id', 'created') - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: super(ReportConfigurationSerializer, self).__init__(*args, **kwargs) request = self.context.get("request") @@ -121,7 +123,7 @@ def __init__(self, *args, **kwargs) -> None: for field in exclude_fields: self.fields.pop(field) - def handle_repository(self, attrs): + def handle_repository(self, attrs) -> None: ''' When creating or updating a ReportConfiguration instance, we need to unflatten the foreign relationship to the repository and validate that it exists. @@ -141,13 +143,13 @@ def handle_repository(self, attrs): attrs['repository'] = repository[0] - def update(self, instance, attrs): + def update(self, instance, attrs) -> ReportConfiguration: self.handle_repository(attrs) # Update our ReportConfiguration instance return super(ReportConfigurationSerializer, self).update(instance, attrs) - def create(self, attrs): + def create(self, attrs) -> ReportConfiguration: self.handle_repository(attrs) # Create our ReportConfiguration instance @@ -162,7 +164,7 @@ class Meta: ) read_only_fields = ('id', 'data_created', 'coverage') - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: super(ReportSerializer, self).__init__(*args, **kwargs) request = self.context.get("request") diff --git a/server/covmanager/tasks.py b/server/covmanager/tasks.py index 8043a8cd2..a8957dcc8 100644 --- a/server/covmanager/tasks.py +++ b/server/covmanager/tasks.py @@ -12,7 +12,7 @@ @app.task(ignore_result=True) -def check_revision_update(pk): +def check_revision_update(pk: int) -> None: from covmanager.models import Collection, Repository # noqa collection = Collection.objects.get(pk=pk) @@ -33,7 +33,7 @@ def check_revision_update(pk): @app.task(ignore_result=True) -def aggregate_coverage_data(pk, pks): +def aggregate_coverage_data(pk: int, pks: list[int]) -> None: from covmanager.models import Collection, CollectionFile # noqa from FTB import CoverageHelper # noqa @@ -82,7 +82,7 @@ def aggregate_coverage_data(pk, pks): @app.task(ignore_result=True) -def calculate_report_summary(pk): +def calculate_report_summary(pk: int) -> None: from covmanager.models import ReportConfiguration, ReportSummary summary = ReportSummary.objects.get(pk=pk) @@ -135,6 +135,7 @@ def calculate_report_summary(pk): if waiting: # We shouldn't have orphaned reports + assert data is not None data["warning"] = "There are orphaned reports that won't be displayed." summary.cached_result = json.dumps(data) diff --git a/server/covmanager/tests/test_collections_rest.py b/server/covmanager/tests/test_collections_rest.py index d23bde904..3f4d11863 100644 --- a/server/covmanager/tests/test_collections_rest.py +++ b/server/covmanager/tests/test_collections_rest.py @@ -142,6 +142,7 @@ def test_rest_collections_get(api_client: APIClient, cm: _result) -> None: assert resp['client'] == 'testclient' assert resp['tools'] == 'testtool' assert resp['revision'] == 'abc' + assert coll.coverage is not None assert resp['coverage'] == coll.coverage.file @@ -226,4 +227,5 @@ def test_rest_collection_get(api_client: APIClient, cm: _result) -> None: assert resp['client'] == 'testclient' assert resp['tools'] == 'testtool' assert resp['revision'] == 'abc' + assert coll.coverage is not None assert resp['coverage'] == coll.coverage.file diff --git a/server/covmanager/views.py b/server/covmanager/views.py index 28cffed29..079d97e34 100644 --- a/server/covmanager/views.py +++ b/server/covmanager/views.py @@ -1,10 +1,12 @@ from __future__ import annotations from typing import Any +from typing import TypeVar from typing import cast from django.conf import settings from django.core.exceptions import SuspiciousOperation, PermissionDenied +from django.db.models import Model from django.db.models import Q from django.db.models.query import QuerySet from django.http import Http404 @@ -33,6 +35,8 @@ from .SourceCodeProvider import SourceCodeProvider +MT = TypeVar("MT", bound=Model) + def index(request: HttpRequest) -> HttpResponseRedirect | HttpResponsePermanentRedirect: return redirect('covmanager:%s' % getattr(settings, 'COV_DEFAULT_PAGE', "collections")) @@ -597,7 +601,7 @@ class CollectionFilterBackend(filters.BaseFilterBackend): """ Accepts filtering with several collection-specific fields from the URL """ - def filter_queryset(self, request: Request, queryset, view: APIView): + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: """ Return a filtered queryset. """ @@ -657,7 +661,7 @@ class ReportFilterBackend(filters.BaseFilterBackend): """ Accepts broad filtering by q parameter to search multiple fields """ - def filter_queryset(self, request: Request, queryset, view: APIView): + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: """ Return a filtered queryset. """ @@ -725,7 +729,7 @@ class ReportConfigurationFilterBackend(filters.BaseFilterBackend): """ Accepts broad filtering by q parameter to search multiple fields """ - def filter_queryset(self, request: Request, queryset, view: APIView): + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: """ Return a filtered queryset. """ diff --git a/server/crashmanager/Bugtracker/BugzillaProvider.py b/server/crashmanager/Bugtracker/BugzillaProvider.py index 7e1b42630..ec3ee69a0 100644 --- a/server/crashmanager/Bugtracker/BugzillaProvider.py +++ b/server/crashmanager/Bugtracker/BugzillaProvider.py @@ -18,6 +18,7 @@ from django.forms.models import model_to_dict from django.shortcuts import get_object_or_404 from django.utils import dateparse +from rest_framework.request import Request from .BugzillaREST import BugzillaREST from .Provider import Provider @@ -28,7 +29,7 @@ class BugzillaProvider(Provider): def __init__(self, pk: int, hostname: str) -> None: super(BugzillaProvider, self).__init__(pk, hostname) - def getTemplateForUser(self, request, crashEntry: CrashEntry): + def getTemplateForUser(self, request: Request, crashEntry: CrashEntry): if 'template' in request.GET: obj = get_object_or_404(BugzillaTemplate, pk=request.GET['template']) template = model_to_dict(obj) @@ -36,15 +37,15 @@ def getTemplateForUser(self, request, crashEntry: CrashEntry): else: user = User.get_or_create_restricted(request.user)[0] - obj = BugzillaTemplate.objects.filter(name__contains=crashEntry.tool.name) - if not obj: + obj_ = BugzillaTemplate.objects.filter(name__contains=crashEntry.tool.name) + if not obj_: defaultTemplateId = user.defaultTemplateId if not defaultTemplateId: defaultTemplateId = 1 - obj = BugzillaTemplate.objects.filter(pk=defaultTemplateId) + obj_ = BugzillaTemplate.objects.filter(pk=defaultTemplateId) - if not obj: + if not obj_: template = {} else: template = model_to_dict(obj[0]) diff --git a/server/crashmanager/Bugtracker/Provider.py b/server/crashmanager/Bugtracker/Provider.py index eaf08d87b..7908ce00d 100644 --- a/server/crashmanager/Bugtracker/Provider.py +++ b/server/crashmanager/Bugtracker/Provider.py @@ -41,5 +41,5 @@ def getBugData(self, bugId: str, username: str | None = None, password: str | No return @abstractmethod - def getBugStatus(self, bugIds: list[str], username: str | None = None, password: str | None = None): + def getBugStatus(self, bugIds: list[str], username: str | None = None, password: str | None = None) -> None: return diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index 851372eed..2b5c94f98 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -121,9 +121,9 @@ def tools_filter_users(self) -> QuerySet[DjangoUser]: class Bucket(models.Model): - bug = cast(Bug, models.ForeignKey(Bug, blank=True, null=True, on_delete=models.deletion.CASCADE)) + bug: Bug | None = cast(Bug, models.ForeignKey(Bug, blank=True, null=True, on_delete=models.deletion.CASCADE)) signature = str(models.TextField()) - optimizedSignature = str(models.TextField(blank=True, null=True)) + optimizedSignature: str | None = str(models.TextField(blank=True, null=True)) shortDescription = str(models.CharField(max_length=1023, blank=True)) frequent = bool(models.BooleanField(blank=False, default=False)) permanent = bool(models.BooleanField(blank=False, default=False)) @@ -140,6 +140,7 @@ def getSignature(self) -> CrashSignature: return CrashSignature(self.signature) def getOptimizedSignature(self) -> CrashSignature: + assert self.optimizedSignature is not None return CrashSignature(self.optimizedSignature) def save(self, *args: Any, **kwargs: Any) -> None: @@ -156,7 +157,7 @@ def save(self, *args: Any, **kwargs: Any) -> None: super(Bucket, self).save(*args, **kwargs) - def reassign(self, submitSave: bool): + def reassign(self, submitSave: bool) -> tuple[list[str], list[str], int, int]: """ Assign all unassigned issues that match our signature to this bucket. Furthermore, remove all non-matching issues from our bucket. @@ -347,7 +348,7 @@ class CrashEntry(models.Model): os = cast(OS, models.ForeignKey(OS, on_delete=models.deletion.CASCADE)) testcase = cast(TestCase, models.ForeignKey(TestCase, blank=True, null=True, on_delete=models.deletion.CASCADE)) client = cast(Client, models.ForeignKey(Client, on_delete=models.deletion.CASCADE)) - bucket = cast(Bucket, models.ForeignKey(Bucket, blank=True, null=True, on_delete=models.deletion.CASCADE)) + bucket: Bucket | None = cast(Bucket, models.ForeignKey(Bucket, blank=True, null=True, on_delete=models.deletion.CASCADE)) rawStdout = str(models.TextField(blank=True)) rawStderr = str(models.TextField(blank=True)) rawCrashData = str(models.TextField(blank=True)) @@ -357,14 +358,14 @@ class CrashEntry(models.Model): crashAddress = str(models.CharField(max_length=255, blank=True)) crashAddressNumeric = int(str(models.BigIntegerField(blank=True, null=True))) shortSignature = str(models.CharField(max_length=255, blank=True)) - cachedCrashInfo = str(models.TextField(blank=True, null=True)) + cachedCrashInfo: str | None = str(models.TextField(blank=True, null=True)) triagedOnce = bool(models.BooleanField(blank=False, default=False)) def __init__(self, *args: Any, **kwargs: Any) -> None: # These variables can hold temporarily deserialized data - self.argsList = None - self.envList = None - self.metadataList = None + self.argsList: list[str] | None = None + self.envList: list[str] | None = None + self.metadataList: list[str] | None = None # For performance reasons we do not deserialize these fields # automatically here. You need to explicitly call the @@ -519,7 +520,7 @@ def deferRawFields( # is also deleted when the CrashEntry is gone. It also explicitly # deletes the file on the filesystem which would otherwise remain. @receiver(post_delete, sender=CrashEntry) -def CrashEntry_delete(sender, instance, **kwargs) -> None: +def CrashEntry_delete(sender: CrashEntry, instance: CrashEntry, **kwargs: Any) -> None: if instance.testcase: instance.testcase.delete(False) if instance.bucket_id is not None: @@ -527,13 +528,13 @@ def CrashEntry_delete(sender, instance, **kwargs) -> None: @receiver(post_delete, sender=TestCase) -def TestCase_delete(sender, instance, **kwargs) -> None: +def TestCase_delete(sender: TestCase, instance: TestCase, **kwargs: Any) -> None: if instance.test: instance.test.delete(False) @receiver(post_save, sender=CrashEntry) -def CrashEntry_save(sender, instance, created, **kwargs) -> None: +def CrashEntry_save(sender: CrashEntry, instance: CrashEntry, created: bool, **kwargs: Any) -> None: if getattr(settings, 'USE_CELERY', None): if created and not instance.triagedOnce: triage_new_crash.delay(instance.pk) @@ -609,9 +610,9 @@ class Meta: # because the bug provider has to decide how to interpret this ID. defaultTemplateId = int(str(models.IntegerField(default=0))) defaultProviderId = int(str(models.IntegerField(default=1))) - defaultToolsFilter = cast(Tool, models.ManyToManyField(Tool)) + defaultToolsFilter = cast(QuerySet[Tool], models.ManyToManyField(Tool)) restricted = bool(models.BooleanField(blank=False, default=False)) - bucketsWatching = cast(Bucket, models.ManyToManyField(Bucket, through='BucketWatch')) + bucketsWatching = cast(QuerySet[Bucket], models.ManyToManyField(Bucket, through='BucketWatch')) # Notifications inaccessible_bug = bool(models.BooleanField(blank=False, default=False)) @@ -627,7 +628,7 @@ def get_or_create_restricted(request_user: AbstractBaseUser | AnonymousUser) -> @receiver(post_save, sender=DjangoUser) -def add_default_perms(sender, instance, created, **kwargs) -> None: +def add_default_perms(sender: DjangoUser, instance: DjangoUser, created: bool, **kwargs: Any) -> None: if created: log = logging.getLogger('crashmanager') for perm in getattr(settings, 'DEFAULT_PERMISSIONS', []): diff --git a/server/crashmanager/serializers.py b/server/crashmanager/serializers.py index b66299daa..cb65fe683 100644 --- a/server/crashmanager/serializers.py +++ b/server/crashmanager/serializers.py @@ -1,6 +1,9 @@ from __future__ import annotations import base64 +from datetime import datetime +from typing import Any + from django.core.exceptions import MultipleObjectsReturned # noqa from django.core.files.base import ContentFile from django.forms import widgets # noqa @@ -37,7 +40,7 @@ class CrashEntrySerializer(serializers.ModelSerializer[CrashEntry]): testcase_quality = serializers.IntegerField(source='testcase.quality', required=False, default=0) testcase_isbinary = serializers.BooleanField(source='testcase.isBinary', required=False, default=False) - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: include_raw = kwargs.pop('include_raw', True) @@ -58,7 +61,7 @@ class Meta: ordering = ['-id'] read_only_fields = ('bucket', 'id', 'shortSignature', 'crashAddress') - def create(self, attrs): + def create(self, attrs) -> CrashEntry: ''' Create a CrashEntry instance based on the given dictionary of values received. We need to unflatten foreign relationships like product, @@ -189,28 +192,28 @@ class Meta(BucketSerializer.Meta): 'view_url', ) - def get_bug_closed(self, sig): + def get_bug_closed(self, sig: Bucket) -> datetime | None: if sig.bug: return sig.bug.closed return None - def get_bug_hostname(self, sig): + def get_bug_hostname(self, sig: Bucket) -> str | None: if sig.bug and sig.bug.externalType: - return sig.bug.externalType.hostname + return str(sig.bug.externalType.hostname) return None - def get_bug_urltemplate(self, sig): + def get_bug_urltemplate(self, sig: Bucket) -> str | None: if sig.bug and sig.bug.externalType: try: - return sig.bug.externalType.urlTemplate % sig.bug.externalId + return str(sig.bug.externalType.urlTemplate % sig.bug.externalId) except Exception: return None return None - def get_opt_pre_url(self, sig): + def get_opt_pre_url(self, sig: Bucket) -> str: return reverse('crashmanager:sigoptpre', kwargs={'sigid': sig.id}) - def get_view_url(self, sig): + def get_view_url(self, sig: Bucket) -> str: return reverse('crashmanager:sigview', kwargs={'sigid': sig.id}) @@ -234,18 +237,18 @@ class Meta(CrashEntrySerializer.Meta): 'find_sigs_url', ) - def get_view_url(self, entry): + def get_view_url(self, entry: CrashEntry) -> str: return reverse('crashmanager:crashview', kwargs={'crashid': entry.id}) - def get_sig_view_url(self, entry): + def get_sig_view_url(self, entry: CrashEntry) -> str | None: if entry.bucket: return reverse('crashmanager:sigview', kwargs={'sigid': entry.bucket.id}) return None - def get_sig_new_url(self, entry): + def get_sig_new_url(self, entry: CrashEntry) -> str: return "{}?crashid={}".format(reverse('crashmanager:signew'), entry.id) - def get_find_sigs_url(self, entry): + def get_find_sigs_url(self, entry: CrashEntry) -> str: return reverse('crashmanager:findsigs', kwargs={'crashid': entry.id}) @@ -280,17 +283,17 @@ class Meta: model = Notification fields = ('id', 'timestamp', 'description', 'verb', 'actor_url', 'target_url', 'external_bug_url',) - def get_actor_url(self, notification): + def get_actor_url(self, notification: Notification) -> str | None: if isinstance(notification.actor, Bucket): return reverse('crashmanager:sigview', kwargs={'sigid': notification.actor.id}) return None - def get_target_url(self, notification): + def get_target_url(self, notification: Notification) -> str | None: if isinstance(notification.target, CrashEntry): return reverse('crashmanager:crashview', kwargs={'crashid': notification.target.id}) return None - def get_external_bug_url(self, notification): + def get_external_bug_url(self, notification: Notification) -> str | None: if isinstance(notification.target, Bug): return f"https://{notification.target.externalType.hostname}/{notification.target.externalId}" return None diff --git a/server/crashmanager/tests/test_signatures_rest.py b/server/crashmanager/tests/test_signatures_rest.py index 040368c0d..e560ffea0 100644 --- a/server/crashmanager/tests/test_signatures_rest.py +++ b/server/crashmanager/tests/test_signatures_rest.py @@ -54,7 +54,7 @@ LOG = logging.getLogger("fm.crashmanager.tests.signatures.rest") -def _compare_rest_result_to_bucket(result: dict[str, object], bucket: Bucket, size: int, quality: int, best_entry: int | None = None, latest: int | None = None, hist: list[dict[str, object]] = [], vue: bool = False) -> None: +def _compare_rest_result_to_bucket(result, bucket: Bucket, size: int, quality: int | None, best_entry: int | None = None, latest: int | None = None, hist: list[dict[str, object]] = [], vue: bool = False) -> None: attributes = { 'best_entry', 'best_quality', 'bug', 'frequent', 'id', 'permanent', 'shortDescription', 'signature', 'size', 'has_optimization', 'latest_entry', @@ -213,6 +213,7 @@ def test_rest_signatures_retrieve(api_client: APIClient, cm: _cm_result, user: D status_code = resp.status_code resp = resp.json() assert status_code == requests.codes['ok'], resp['detail'] + quality: int | None if user.username == "test": if ignore_toolfilter: size, quality, best, latest = [ diff --git a/server/crashmanager/views.py b/server/crashmanager/views.py index e558cb98e..fb6692b21 100644 --- a/server/crashmanager/views.py +++ b/server/crashmanager/views.py @@ -3,8 +3,9 @@ from collections import OrderedDict from datetime import datetime, timedelta from django.core.exceptions import FieldError, SuspiciousOperation, PermissionDenied -from django.db.models import F, Q +from django.db.models import F, Q, Model from django.db.models.aggregates import Count, Min +from django.db.models.query import QuerySet from django.http import Http404, HttpResponse from django.http.request import HttpRequest from django.http.response import HttpResponsePermanentRedirect @@ -23,10 +24,13 @@ from rest_framework.decorators import action from rest_framework.exceptions import MethodNotAllowed, ValidationError from rest_framework.filters import BaseFilterBackend, OrderingFilter +from rest_framework.request import Request from rest_framework.response import Response from rest_framework.views import APIView import six +from typing import Any from typing import Type +from typing import TypeVar from typing import cast from wsgiref.util import FileWrapper @@ -43,6 +47,8 @@ from django.conf import settings as django_settings +MT = TypeVar("MT", bound=Model) + class JSONDateEncoder(json.JSONEncoder): @@ -84,7 +90,7 @@ def deny_restricted_users(request: HttpRequest) -> None: raise PermissionDenied({"message": "Restricted users cannot use this feature."}) -def filter_crash_entries_by_toolfilter(request: HttpRequest, entries, restricted_only=False): +def filter_crash_entries_by_toolfilter(request: HttpRequest, entries: QuerySet[MT], restricted_only: bool = False) -> QuerySet[MT]: user = cast(User, User.get_or_create_restricted(request.user)[0]) if restricted_only and not user.restricted: @@ -99,7 +105,7 @@ def filter_crash_entries_by_toolfilter(request: HttpRequest, entries, restricted return entries -def filter_signatures_by_toolfilter(request: HttpRequest, signatures, restricted_only: bool = False, legacy_filters: bool = True): +def filter_signatures_by_toolfilter(request: HttpRequest, signatures: QuerySet[MT], restricted_only: bool = False, legacy_filters: bool = True) -> QuerySet[MT]: user = cast(User, User.get_or_create_restricted(request.user)[0]) if restricted_only and not user.restricted: @@ -127,7 +133,7 @@ def filter_signatures_by_toolfilter(request: HttpRequest, signatures, restricted return signatures -def filter_bucket_hits_by_toolfilter(request: HttpRequest, hits, restricted_only: bool = False): +def filter_bucket_hits_by_toolfilter(request: HttpRequest, hits: QuerySet[MT], restricted_only: bool = False) -> QuerySet[MT]: user = cast(User, User.get_or_create_restricted(request.user)[0]) if restricted_only and not user.restricted: @@ -164,8 +170,8 @@ def stats(request: HttpRequest) -> HttpResponse: frequentBuckets = [] if bucketFrequencyMap: - bucketFrequencyMap = sorted(bucketFrequencyMap.items(), key=lambda t: t[1], reverse=True)[:10] - for pk, freq in bucketFrequencyMap: + bucketFrequencyMap_ = sorted(bucketFrequencyMap.items(), key=lambda t: t[1], reverse=True)[:10] + for pk, freq in bucketFrequencyMap_: obj = Bucket.objects.get(pk=pk) obj.rph = freq frequentBuckets.append(obj) @@ -212,22 +218,23 @@ def watchedSignatures(request: HttpRequest) -> HttpResponse: # this is the result, but we will replace any buckets also found in newBuckets bucketsAll = Bucket.objects.filter(user=user).order_by('-id') bucketsAll = bucketsAll.extra(select={'lastCrash': 'crashmanager_bucketwatch.lastCrash'}) - buckets = list(bucketsAll) - for idx, bucket in enumerate(buckets): + buckets_list = list(bucketsAll) + for idx, bucket in enumerate(buckets_list): for newIdx, newBucket in enumerate(newBuckets): if newBucket == bucket: # replace with this one - buckets[idx] = newBucket + buckets_list[idx] = newBucket newBuckets.pop(newIdx) break else: bucket.newCrashes = 0 - return render(request, 'signatures/watch.html', {'siglist': buckets}) + return render(request, 'signatures/watch.html', {'siglist': buckets_list}) def deleteBucketWatch(request: HttpRequest, sigid: int) -> HttpResponseRedirect | HttpResponsePermanentRedirect | HttpResponse: user = cast(User, User.get_or_create_restricted(request.user)[0]) + entry: BucketWatch | Bucket if request.method == 'POST': entry = get_object_or_404(BucketWatch, user=user, bucket=sigid) entry.delete() @@ -769,7 +776,7 @@ class JsonQueryFilterBackend(BaseFilterBackend): """ Accepts filtering with a query parameter which builds a Django query from JSON (see json_to_query) """ - def filter_queryset(self, request: HttpRequest, queryset, view): + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: """ Return a filtered queryset. """ @@ -791,11 +798,11 @@ class ToolFilterCrashesBackend(BaseFilterBackend): Filters the queryset by the user's toolfilter unless '?ignore_toolfilter=1' is given. Only unrestricted users can use ignore_toolfilter. """ - def filter_queryset(self, request: HttpRequest, queryset, view): + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: """Return a filtered queryset""" - ignore_toolfilter = request.query_params.get('ignore_toolfilter', '0') + ignore_toolfilter_requested = request.query_params.get('ignore_toolfilter', '0') try: - ignore_toolfilter = int(ignore_toolfilter) + ignore_toolfilter = int(ignore_toolfilter_requested) assert ignore_toolfilter in {0, 1} except (AssertionError, ValueError): raise InvalidArgumentException({'ignore_toolfilter': ['Expecting 0 or 1.']}) @@ -807,7 +814,7 @@ def filter_queryset(self, request: HttpRequest, queryset, view): class WatchFilterCrashesBackend(BaseFilterBackend): """Filters the queryset to retrieve watched entries if '?watch='""" - def filter_queryset(self, request: HttpRequest, queryset, view): + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: watch_id = request.query_params.get('watch', 'false').lower() if watch_id == 'false': return queryset @@ -820,11 +827,11 @@ class ToolFilterSignaturesBackend(BaseFilterBackend): Filters the queryset by the user's toolfilter unless '?ignore_toolfilter=1' is given. Only unrestricted users can use ignore_toolfilter. """ - def filter_queryset(self, request: HttpRequest, queryset, view): + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: """Return a filtered queryset""" - ignore_toolfilter = request.query_params.get('ignore_toolfilter', '0') + ignore_toolfilter_requested = request.query_params.get('ignore_toolfilter', '0') try: - ignore_toolfilter = int(ignore_toolfilter) + ignore_toolfilter = int(ignore_toolfilter_requested) assert ignore_toolfilter in {0, 1} except (AssertionError, ValueError): raise InvalidArgumentException({'ignore_toolfilter': ['Expecting 0 or 1.']}) @@ -836,16 +843,16 @@ def filter_queryset(self, request: HttpRequest, queryset, view): class BucketAnnotateFilterBackend(BaseFilterBackend): """Annotates bucket queryset with size and best_quality""" - def filter_queryset(self, request: HttpRequest, queryset, view): + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: return queryset.annotate(size=Count('crashentry'), quality=Min('crashentry__testcase__quality')) class DeferRawFilterBackend(BaseFilterBackend): """Optionally defer raw fields""" - def filter_queryset(self, request: HttpRequest, queryset, view): - include_raw = request.query_params.get('include_raw', '1') + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: + include_raw_requested = request.query_params.get('include_raw', '1') try: - include_raw = int(include_raw) + include_raw = int(include_raw_requested) assert include_raw in {0, 1} except (AssertionError, ValueError): raise InvalidArgumentException({'include_raw': ['Expecting 0 or 1.']}) @@ -873,7 +880,7 @@ class CrashEntryViewSet(mixins.CreateModelMixin, DeferRawFilterBackend ] - def get_serializer(self, *args, **kwds): + def get_serializer(self, *args: Any, **kwds: Any): kwds["include_raw"] = getattr(self, "include_raw", True) vue = self.request.query_params.get('vue', 'false').lower() not in ('false', '0') if vue: @@ -881,7 +888,7 @@ def get_serializer(self, *args, **kwds): else: return super(CrashEntryViewSet, self).get_serializer(*args, **kwds) - def partial_update(self, request: HttpRequest, pk: int | None = None) -> Response: + def partial_update(self, request: Request, pk: int | None = None) -> Response: """Update individual crash fields.""" user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: @@ -926,14 +933,14 @@ class BucketViewSet(mixins.CreateModelMixin, ordering_fields = ['id', 'shortDescription', 'size', 'quality', 'optimizedSignature', 'bug__externalId'] pagination_class = None - def get_serializer(self, *args, **kwds): + def get_serializer(self, *args: Any, **kwds: Any): self.vue = self.request.query_params.get('vue', 'false').lower() not in ('false', '0') if self.vue: return BucketVueSerializer(*args, **kwds) else: return super(BucketViewSet, self).get_serializer(*args, **kwds) - def list(self, request, *args, **kwargs) -> Response: + def list(self, request: Request, *args: Any, **kwargs: Any) -> Response: response = super().list(request, *args, **kwargs) if self.vue and response.status_code == 200: @@ -962,7 +969,7 @@ def list(self, request, *args, **kwargs) -> Response: return response - def retrieve(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: + def retrieve(self, request: Request, *args: str, **kwargs: str) -> Response: user = cast(User, User.get_or_create_restricted(request.user)[0]) instance = self.get_object() ignore_toolfilter = getattr(self, "ignore_toolfilter", False) @@ -986,10 +993,12 @@ def retrieve(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: best_crash = crashes_in_filter.filter(testcase__quality=instance.quality).order_by( "testcase__size", "-id" ).first() + assert best_crash is not None instance.best_entry = best_crash.id if instance.size: latest_crash = crashes_in_filter.order_by("id").last() + assert latest_crash is not None instance.latest_entry = latest_crash.id serializer = self.get_serializer(instance) @@ -1009,7 +1018,7 @@ def retrieve(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: return response - def __validate(self, request: HttpRequest, bucket: Bucket, submitSave: bool, reassign: bool): + def __validate(self, request: Request, bucket: Bucket, submitSave: bool, reassign: bool): try: bucket.getSignature() except RuntimeError as e: @@ -1028,8 +1037,8 @@ def __validate(self, request: HttpRequest, bucket: Bucket, submitSave: bool, rea bucket.bug = bucket.bug bucket.save() - inList, outList = [], [] - inListCount, outListCount = 0, 0 + inList: list[str] = [] + outList: list[str] = [] # If the reassign checkbox is checked if reassign: inList, outList, inListCount, outListCount = bucket.reassign(submitSave) @@ -1049,12 +1058,14 @@ def __validate(self, request: HttpRequest, bucket: Bucket, submitSave: bool, rea 'outListCount': outListCount, } - def update(self, request: HttpRequest, *args: str, **kwargs: str) -> None: + def update(self, request: Request, *args: str, **kwargs: str) -> Response: + assert request.method is not None raise MethodNotAllowed(request.method) - def partial_update(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: + def partial_update(self, request: Request, *args: str, **kwargs: str) -> Response: user = cast(User, User.get_or_create_restricted(request.user)[0]) if user.restricted: + assert request.method is not None raise MethodNotAllowed(request.method) serializer = self.get_serializer(data=request.data, partial=True) @@ -1063,6 +1074,7 @@ def partial_update(self, request: HttpRequest, *args: str, **kwargs: str) -> Res bucket = get_object_or_404(Bucket, id=self.kwargs["pk"]) check_authorized_for_signature(request, bucket) + bug: QuerySet[Bug] | Bug | None if 'bug' in serializer.validated_data: if serializer.validated_data['bug'] is None: bug = None @@ -1098,7 +1110,7 @@ def partial_update(self, request: HttpRequest, *args: str, **kwargs: str) -> Res data=data, ) - def create(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: + def create(self, request: Request, *args: str, **kwargs: str) -> Response: serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) @@ -1121,7 +1133,7 @@ def create(self, request: HttpRequest, *args: str, **kwargs: str) -> Response: class BucketVueViewSet(BucketViewSet): """API endpoint that allows viewing Buckets and always uses Vue serializer""" - def get_serializer(self, *args, **kwds) -> BucketVueSerializer: + def get_serializer(self, *args: Any, **kwds: Any) -> BucketVueSerializer: self.vue = True return BucketVueSerializer(*args, **kwds) @@ -1156,11 +1168,11 @@ class NotificationViewSet(mixins.ListModelMixin, serializer_class = NotificationSerializer filter_backends = [JsonQueryFilterBackend, ] - def get_queryset(self): + def get_queryset(self) -> QuerySet[Notification]: return Notification.objects.unread().filter(recipient=self.request.user) @action(detail=True, methods=['patch']) - def mark_as_read(self, request, pk=None): + def mark_as_read(self, request: Request, pk: int | None = None) -> Response: notification = self.get_object() if notification.recipient != request.user: @@ -1170,7 +1182,7 @@ def mark_as_read(self, request, pk=None): return Response(status=status.HTTP_200_OK) @action(detail=False, methods=['patch']) - def mark_all_as_read(self, request): + def mark_all_as_read(self, request: Request) -> Response: notifications = self.get_queryset() notifications.mark_all_as_read() return Response(status=status.HTTP_200_OK) @@ -1205,7 +1217,7 @@ def json_to_query(json_str: str): except ValueError as e: raise RuntimeError("Invalid JSON: %s" % e) - def get_query_obj(obj, key=None) -> Q: + def get_query_obj(obj, key: str | None = None) -> Q: if obj is None or isinstance(obj, (six.text_type, list, int)): kwargs = {key: obj} @@ -1276,7 +1288,7 @@ def get(self, request: HttpRequest, crashid: int) -> HttpResponse: class SignaturesDownloadView(AbstractDownloadView): - def get(self, request: HttpRequest, format=None) -> HttpResponse: + def get(self, request: HttpRequest, format: int | None = None) -> HttpResponse: deny_restricted_users(request) storage_base = getattr(django_settings, 'SIGNATURE_STORAGE', None) @@ -1303,13 +1315,13 @@ class BugzillaTemplateDeleteView(DeleteView): pk_url_kwarg = 'templateId' -class BugzillaTemplateEditView(UpdateView[BugzillaTemplate]): +class BugzillaTemplateEditView(UpdateView): model = BugzillaTemplate template_name = 'bugzilla/create_edit.html' success_url = reverse_lazy('crashmanager:templates') pk_url_kwarg = 'templateId' - def get_context_data(self, **kwargs): + def get_context_data(self, **kwargs: Any): context = super().get_context_data(**kwargs) context['title'] = 'Edit template' return context @@ -1321,18 +1333,18 @@ def get_form_class(self) -> Type[BugzillaTemplateBugForm] | Type[BugzillaTemplat return BugzillaTemplateCommentForm -class BugzillaTemplateBugCreateView(CreateView[BugzillaTemplate]): +class BugzillaTemplateBugCreateView(CreateView): model = BugzillaTemplate template_name = 'bugzilla/create_edit.html' form_class = BugzillaTemplateBugForm success_url = reverse_lazy('crashmanager:templates') - def get_context_data(self, **kwargs): + def get_context_data(self, **kwargs: Any): context = super().get_context_data(**kwargs) context['title'] = 'Create a bug template' return context - def form_valid(self, form): + def form_valid(self, form) -> HttpResponse: form.instance.mode = BugzillaTemplateMode.Bug return super(BugzillaTemplateBugCreateView, self).form_valid(form) @@ -1343,7 +1355,7 @@ class BugzillaTemplateCommentCreateView(CreateView[BugzillaTemplate]): form_class = BugzillaTemplateCommentForm success_url = reverse_lazy('crashmanager:templates') - def get_context_data(self, **kwargs): + def get_context_data(self, **kwargs: Any): context = super().get_context_data(**kwargs) context['title'] = 'Create a comment template' return context @@ -1359,7 +1371,7 @@ class UserSettingsEditView(UpdateView[User]): form_class = UserSettingsForm success_url = reverse_lazy('crashmanager:usersettings') - def get_form_kwargs(self, **kwargs): + def get_form_kwargs(self, **kwargs: Any): kwargs = super(UserSettingsEditView, self).get_form_kwargs(**kwargs) kwargs['user'] = self.get_queryset().get(user=self.request.user) return kwargs @@ -1367,7 +1379,7 @@ def get_form_kwargs(self, **kwargs): def get_object(self): return self.get_queryset().get(user=self.request.user) - def get_context_data(self, **kwargs): + def get_context_data(self, **kwargs: Any): context = super().get_context_data(**kwargs) context['bugzilla_providers'] = BugProvider.objects.filter(classname="BugzillaProvider") context['user'] = self.request.user diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index 20cfaa9ba..b7f37d381 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -280,7 +280,7 @@ def get_prices_per_region(self, region_name: str, instance_types: list[str] | No # apply it to the whole zone to be conservative. assert region_name == "global" - def get_price(sku): + def get_price(sku) -> tuple[float, str]: assert len(sku["pricingInfo"]) == 1 expr = sku["pricingInfo"][0]["pricingExpression"] assert len(expr["tieredRates"]) == 1, expr["tieredRates"] diff --git a/server/ec2spotmanager/common/prices.py b/server/ec2spotmanager/common/prices.py index 1543512bb..59d7a15d4 100644 --- a/server/ec2spotmanager/common/prices.py +++ b/server/ec2spotmanager/common/prices.py @@ -16,7 +16,7 @@ from __future__ import annotations -def get_prices(regions, cloud_provider, instance_types=None, use_multiprocess=False): +def get_prices(regions: list[str], cloud_provider, instance_types: list[str] | None = None, use_multiprocess: bool = False) -> dict[str, str]: if use_multiprocess: from multiprocessing import Pool, cpu_count pool = Pool(cpu_count()) @@ -45,7 +45,7 @@ def get_prices(regions, cloud_provider, instance_types=None, use_multiprocess=Fa return prices -def get_price_median(data): +def get_price_median(data: list[float]) -> float: sdata = sorted(data) n = len(sdata) if not n % 2: diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index 4b5caa9e4..fb05532e9 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -1,19 +1,22 @@ from __future__ import annotations +from datetime import datetime from decimal import Decimal import json import os +from typing import Any from typing import cast from django.conf import settings from django.core.files.base import ContentFile from django.core.files.storage import FileSystemStorage +from django.core.files.uploadedfile import UploadedFile from django.db import models from django.dispatch.dispatcher import receiver from django.utils import timezone -def get_storage_path(self, name): +def get_storage_path(self: models.Model, name: str) -> str: return os.path.join("poolconfig-%s-files" % self.pk, name) @@ -35,19 +38,19 @@ def get_available_name(self, name: str, max_length: int | None = None) -> str: class PoolConfiguration(models.Model): - parent = models.ForeignKey('self', blank=True, null=True, on_delete=models.deletion.CASCADE) + parent: PoolConfiguration | None = cast("PoolConfiguration", models.ForeignKey('self', blank=True, null=True, on_delete=models.deletion.CASCADE)) name = str(models.CharField(max_length=255, blank=False)) size: int | None = int(str(models.IntegerField(default=1, blank=True, null=True))) cycle_interval: int | None = int(str(models.IntegerField(default=86400, blank=True, null=True))) - max_price = cast(Decimal, models.DecimalField(max_digits=12, decimal_places=6, blank=True, null=True)) + max_price: Decimal | float | None = cast(Decimal, models.DecimalField(max_digits=12, decimal_places=6, blank=True, null=True)) instance_tags = str(models.CharField(max_length=1023, blank=True, null=True)) ec2_key_name: str | None = str(models.CharField(max_length=255, blank=True, null=True)) ec2_security_groups = str(models.CharField(max_length=255, blank=True, null=True)) ec2_instance_types = str(models.TextField(blank=True, null=True)) ec2_image_name: str | None = str(models.CharField(max_length=255, blank=True, null=True)) - ec2_userdata_file = \ - models.FileField(storage=OverwritingStorage(location=getattr(settings, 'USERDATA_STORAGE', None)), - upload_to=get_storage_path, blank=True, null=True) + ec2_userdata_file: UploadedFile | None = \ + cast(UploadedFile, models.FileField(storage=OverwritingStorage(location=getattr(settings, 'USERDATA_STORAGE', None)), + upload_to=get_storage_path, blank=True, null=True)) ec2_userdata_macros = str(models.TextField(blank=True, null=True)) ec2_allowed_regions = str(models.CharField(max_length=1023, blank=True, null=True)) ec2_raw_config = str(models.TextField(blank=True, null=True)) @@ -64,20 +67,20 @@ class PoolConfiguration(models.Model): gce_env_include_macros = bool(models.BooleanField(default=False)) gce_raw_config = str(models.TextField(blank=True, null=True)) - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: # These variables can hold temporarily deserialized data - self.instance_tags_dict: dict[str, str] | None = None + self.instance_tags_dict: dict[str, str] | str | None = None self.instance_tags_override: bool | None = None - self.ec2_raw_config_dict: dict[str, str] | None = None + self.ec2_raw_config_dict: dict[str, str] | str | None = None self.ec2_raw_config_override: bool | None = None - self.ec2_userdata_macros_dict: dict[str, str] | None = None + self.ec2_userdata_macros_dict: dict[str, str] | str | None = None self.ec2_userdata_macros_override: bool | None = None - self.ec2_userdata = None - self.ec2_security_groups_list: list[str] | None = None + self.ec2_userdata: UploadedFile | bytes | str | None = None + self.ec2_security_groups_list: list[str] | str | None = None self.ec2_security_groups_override: bool | None = None - self.ec2_allowed_regions_list: list[str] | None = None + self.ec2_allowed_regions_list: list[str] | str | None = None self.ec2_allowed_regions_override: bool | None = None - self.ec2_instance_types_list: list[str] | None = None + self.ec2_instance_types_list: list[str] | str | None = None self.ec2_instance_types_override: bool | None = None self.gce_machine_types_list: list[str] | None = None self.gce_machine_types_override: bool | None = None @@ -141,7 +144,7 @@ def __init__(self, *args, **kwargs) -> None: super(PoolConfiguration, self).__init__(*args, **kwargs) - def flatten(self, cache=None) -> FlatObject: + def flatten(self, cache=None): # cache is optionally a prefetched {config_id: config} dictionary used for parent lookups if self.isCyclic(cache): raise RuntimeError("Attempted to flatten a cyclic configuration") @@ -213,7 +216,7 @@ def flatten(self, cache=None) -> FlatObject: return flat_parent_config - def save(self, *args, **kwargs) -> None: + def save(self, *args: Any, **kwargs: Any) -> None: # Reserialize data, then call regular save method for field in self.dict_config_fields: obj = getattr(self, field + "_dict") @@ -264,6 +267,7 @@ def storeTestAndSave(self) -> None: # Save the file using save() to avoid problems when initially # creating the directory. We use os.path.split to keep the # original filename assigned when saving the file. + assert self.ec2_userdata_file is not None self.ec2_userdata_file.save(os.path.split(self.ec2_userdata_file.name)[-1], ContentFile(self.ec2_userdata), save=False) elif self.ec2_userdata_file: @@ -290,7 +294,7 @@ def isCyclic(self, cache=None) -> bool: break tortoise = tortoise._cache_parent(cache) hare = hare._cache_parent(cache)._cache_parent(cache) - return tortoise == hare + return bool(tortoise == hare) def getMissingParameters(self) -> list[str]: flat_config = self.flatten() @@ -328,7 +332,7 @@ def getMissingParameters(self) -> list[str]: @receiver(models.signals.post_delete, sender=PoolConfiguration) -def deletePoolConfigurationFiles(sender, instance, **kwargs): +def deletePoolConfigurationFiles(sender: PoolConfiguration, instance: PoolConfiguration, **kwargs: Any) -> None: if instance.ec2_userdata: filename = instance.file.path filedir = os.path.dirname(filename) @@ -342,15 +346,15 @@ def deletePoolConfigurationFiles(sender, instance, **kwargs): class InstancePool(models.Model): config = cast(PoolConfiguration, models.ForeignKey(PoolConfiguration, on_delete=models.deletion.CASCADE)) isEnabled = bool(models.BooleanField(default=False)) - last_cycled = models.DateTimeField(blank=True, null=True) + last_cycled: datetime | None = cast(datetime, models.DateTimeField(blank=True, null=True)) class Instance(models.Model): - created = models.DateTimeField(default=timezone.now) + created = cast(datetime, models.DateTimeField(default=timezone.now)) pool = cast(InstancePool, models.ForeignKey(InstancePool, blank=True, null=True, on_delete=models.deletion.CASCADE)) hostname = str(models.CharField(max_length=255, blank=True, null=True)) status_code = int(str(models.IntegerField())) - status_data = str(models.TextField(blank=True, null=True)) + status_data: str | None = str(models.TextField(blank=True, null=True)) instance_id = str(models.CharField(max_length=255, blank=True, null=True)) region = str(models.CharField(max_length=255)) zone = str(models.CharField(max_length=255)) @@ -360,14 +364,14 @@ class Instance(models.Model): class InstanceStatusEntry(models.Model): instance = cast(Instance, models.ForeignKey(Instance, on_delete=models.deletion.CASCADE)) - created = models.DateTimeField(default=timezone.now) + created = cast(datetime, models.DateTimeField(default=timezone.now)) msg = str(models.CharField(max_length=4095)) isCritical = bool(models.BooleanField(default=False)) class PoolStatusEntry(models.Model): pool = cast(InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE)) - created = models.DateTimeField(default=timezone.now) + created = cast(datetime, models.DateTimeField(default=timezone.now)) type = int(str(models.IntegerField())) msg = str(models.CharField(max_length=4095)) isCritical = bool(models.BooleanField(default=False)) @@ -375,7 +379,7 @@ class PoolStatusEntry(models.Model): class ProviderStatusEntry(models.Model): provider = str(models.CharField(max_length=255)) - created = models.DateTimeField(default=timezone.now) + created = cast(datetime, models.DateTimeField(default=timezone.now)) type = int(str(models.IntegerField())) msg = str(models.CharField(max_length=4095)) isCritical = bool(models.BooleanField(default=False)) @@ -383,13 +387,13 @@ class ProviderStatusEntry(models.Model): class PoolUptimeDetailedEntry(models.Model): pool = cast(InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE)) - created = models.DateTimeField(default=timezone.now) + created = cast(datetime, models.DateTimeField(default=timezone.now)) target = int(str(models.IntegerField())) actual = int(str(models.IntegerField())) class PoolUptimeAccumulatedEntry(models.Model): pool = cast(InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE)) - created = models.DateTimeField(default=timezone.now) + created = cast(datetime, models.DateTimeField(default=timezone.now)) accumulated_count = int(str(models.IntegerField(default=0))) uptime_percentage = cast(Decimal, models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True)) diff --git a/server/ec2spotmanager/serializers.py b/server/ec2spotmanager/serializers.py index df58933f4..54c49b2bc 100644 --- a/server/ec2spotmanager/serializers.py +++ b/server/ec2spotmanager/serializers.py @@ -1,6 +1,8 @@ from __future__ import annotations import itertools +from typing import Any + from django.http.response import Http404 # noqa from rest_framework import serializers @@ -44,7 +46,7 @@ class PoolConfigurationSerializer(serializers.BaseSerializer[PoolConfiguration]) gce_raw_config = serializers.DictField(child=serializers.CharField(), allow_null=True) gce_raw_config_override = serializers.BooleanField(default=False) - def __init__(self, *args, **kwargs) -> None: + def __init__(self, *args: Any, **kwargs: Any) -> None: self._flatten = kwargs.pop('flatten', False) super(PoolConfigurationSerializer, self).__init__(*args, **kwargs) @@ -84,7 +86,7 @@ class Meta: model = Instance fields = ['status_data'] - def update(self, instance, attrs): + def update(self, instance: Instance, attrs: dict[str, str]) -> Instance: ''' Update the status_data field of a given instance ''' diff --git a/server/ec2spotmanager/tasks.py b/server/ec2spotmanager/tasks.py index dc4672eb9..0aefb9766 100644 --- a/server/ec2spotmanager/tasks.py +++ b/server/ec2spotmanager/tasks.py @@ -12,6 +12,7 @@ from celeryconf import app from . import cron # noqa ensure cron tasks get registered from .common.prices import get_price_median +from .models import InstancePool from .CloudProvider.CloudProvider import INSTANCE_STATE, PROVIDERS, CloudProvider, CloudProviderError @@ -53,7 +54,7 @@ def _determine_best_location(config, count: int, cache=None) -> tuple[str | None best_zone: str | None = None best_region: str | None = None best_type: str | None = None - best_median: int | None = None + best_median: float | None = None best_instances: int | None = None rejected_prices: dict[str, int] = {} @@ -257,7 +258,7 @@ def _update_provider_status(provider: str, type_: str, message: str) -> None: logger.warning('Ignoring provider error: already exists.') -def _update_pool_status(pool, type_: str, message: str) -> None: +def _update_pool_status(pool: InstancePool, type_: str, message: str) -> None: from .models import PoolStatusEntry, POOL_STATUS_ENTRY_TYPE is_critical = type_ not in {'max-spot-instance-count-exceeded', 'price-too-low', 'temporary-failure'} diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index 3fdc269bf..97827ebfe 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -12,9 +12,12 @@ from __future__ import annotations +from datetime import datetime +from decimal import Decimal import logging from typing import cast from django.core.files.base import ContentFile +from django.core.files.uploadedfile import UploadedFile from django.http.response import HttpResponse from django.test import SimpleTestCase as DjangoTestCase from django.utils import timezone @@ -41,10 +44,10 @@ def runTest(self) -> None: _().assertContains(response, text) -def create_config(name, parent=None, size=None, cycle_interval=None, ec2_key_name=None, ec2_security_groups=None, - ec2_instance_types=None, ec2_image_name=None, ec2_userdata_macros=None, ec2_allowed_regions=None, - max_price=None, instance_tags=None, ec2_raw_config=None, ec2_userdata=None, gce_image_name=None, - gce_container_name=None, gce_disk_size=None) -> PoolConfiguration: +def create_config(name: str, parent: PoolConfiguration | None = None, size: int | None = None, cycle_interval: int | None = None, ec2_key_name: str | None = None, ec2_security_groups: str | None = None, + ec2_instance_types: str | None = None, ec2_image_name: str | None = None, ec2_userdata_macros: str | None = None, ec2_allowed_regions: str | None = None, + max_price: Decimal | None = None, instance_tags: str | None = None, ec2_raw_config: str | None = None, ec2_userdata: UploadedFile | None = None, gce_image_name: str | None = None, + gce_container_name: str | None = None, gce_disk_size: int | None = None) -> PoolConfiguration: result = cast(PoolConfiguration, PoolConfiguration.objects.create(name=name, parent=parent, size=size, cycle_interval=cycle_interval, ec2_key_name=ec2_key_name, ec2_image_name=ec2_image_name, @@ -65,6 +68,7 @@ def create_config(name, parent=None, size=None, cycle_interval=None, ec2_key_nam if ec2_raw_config is not None: result.ec2_raw_config_dict = ec2_raw_config if ec2_userdata is not None: + assert result.ec2_userdata_file is not None if not result.ec2_userdata_file.name: result.ec2_userdata_file.save("default.sh", ContentFile("")) result.ec2_userdata = ec2_userdata @@ -73,28 +77,28 @@ def create_config(name, parent=None, size=None, cycle_interval=None, ec2_key_nam return result -def create_pool(config, enabled=False, last_cycled=None) -> InstancePool: +def create_pool(config: PoolConfiguration, enabled: bool = False, last_cycled: datetime | None = None) -> InstancePool: result = cast(InstancePool, InstancePool.objects.create(config=config, isEnabled=enabled, last_cycled=last_cycled)) LOG.debug("Created InstancePool pk=%d", result.pk) return result -def create_poolmsg(pool) -> PoolStatusEntry: +def create_poolmsg(pool: InstancePool) -> PoolStatusEntry: result = cast(PoolStatusEntry, PoolStatusEntry.objects.create(pool=pool, type=0)) LOG.debug("Created PoolStatusEntry pk=%d", result.pk) return result -def create_instance(hostname, - pool=None, - status_code=0, - status_data=None, - ec2_instance_id=None, - ec2_region="", - ec2_zone="", - size=1, - created=None, - provider='EC2Spot') -> Instance: +def create_instance(hostname: str, + pool: InstancePool | None = None, + status_code: int = 0, + status_data: str | None = None, + ec2_instance_id: int | None = None, + ec2_region: str = "", + ec2_zone: str = "", + size: int = 1, + created: datetime | None = None, + provider: str = 'EC2Spot') -> Instance: if created is None: created = timezone.now() result = cast(Instance, Instance.objects.create(pool=pool, hostname=hostname, status_code=status_code, status_data=status_data, diff --git a/server/ec2spotmanager/tests/conftest.py b/server/ec2spotmanager/tests/conftest.py index b8137bfaa..297991e0b 100644 --- a/server/ec2spotmanager/tests/conftest.py +++ b/server/ec2spotmanager/tests/conftest.py @@ -21,8 +21,10 @@ from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Permission import pytest +from pytest_mock import MockerFixture from crashmanager.models import User as cmUser from ec2spotmanager.CloudProvider.CloudProvider import CloudProvider +from ec2spotmanager.models import InstancePool, PoolConfiguration from . import UncatchableException @@ -39,7 +41,7 @@ def _create_user(username: str, email: str = "test@mozilla.com", password: str = @pytest.fixture -def ec2spotmanager_test(db) -> None: # pylint: disable=invalid-name,unused-argument +def ec2spotmanager_test(db: None) -> None: # pylint: disable=invalid-name,unused-argument """Common testcase class for all ec2spotmanager unittests""" # Create one unrestricted and one restricted test user _create_user("test") @@ -47,11 +49,11 @@ def ec2spotmanager_test(db) -> None: # pylint: disable=invalid-name,unused-argu @pytest.fixture -def mock_provider(mocker): +def mock_provider(mocker: MockerFixture) -> Mock: prv_t = Mock(spec=CloudProvider) - def allowed_regions(cls, cfg): - result = [] + def allowed_regions(cls, cfg: PoolConfiguration) -> list[str]: + result: list[str] = [] if cls.provider == 'prov1': result.extend(set(cfg.ec2_allowed_regions) & set("abcd")) if cls.provider == 'prov2': @@ -59,7 +61,7 @@ def allowed_regions(cls, cfg): result.sort() return result - def get_instance(cls, provider): + def get_instance(cls, provider: str): cls.provider = provider return cls prv_t.check_instances_state.return_value = {} @@ -75,9 +77,9 @@ def get_instance(cls, provider): @pytest.fixture -def raise_on_status(mocker) -> None: +def raise_on_status(mocker: MockerFixture) -> None: - def _mock_pool_status(_pool, type_: str, message: str) -> None: + def _mock_pool_status(_pool: InstancePool, type_: str, message: str) -> None: if sys.exc_info() != (None, None, None): raise # pylint: disable=misplaced-bare-raise raise UncatchableException("%s: %s" % (type_, message)) diff --git a/server/ec2spotmanager/views.py b/server/ec2spotmanager/views.py index e47aa39d9..b16757a0f 100644 --- a/server/ec2spotmanager/views.py +++ b/server/ec2spotmanager/views.py @@ -490,6 +490,7 @@ def __handleConfigPOST(request: HttpRequest, config: PoolConfiguration) -> HttpR config.save() if request.POST['ec2_userdata']: + assert config.ec2_userdata_file is not None if not config.ec2_userdata_file.name: config.ec2_userdata_file.save("default.sh", ContentFile("")) config.ec2_userdata = request.POST['ec2_userdata'] @@ -588,7 +589,7 @@ def deletePool(request: HttpRequest, poolid: int) -> HttpResponse | HttpResponse @deny_restricted_users -def deletePoolMsg(request: HttpRequest, msgid: int, from_pool: str = '0') -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: +def deletePoolMsg(request: HttpRequest, msgid: int, from_pool: str | int = '0') -> HttpResponse | HttpResponsePermanentRedirect | HttpResponseRedirect: entry = get_object_or_404(PoolStatusEntry, pk=msgid) if request.method == 'POST': from_pool = int(request.POST['from_pool']) @@ -650,7 +651,7 @@ def deleteConfig(request: HttpRequest, configid: int) -> HttpResponse | HttpResp class UptimeChartViewDetailed(JSONView): authentication_classes = (SessionAuthentication,) # noqa - def get_context_data(self, **kwargs: Any) -> dict[str, object]: + def get_context_data(self, **kwargs: Any): context = super(UptimeChartViewDetailed, self).get_context_data(**kwargs) pool = InstancePool.objects.get(pk=int(kwargs['poolid'])) pool.flat_config = pool.config.flatten() @@ -699,7 +700,7 @@ def get_options(self, pool, entries) -> dict[str, object]: 'barShowStroke': False, } - def get_datasets(self, pool, entries): + def get_datasets(self, pool: InstancePool, entries): datasets = [] color_generator = self.get_colors() color = tuple(next(color_generator)) @@ -717,7 +718,7 @@ def get_datasets(self, pool, entries): datasets.append(dataset) return datasets - def get_labels(self, pool, entries) -> list[str]: + def get_labels(self, pool: InstancePool, entries) -> list[str]: return [x.created.strftime("%H:%M") for x in entries] @@ -761,7 +762,7 @@ def get_data_colors(self, entries) -> list[str]: return colors - def get_options(self, pool, entries) -> dict[str, object]: + def get_options(self, pool: InstancePool, entries) -> dict[str, object]: # Scale to 100% but use 110 so the red bar is actually visible scaleSteps = 11 return { @@ -775,7 +776,7 @@ def get_options(self, pool, entries) -> dict[str, object]: 'barShowStroke': False, } - def get_datasets(self, pool, entries): + def get_datasets(self, pool: InstancePool, entries): datasets = [] color_generator = self.get_colors() color = tuple(next(color_generator)) @@ -793,7 +794,7 @@ def get_datasets(self, pool, entries): datasets.append(dataset) return datasets - def get_labels(self, pool, entries) -> list[str]: + def get_labels(self, pool: InstancePool, entries) -> list[str]: return [x.created.strftime("%b %d") for x in entries] @@ -829,7 +830,7 @@ class PoolConfigurationViewSet(mixins.RetrieveModelMixin, serializer_class = PoolConfigurationSerializer def retrieve(self, request: Request, *args: Any, **kwds: Any) -> Response: - flatten = request.query_params.get('flatten', '0') + flatten: str | int = request.query_params.get('flatten', '0') try: flatten = int(flatten) assert flatten in {0, 1} diff --git a/server/server/middleware.py b/server/server/middleware.py index 8ab80436c..a54028c00 100644 --- a/server/server/middleware.py +++ b/server/server/middleware.py @@ -2,10 +2,17 @@ import re import traceback +from types import TracebackType +from typing import Any +from typing import Callable from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponseForbidden +from django.http.request import HttpRequest +from django.http.response import HttpResponse +from rest_framework.request import Request +from rest_framework.views import APIView from crashmanager.models import User from .auth import CheckAppPermission @@ -16,13 +23,17 @@ class ExceptionLoggingMiddleware(object): This tiny middleware module allows us to see exceptions on stderr when running a Django instance with runserver.py """ - def __init__(self, get_response) -> None: + def __init__(self, get_response: Callable[..., Any]) -> None: self.get_response = get_response - def __call__(self, request): + def __call__(self, request: HttpRequest): return self.get_response(request) - def process_exception(self, request, exception): + def process_exception(self, request: HttpRequest, exception: tuple[ + type[BaseException] | None, + type[BaseException] | None, + TracebackType | None + ]) -> None: print(traceback.format_exc()) return None @@ -43,14 +54,14 @@ class RequireLoginMiddleware(object): """ # Based on snippet from https://stackoverflow.com/a/46976284 # Docstring and original idea from https://stackoverflow.com/a/2164224 - def __init__(self, get_response) -> None: + def __init__(self, get_response: Callable[..., Any]) -> None: self.get_response = get_response self.exceptions = re.compile("(" + "|".join(settings.LOGIN_REQUIRED_URLS_EXCEPTIONS) + ")") - def __call__(self, request): + def __call__(self, request: HttpRequest): return self.get_response(request) - def process_view(self, request, view_func, view_args, view_kwargs): + def process_view(self, request: HttpRequest, view_func: Callable[..., Any], view_args: Any, view_kwargs: Any) -> Any: # No need to process URLs if user already logged in if request.user.is_authenticated: return None @@ -65,14 +76,14 @@ def process_view(self, request, view_func, view_args, view_kwargs): class CheckAppPermissionsMiddleware(object): - def __init__(self, get_response) -> None: + def __init__(self, get_response: Callable[..., Any]) -> None: self.get_response = get_response self.exceptions = re.compile("(" + "|".join(settings.LOGIN_REQUIRED_URLS_EXCEPTIONS) + ")") - def __call__(self, request): + def __call__(self, request: HttpRequest): return self.get_response(request) - def process_view(self, request, view_func, view_args, view_kwargs): + def process_view(self, request: Request, view_func: APIView, view_args: Any, view_kwargs: Any) -> HttpResponseForbidden | None: # Get the app name app = view_func.__module__.split('.', 1)[0] diff --git a/server/server/views.py b/server/server/views.py index 3e7fe40b2..ad2688704 100644 --- a/server/server/views.py +++ b/server/server/views.py @@ -4,7 +4,7 @@ from django.contrib.auth.views import LoginView from django.conf import settings from django.core.exceptions import PermissionDenied -from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage +from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage, Page from django.db.models import Model from django.db.models import Q from django.db.models.query import QuerySet @@ -14,11 +14,12 @@ from django.http.response import HttpResponseRedirect from django.shortcuts import render from django.urls import resolve, reverse -from django.views import View import collections import functools import json from rest_framework import filters +from rest_framework.request import Request +from rest_framework.views import APIView import six from typing import Any from typing import TypeVar @@ -51,7 +52,7 @@ def login(request: HttpRequest): def deny_restricted_users(wrapped: collections.abc.Callable[..., Any]) -> collections.abc.Callable[..., Any]: @functools.wraps(wrapped) - def decorator(request, *args, **kwargs): + def decorator(request: HttpRequest, *args: Any, **kwargs: Any) -> Any: user = User.get_or_create_restricted(request.user)[0] if user.restricted: raise PermissionDenied({"message": "You don't have permission to access this view."}) @@ -63,7 +64,7 @@ def renderError(request: HttpRequest, err: str) -> HttpResponse: return render(request, 'error.html', {'error_message': err}) # noqa -def paginate_requested_list(request: HttpRequest, entries: QuerySet[Model]) -> QuerySet[Model]: +def paginate_requested_list(request: HttpRequest, entries: QuerySet[Model]) -> Page: """ This method generically paginates a given QuerySet and returns a list suitable for passing to a template. The set is paginated by request @@ -71,11 +72,14 @@ def paginate_requested_list(request: HttpRequest, entries: QuerySet[Model]) -> Q """ page_size = request.GET.get('page_size') if not page_size: - page_size = 100 - paginator = Paginator(entries, page_size) + assert page_size is not None + page_size_int = int(page_size) + page_size_int = 100 + paginator = Paginator(entries, page_size_int) page = request.GET.get('page') try: + assert page is not None page_entries = paginator.page(page) except PageNotAnInteger: # If page is not an integer, deliver first page. @@ -96,7 +100,7 @@ def paginate_requested_list(request: HttpRequest, entries: QuerySet[Model]) -> Q return page_entries -def json_to_query(json_str): +def json_to_query(json_str: str): """ This method converts JSON objects into trees of Django Q objects. It can be used to provide the user the ability to perform complex @@ -166,7 +170,7 @@ class JsonQueryFilterBackend(filters.BaseFilterBackend): """ Accepts filtering with a query parameter which builds a Django query from JSON (see json_to_query) """ - def filter_queryset(self, request: HttpRequest, queryset: QuerySet[MT], view: View) -> QuerySet[MT]: + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: """ Return a filtered queryset. """ @@ -184,7 +188,7 @@ class SimpleQueryFilterBackend(filters.BaseFilterBackend): """ Accepts filtering with a query parameter which builds a Django query using simple "contains" searches """ - def filter_queryset(self, request: HttpRequest, queryset: QuerySet[MT], view: View) -> QuerySet[MT]: + def filter_queryset(self, request: Request, queryset: QuerySet[MT], view: APIView) -> QuerySet[MT]: """ Return a filtered queryset. """ diff --git a/server/taskmanager/management/commands/taskmanager_scrape_task_group.py b/server/taskmanager/management/commands/taskmanager_scrape_task_group.py index 2a5b1e3e3..db35359ff 100644 --- a/server/taskmanager/management/commands/taskmanager_scrape_task_group.py +++ b/server/taskmanager/management/commands/taskmanager_scrape_task_group.py @@ -3,9 +3,11 @@ from __future__ import annotations from argparse import ArgumentParser +from collections.abc import Callable import functools from logging import getLogger from typing import Any +from typing import Generator from django.conf import settings from django.core.management import BaseCommand # noqa @@ -18,7 +20,7 @@ LOG = getLogger("taskmanager.management.commands.scrape_group") -def paginated(func, result_key): +def paginated(func: Callable[..., Any], result_key: str) -> Callable[..., Any]: """Wraps a Taskcluster API that returns a result like: { continuationToken: "", @@ -28,7 +30,7 @@ def paginated(func, result_key): and yields the contents of `result_key` """ @functools.wraps(func) - def _wrapped(*args, **kwds): + def _wrapped(*args: Any, **kwds: Any) -> Generator[Any, Any, Any]: kwds = kwds.copy() result = func(*args, **kwds) while result.get("continuationToken"): diff --git a/server/taskmanager/serializers.py b/server/taskmanager/serializers.py index 64f78fe1a..3b306b1a8 100644 --- a/server/taskmanager/serializers.py +++ b/server/taskmanager/serializers.py @@ -23,7 +23,7 @@ class Meta: model = Pool fields = "__all__" - def to_representation(self, instance): + def to_representation(self, instance: Pool): """Add dynamic fields""" ret = super(PoolSerializer, self).to_representation(instance) ret["cycle_time"] = None diff --git a/server/taskmanager/views.py b/server/taskmanager/views.py index 9225e8011..8f65d4879 100644 --- a/server/taskmanager/views.py +++ b/server/taskmanager/views.py @@ -5,13 +5,19 @@ import datetime import logging import re +from typing import Any +from django.http.request import HttpRequest +from django.http.response import HttpResponse +from django.http.response import HttpResponsePermanentRedirect +from django.http.response import HttpResponseRedirect from django.shortcuts import render, redirect, get_object_or_404 from django.utils import timezone from rest_framework import mixins, status, viewsets from rest_framework.authentication import TokenAuthentication, SessionAuthentication from rest_framework.decorators import action from rest_framework.filters import OrderingFilter +from rest_framework.request import Request from rest_framework.response import Response from server.auth import CheckAppPermission from server.views import JsonQueryFilterBackend, SimpleQueryFilterBackend, deny_restricted_users @@ -27,17 +33,17 @@ @deny_restricted_users -def index(request): +def index(request: HttpRequest) -> HttpResponsePermanentRedirect | HttpResponseRedirect: return redirect('taskmanager:pool-list-ui') @deny_restricted_users -def list_pools(request): +def list_pools(request: HttpRequest) -> HttpResponse: return render(request, 'pool/index.html', {}) @deny_restricted_users -def view_pool(request, pk): +def view_pool(request: HttpRequest, pk: int) -> HttpResponse: pool = get_object_or_404(Pool, pk=pk) return render(request, 'pool/view.html', { "pool": PoolVueSerializer(pool).data, @@ -59,7 +65,7 @@ class PoolViewSet(viewsets.ReadOnlyModelViewSet): OrderingFilter, ] - def get_serializer(self, *args, **kwds): + def get_serializer(self, *args: Any, **kwds: Any): vue = self.request.query_params.get('vue', 'false').lower() not in ('false', '0') if vue: return PoolVueSerializer(*args, **kwds) @@ -83,14 +89,14 @@ class TaskViewSet(mixins.ListModelMixin, OrderingFilter, ] - def get_serializer(self, *args, **kwds): + def get_serializer(self, *args: Any, **kwds: Any): vue = self.request.query_params.get('vue', 'false').lower() not in ('false', '0') if vue: return TaskVueSerializer(*args, **kwds) return super().get_serializer(*args, **kwds) @action(detail=False, methods=['post'], authentication_classes=(TokenAuthentication,)) - def update_status(self, request): + def update_status(self, request: Request) -> Response: if set(request.data.keys()) != {"client", "status_data"}: LOG.debug("request.data.keys(): %s", request.data.keys()) errors = {} From 168cabe52c6af555569336b6c7a5c55d9eb4d02d Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 21 Feb 2022 13:24:55 -0800 Subject: [PATCH 110/137] 457 mypy issues left --- Collector/Collector.py | 1 + FTB/ConfigurationFiles.py | 4 ++-- server/ec2spotmanager/models.py | 2 +- server/ec2spotmanager/tests/__init__.py | 10 +++++----- server/ec2spotmanager/tests/test_tasks.py | 11 ++++++----- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Collector/Collector.py b/Collector/Collector.py index 2907187e6..074bc34c8 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -577,6 +577,7 @@ def main(args: list[str] | None = None) -> int: if opts.autosubmit: runner = AutoRunner.fromBinaryArgs(opts.rargs[0], opts.rargs[1:]) if runner.run(): + assert configuration is not None crashInfo = runner.getCrashInfo(configuration) collector.submit(crashInfo, testcase, opts.testcasequality, opts.testcasesize, metadata) else: diff --git a/FTB/ConfigurationFiles.py b/FTB/ConfigurationFiles.py index 12950465c..0b80de42f 100755 --- a/FTB/ConfigurationFiles.py +++ b/FTB/ConfigurationFiles.py @@ -23,7 +23,7 @@ class ConfigurationFiles(): def __init__(self, configFiles: list[str]) -> None: self.mainConfig: dict[str, str] = {} - self.metadataConfig: dict[str, str] = {} + self.metadataConfig = {} if configFiles: self.parser = configparser.ConfigParser() @@ -45,7 +45,7 @@ def __init__(self, configFiles: list[str]) -> None: if sections: print("Warning: Ignoring the following config file sections: %s" % " ".join(sections), file=sys.stderr) - def getSectionMap(self, section: str) -> dict[str, str]: + def getSectionMap(self, section: str): ret = {} try: options = self.parser.options(section) diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index fb05532e9..123f7731c 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -75,7 +75,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: self.ec2_raw_config_override: bool | None = None self.ec2_userdata_macros_dict: dict[str, str] | str | None = None self.ec2_userdata_macros_override: bool | None = None - self.ec2_userdata: UploadedFile | bytes | str | None = None + self.ec2_userdata: bytes | str | None = None self.ec2_security_groups_list: list[str] | str | None = None self.ec2_security_groups_override: bool | None = None self.ec2_allowed_regions_list: list[str] | str | None = None diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index 97827ebfe..eb0b629a4 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -44,9 +44,9 @@ def runTest(self) -> None: _().assertContains(response, text) -def create_config(name: str, parent: PoolConfiguration | None = None, size: int | None = None, cycle_interval: int | None = None, ec2_key_name: str | None = None, ec2_security_groups: str | None = None, - ec2_instance_types: str | None = None, ec2_image_name: str | None = None, ec2_userdata_macros: str | None = None, ec2_allowed_regions: str | None = None, - max_price: Decimal | None = None, instance_tags: str | None = None, ec2_raw_config: str | None = None, ec2_userdata: UploadedFile | None = None, gce_image_name: str | None = None, +def create_config(name: str, parent: PoolConfiguration | None = None, size: int | None = None, cycle_interval: int | None = None, ec2_key_name: str | None = None, ec2_security_groups: list[str] | str | None = None, + ec2_instance_types: list[str] | None = None, ec2_image_name: str | None = None, ec2_userdata_macros: dict[str, str] | None = None, ec2_allowed_regions: list[str] | None = None, + max_price: float | str | None = None, instance_tags: dict[str, str] | None = None, ec2_raw_config: dict[str, str] | None = None, ec2_userdata: UploadedFile | str | bytes | None = None, gce_image_name: str | None = None, gce_container_name: str | None = None, gce_disk_size: int | None = None) -> PoolConfiguration: result = cast(PoolConfiguration, PoolConfiguration.objects.create(name=name, parent=parent, size=size, cycle_interval=cycle_interval, ec2_key_name=ec2_key_name, @@ -89,11 +89,11 @@ def create_poolmsg(pool: InstancePool) -> PoolStatusEntry: return result -def create_instance(hostname: str, +def create_instance(hostname: str | None, pool: InstancePool | None = None, status_code: int = 0, status_data: str | None = None, - ec2_instance_id: int | None = None, + ec2_instance_id: str | int | None = None, ec2_region: str = "", ec2_zone: str = "", size: int = 1, diff --git a/server/ec2spotmanager/tests/test_tasks.py b/server/ec2spotmanager/tests/test_tasks.py index f77aca117..e807acc2f 100644 --- a/server/ec2spotmanager/tests/test_tasks.py +++ b/server/ec2spotmanager/tests/test_tasks.py @@ -13,6 +13,7 @@ from __future__ import annotations +from collections.abc import Callable import datetime import logging from typing import Iterable @@ -421,20 +422,20 @@ def test_pool_trim() -> None: @pytest.mark.parametrize("term_task,provider_func", [(_terminate_instance_ids, "terminate_instances"), (_terminate_instance_request_ids, "cancel_requests")]) -def test_terminate(mocker: MockerFixture, term_task, provider_func) -> None: +def test_terminate(mocker: MockerFixture, term_task: Callable[..., None], provider_func: str) -> None: """check that terminate instances task works properly""" fake_provider_cls = mocker.patch('ec2spotmanager.tasks.CloudProvider') fake_provider = fake_provider_cls.get_instance.return_value = mocker.Mock() term_task('provider', 'region', ['inst1', 'inst2']) fake_provider_cls.get_instance.assert_called_once_with('provider') - provider_func = getattr(fake_provider, provider_func) - provider_func.assert_called_once_with({'region': ['inst1', 'inst2']}) + provider_func_ = getattr(fake_provider, provider_func) + provider_func_.assert_called_once_with({'region': ['inst1', 'inst2']}) - provider_func.side_effect = CloudProviderTemporaryFailure('blah') + provider_func_.side_effect = CloudProviderTemporaryFailure('blah') with pytest.raises(CloudProviderTemporaryFailure, match=r'CloudProviderTemporaryFailure: blah \(temporary-failure\)'): term_task('provider', 'region', []) - provider_func.side_effect = Exception('blah') + provider_func_.side_effect = Exception('blah') with pytest.raises(Exception, match=r'blah'): term_task('provider', 'region', []) From 8107b928eaa143d9e1388638db12c5057ecfeb76 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 4 Mar 2022 17:48:37 -0800 Subject: [PATCH 111/137] Rename variables for different with blocks --- Collector/tests/test_Collector.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index 431611dad..a30e78e5d 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -261,28 +261,28 @@ class response_t: # noqa collector.refresh() # check that bad zips raise errors - with (sigs_path / "other.txt").open("rb") as fp: + with (sigs_path / "other.txt").open("rb") as fp3: class response_t: # noqa status_code = requests.codes["ok"] text = "OK" - raw = fp + raw = fp3 collector._session.get = lambda *_, **__: response_t() with pytest.raises(zipfile.BadZipfile, match="not a zip file"): collector.refresh() - with outzip_path.open("r+b") as fp_2: + with outzip_path.open("r+b") as fp4: # corrupt the CRC field for the signature file in the zip - fp_2.seek(0x42) - fp_2.write(b"\xFF") - with outzip_path.open("rb") as fp_3: + fp4.seek(0x42) + fp4.write(b"\xFF") + with outzip_path.open("rb") as fp5: class response_t: # noqa status_code = requests.codes["ok"] text = "OK" - raw = fp_3 + raw = fp5 collector._session.get = lambda *_, **__: response_t() From d5b343365a4a77962bfadebf2ed35c5a6d25c769 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 5 Mar 2022 16:27:35 -0800 Subject: [PATCH 112/137] Remove unused imports that were added inadvertently --- server/ec2spotmanager/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index 74a210074..5eff17fda 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -11,8 +11,8 @@ from __future__ import annotations -import logging from datetime import datetime +import logging from typing import cast from django.core.files.base import ContentFile From 763b1e29fe7e92b0b683326aaee8c69823af9476 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 15 Mar 2022 02:28:25 -0700 Subject: [PATCH 113/137] TEMP Changes from my other mypy-support branch --- .github/workflows/mypytmp.yml | 19 +- Collector/Collector.py | 17 +- Collector/__main__.py | 3 + Collector/tests/test_Collector.py | 6 +- CovReporter/CovReporter.py | 7 +- CovReporter/__main__.py | 3 + EC2Reporter/__main__.py | 3 + FTB/AssertionHelper.py | 1 - FTB/Running/GDB.py | 3 +- FTB/Signatures/CrashInfo.py | 235 ++--- FTB/Signatures/CrashSignature.py | 1 - FTB/Signatures/RegisterHelper.py | 2 +- FTB/Signatures/Symptom.py | 9 - .../apple-10-7-crash-report-example.txt | 238 +++++ .../resources/apple-crash-report-example.txt | 59 ++ .../tests/resources/cdb-10c-crashlog.txt | 214 +++++ .../tests/resources/cdb-11c-crashlog.txt | 208 +++++ .../tests/resources/cdb-12c-crashlog.txt | 220 +++++ .../tests/resources/cdb-1a-crashlog.txt | 245 ++++++ .../tests/resources/cdb-1b-crashlog.txt | 329 +++++++ .../tests/resources/cdb-2a-crashlog.txt | 308 +++++++ .../tests/resources/cdb-2b-crashlog.txt | 381 ++++++++ .../tests/resources/cdb-3a-crashlog.txt | 284 ++++++ .../tests/resources/cdb-3b-crashlog.txt | 357 ++++++++ .../tests/resources/cdb-4a-crashlog.txt | 318 +++++++ .../tests/resources/cdb-4b-crashlog.txt | 368 ++++++++ .../tests/resources/cdb-5a-crashlog.txt | 335 ++++++++ .../tests/resources/cdb-5b-crashlog.txt | 425 +++++++++ .../tests/resources/cdb-6a-crashlog.txt | 407 +++++++++ .../tests/resources/cdb-6b-crashlog.txt | 503 +++++++++++ .../tests/resources/cdb-7c-crashlog.txt | 269 ++++++ .../tests/resources/cdb-8c-crashlog.txt | 207 +++++ .../tests/resources/cdb-9c-crashlog.txt | 260 ++++++ .../tests/resources/minidump-example.txt | 811 ++++++++++++++++++ .../tests/resources/tsan-lock-report.txt | 18 + .../resources/tsan-report-atomic-swapped.txt | 170 ++++ .../tests/resources/tsan-report-atomic.txt | 170 ++++ .../tests/resources/tsan-report.txt | 160 ++++ .../tests/resources/tsan-report2.txt | 70 ++ .../resources/tsan-simple-leak-report.txt | 4 + .../tsan-simple-race-report-swapped.txt | 14 + .../resources/tsan-simple-race-report.txt | 14 + .../tests/resources/valgrind-cjm-01.txt | 11 + .../tests/resources/valgrind-cjm-02.txt | 89 ++ .../tests/resources/valgrind-if-01.txt | 7 + .../tests/resources/valgrind-if-02.txt | 24 + .../tests/resources/valgrind-if-03.txt | 26 + .../tests/resources/valgrind-ir-01.txt | 6 + .../tests/resources/valgrind-ir-02.txt | 22 + .../tests/resources/valgrind-iw-01.txt | 5 + .../tests/resources/valgrind-leak-01.txt | 5 + .../tests/resources/valgrind-leak-02.txt | 4 + .../tests/resources/valgrind-nm-01.txt | 4 + .../tests/resources/valgrind-pt-01.txt | 11 + .../tests/resources/valgrind-sc-01.txt | 10 + .../tests/resources/valgrind-sc-02.txt | 8 + .../tests/resources/valgrind-sdo-01.txt | 4 + .../tests/resources/valgrind-uuv-01.txt | 7 + FTB/Signatures/tests/test_CrashSignature.py | 1 - Reporter/Reporter.py | 3 - TaskStatusReporter/__main__.py | 3 + misc/afl_libfuzzer/S3Manager.py | 3 - misc/afl_libfuzzer/afl-libfuzzer-daemon.py | 12 +- misc/ec2prices/simulator.py | 11 +- pyproject.toml | 7 - repack_wheel.sh | 15 + requirements.txt | 5 +- server/celeryconf.py | 2 + .../management/commands/setup_repository.py | 4 +- server/covmanager/migrations/0001_initial.py | 2 + ...002_increase_collection_filename_length.py | 2 + .../0003_collection_file_optional.py | 2 + .../0004_reportconfiguration_reportsummary.py | 2 + server/covmanager/migrations/0005_report.py | 2 + server/covmanager/models.py | 3 +- server/covmanager/tests/test_collections.py | 2 +- .../covmanager/tests/test_collections_rest.py | 3 +- server/covmanager/tests/test_repositories.py | 2 +- .../tests/test_repositories_rest.py | 6 +- server/covmanager/views.py | 10 +- .../crashmanager/Bugtracker/BugzillaREST.py | 6 +- server/crashmanager/admin.py | 10 +- .../0001_squashed_0020_add_app_permissions.py | 2 + .../migrations/0002_add_taskmanager.py | 2 + .../tests/fixtures/gdb_crash_data.txt | 39 - .../tests/test_bugproviders_rest.py | 3 +- server/crashmanager/tests/test_bugs.py | 3 +- server/crashmanager/tests/test_crashes.py | 3 +- .../crashmanager/tests/test_crashes_rest.py | 5 +- server/crashmanager/tests/test_inbox_rest.py | 3 +- server/crashmanager/tests/test_rest_live.py | 14 +- server/crashmanager/tests/test_signatures.py | 2 +- .../tests/test_signatures_rest.py | 3 +- server/crashmanager/tests/test_stats.py | 3 +- .../crashmanager/tests/test_templates_rest.py | 3 +- .../crashmanager/tests/test_user_settings.py | 3 +- .../CloudProvider/GCECloudProvider.py | 2 +- .../0001_squashed_0013_add_gce_fields.py | 2 + server/ec2spotmanager/tasks.py | 5 +- server/ec2spotmanager/tests/__init__.py | 2 +- server/ec2spotmanager/tests/test_configs.py | 8 +- .../ec2spotmanager/tests/test_configs_rest.py | 8 +- .../tests/test_ec2spotmanager.py | 8 +- .../ec2spotmanager/tests/test_pools_rest.py | 8 +- .../ec2spotmanager/tests/test_status_rest.py | 8 +- .../ec2spotmanager/tests/test_task_status.py | 4 +- server/server/views.py | 8 +- server/taskmanager/apps.py | 2 + .../commands/taskmanager_pulse_listen.py | 3 +- ...wn_task_status_and_run_time_calculation.py | 2 + server/taskmanager/tests/test_update_pools.py | 3 +- setup.cfg | 21 + setup.py | 1 + tox.ini | 13 +- 114 files changed, 7937 insertions(+), 295 deletions(-) create mode 100644 FTB/Signatures/tests/resources/apple-10-7-crash-report-example.txt create mode 100644 FTB/Signatures/tests/resources/apple-crash-report-example.txt create mode 100644 FTB/Signatures/tests/resources/cdb-10c-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-11c-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-12c-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-1a-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-1b-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-2a-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-2b-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-3a-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-3b-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-4a-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-4b-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-5a-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-5b-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-6a-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-6b-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-7c-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-8c-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/cdb-9c-crashlog.txt create mode 100644 FTB/Signatures/tests/resources/minidump-example.txt create mode 100644 FTB/Signatures/tests/resources/tsan-lock-report.txt create mode 100644 FTB/Signatures/tests/resources/tsan-report-atomic-swapped.txt create mode 100644 FTB/Signatures/tests/resources/tsan-report-atomic.txt create mode 100644 FTB/Signatures/tests/resources/tsan-report.txt create mode 100644 FTB/Signatures/tests/resources/tsan-report2.txt create mode 100644 FTB/Signatures/tests/resources/tsan-simple-leak-report.txt create mode 100644 FTB/Signatures/tests/resources/tsan-simple-race-report-swapped.txt create mode 100644 FTB/Signatures/tests/resources/tsan-simple-race-report.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-cjm-01.txt create mode 100755 FTB/Signatures/tests/resources/valgrind-cjm-02.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-if-01.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-if-02.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-if-03.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-ir-01.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-ir-02.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-iw-01.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-leak-01.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-leak-02.txt create mode 100755 FTB/Signatures/tests/resources/valgrind-nm-01.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-pt-01.txt create mode 100755 FTB/Signatures/tests/resources/valgrind-sc-01.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-sc-02.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-sdo-01.txt create mode 100644 FTB/Signatures/tests/resources/valgrind-uuv-01.txt create mode 100755 repack_wheel.sh delete mode 100644 server/crashmanager/tests/fixtures/gdb_crash_data.txt diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 0b5e785b1..e9b7b4de0 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -2,7 +2,7 @@ name: mypytmp on: push: - branches: [ basic-mypy-infrastructure ] + branches: [ mypy-support ] pull_request: branches: [ master ] @@ -50,9 +50,20 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: | python -u -m pip install --upgrade pip setuptools wheel - pip install -r server/requirements3.7.txt - pip install --upgrade -e . + pip install --upgrade -e .[dev,server,taskmanager,docker,test,mypy] + + - name: Run flake8 + run: | + flake8 . + + - name: Run yesqa + run: | + find . -type f -name "*.py" -not -path "./build/*" | xargs yesqa + + - name: Run isort and all the rest + run: | + isort . && black . && pyup_dirs --py37-plus . && flynt . - name: Run mypy run: | - mypy Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py + mypy --install-types --non-interactive Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py diff --git a/Collector/Collector.py b/Collector/Collector.py index 93fbb64a2..28a21ecff 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -111,8 +111,7 @@ def refreshFromZip(self, zipFileName: str) -> None: os.remove(os.path.join(self.sigCacheDir, sigFile)) else: print( - "Warning: Skipping deletion of non-signature file:", - sigFile, + f"Warning: Skipping deletion of non-signature file: {sigFile}", file=sys.stderr, ) @@ -274,11 +273,10 @@ def generate( @remote_checks def download(self, crashId: int) -> tuple[str, dict[str, str]] | None: """ - Download the testcase for the specified crashId. + Download all testcases for the specified bucketId. - @param crashId: ID of the requested crash entry on the server side - @return: Tuple containing name of the file where the test was stored and the raw - JSON response + @param bucketId: ID of the requested bucket on the server side + @return: generator of filenames where tests were stored. """ assert self.serverHost is not None assert self.serverPort is not None @@ -782,17 +780,14 @@ def main(args: list[str] | None = None) -> int: if "args" in retJSON and retJSON["args"]: args = json.loads(retJSON["args"]) assert args is not None - print( - "Command line arguments:", - " ".join(args), - ) + print(f"Command line arguments: {' '.join(args)}") print("") if "env" in retJSON and retJSON["env"]: env = json.loads(retJSON["env"]) assert env is not None print( - "Environment variables:", + "Environment variables: %s", " ".join(f"{k} = {v}" for (k, v) in env.items()), ) print("") diff --git a/Collector/__main__.py b/Collector/__main__.py index e8e4d3ae7..e2e438b42 100644 --- a/Collector/__main__.py +++ b/Collector/__main__.py @@ -14,6 +14,9 @@ @contact: choller@mozilla.com """ + +from __future__ import annotations + import sys from .Collector import main diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index a30e78e5d..b3751429b 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -89,7 +89,7 @@ def test_collector_submit( # see that the issue was created in the server entry = CrashEntry.objects.get(pk=result["id"]) assert entry.rawStdout == "" - assert entry.rawStderr == asan_trace_crash.rstrip() + assert entry.rawStderr == asan_trace_crash assert entry.rawCrashData == "" assert entry.tool.name == "test-tool" assert entry.client.name == "test-fuzzer1" @@ -111,7 +111,7 @@ def test_collector_submit( with (tmp_path / ".fuzzmanagerconf").open("w") as fp: fp.write("[Main]\n") fp.write(f"serverhost = {url.hostname}\n") - fp.write(f"serverport = {url.port:d}\n") + fp.write("serverport = %d\n" % url.port) fp.write(f"serverproto = {url.scheme}\n") fp.write(f"serverauthtoken = {fm_user.token}\n") @@ -167,7 +167,7 @@ def test_collector_submit( ) # newer than the last result, will fail if the test db is active assert entry.rawStdout == "stdout data" assert entry.rawStderr == "stderr data" - assert entry.rawCrashData == asan_trace_crash.rstrip() + assert entry.rawCrashData == asan_trace_crash assert entry.tool.name == "tool2" assert entry.client.name == platform.node() assert entry.product.name == "mozilla-inbound" diff --git a/CovReporter/CovReporter.py b/CovReporter/CovReporter.py index fb5a4a813..f93ed7467 100755 --- a/CovReporter/CovReporter.py +++ b/CovReporter/CovReporter.py @@ -91,9 +91,10 @@ def submit( @param description: Optional description for this coverage data @param stats: An optional stats object as returned by create_combined_coverage """ - url = ( - f"{self.serverProtocol}://{self.serverHost}:{self.serverPort}" - "/covmanager/rest/collections/" + url = "{}://{}:{}/covmanager/rest/collections/".format( + self.serverProtocol, + self.serverHost, + self.serverPort, ) if version is None: diff --git a/CovReporter/__main__.py b/CovReporter/__main__.py index 2b3f02d8c..c2a6f103d 100644 --- a/CovReporter/__main__.py +++ b/CovReporter/__main__.py @@ -14,6 +14,9 @@ @contact: choller@mozilla.com """ + +from __future__ import annotations + import sys from .CovReporter import main diff --git a/EC2Reporter/__main__.py b/EC2Reporter/__main__.py index 9213c88f0..307a7390b 100644 --- a/EC2Reporter/__main__.py +++ b/EC2Reporter/__main__.py @@ -14,6 +14,9 @@ @contact: choller@mozilla.com """ + +from __future__ import annotations + import sys from .EC2Reporter import main diff --git a/FTB/AssertionHelper.py b/FTB/AssertionHelper.py index 6b83c4f83..0c37db430 100644 --- a/FTB/AssertionHelper.py +++ b/FTB/AssertionHelper.py @@ -190,7 +190,6 @@ def getSanitizedAssertionPattern(msgs: list[str] | str | None) -> list[str] | st for use in signature matching. @param msgs: Assertion message(s) to be sanitized - @return: Sanitized assertion message (regular expression) """ assert msgs is not None diff --git a/FTB/Running/GDB.py b/FTB/Running/GDB.py index e7993bdcc..3fe120489 100644 --- a/FTB/Running/GDB.py +++ b/FTB/Running/GDB.py @@ -32,8 +32,7 @@ def regAsHexStr(reg: str) -> str: mask = 0xFFFFFFFFFFFFFFFF else: mask = 0xFFFFFFFF - val = int(str(gdb.parse_and_eval("$" + reg)), 0) & mask # type: ignore[name-defined] # noqa @UndefinedVariable - return f"0x{val:x}" + return f"0x{int(str(gdb.parse_and_eval('$' + reg)), 0) & mask:x}" # type: ignore[name-defined] # noqa @UndefinedVariable def regAsIntStr(reg: str) -> str: diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 3f1d094dd..32a84dd03 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -290,7 +290,20 @@ def fromRawCrashData( if stderr is not None: lines.extend(stderr) - result: CrashInfo | None = None + result: ( + UBSanCrashInfo + | ASanCrashInfo + | LSanCrashInfo + | TSanCrashInfo + | AppleCrashInfo + | CDBCrashInfo + | GDBCrashInfo + | RustCrashInfo + | MinidumpCrashInfo + | ValgrindCrashInfo + | NoCrashInfo + | None + ) = None for line in lines: if ubsanString in line and re.match(ubsanRegex, line) is not None: result = UBSanCrashInfo(stdout, stderr, configuration, auxCrashData) @@ -723,7 +736,7 @@ def __init__( if not expectedIndex == index: raise RuntimeError( - "Fatal error parsing ASan trace (Index mismatch, got index " + f"Fatal error parsing ASan trace (Index mismatch, got index " f"{index} but expected {expectedIndex})" ) @@ -879,7 +892,7 @@ def __init__( if expectedIndex != index: raise RuntimeError( - "Fatal error parsing LSan trace (Index mismatch, got index " + f"Fatal error parsing LSan trace (Index mismatch, got index " f"{index} but expected {expectedIndex})" ) @@ -1623,16 +1636,15 @@ def __init__( apple_crash_data = crashData or stderr inCrashingThread = False - if apple_crash_data is not None: - for line in apple_crash_data: - # Crash address - if line.startswith("Exception Codes:"): - # Example: - # Exception Type: EXC_BAD_ACCESS (SIGABRT) - # Exception Codes: KERN_INVALID_ADDRESS at 0x00000001374b893e - address = line.split(" ")[-1] - if address.startswith("0x"): - self.crashAddress = int(address, 16) + for line in apple_crash_data: + # Crash address + if line.startswith("Exception Codes:"): + # Example: + # Exception Type: EXC_BAD_ACCESS (SIGABRT) + # Exception Codes: KERN_INVALID_ADDRESS at 0x00000001374b893e + address = line.split(" ")[-1] + if address.startswith("0x"): + self.crashAddress = int(address, 16) # Start of stack for crashing thread if re.match(r"Thread \d+ Crashed:", line): @@ -1707,112 +1719,111 @@ def __init__( cdb_crash_data = crashData or stderr - if cdb_crash_data is not None: - for line in cdb_crash_data: - # Start of .ecxr data - if re.match(r"0:000> \.ecxr", line): - inEcxrData = True + for line in cdb_crash_data: + # Start of .ecxr data + if re.match(r"0:000> \.ecxr", line): + inEcxrData = True + continue + + if inEcxrData: + # 32-bit example: + # 0:000> .ecxr + # noqa eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 + # noqa eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc + # noqa cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 + # 64-bit example: + # 0:000> .ecxr + # rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b + # rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 + # rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 + # r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 + # r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff + # r14=000000e87fbfd0e0 r15=0000000000000003 + # iopl=0 nv up ei pl nz na pe nc + # noqa cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 + if line.startswith("cs="): + inEcxrData = False continue - if inEcxrData: - # 32-bit example: - # 0:000> .ecxr - # noqa eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 - # noqa eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc - # noqa cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 - # 64-bit example: - # 0:000> .ecxr - # noqa rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b - # noqa rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 - # noqa rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 - # noqa r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 - # noqa r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff - # r14=000000e87fbfd0e0 r15=0000000000000003 - # iopl=0 nv up ei pl nz na pe nc - # noqa cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 - if line.startswith("cs="): - inEcxrData = False - continue + # Crash address + # Extract the eip/rip specifically for use later + if "eip=" in line: + address = line.split("eip=")[1].split()[0] + self.crashAddress = int(address, 16) + elif "rip=" in line: + address = line.split("rip=")[1].split()[0] + self.crashAddress = int(address, 16) + + # First extract the line + # 32-bit example: + # eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b esi=02e00310 edi=02e00310 + # 64-bit example: + # rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b + matchLine = re.search(RegisterHelper.getRegisterPattern(), line) + if matchLine is not None: + ecxrData.extend(line.split()) + + # Next, put the eax/rax, ebx/rbx, etc. entries into a list of their own, + # then iterate + match = re.search(cdbRegisterPattern, line) + for instr in ecxrData: + match = re.search(cdbRegisterPattern, instr) + if match is not None: + register = match.group(1) + value = int(match.group(2), 16) + self.registers[register] = value + + # Crash instruction + # Start of crash instruction details + if line.startswith("FAULTING_IP"): + inCrashInstruction = True + continue + + if inCrashInstruction and not cInstruction: + if "PROCESS_NAME" in line: + inCrashInstruction = False + continue - # Crash address - # Extract the eip/rip specifically for use later - if "eip=" in line: - address = line.split("eip=")[1].split()[0] - self.crashAddress = int(address, 16) - elif "rip=" in line: - address = line.split("rip=")[1].split()[0] - self.crashAddress = int(address, 16) - - # First extract the line - # 32-bit example: - # noqa eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 + # 64-bit binaries have a backtick in their addresses, + # e.g. 00007ff7`1e424e62 + lineWithoutBacktick = line.replace("`", "", 1) + if address and lineWithoutBacktick.startswith(address): + # 32-bit examples: + # 25d80b01 cc int 3 + # 00404c59 8b39 mov edi,dword ptr [ecx] # 64-bit example: - # noqa rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b - matchLine = re.search(RegisterHelper.getRegisterPattern(), line) - if matchLine is not None: - ecxrData.extend(line.split()) - - # Next, put the eax/rax, ebx/rbx, etc. entries into a list of their - # own, then iterate - match = re.search(cdbRegisterPattern, line) - for instr in ecxrData: - match = re.search(cdbRegisterPattern, instr) - if match is not None: - register = match.group(1) - value = int(match.group(2), 16) - self.registers[register] = value - - # Crash instruction - # Start of crash instruction details - if line.startswith("FAULTING_IP"): - inCrashInstruction = True + # 00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] + cInstruction = line.split(None, 2)[-1] + # There may be multiple spaces inside the faulting instruction + cInstruction = " ".join(cInstruction.split()) + self.crashInstruction = cInstruction + + # Start of stack for crashing thread + if line.startswith("STACK_TEXT:"): + inCrashingThread = True + continue + + if inCrashingThread: + # 32-bit example: + # noqa "016fdc38 004b2387 01e104e8 016fe490 016fe490 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9" + # 64-bit example: + # noqa "000000e8`7fbfc040 00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13" + if ( + "STACK_COMMAND" in line + or "SYMBOL_NAME" in line + or "THREAD_SHA1_HASH_MOD_FUNC" in line + or "FAULTING_SOURCE_CODE" in line + ): + inCrashingThread = False continue - if inCrashInstruction and not cInstruction: - if "PROCESS_NAME" in line: - inCrashInstruction = False - continue - - # 64-bit binaries have a backtick in their addresses, - # e.g. 00007ff7`1e424e62 - lineWithoutBacktick = line.replace("`", "", 1) - if address and lineWithoutBacktick.startswith(address): - # 32-bit examples: - # 25d80b01 cc int 3 - # 00404c59 8b39 mov edi,dword ptr [ecx] - # 64-bit example: - # noqa 00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] - cInstruction = line.split(None, 2)[-1] - # There may be multiple spaces inside the faulting instruction - cInstruction = " ".join(cInstruction.split()) - self.crashInstruction = cInstruction - - # Start of stack for crashing thread - if line.startswith("STACK_TEXT:"): - inCrashingThread = True + # Ignore cdb error and empty lines + if "Following frames may be wrong." in line or line.strip() == "": continue - if inCrashingThread: - # 32-bit example: - # noqa "016fdc38 004b2387 01e104e8 016fe490 016fe490 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9" - # 64-bit example: - # noqa "000000e8`7fbfc040 00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13" - if ( - "STACK_COMMAND" in line - or "SYMBOL_NAME" in line - or "THREAD_SHA1_HASH_MOD_FUNC" in line - or "FAULTING_SOURCE_CODE" in line - ): - inCrashingThread = False - continue - - # Ignore cdb error and empty lines - if "Following frames may be wrong." in line or line.strip() == "": - continue - - stackEntry = CDBCrashInfo.removeFilenameAndOffset(line) - stackEntry = CrashInfo.sanitizeStackFrame(stackEntry) - self.backtrace.append(stackEntry) + stackEntry = CDBCrashInfo.removeFilenameAndOffset(line) + stackEntry = CrashInfo.sanitizeStackFrame(stackEntry) + self.backtrace.append(stackEntry) @staticmethod def removeFilenameAndOffset(stackEntry: str) -> str: @@ -1964,7 +1975,7 @@ def __init__( if not expectedIndex == index: raise RuntimeError( - "Fatal error parsing TSan trace (Index mismatch, got index " + f"Fatal error parsing TSan trace (Index mismatch, got index " f"{index} but expected {expectedIndex})" ) diff --git a/FTB/Signatures/CrashSignature.py b/FTB/Signatures/CrashSignature.py index ede833b60..c63b7f1b7 100644 --- a/FTB/Signatures/CrashSignature.py +++ b/FTB/Signatures/CrashSignature.py @@ -92,7 +92,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Match this signature against the given crash information @param crashInfo: The crash info to match the signature against - @return: True if the signature matches, False otherwise """ assert crashInfo.configuration is not None diff --git a/FTB/Signatures/RegisterHelper.py b/FTB/Signatures/RegisterHelper.py index 06a264bc8..83a91e35a 100644 --- a/FTB/Signatures/RegisterHelper.py +++ b/FTB/Signatures/RegisterHelper.py @@ -86,7 +86,7 @@ def getRegisterPattern() -> str: return ( "(" + "|".join(["%s"] * len(validRegisters)) - % tuple("|".join(i) for i in validRegisters.values()) + % tuple(["|".join(i) for i in validRegisters.values()]) + ")" ) diff --git a/FTB/Signatures/Symptom.py b/FTB/Signatures/Symptom.py index f41832795..16bf2927c 100644 --- a/FTB/Signatures/Symptom.py +++ b/FTB/Signatures/Symptom.py @@ -46,7 +46,6 @@ def fromJSONObject(obj: dict[str, object]) -> Symptom: @type obj: map @param obj: Object as decoded from JSON - @return: Symptom subclass instance matching the given object """ if "type" not in obj: @@ -77,7 +76,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against - @return: True if the symptom matches, False otherwise """ return @@ -108,7 +106,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against - @return: True if the symptom matches, False otherwise """ checkedOutput = [] @@ -155,7 +152,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against - @return: True if the symptom matches, False otherwise """ @@ -183,7 +179,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against - @return: True if the symptom matches, False otherwise """ return self.stackSize.matches(len(crashInfo.backtrace)) @@ -204,7 +199,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against - @return: True if the symptom matches, False otherwise """ # In case the crash address is not available, @@ -235,7 +229,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against - @return: True if the symptom matches, False otherwise """ if crashInfo.crashInstruction is None: @@ -269,7 +262,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against - @return: True if the symptom matches, False otherwise """ @@ -304,7 +296,6 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against - @return: True if the symptom matches, False otherwise """ diff --git a/FTB/Signatures/tests/resources/apple-10-7-crash-report-example.txt b/FTB/Signatures/tests/resources/apple-10-7-crash-report-example.txt new file mode 100644 index 000000000..35f767d20 --- /dev/null +++ b/FTB/Signatures/tests/resources/apple-10-7-crash-report-example.txt @@ -0,0 +1,238 @@ +Process: js [55788] +Path: /Users/*/js +Identifier: js +Version: ??? (???) +Code Type: X86-64 (Native) +Parent Process: python [18478] + +Date/Time: 2017-03-12 15:55:36.820 -0700 +OS Version: Mac OS X Server 10.7.2 (11C74) +Report Version: 9 + +Crashed Thread: 0 Dispatch queue: com.apple.main-thread + +Exception Type: EXC_BAD_ACCESS (SIGSEGV) +Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 + +VM Regions Near 0: +--> +__TEXT 000000010542c000-00000001062b9000 [ 14.6M] r-x/rwx SM=COW /Users/* + +Application Specific Information: +objc[55788]: garbage collection is OFF + +Thread 0 Crashed:: Dispatch queue: com.apple.main-thread +0 js 0x000000010578119d js::jit::LIRGenerator::visitNearbyInt(js::jit::MNearbyInt*) + 669 +1 js 0x00000001057a97d8 js::jit::LIRGenerator::visitInstruction(js::jit::MInstruction*) + 56 +2 js 0x00000001057a9eaf js::jit::LIRGenerator::visitBlock(js::jit::MBasicBlock*) + 447 +3 js 0x00000001057aa58b js::jit::LIRGenerator::generate() + 203 +4 js 0x00000001056cb564 js::jit::GenerateLIR(js::jit::MIRGenerator*) + 468 +5 js 0x00000001056cc08f js::jit::CompileBackEnd(js::jit::MIRGenerator*) + 79 +6 js 0x00000001056ce1b0 _ZN2js3jitL7CompileEP9JSContextN2JS6HandleIP8JSScriptEEPNS0_13BaselineFrameEPhb + 4368 +7 js 0x00000001056cea0a js::jit::IonCompileScriptForBaseline(JSContext*, js::jit::BaselineFrame*, unsigned char*) + 890 +8 ??? 0x00001712df097601 0 + 25369818789377 +9 ??? 0x00001712df170c91 0 + 25369819679889 +10 ??? 0x0000000107f32b08 0 + 4428344072 +11 ??? 0x00001712df093e3b 0 + 25369818775099 +12 js 0x00000001056268b3 _ZL13EnterBaselineP9JSContextRN2js3jit12EnterJitDataE + 723 + +Thread 1: +0 libsystem_kernel.dylib 0x00007fff9905167a mach_msg_trap + 10 +1 libsystem_kernel.dylib 0x00007fff99050d71 mach_msg + 73 +2 libsystem_kernel.dylib 0x00007fff99049d39 semaphore_create + 148 +3 libsystem_c.dylib 0x00007fff979580f8 new_sem_from_pool + 155 +4 libsystem_c.dylib 0x00007fff9795919a _pthread_exit + 684 +5 libsystem_c.dylib 0x00007fff979578ca _pthread_start + 346 +6 libsystem_c.dylib 0x00007fff9795ab75 thread_start + 13 + +Thread 2: +0 libsystem_kernel.dylib 0x00007fff9905167a mach_msg_trap + 10 +1 libsystem_kernel.dylib 0x00007fff99050d71 mach_msg + 73 +2 js 0x0000000105e2a6b0 _ZL26MachExceptionHandlerThreadP9JSContext + 416 +3 js 0x0000000105457c6f _ZN2js6detail16ThreadTrampolineIRFvP9JSContextEJRS3_EE5StartEPv + 15 +4 libsystem_c.dylib 0x00007fff979578bf _pthread_start + 335 +5 libsystem_c.dylib 0x00007fff9795ab75 thread_start + 13 + +Thread 0 crashed with X86 Thread State (64-bit): +rax: 0x0000000000000000 rbx: 0x0000000107fb4a40 rcx: 0x0000000000000200 rdx: 0x00007fff65026e14 +rdi: 0x0000010000000203 rsi: 0x0000020000000200 rbp: 0x00007fff65026e90 rsp: 0x00007fff65026e60 +r8: 0x00007fff65026e1c r9: 0x00007fff65026e18 r10: 0x0000000000000081 r11: 0x0000000000000246 +r12: 0x0000000000000006 r13: 0x0000000107fb2e80 r14: 0x00007fff65027ef0 r15: 0x0000000107fb4a40 +rip: 0x000000010578119d rfl: 0x0000000000010202 cr2: 0x0000000000000000 +Logical CPU: 1 + +Binary Images: +0x10542c000 - 0x1062b8ff7 +js (??? - ???) <8183C357-C5B2-3F40-A0A5-E02D8E9FD1AD> /Users/*/js +0x1074a6000 - 0x1074a8fff com.apple.ExceptionHandling (1.5 - 10) /System/Library/Frameworks/ExceptionHandling.framework/Versions/A/ExceptionHandling +0x1074b1000 - 0x1074d7ff7 +libmozglue.dylib (??? - ???) <45B64222-11E5-3F19-A8DC-26D5A9B962B0> /Users/*/libmozglue.dylib +0x1074f1000 - 0x10776dff7 +libnss3.dylib (??? - ???) /Users/*/libnss3.dylib +0x7fff6502c000 - 0x7fff65060ac7 dyld (195.5 - ???) /usr/lib/dyld +0x7fff8df6e000 - 0x7fff8dfadfff com.apple.AE (527.7 - 527.7) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE +0x7fff8e22a000 - 0x7fff8e292ff7 com.apple.audio.CoreAudio (4.0.1 - 4.0.1) <7966E3BE-376B-371A-A21D-9BD763C0BAE7> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio +0x7fff8e293000 - 0x7fff8e298ff7 libsystem_network.dylib (??? - ???) <5DE7024E-1D2D-34A2-80F4-08326331A75B> /usr/lib/system/libsystem_network.dylib +0x7fff8e764000 - 0x7fff8e76aff7 libunwind.dylib (30.0.0 - compatibility 1.0.0) <1E9C6C8C-CBE8-3F4B-A5B5-E03E3AB53231> /usr/lib/system/libunwind.dylib +0x7fff8e76b000 - 0x7fff8e791ff7 com.apple.framework.familycontrols (3.0 - 300) <41A6DFC2-EAF5-390A-83A1-C8832528705C> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls +0x7fff8ee1e000 - 0x7fff8ee1efff com.apple.ApplicationServices (41 - 41) <89B6AD5B-5C75-3E83-8C2B-AA7F4C55E400> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices +0x7fff8ee80000 - 0x7fff8eeb0ff7 com.apple.DictionaryServices (1.2.1 - 158.2) <3FC86118-7553-38F7-8916-B329D2E94476> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices +0x7fff8eeb1000 - 0x7fff8efc9ff7 com.apple.DesktopServices (1.6.1 - 1.6.1) <4418EAA6-7163-3A77-ABD3-F8289796C81A> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv +0x7fff8efca000 - 0x7fff8f02afff libvDSP.dylib (325.4.0 - compatibility 1.0.0) <3A7521E6-5510-3FA7-AB65-79693A7A5839> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib +0x7fff8f12e000 - 0x7fff8f152ff7 com.apple.RemoteViewServices (1.2 - 39) <862849C8-84C1-32A1-B87E-B29E74778C9F> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices +0x7fff8f1a2000 - 0x7fff8f2fbfff com.apple.audio.toolbox.AudioToolbox (1.7.1 - 1.7.1) <4877267E-F736-3019-85D3-40A32A042A80> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox +0x7fff8f2fc000 - 0x7fff8f435fef com.apple.vImage (5.1 - 5.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage +0x7fff8f48a000 - 0x7fff8f48efff libdyld.dylib (195.5.0 - compatibility 1.0.0) <380C3F44-0CA7-3514-8080-46D1C9DF4FCD> /usr/lib/system/libdyld.dylib +0x7fff8f60f000 - 0x7fff8f62cff7 libxpc.dylib (77.17.0 - compatibility 1.0.0) <72A16104-2F23-3C22-B474-1953F06F9376> /usr/lib/system/libxpc.dylib +0x7fff8f62d000 - 0x7fff8f634ff7 com.apple.CommerceCore (1.0 - 17) <3894FE48-EDCE-30E9-9796-E2F959D92704> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore +0x7fff8f706000 - 0x7fff8f7a5fff com.apple.LaunchServices (480.21 - 480.21) <6BFADEA9-5BC1-3B53-A013-488EB7F1AB57> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices +0x7fff8f7a6000 - 0x7fff8f819fff libstdc++.6.dylib (52.0.0 - compatibility 7.0.0) <6BDD43E4-A4B1-379E-9ED5-8C713653DFF2> /usr/lib/libstdc++.6.dylib +0x7fff8f81a000 - 0x7fff8f85cff7 libcommonCrypto.dylib (55010.0.0 - compatibility 1.0.0) /usr/lib/system/libcommonCrypto.dylib +0x7fff8f85d000 - 0x7fff8f86fff7 libbsm.0.dylib (??? - ???) <349BB16F-75FA-363F-8D98-7A9C3FA90A0D> /usr/lib/libbsm.0.dylib +0x7fff8f870000 - 0x7fff8f876fff IOSurface (??? - ???) <03F95CAC-569C-3573-B3D7-2D211B8BDC56> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface +0x7fff8f8a5000 - 0x7fff8fe89fff libBLAS.dylib (??? - ???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib +0x7fff8fe8a000 - 0x7fff8feffff7 libc++.1.dylib (19.0.0 - compatibility 1.0.0) /usr/lib/libc++.1.dylib +0x7fff8ff00000 - 0x7fff90224fff com.apple.HIToolbox (1.8 - ???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x7fff90282000 - 0x7fff902d6ff7 com.apple.ScalableUserInterface (1.0 - 1) <33563775-C662-313D-B7FA-3D575A9F3D41> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableUserInterface.framework/Versions/A/ScalableUserInterface +0x7fff902e5000 - 0x7fff902f0ff7 libc++abi.dylib (14.0.0 - compatibility 1.0.0) <8FF3D766-D678-36F6-84AC-423C878E6D14> /usr/lib/libc++abi.dylib +0x7fff9034e000 - 0x7fff9038ffff com.apple.QD (3.12 - ???) <983D6E1E-B8BD-3260-A960-13727351D867> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD +0x7fff90390000 - 0x7fff903a6fff libGL.dylib (??? - ???) <6A473BF9-4D35-34C6-9F8B-86B68091A9AF> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib +0x7fff903d1000 - 0x7fff903d7fff libGFXShared.dylib (??? - ???) <343AE6C0-EB02-333C-8D35-DF6093B92758> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib +0x7fff90c7b000 - 0x7fff90c7cff7 libremovefile.dylib (21.0.0 - compatibility 1.0.0) <001E87FF-97DF-328D-B22F-16E3ACEF8864> /usr/lib/system/libremovefile.dylib +0x7fff90c7d000 - 0x7fff90d5efff com.apple.CoreServices.OSServices (478.29 - 478.29) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices +0x7fff90da9000 - 0x7fff90daafff liblangid.dylib (??? - ???) /usr/lib/liblangid.dylib +0x7fff90f64000 - 0x7fff90fb2fff libauto.dylib (??? - ???) /usr/lib/libauto.dylib +0x7fff90fb3000 - 0x7fff90fb8fff libGIF.dylib (??? - ???) <393E2DB5-9479-39A6-A75A-B5F20B852532> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib +0x7fff9116a000 - 0x7fff91187fff libPng.dylib (??? - ???) <3C70A94C-9442-3E11-AF51-C1B0EF81680E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib +0x7fff911b0000 - 0x7fff913b2fff libicucore.A.dylib (46.1.0 - compatibility 1.0.0) <38CD6ED3-C8E4-3CCD-89AC-9C3198803101> /usr/lib/libicucore.A.dylib +0x7fff913b3000 - 0x7fff913b3fff com.apple.CoreServices (53 - 53) <043C8026-8EDD-3241-B090-F589E24062EF> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices +0x7fff914f7000 - 0x7fff914fafff libCoreVMClient.dylib (??? - ???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib +0x7fff91500000 - 0x7fff91819ff7 com.apple.Foundation (6.7.1 - 833.20) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation +0x7fff91826000 - 0x7fff91827fff libunc.dylib (24.0.0 - compatibility 1.0.0) <337960EE-0A85-3DD0-A760-7134CF4C0AFF> /usr/lib/system/libunc.dylib +0x7fff91828000 - 0x7fff9183aff7 libz.1.dylib (1.2.5 - compatibility 1.0.0) <30CBEF15-4978-3DED-8629-7109880A19D4> /usr/lib/libz.1.dylib +0x7fff9183b000 - 0x7fff91892fff libTIFF.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib +0x7fff91916000 - 0x7fff91935fff libresolv.9.dylib (46.0.0 - compatibility 1.0.0) <33263568-E6F3-359C-A4FA-66AD1300F7D4> /usr/lib/libresolv.9.dylib +0x7fff9196e000 - 0x7fff91979fff com.apple.CommonAuth (2.1 - 2.0) /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth +0x7fff91996000 - 0x7fff9199dfff libcopyfile.dylib (85.1.0 - compatibility 1.0.0) <0AB51EE2-E914-358C-AC19-47BC024BDAE7> /usr/lib/system/libcopyfile.dylib +0x7fff9199e000 - 0x7fff9259fff7 com.apple.AppKit (6.7.2 - 1138.23) <5CD2C850-4F52-3BA2-BA11-3107DFD2D23C> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x7fff932a7000 - 0x7fff932aefff com.apple.NetFS (4.0 - 4.0) <433EEE54-E383-3505-9154-45B909FD3AF0> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS +0x7fff93353000 - 0x7fff93527fff com.apple.CoreFoundation (6.7.1 - 635.15) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x7fff93528000 - 0x7fff9352dfff com.apple.OpenDirectory (10.7 - 146) <91A87249-6A2F-3F89-A8DE-0E95C0B54A3A> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory +0x7fff9352e000 - 0x7fff93543fff com.apple.speech.synthesis.framework (4.0.74 - 4.0.74) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis +0x7fff93977000 - 0x7fff9399eff7 com.apple.PerformanceAnalysis (1.10 - 10) /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis +0x7fff942b1000 - 0x7fff94778fff FaceCoreLight (1.4.7 - compatibility 1.0.0) /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLight +0x7fff94779000 - 0x7fff947a4ff7 libxslt.1.dylib (3.24.0 - compatibility 3.0.0) <4DB5ED11-004B-36B5-AE5F-2AB714754241> /usr/lib/libxslt.1.dylib +0x7fff947fa000 - 0x7fff9486afff com.apple.datadetectorscore (3.0 - 179.4) <2A822A13-94B3-3A43-8724-98FDF698BB12> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore +0x7fff94889000 - 0x7fff9488bfff libquarantine.dylib (36.0.0 - compatibility 1.0.0) <4C3BFBC7-E592-3939-B376-1C2E2D7C5389> /usr/lib/system/libquarantine.dylib +0x7fff9488c000 - 0x7fff948bfff7 com.apple.GSS (2.1 - 2.0) <9A2C9736-DA10-367A-B376-2C7A584E6C7A> /System/Library/Frameworks/GSS.framework/Versions/A/GSS +0x7fff948fa000 - 0x7fff9495cfff com.apple.coreui (1.2.1 - 164.1) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI +0x7fff9495d000 - 0x7fff9495efff libdnsinfo.dylib (395.7.0 - compatibility 1.0.0) <37FEFE78-BCB5-37EC-8E99-747469BCA4C7> /usr/lib/system/libdnsinfo.dylib +0x7fff9495f000 - 0x7fff94976fff com.apple.MultitouchSupport.framework (220.62.1 - 220.62.1) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport +0x7fff950a2000 - 0x7fff950b9fff com.apple.CFOpenDirectory (10.7 - 146) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory +0x7fff950ba000 - 0x7fff950cdff7 libCRFSuite.dylib (??? - ???) <0B76941F-218E-30C8-B6DE-E15919F8DBEB> /usr/lib/libCRFSuite.dylib +0x7fff950ce000 - 0x7fff95234fff com.apple.CFNetwork (520.2.5 - 520.2.5) <406712D9-3F0C-3763-B4EB-868D01F1F042> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork +0x7fff95457000 - 0x7fff954dafef com.apple.Metadata (10.7.0 - 627.20) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata +0x7fff95501000 - 0x7fff955dffff com.apple.ImageIO.framework (3.1.1 - 3.1.1) <13E549F8-5BD6-3BAE-8C33-1D0BD269C081> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO +0x7fff955e0000 - 0x7fff95609fff libJPEG.dylib (??? - ???) <64D079F9-256A-323B-A837-84628B172F21> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib +0x7fff9560a000 - 0x7fff95685ff7 com.apple.print.framework.PrintCore (7.1 - 366.1) <3F140DEB-9F87-3672-97CC-F983752581AC> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore +0x7fff956ae000 - 0x7fff956b0fff libCVMSPluginSupport.dylib (??? - ???) <61D89F3C-C64D-3733-819F-8AAAE4E2E993> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib +0x7fff956b1000 - 0x7fff956bffff libdispatch.dylib (187.7.0 - compatibility 1.0.0) <712AAEAC-AD90-37F7-B71F-293FF8AE8723> /usr/lib/system/libdispatch.dylib +0x7fff956c0000 - 0x7fff959dcff7 com.apple.CoreServices.CarbonCore (960.18 - 960.18) <6020C3FB-6125-3EAE-A55D-1E77E38BEDEA> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore +0x7fff959df000 - 0x7fff959dffff com.apple.Cocoa (6.6 - ???) <7EC4D759-B2A6-3A99-AC75-809FED1500C6> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa +0x7fff95a01000 - 0x7fff95a1dff7 com.apple.GenerationalStorage (1.0 - 125) <31F60175-E38D-3C63-8D95-32CFE7062BCB> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage +0x7fff95a81000 - 0x7fff95a8fff7 libkxld.dylib (??? - ???) /usr/lib/system/libkxld.dylib +0x7fff95a90000 - 0x7fff95a91fff libsystem_sandbox.dylib (??? - ???) /usr/lib/system/libsystem_sandbox.dylib +0x7fff95aa1000 - 0x7fff95aacff7 com.apple.speech.recognition.framework (4.0.19 - 4.0.19) <48607E6E-8612-3267-9184-E948B1863B32> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition +0x7fff95c92000 - 0x7fff95cddff7 com.apple.SystemConfiguration (1.11.1 - 1.11) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration +0x7fff95ce2000 - 0x7fff95de5fff libsqlite3.dylib (9.6.0 - compatibility 9.0.0) <7F60B0FF-4946-3639-89AB-B540D318B249> /usr/lib/libsqlite3.dylib +0x7fff95e2f000 - 0x7fff95e6eff7 libGLImage.dylib (??? - ???) <2D1D8488-EC5F-3229-B983-CFDE0BB37586> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib +0x7fff95e73000 - 0x7fff95f26fff com.apple.CoreText (220.11.0 - ???) <4EA8E2DF-542D-38D5-ADB9-C0DAA73F898B> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText +0x7fff95f2a000 - 0x7fff95f2ffff libpam.2.dylib (3.0.0 - compatibility 3.0.0) /usr/lib/libpam.2.dylib +0x7fff95f30000 - 0x7fff95fd2ff7 com.apple.securityfoundation (5.0 - 55005) <2814D17E-E6BB-30A2-A62E-2D481AF514F2> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation +0x7fff9633c000 - 0x7fff96614ff7 com.apple.security (7.0 - 55010) <93713FF4-FE86-3B4C-8150-5FCC7F3320C8> /System/Library/Frameworks/Security.framework/Versions/A/Security +0x7fff9661a000 - 0x7fff966e1ff7 com.apple.ColorSync (4.7.0 - 4.7.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync +0x7fff966e2000 - 0x7fff9673dff7 com.apple.HIServices (1.10 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices +0x7fff9673e000 - 0x7fff96762fff com.apple.Kerberos (1.0 - 1) <1F826BCE-DA8F-381D-9C4C-A36AA0EA1CB9> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos +0x7fff96763000 - 0x7fff96777ff7 com.apple.LangAnalysis (1.7.0 - 1.7.0) <04C31EF0-912A-3004-A08F-CEC27030E0B2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis +0x7fff96778000 - 0x7fff967fcff7 com.apple.ApplicationServices.ATS (317.5.0 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS +0x7fff9682d000 - 0x7fff9682dfff libkeymgr.dylib (23.0.0 - compatibility 1.0.0) <61EFED6A-A407-301E-B454-CD18314F0075> /usr/lib/system/libkeymgr.dylib +0x7fff9682e000 - 0x7fff96881fff libFontRegistry.dylib (??? - ???) <57FBD85F-41A6-3DB9-B5F4-FCC6B260F1AD> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib +0x7fff96c5d000 - 0x7fff96c63fff com.apple.DiskArbitration (2.4.1 - 2.4.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration +0x7fff96c6b000 - 0x7fff96d70ff7 libFontParser.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib +0x7fff96d7d000 - 0x7fff96d80fff libRadiance.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib +0x7fff96dbf000 - 0x7fff96fd9fef com.apple.CoreData (104 - 358.12) <33B1FA75-7970-3751-9DCC-FF809D3E1FA2> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData +0x7fff96fe7000 - 0x7fff96ff5fff com.apple.NetAuth (3.1 - 3.1) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth +0x7fff97039000 - 0x7fff9712efff libiconv.2.dylib (7.0.0 - compatibility 7.0.0) <5C40E880-0706-378F-B864-3C2BD922D926> /usr/lib/libiconv.2.dylib +0x7fff9712f000 - 0x7fff9723bfff libcrypto.0.9.8.dylib (44.0.0 - compatibility 0.9.8) <3A8E1F89-5E26-3C8B-B538-81F5D61DBF8A> /usr/lib/libcrypto.0.9.8.dylib +0x7fff97546000 - 0x7fff97573ff7 com.apple.opencl (1.50.63 - 1.50.63) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL +0x7fff97637000 - 0x7fff9763bfff libmathCommon.A.dylib (2026.0.0 - compatibility 1.0.0) /usr/lib/system/libmathCommon.A.dylib +0x7fff9763c000 - 0x7fff9763efff com.apple.TrustEvaluationAgent (2.0 - 1) <1F31CAFF-C1C6-33D3-94E9-11B721761DDF> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent +0x7fff97858000 - 0x7fff97880ff7 com.apple.CoreVideo (1.7 - 70.1) <98F917B2-FB53-3EA3-B548-7E97B38309A7> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo +0x7fff97909000 - 0x7fff979e6fef libsystem_c.dylib (763.12.0 - compatibility 1.0.0) /usr/lib/system/libsystem_c.dylib +0x7fff979e7000 - 0x7fff97b86fff com.apple.QuartzCore (1.7 - 270.0) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore +0x7fff97b87000 - 0x7fff97b8ffff libsystem_dnssd.dylib (??? - ???) <998E3778-7B43-301C-9053-12045AB8544D> /usr/lib/system/libsystem_dnssd.dylib +0x7fff97b90000 - 0x7fff97c34fff com.apple.ink.framework (1.3.2 - 110) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink +0x7fff97c35000 - 0x7fff97c44ff7 com.apple.opengl (1.7.5 - 1.7.5) <2945F1A6-910C-3596-9988-5701B04BD821> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL +0x7fff981c8000 - 0x7fff9843bfff com.apple.CoreImage (7.82 - 1.0.1) <282801B6-5D80-3E2C-88A4-00FE29906D5A> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage +0x7fff98441000 - 0x7fff9844bff7 liblaunch.dylib (392.35.0 - compatibility 1.0.0) <8F8BB206-CECA-33A5-A105-4A01C3ED5D23> /usr/lib/system/liblaunch.dylib +0x7fff9844c000 - 0x7fff984e2ff7 libvMisc.dylib (325.4.0 - compatibility 1.0.0) <642D8D54-F9F5-3FBB-A96C-EEFE94C6278B> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib +0x7fff9850f000 - 0x7fff985f3def libobjc.A.dylib (228.0.0 - compatibility 1.0.0) /usr/lib/libobjc.A.dylib +0x7fff985f4000 - 0x7fff985f4fff com.apple.Accelerate (1.7 - Accelerate 1.7) <82DDF6F5-FBC3-323D-B71D-CF7ABC5CF568> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate +0x7fff986ff000 - 0x7fff98766fff com.apple.Symbolication (1.2 - 87) /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication +0x7fff98786000 - 0x7fff98786fff com.apple.vecLib (3.7 - vecLib 3.7) <9A58105C-B36E-35B5-812C-4ED693F2618F> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib +0x7fff98787000 - 0x7fff98889ff7 libxml2.2.dylib (10.3.0 - compatibility 10.0.0) <22F1D1B6-1761-3687-9EFD-036EA15FB2E4> /usr/lib/libxml2.2.dylib +0x7fff9888a000 - 0x7fff98997fff libJP2.dylib (??? - ???) <6052C973-9354-35CB-AAB9-31D00D8786F9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib +0x7fff989a3000 - 0x7fff989a8fff libcompiler_rt.dylib (6.0.0 - compatibility 1.0.0) <98ECD5F6-E85C-32A5-98CD-8911230CB66A> /usr/lib/system/libcompiler_rt.dylib +0x7fff989a9000 - 0x7fff989fbff7 libGLU.dylib (??? - ???) <3C9153A0-8499-3DC0-AAA4-9FA6E488BE13> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib +0x7fff989fc000 - 0x7fff989fcfff com.apple.audio.units.AudioUnit (1.7.1 - 1.7.1) <04C10813-CCE5-3333-8C72-E8E35E417B3B> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit +0x7fff98a01000 - 0x7fff98a6bfff com.apple.framework.IOKit (2.0 - ???) <87D55F1D-CDB5-3D13-A5F9-98EA4E22F8EE> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit +0x7fff98cf7000 - 0x7fff98d91ff7 com.apple.SearchKit (1.4.0 - 1.4.0) <4E70C394-773E-3A4B-A93C-59A88ABA9509> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit +0x7fff98dcd000 - 0x7fff98dcefff libDiagnosticMessagesClient.dylib (??? - ???) <3DCF577B-F126-302B-BCE2-4DB9A95B8598> /usr/lib/libDiagnosticMessagesClient.dylib +0x7fff98dcf000 - 0x7fff98dcffff com.apple.Accelerate.vecLib (3.7 - vecLib 3.7) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib +0x7fff98dd0000 - 0x7fff98e0afef com.apple.DebugSymbols (2.1 - 85) <7E0E17D9-C8D4-3117-B36A-506929F6FF72> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols +0x7fff98e0b000 - 0x7fff98e46ff7 libsystem_info.dylib (??? - ???) <9C8C2DCB-96DB-3471-9DCE-ADCC26BE2DD4> /usr/lib/system/libsystem_info.dylib +0x7fff98ffb000 - 0x7fff9903bff7 libcups.2.dylib (2.9.0 - compatibility 2.0.0) /usr/lib/libcups.2.dylib +0x7fff9903c000 - 0x7fff9905cfff libsystem_kernel.dylib (1699.24.8 - compatibility 1.0.0) /usr/lib/system/libsystem_kernel.dylib +0x7fff9905d000 - 0x7fff9948afff libLAPACK.dylib (??? - ???) <4F2E1055-2207-340B-BB45-E4F16171EE0D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib +0x7fff9948b000 - 0x7fff99494ff7 libsystem_notify.dylib (80.1.0 - compatibility 1.0.0) /usr/lib/system/libsystem_notify.dylib +0x7fff994a5000 - 0x7fff994a6ff7 libsystem_blocks.dylib (53.0.0 - compatibility 1.0.0) <8BCA214A-8992-34B2-A8B9-B74DEACA1869> /usr/lib/system/libsystem_blocks.dylib +0x7fff995f1000 - 0x7fff9961efe7 libSystem.B.dylib (159.1.0 - compatibility 1.0.0) <095FDD3C-3961-3865-A59B-A5B0A4B8B923> /usr/lib/libSystem.B.dylib +0x7fff99d29000 - 0x7fff99d97fff com.apple.CoreSymbolication (2.1 - 67) <194A355B-58C7-3B1E-A714-00F71ACCDB0A> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication +0x7fff99dea000 - 0x7fff99df0fff libmacho.dylib (800.0.0 - compatibility 1.0.0) <165514D7-1BFA-38EF-A151-676DCD21FB64> /usr/lib/system/libmacho.dylib +0x7fff99df5000 - 0x7fff99dfafff libcache.dylib (47.0.0 - compatibility 1.0.0) <1571C3AB-BCB2-38CD-B3B2-C5FC3F927C6A> /usr/lib/system/libcache.dylib +0x7fff9a05b000 - 0x7fff9a0e0ff7 com.apple.Heimdal (2.1 - 2.0) /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal +0x7fff9a0e1000 - 0x7fff9a7f4587 com.apple.CoreGraphics (1.600.0 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics + +External Modification Summary: +Calls made by other processes targeting this process: +task_for_pid: 0 +thread_create: 0 +thread_set_state: 0 +Calls made by this process: +task_for_pid: 0 +thread_create: 0 +thread_set_state: 0 +Calls made by all processes on this machine: +task_for_pid: 38830 +thread_create: 0 +thread_set_state: 0 + +VM Region Summary: +ReadOnly portion of Libraries: Total=162.1M resident=162.1M(100%) swapped_out_or_unallocated=0K(0%) +Writable regions: Total=33.8M written=10.5M(31%) resident=14.7M(43%) swapped_out=0K(0%) unallocated=19.2M(57%) + +REGION TYPE VIRTUAL +=========== ======= +(null) (reserved) 176K reserved VM address space (unallocated) +MALLOC 9404K +MALLOC guard page 16K +STACK GUARD 56.0M +Stack 9232K +VM_ALLOCATE 1.0G +__CI_BITMAP 80K +__DATA 22.6M +__IMAGE 1256K +__LINKEDIT 55.2M +__TEXT 106.9M +__UNICODE 544K +shared memory 12K +=========== ======= +TOTAL 1.3G +TOTAL, minus reserved VM space 1.3G \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/apple-crash-report-example.txt b/FTB/Signatures/tests/resources/apple-crash-report-example.txt new file mode 100644 index 000000000..3a34a720c --- /dev/null +++ b/FTB/Signatures/tests/resources/apple-crash-report-example.txt @@ -0,0 +1,59 @@ +Process: js-dbg-64-dm-darwin-a523d4c7efe2 [27938] +Path: /Users/USER/*/js-dbg-64-dm-darwin-a523d4c7efe2 +Identifier: js-dbg-64-dm-darwin-a523d4c7efe2 +Version: ??? +Code Type: X86-64 (Native) +Parent Process: bash [27933] +Responsible: iTerm2 [91188] +User ID: 501 + +Date/Time: 2015-11-19 17:01:28.214 -0800 +OS Version: Mac OS X 10.11.1 (15B42) +Report Version: 11 +Anonymous UUID: 2D34C956-9487-7B72-EFCB-E61B989F1869 + + +Time Awake Since Boot: 25000 seconds + +System Integrity Protection: enabled + +Crashed Thread: 0 Dispatch queue: com.apple.main-thread + +Exception Type: EXC_BAD_ACCESS (SIGSEGV) +Exception Codes: KERN_PROTECTION_FAILURE at 0x00007fff5f3fff98 + +VM Regions Near 0x7fff5f3fff98: + Stack 00007000034c5000-0000700003547000 [ 520K] rw-/rwx SM=COW thread 59 +--> STACK GUARD 00007fff5bc00000-00007fff5f400000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0 + Stack 00007fff5f400000-00007fff5fc00000 [ 8192K] rw-/rwx SM=PRV thread 0 + +Thread 0 Crashed:: Dispatch queue: com.apple.main-thread +0 js-dbg-64-dm-darwin-a523d4c7efe2 0x00000001004b04c4 js::jit::MacroAssembler::Pop(js::jit::Register) + 180 (MacroAssembler-inl.h:50) +1 js-dbg-64-dm-darwin-a523d4c7efe2 0x0000000100395e01 js::jit::ICGetPropCallNativeCompiler::generateStubCode(js::jit::MacroAssembler&) + 1329 (SharedIC.cpp:3701) +2 js-dbg-64-dm-darwin-a523d4c7efe2 0x0000000100385112 js::jit::ICStubCompiler::getStubCode() + 242 (SharedIC.cpp:734) +3 js-dbg-64-dm-darwin-a523d4c7efe2 0x00000001003961e5 js::jit::ICGetPropCallNativeCompiler::getStub(js::jit::ICStubSpace*) + 245 (SharedIC.cpp:3721) +4 js-dbg-64-dm-darwin-a523d4c7efe2 0x000000010038fe57 js::jit::DoGetPropFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICGetProp_Fallback*, JS::MutableHandle, JS::MutableHandle) + 7687 (SharedIC.h:2872) +5 ??? 0x0000000101e48547 0 + 4326720839 +6 libsystem_c.dylib 0x00007fff841e10ff __cxa_finalize_ranges + 345 +7 XUL 0x0000000102cff002 0x101c38000 + 17592322 +8 com.apple.AppKit 0x00007fff957c91c5 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454 + +Thread 1: +0 libsystem_kernel.dylib 0x00007fff9700fc96 mach_msg_trap + 10 +1 libsystem_kernel.dylib 0x00007fff9700f0d7 mach_msg + 55 +2 js-dbg-64-dm-darwin-a523d4c7efe2 0x00000001000e0ebf AsmJSMachExceptionHandlerThread(void*) + 415 (AsmJSSignalHandlers.cpp:950) +3 js-dbg-64-dm-darwin-a523d4c7efe2 0x0000000100720c3f nspr::Thread::ThreadRoutine(void*) + 31 (Utility.h:369) +4 libsystem_pthread.dylib 0x00007fff96ef29b1 _pthread_body + 131 +5 libsystem_pthread.dylib 0x00007fff96ef292e _pthread_start + 168 +6 libsystem_pthread.dylib 0x00007fff96ef0385 thread_start + 13 + +Thread 0 crashed with X86 Thread State (64-bit): + rax: 0x0000000000000000 rbx: 0x00007fff7bb75bd0 rcx: 0x0000010000000203 rdx: 0x0000020000000200 + rdi: 0x00007fff7bb751e8 rsi: 0x0000000000012068 rbp: 0x00007fff5fbf95b0 rsp: 0x00007fff5fbf95a0 + r8: 0x0000000000000040 r9: 0x00007fff7bb751e0 r10: 0xffffffffffffffff r11: 0x00007fff8c7a7201 + r12: 0x00000000001e374a r13: 0x00007fff5fbf9680 r14: 0x00007fff5fbfa228 r15: 0x0000000000000002 + rip: 0x00000001004b04c4 rfl: 0x0000000000010206 cr2: 0x0000000000000000 + +Logical CPU: 0 +Error Code: 0x00000006 +Trap Number: 14 diff --git a/FTB/Signatures/tests/resources/cdb-10c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-10c-crashlog.txt new file mode 100644 index 000000000..def0ed4fc --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-10c-crashlog.txt @@ -0,0 +1,214 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-32-prof-windows-42c95d88aaaa.exe.4652.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 9600 MP (16 procs) Free x86 compatible +Product: Server, suite: TerminalServer SingleUserTS +Machine Name: +Debug session time: Tue Oct 4 12:35:05.000 2016 (UTC + 0:00) +System Uptime: not available +Process Uptime: not available +...................................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +eax=00000000 ebx=00000000 ecx=5f7b6461 edx=00000000 esi=00000003 edi=00000003 +eip=774ec7ec esp=020ddc64 ebp=020dddec iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 +Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +ntdll+0x3c7ec: +774ec7ec c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=06fda948 ebx=020de8dc ecx=5f7b6461 edx=00000000 esi=1c2fbaab edi=020de910 +eip=1c2fbbb0 esp=020de910 ebp=00000018 iopl=0 nv up ei pl zr na pe cy +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000247 +1c2fbbb0 cc int 3 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +*** WARNING: Unable to verify timestamp for kernel32.dll +*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll +*** WARNING: Unable to verify checksum for js-32-prof-windows-42c95d88aaaa.exe +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll+0x3c7ec: +774ec7ec c21400 ret 14h +774ec7ef 90 nop +774ec7f0 b85b000000 mov eax,5Bh +774ec7f5 64ff15c0000000 call dword ptr fs:[0C0h] +774ec7fc c21000 ret 10h +774ec7ff 90 nop +774ec800 b85c000000 mov eax,5Ch +774ec805 64ff15c0000000 call dword ptr fs:[0C0h] +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +1c2fbbb0 cc f2 0f 10 .... +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +*** WARNING: Unable to verify timestamp for KERNELBASE.dll +*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll + +FAULTING_IP: ++82 +1c2fbbb0 cc int 3 + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 1c2fbbb0 +ExceptionCode: 80000003 (Break instruction exception) +ExceptionFlags: 00000000 +NumberParameters: 1 +Parameter[0]: 00000000 + +DEFAULT_BUCKET_ID: WRONG_SYMBOLS + +PROCESS_NAME: js-32-prof-windows-42c95d88aaaa.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 774b0000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 57f38c83 + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_PARAMETER1: 00000000 + +MOD_LIST: + +FAULTING_THREAD: 00001560 + +PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS + +BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS + +LAST_CONTROL_TRANSFER: from 0125f102 to 1c2fbbb0 + +STACK_TEXT: +WARNING: Frame IP not in any known module. Following frames may be wrong. +020de914 0125f102 09256748 020de9c8 00000044 0x1c2fbbb0 +020de9c8 ffffff82 00200000 ffffff81 ffffff81 js_32_prof_windows_42c95d88aaaa!js::jit::PrepareOsrTempData+0x82 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 121] +020dea38 00e9a9a8 00fd1326 08e10000 020deb48 0xffffff82 +020deaa8 010a7b82 08e36838 020deb88 00ff1fd0 js_32_prof_windows_42c95d88aaaa!js::AddTypePropertyId+0x1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] +00000000 00000000 00000000 00000000 00000000 js_32_prof_windows_42c95d88aaaa!JSObject::makeLazyGroup+0x212 [c:\users\administrator\trees\mozilla-central\js\src\vm\objectgroup.cpp @ 344] + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FOLLOWUP_IP: +js_32_prof_windows_42c95d88aaaa!js::jit::PrepareOsrTempData+82 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 121] +0125f102 83c418 add esp,18h + +SYMBOL_STACK_INDEX: 1 + +SYMBOL_NAME: js_32_prof_windows!js::jit::PrepareOsrTempData+82 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_32_prof_windows_42c95d88aaaa + +IMAGE_NAME: js-32-prof-windows-42c95d88aaaa.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-32-prof-windows-42c95d88aaaa.exe!js::jit::PrepareOsrTempData + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 +# ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 020dddec 75027b89 ntdll+0x3c7ec +01 020dde08 750807bf kernel32+0x17b89 +02 020de248 75080295 kernel32+0x707bf +03 020de260 74eef605 kernel32+0x70295 +04 020de2ec 7755f154 KERNELBASE+0xbf605 +05 020dfd40 7750ab5a ntdll+0xaf154 +06 020dfd50 00000000 ntdll+0x5ab5a +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +020dddec 75027b89 00000003 020dde30 00000000 ntdll+0x3c7ec +020dde08 750807bf 00000003 020dde30 00000000 kernel32+0x17b89 +020de248 75080295 00000000 00000001 00000000 kernel32+0x707bf +020de260 74eef605 020de31c 00000001 5a68f989 kernel32+0x70295 +020de2ec 7755f154 020de31c 774f0830 020dfd40 KERNELBASE+0xbf605 +020dfd40 7750ab5a ffffffff 774f000a 00000000 ntdll+0xaf154 +020dfd50 00000000 013a7c34 ff105000 00000000 ntdll+0x5ab5a +0:000> q +quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/cdb-11c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-11c-crashlog.txt new file mode 100644 index 000000000..649f8241a --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-11c-crashlog.txt @@ -0,0 +1,208 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-dbg-32-prof-dm-windows-42c95d88aaaa.exe.6940.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 9600 MP (16 procs) Free x86 compatible +Product: Server, suite: TerminalServer SingleUserTS +Machine Name: +Debug session time: Tue Oct 4 16:10:34.000 2016 (UTC + 0:00) +System Uptime: not available +Process Uptime: 0 days 0:00:02.000 +....................................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +eax=00000000 ebx=00000000 ecx=738f705d edx=00e7b0e0 esi=00000003 edi=00000003 +eip=76f0c7ec esp=00e7b9a4 ebp=00e7bb2c iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 +Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +ntdll+0x3c7ec: +76f0c7ec c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=00000000 ebx=00000000 ecx=738f705d edx=00e7b0e0 esi=00000383 edi=0ba37110 +eip=0156865d esp=00e7c650 ebp=00e7c6bc iopl=0 nv up ei pl nz ac pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000216 +*** WARNING: Unable to verify checksum for js-dbg-32-prof-dm-windows-42c95d88aaaa.exe +js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+0x3d: +0156865d cc int 3 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +*** WARNING: Unable to verify timestamp for kernel32.dll +*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll+0x3c7ec: +76f0c7ec c21400 ret 14h +76f0c7ef 90 nop +76f0c7f0 b85b000000 mov eax,5Bh +76f0c7f5 64ff15c0000000 call dword ptr fs:[0C0h] +76f0c7fc c21000 ret 10h +76f0c7ff 90 nop +76f0c800 b85c000000 mov eax,5Ch +76f0c805 64ff15c0000000 call dword ptr fs:[0C0h] +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +0156865d cc 6a 03 c7 .j.. +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** WARNING: Unable to verify checksum for mozglue.dll +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +*** WARNING: Unable to verify timestamp for KERNELBASE.dll +*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll +Unable to load image C:\Windows\System32\ucrtbase.dll, Win32 error 0n2 +*** WARNING: Unable to verify timestamp for ucrtbase.dll +*** ERROR: Module load completed but symbols could not be loaded for ucrtbase.dll + +FAULTING_IP: +js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+3d [c:\users\administrator\trees\mozilla-central\js\src\jit\rangeanalysis.h @ 578] +0156865d cc int 3 + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 0156865d (js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+0x0000003d) +ExceptionCode: 80000003 (Break instruction exception) +ExceptionFlags: 00000000 +NumberParameters: 1 +Parameter[0]: 00000000 + +PROCESS_NAME: js-dbg-32-prof-dm-windows-42c95d88aaaa.exe + +MODULE_NAME: unknown + +FAULTING_MODULE: 76ed0000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 0 + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_PARAMETER1: 00000000 + +MOD_LIST: + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD] + +LAST_CONTROL_TRANSFER: from 01546a04 to 0156865d + +FAULTING_THREAD: ffffffff + +BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS_STACKIMMUNE + +PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS_STACKIMMUNE + +DEFAULT_BUCKET_ID: WRONG_SYMBOLS_STACKIMMUNE + +STACK_TEXT: +00000000 00000000 unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe+0x0 + + +SYMBOL_NAME: unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe + +FOLLOWUP_NAME: MachineOwner + +IMAGE_NAME: unknown + +STACK_COMMAND: ** Pseudo Context ** ; kb + +FAILURE_BUCKET_ID: WRONG_SYMBOLS_STACKIMMUNE_80000003_unknown!Unloaded + +BUCKET_ID: APPLICATION_FAULT_WRONG_SYMBOLS_STACKIMMUNE_unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 +# ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 00e7bb2c 752d7b89 ntdll+0x3c7ec +01 00e7bb48 753307bf kernel32+0x17b89 +02 00e7bf88 75330295 kernel32+0x707bf +03 00e7bfa0 7491f605 kernel32+0x70295 +04 00e7c02c 76f7f154 KERNELBASE+0xbf605 +05 00e7ff10 76f2ab5a ntdll+0xaf154 +06 00e7ff20 00000000 ntdll+0x5ab5a +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +00e7bb2c 752d7b89 00000003 00e7bb70 00000000 ntdll+0x3c7ec +00e7bb48 753307bf 00000003 00e7bb70 00000000 kernel32+0x17b89 +00e7bf88 75330295 00000000 00000001 00000000 kernel32+0x707bf +00e7bfa0 7491f605 00e7c05c 00000001 fa5997c7 kernel32+0x70295 +00e7c02c 76f7f154 00e7c05c 76f10830 00e7ff10 KERNELBASE+0xbf605 +00e7ff10 76f2ab5a ffffffff 76f10007 00000000 ntdll+0xaf154 +00e7ff20 00000000 01191f50 ff929000 00000000 ntdll+0x5ab5a +0:000> q +quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/cdb-12c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-12c-crashlog.txt new file mode 100644 index 000000000..cf92a9752 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-12c-crashlog.txt @@ -0,0 +1,220 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-32-prof-dm-windows-42c95d88aaaa.exe.1348.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 9600 MP (16 procs) Free x86 compatible +Product: Server, suite: TerminalServer SingleUserTS +Machine Name: +Debug session time: Wed Oct 5 01:53:46.000 2016 (UTC + 0:00) +System Uptime: not available +Process Uptime: not available +...................................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +eax=00000000 ebx=00000000 ecx=00000000 edx=73bf4f80 esi=00000003 edi=00000003 +eip=7726c7ec esp=0044dda4 ebp=0044df2c iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 +Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +ntdll+0x3c7ec: +7726c7ec c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=00000020 ebx=0044ea78 ecx=00000000 edx=73bf4f80 esi=ffffff8c edi=0044ea50 +eip=1fa0b7f8 esp=0044ea50 ebp=0044eb00 iopl=0 nv up ei pl zr na pe cy +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000247 +1fa0b7f8 cc int 3 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +*** WARNING: Unable to verify timestamp for kernel32.dll +*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll+0x3c7ec: +7726c7ec c21400 ret 14h +7726c7ef 90 nop +7726c7f0 b85b000000 mov eax,5Bh +7726c7f5 64ff15c0000000 call dword ptr fs:[0C0h] +7726c7fc c21000 ret 10h +7726c7ff 90 nop +7726c800 b85c000000 mov eax,5Ch +7726c805 64ff15c0000000 call dword ptr fs:[0C0h] +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +1fa0b7f8 cc f2 0f 10 .... +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** WARNING: Unable to verify checksum for js-32-prof-dm-windows-42c95d88aaaa.exe +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +*** WARNING: Unable to verify timestamp for KERNELBASE.dll +*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll + +FAULTING_IP: ++1d8 +1fa0b7f8 cc int 3 + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 1fa0b7f8 +ExceptionCode: 80000003 (Break instruction exception) +ExceptionFlags: 00000000 +NumberParameters: 1 +Parameter[0]: 00000000 + +DEFAULT_BUCKET_ID: WRONG_SYMBOLS + +PROCESS_NAME: js-32-prof-dm-windows-42c95d88aaaa.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 77230000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 57f3fe61 + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_PARAMETER1: 00000000 + +MOD_LIST: + +FAULTING_THREAD: 000004fc + +PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS + +BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS + +IP_ON_HEAP: 086ea550 +The fault address in not in any loaded module, please check your build's rebase +log at \bin\build_logs\timebuild\ntrebase.log for module which may +contain the address if it were loaded. + +FRAME_ONE_INVALID: 1 + +LAST_CONTROL_TRANSFER: from 086ea550 to 1fa0b7f8 + +STACK_TEXT: +WARNING: Frame IP not in any known module. Following frames may be wrong. +0044eb00 086ea550 1fa087ec 0000a021 00200000 0x1fa0b7f8 +0044ec88 0130a818 01441c16 08310000 0044ed98 0x86ea550 +0044ecf8 01517762 08336838 0044edd8 01462820 js_32_prof_dm_windows_42c95d88aaaa!js::AddTypePropertyId+0x1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] +00000000 00000000 00000000 00000000 00000000 js_32_prof_dm_windows_42c95d88aaaa!JSObject::makeLazyGroup+0x212 [c:\users\administrator\trees\mozilla-central\js\src\vm\objectgroup.cpp @ 344] + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FOLLOWUP_IP: +js_32_prof_dm_windows_42c95d88aaaa!js::AddTypePropertyId+1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] +0130a818 8b4dfc mov ecx,dword ptr [ebp-4] + +SYMBOL_STACK_INDEX: 2 + +SYMBOL_NAME: js_32_prof_dm_windows!js::AddTypePropertyId+1d8 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_32_prof_dm_windows_42c95d88aaaa + +IMAGE_NAME: js-32-prof-dm-windows-42c95d88aaaa.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-32-prof-dm-windows-42c95d88aaaa.exe!js::AddTypePropertyId + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 +# ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 0044df2c 76c57b89 ntdll+0x3c7ec +01 0044df48 76cb07bf kernel32+0x17b89 +02 0044e388 76cb0295 kernel32+0x707bf +03 0044e3a0 74d4f605 kernel32+0x70295 +04 0044e42c 772df154 KERNELBASE+0xbf605 +05 0044ff9c 7728ab5a ntdll+0xaf154 +06 0044ffac 00000000 ntdll+0x5ab5a +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +0044df2c 76c57b89 00000003 0044df70 00000000 ntdll+0x3c7ec +0044df48 76cb07bf 00000003 0044df70 00000000 kernel32+0x17b89 +0044e388 76cb0295 00000000 00000001 00000000 kernel32+0x707bf +0044e3a0 74d4f605 0044e45c 00000001 37adf25c kernel32+0x70295 +0044e42c 772df154 0044e45c 77270830 0044ff9c KERNELBASE+0xbf605 +0044ff9c 7728ab5a ffffffff 77270004 00000000 ntdll+0xaf154 +0044ffac 00000000 018182a4 ff7ab000 00000000 ntdll+0x5ab5a +0:000> q +quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/cdb-1a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-1a-crashlog.txt new file mode 100644 index 000000000..dcd3eedb0 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-1a-crashlog.txt @@ -0,0 +1,245 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-dbg-32-dm-windows-62f79d676e0e.exe.2372.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible +Product: WinNt, suite: SingleUserTS +Machine Name: +Debug session time: Fri Sep 23 15:23:36.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: 0 days 0:00:02.000 +.......................................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +eax=00000000 ebx=0034e7ac ecx=6a24705d edx=0034d9d4 esi=00000002 edi=00000000 +eip=77e9016d esp=0034e75c ebp=0034e7f8 iopl=0 nv up ei pl zr na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246 +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +ntdll!NtWaitForMultipleObjects+0x15: +77e9016d 83c404 add esp,4 +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=00000000 ebx=00000001 ecx=6a24705d edx=0034d9d4 esi=0925b3ec edi=0925b3d1 +eip=01814577 esp=0034ef5c ebp=0034ef5c iopl=0 nv up ei pl nz na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206 +*** WARNING: Unable to verify checksum for js-dbg-32-dm-windows-62f79d676e0e.exe +js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47: +01814577 cc int 3 +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll!NtWaitForMultipleObjects+0x15: +77e9016d 83c404 add esp,4 +77e90170 c21400 ret 14h +77e90173 90 nop +ntdll!NtSetInformationObject: +77e90174 b859000000 mov eax,59h +77e90179 33c9 xor ecx,ecx +77e9017b 8d542404 lea edx,[esp+4] +77e9017f 64ff15c0000000 call dword ptr fs:[0C0h] +77e90186 83c404 add esp,4 +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +01814577 cc 6a 03 c7 .j.. +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +***** OS symbols are WRONG. Please fix symbols to do analysis. + +***** OS (WOW64 kernel32) symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: nt!IMAGE_NT_HEADERS32 *** +*** *** +************************************************************************* + +FAULTING_IP: +js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] +01814577 cc int 3 + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 01814577 (js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x00000047) + ExceptionCode: 80000003 (Break instruction exception) + ExceptionFlags: 00000000 +NumberParameters: 1 + Parameter[0]: 00000000 + +DEFAULT_BUCKET_ID: WRONG_SYMBOLS + +PROCESS_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 76620000 kernel32 + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e2feea + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_PARAMETER1: 00000000 + +MOD_LIST: + +FAULTING_THREAD: 00000d9c + +PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS + +BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS + +LAST_CONTROL_TRANSFER: from 0186f798 to 01814577 + +STACK_TEXT: +0034ef5c 0186f798 0925b3ec 08d12000 09061100 js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] +0034efdc 01823483 09061100 09061100 08d12000 js_dbg_32_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x788 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] +0034eff4 01886782 08d38000 090600a0 09061100 js_dbg_32_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x43 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] +0034f1b8 018875f3 08d12000 08d38000 0034f1d8 js_dbg_32_dm_windows_62f79d676e0e!GenerateLcovInfo+0x5c2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] +0034f1f4 014760ac 08d12000 0034f244 0034f344 js_dbg_32_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x33 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] +0034f234 0190b2b6 08d12000 00000000 00000000 js_dbg_32_dm_windows_62f79d676e0e!GetLcovInfo+0x14c [c:\users\mozillaadmin\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3420] +0034f25c 01916811 08d38000 01475f60 0034f344 js_dbg_32_dm_windows_62f79d676e0e!js::CallJSNative+0x86 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +0034f2c0 01916429 08d12000 00006000 00000000 js_dbg_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x391 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +0034f2e4 01ddcce4 08d12000 0034f344 092720e8 js_dbg_32_dm_windows_62f79d676e0e!InternalCall+0x119 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +0034f37c 1f6a167c 0034f330 0034f3f8 0925a815 js_dbg_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x364 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +WARNING: Frame IP not in any known module. Following frames may be wrong. +0034f440 01ab4acf 1f6aa000 00000000 00000000 0x1f6a167c +0034f3a0 ffffff82 02186128 0904e4e8 1f6a9163 js_dbg_32_dm_windows_62f79d676e0e!EnterIon+0x2cf [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\ion.cpp @ 2837] +00000000 00000000 00000000 00000000 00000000 0xffffff82 + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FOLLOWUP_IP: +js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] +01814577 cc int 3 + +FAULTING_SOURCE_CODE: + 600: static inline unsigned + 601: GetBytecodeLength(jsbytecode* pc) + 602: { + 603: JSOp op = (JSOp)*pc; +> 604: MOZ_ASSERT(op < JSOP_LIMIT); + 605: + 606: if (CodeSpec[op].length != -1) + 607: return CodeSpec[op].length; + 608: return GetVariableBytecodeLength(pc); + 609: } + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_dbg_32_dm_windows!js::GetBytecodeLength+47 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_dbg_32_dm_windows_62f79d676e0e + +IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-dbg-32-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 0034e7f8 766319fc ntdll!NtWaitForMultipleObjects+0x15 +01 0034e840 766341d8 kernel32!WaitForMultipleObjectsEx+0x8e +02 0034e85c 766580bc kernel32!WaitForMultipleObjects+0x18 +03 0034e8c8 76657f7b kernel32!GetApplicationRecoveryCallback+0x2a7 +04 0034e8dc 76657870 kernel32!GetApplicationRecoveryCallback+0x166 +05 0034e8ec 766577ef kernel32!UnhandledExceptionFilter+0x161 +06 0034e978 77ee5b67 kernel32!UnhandledExceptionFilter+0xe0 +07 0034fc50 77ea98d5 ntdll!RtlKnownExceptionFilter+0xb7 +08 0034fc68 00000000 ntdll!RtlInitializeExceptionChain+0x36 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +0034e7f8 766319fc 0034e7ac 0034e820 00000000 ntdll!NtWaitForMultipleObjects+0x15 +0034e840 766341d8 00000002 fffde000 00000000 kernel32!WaitForMultipleObjectsEx+0x8e +0034e85c 766580bc 00000002 0034e890 00000000 kernel32!WaitForMultipleObjects+0x18 +0034e8c8 76657f7b 0034e9a8 00000001 00000001 kernel32!GetApplicationRecoveryCallback+0x2a7 +0034e8dc 76657870 0034e9a8 00000001 0034e978 kernel32!GetApplicationRecoveryCallback+0x166 +0034e8ec 766577ef 0034e9a8 00000001 95527c76 kernel32!UnhandledExceptionFilter+0x161 +0034e978 77ee5b67 00000000 77ee5a44 00000000 kernel32!UnhandledExceptionFilter+0xe0 +0034fc50 77ea98d5 012f1f73 fffde000 00000000 ntdll!RtlKnownExceptionFilter+0xb7 +0034fc68 00000000 012f1f73 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x36 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-1b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-1b-crashlog.txt new file mode 100644 index 000000000..e5143d71c --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-1b-crashlog.txt @@ -0,0 +1,329 @@ + +Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-dbg-32-dm-windows-62f79d676e0e.exe.4192.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: srv* +Executable search path is: +Windows 10 Version 14393 MP (8 procs) Free x86 compatible +Product: WinNt, suite: SingleUserTS +Built by: 10.0.14393.0 (rs1_release.160715-1616) +Machine Name: +Debug session time: Tue Sep 20 17:58:22.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: not available +................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +eax=00000000 ebx=00000000 ecx=765e06ef edx=00000060 esi=00000003 edi=00000003 +eip=770fe1bc esp=02b2e118 ebp=02b2e2a8 iopl=0 nv up ei pl nz na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206 +ntdll!NtWaitForMultipleObjects+0xc: +770fe1bc c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw + *** !wow64exts is only useful targeting architectures that support WoW *** +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +*** WARNING: Unable to verify checksum for js-dbg-32-dm-windows-62f79d676e0e.exe +eax=00000000 ebx=00000001 ecx=765e06ef edx=00000060 esi=039604ec edi=039604d1 +eip=01344577 esp=02b2ee1c ebp=02b2ee1c iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 +js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47: +01344577 cc int 3 +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604]: +01344577 cc int 3 +01344578 6a03 push 3 +0134457a c705000000005c020000 mov dword ptr ds:[0],25Ch +01344584 ff158070cb01 call dword ptr [js_dbg_32_dm_windows_62f79d676e0e!_imp__GetCurrentProcess (01cb7080)] +0134458a 50 push eax +0134458b ff157c70cb01 call dword ptr [js_dbg_32_dm_windows_62f79d676e0e!_imp__TerminateProcess (01cb707c)] +01344591 8a04c5d0e7b701 mov al,byte ptr js_dbg_32_dm_windows_62f79d676e0e!js::CodeSpec (01b7e7d0)[eax*8] +01344598 3cff cmp al,0FFh +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +01344577 cc 6a 03 c7 .j.. +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + + +DUMP_CLASS: 2 + +DUMP_QUALIFIER: 400 + +CONTEXT: (.ecxr) +eax=00000000 ebx=00000001 ecx=765e06ef edx=00000060 esi=039604ec edi=039604d1 +eip=01344577 esp=02b2ee1c ebp=02b2ee1c iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 +js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47: +01344577 cc int 3 +Resetting default scope + +FAULTING_IP: +js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] +01344577 cc int 3 + +EXCEPTION_RECORD: (.exr -1) +ExceptionAddress: 01344577 (js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x00000047) + ExceptionCode: 80000003 (Break instruction exception) + ExceptionFlags: 00000000 +NumberParameters: 1 + Parameter[0]: 00000000 + +DEFAULT_BUCKET_ID: STATUS_BREAKPOINT + +PROCESS_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_CODE_STR: 80000003 + +EXCEPTION_PARAMETER1: 00000000 + +WATSON_BKT_PROCSTAMP: 57e1a04d + +WATSON_BKT_PROCVER: 0.0.0.0 + +WATSON_BKT_MODULE: js-dbg-32-dm-windows-62f79d676e0e.exe + +WATSON_BKT_MODSTAMP: 57e1a04d + +WATSON_BKT_MODOFFSET: 524577 + +WATSON_BKT_MODVER: 0.0.0.0 + +BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) + +MODLIST_WITH_TSCHKSUM_HASH: 49a2e61967a9127904a3e4021eee1b18fbbadd16 + +MODLIST_SHA1_HASH: 7a765fdbd5266a0acb1114b3be4f770812eac374 + +NTGLOBALFLAG: 0 + +APPLICATION_VERIFIER_FLAGS: 0 + +DUMP_FLAGS: 94 + +DUMP_TYPE: 1 + +APP: js-dbg-32-dm-windows-62f79d676e0e.exe + +ANALYSIS_SESSION_HOST: F1BRIX + +ANALYSIS_SESSION_TIME: 09-20-2016 17:58:23.0553 + +ANALYSIS_VERSION: 10.0.10586.567 amd64fre + +THREAD_ATTRIBUTES: +OS_LOCALE: ENU + +PROBLEM_CLASSES: + + + + + Tid [0x0] + Frame [0x00] + String [STATUS_BREAKPOINT] + Data Bucketing + + +BUGCHECK_STR: STATUS_BREAKPOINT + +LAST_CONTROL_TRANSFER: from 0139f798 to 01344577 + +STACK_TEXT: +02b2ee1c 0139f798 039604ec 03512000 03761100 js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47 +02b2ee9c 01353483 03761100 03761100 03512000 js_dbg_32_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x788 +02b2eeb4 013b6782 03538000 037600a0 03761100 js_dbg_32_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x43 +02b2f078 013b75f3 03512000 03538000 02b2f098 js_dbg_32_dm_windows_62f79d676e0e!GenerateLcovInfo+0x5c2 +02b2f0b4 00fa60ac 03512000 02b2f104 02b2f204 js_dbg_32_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x33 +02b2f0f4 0143b2b6 03512000 00000000 00000000 js_dbg_32_dm_windows_62f79d676e0e!GetLcovInfo+0x14c +02b2f11c 01446811 03538000 00fa5f60 02b2f204 js_dbg_32_dm_windows_62f79d676e0e!js::CallJSNative+0x86 +02b2f180 01446429 03512000 00006000 00000000 js_dbg_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x391 +02b2f1a4 0190cce4 03512000 02b2f204 039710e8 js_dbg_32_dm_windows_62f79d676e0e!InternalCall+0x119 +02b2f23c 372c167c 02b2f1f0 02b2f2b8 0394a775 js_dbg_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x364 +WARNING: Frame IP not in any known module. Following frames may be wrong. +02b2f300 015e4acf 372ca000 00000000 00000000 0x372c167c +02b2f260 ffffff82 01cb5128 0374e4e8 372c9163 js_dbg_32_dm_windows_62f79d676e0e!EnterIon+0x2cf +00000000 00000000 00000000 00000000 00000000 0xffffff82 + + +THREAD_SHA1_HASH_MOD_FUNC: 982e0189f904ab5332c90b1402b462d775829a88 + +THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 84a065044ee6439455c4e2f7b9308b0181a554af + +THREAD_SHA1_HASH_MOD: 4922854b45388f6eb662cfb814183eb2916f95ec + +FOLLOWUP_IP: +js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] +01344577 cc int 3 + +FAULT_INSTR_CODE: c7036acc + +FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h + +FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h + +FAULTING_SOURCE_LINE_NUMBER: 604 + +FAULTING_SOURCE_CODE: + 600: static inline unsigned + 601: GetBytecodeLength(jsbytecode* pc) + 602: { + 603: JSOp op = (JSOp)*pc; +> 604: MOZ_ASSERT(op < JSOP_LIMIT); + 605: + 606: if (CodeSpec[op].length != -1) + 607: return CodeSpec[op].length; + 608: return GetVariableBytecodeLength(pc); + 609: } + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_dbg_32_dm_windows_62f79d676e0e + +IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e1a04d + +STACK_COMMAND: .ecxr ; kb + +BUCKET_ID: STATUS_BREAKPOINT_js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 + +PRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINT_js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 + +BUCKET_ID_OFFSET: 47 + +BUCKET_ID_MODULE_STR: js_dbg_32_dm_windows_62f79d676e0e + +BUCKET_ID_MODTIMEDATESTAMP: 57e1a04d + +BUCKET_ID_MODCHECKSUM: 0 + +BUCKET_ID_MODVER_STR: 0.0.0.0 + +BUCKET_ID_PREFIX_STR: STATUS_BREAKPOINT_ + +FAILURE_PROBLEM_CLASS: STATUS_BREAKPOINT + +FAILURE_EXCEPTION_CODE: 80000003 + +FAILURE_IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +FAILURE_FUNCTION_NAME: js::GetBytecodeLength + +BUCKET_ID_FUNCTION_STR: js::GetBytecodeLength + +FAILURE_SYMBOL_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength + +FAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_js-dbg-32-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength + +WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-dbg-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a04d/js-dbg-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a04d/80000003/00524577.htm?Retriage=1 + +TARGET_TIME: 2016-09-21T00:58:22.000Z + +OSBUILD: 14393 + +OSSERVICEPACK: 0 + +SERVICEPACK_NUMBER: 0 + +OS_REVISION: 0 + +SUITE_MASK: 256 + +PRODUCT_TYPE: 1 + +OSPLATFORM_TYPE: x86 + +OSNAME: Windows 10 + +OSEDITION: Windows 10 WinNt SingleUserTS + +USER_LCID: 0 + +OSBUILD_TIMESTAMP: 2016-07-15 18:33:42 + +BUILDDATESTAMP_STR: 160715-1616 + +BUILDLAB_STR: rs1_release + +BUILDOSVER_STR: 10.0.14393.0 + +ANALYSIS_SESSION_ELAPSED_TIME: 987 + +ANALYSIS_SOURCE: UM + +FAILURE_ID_HASH_STRING: um:status_breakpoint_80000003_js-dbg-32-dm-windows-62f79d676e0e.exe!js::getbytecodelength + +FAILURE_ID_HASH: {7407c034-3269-381a-c35e-dc0f05c0c82a} + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # ChildEBP RetAddr +00 02b2e114 76761a30 ntdll!NtWaitForMultipleObjects+0xc +01 02b2e2a8 76761928 KERNELBASE!WaitForMultipleObjectsEx+0xf0 +02 02b2e2c4 76de7062 KERNELBASE!WaitForMultipleObjects+0x18 +03 02b2e740 76de6aa6 kernel32!WerpReportFaultInternal+0x59d +04 02b2e75c 76dbe7a9 kernel32!WerpReportFault+0x9b +05 02b2e764 767ed90a kernel32!BasepReportFault+0x19 +06 02b2e7fc 7712dc00 KERNELBASE!UnhandledExceptionFilter+0x25a +07 02b2fb1c 770f05d4 ntdll!__RtlUserThreadStart+0x3d626 +08 02b2fb2c 00000000 ntdll!_RtlUserThreadStart+0x1b +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +02b2e114 76761a30 00000003 02b2e704 00000001 ntdll!NtWaitForMultipleObjects+0xc +02b2e2a8 76761928 00000003 02b2e704 00000000 KERNELBASE!WaitForMultipleObjectsEx+0xf0 +02b2e2c4 76de7062 00000003 02b2e704 00000000 KERNELBASE!WaitForMultipleObjects+0x18 +02b2e740 76de6aa6 00000000 00000000 00000001 kernel32!WerpReportFaultInternal+0x59d +02b2e75c 76dbe7a9 02b2e7fc 767ed90a 02b2e82c kernel32!WerpReportFault+0x9b +02b2e764 767ed90a 02b2e82c 00000001 b88633d1 kernel32!BasepReportFault+0x19 +02b2e7fc 7712dc00 02b2e82c 771020b0 02b2fb1c KERNELBASE!UnhandledExceptionFilter+0x25a +02b2fb1c 770f05d4 ffffffff 77112518 00000000 ntdll!__RtlUserThreadStart+0x3d626 +02b2fb2c 00000000 00e21f5a 02c1b000 00000000 ntdll!_RtlUserThreadStart+0x1b +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-2a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-2a-crashlog.txt new file mode 100644 index 000000000..e9a61076d --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-2a-crashlog.txt @@ -0,0 +1,308 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-dbg-64-dm-windows-62f79d676e0e.exe.2076.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x64 +Product: WinNt, suite: SingleUserTS +Machine Name: +Debug session time: Fri Sep 23 15:40:34.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: 0 days 0:00:01.000 +......................................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +*** WARNING: Unable to verify checksum for js-dbg-64-dm-windows-62f79d676e0e.exe +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: +00000001`40144e62 cc int 3 +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +The current thread doesn't have an x86 context. +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +rax=0000000000000000 rbx=0000000006c139ac rcx=000007fef38241f0 +rdx=000007fef38255f0 rsi=0000000006c1399e rdi=0000000006cf2101 +rip=0000000140144e62 rsp=000000000027e500 rbp=0000000006cf2120 + r8=000000000027ce88 r9=00000000020cc069 r10=0000000000000000 +r11=000000000027e3f0 r12=0000000006c0d088 r13=0000000006c139ad +r14=0000000000000000 r15=0000000006c13991 +iopl=0 nv up ei pl nz na po nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000204 +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: +00000001`40144e62 cc int 3 +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604]: +00000001`40144e62 cc int 3 +00000001`40144e63 c70425000000005c020000 mov dword ptr [0],25Ch +00000001`40144e6e ff158c02eb00 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp_GetCurrentProcess (00000001`40ff5100)] +00000001`40144e74 488bc8 mov rcx,rax +00000001`40144e77 ba03000000 mov edx,3 +00000001`40144e7c ff157602eb00 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp_TerminateProcess (00000001`40ff50f8)] +00000001`40144e82 cc int 3 +00000001`40144e83 488d15168ab600 lea rdx,[js_dbg_64_dm_windows_62f79d676e0e!js::CodeSpec (00000001`40cad8a0)] +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00000000`40144e62 ?? ?? ?? ?? ???? +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +00000001`40144e62 cc c7 04 25 00 00 00 00 ...%.... +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: nt!IMAGE_NT_HEADERS32 *** +*** *** +************************************************************************* +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ucrtbase.dll - +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* + +FAULTING_IP: +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] +00000001`40144e62 cc int 3 + +EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 0000000140144e62 (js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x0000000000000052) + ExceptionCode: 80000003 (Break instruction exception) + ExceptionFlags: 00000000 +NumberParameters: 1 + Parameter[0]: 0000000000000000 + +DEFAULT_BUCKET_ID: WRONG_SYMBOLS + +PROCESS_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 0000000077c90000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e303d8 + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_PARAMETER1: 0000000000000000 + +MOD_LIST: + +FAULTING_THREAD: 0000000000000f2c + +PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS + +BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS + +LAST_CONTROL_TRANSFER: from 00000001401d8fdd to 0000000140144e62 + +STACK_TEXT: +00000000`0027e500 00000001`401d8fdd : 00000000`06c13900 00000000`00000046 00000000`0697f101 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] +00000000`0027e540 00000001`4015d3ca : 00000000`06c0d088 00000000`0697f1a8 00000000`00000002 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] +00000000`0027e610 00000001`401fb883 : 00000000`0697f1a8 00000000`0027e740 00000000`068031b0 00000000`06807000 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] +00000000`0027e640 00000001`401fd30d : 00000000`0027e5f0 00000000`00000000 00000000`06999c18 00000000`0027ed98 : js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] +00000000`0027e940 00000001`3fc08085 : 00000000`06853800 00000000`0027ed68 00000000`06807000 00000000`0000001d : js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] +00000000`0027e9b0 00000001`402c23c5 : 00000000`0027ebe8 00000000`0027ebe8 00000000`00000000 00000000`06999c18 : js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\mozillaadmin\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] +00000000`0027ea20 00000001`402d677a : 00000000`0027eb80 00000000`00000000 00000000`00000001 00000000`06853800 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +00000000`0027ea80 00000001`40756744 : 00000000`0000003a 00000000`00000000 00000000`00000000 00000000`06c1427d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +00000000`0027eb10 000000c1`814a777e : 00000000`0027ed01 00000000`0697f100 00000000`000006d0 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +00000000`0027ecd0 00000000`0027ed01 : 00000000`0697f100 00000000`000006d0 00000000`00000008 00000000`0027ed58 : 0xc1`814a777e +00000000`0027ecd8 00000000`0697f100 : 00000000`000006d0 00000000`00000008 00000000`0027ed58 00000000`0027ed10 : 0x27ed01 +00000000`0027ece0 00000000`000006d0 : 00000000`00000008 00000000`0027ed58 00000000`0027ed10 00000321`8aa30ceb : 0x697f100 +00000000`0027ece8 00000000`00000008 : 00000000`0027ed58 00000000`0027ed10 00000321`8aa30ceb 00000000`0027ed10 : 0x6d0 +00000000`0027ecf0 00000000`0027ed58 : 00000000`0027ed10 00000321`8aa30ceb 00000000`0027ed10 fff90000`00000000 : 0x8 +00000000`0027ecf8 00000000`0027ed10 : 00000321`8aa30ceb 00000000`0027ed10 fff90000`00000000 00000001`40f2f940 : 0x27ed58 +00000000`0027ed00 00000321`8aa30ceb : 00000000`0027ed10 fff90000`00000000 00000001`40f2f940 00000000`06969bb0 : 0x27ed10 +00000000`0027ed08 00000000`0027ed10 : fff90000`00000000 00000001`40f2f940 00000000`06969bb0 000000c1`814ae873 : 0x321`8aa30ceb +00000000`0027ed10 fff90000`00000000 : 00000001`40f2f940 00000000`06969bb0 000000c1`814ae873 00000000`00004022 : 0x27ed10 +00000000`0027ed18 00000001`40f2f940 : 00000000`06969bb0 000000c1`814ae873 00000000`00004022 00000000`0027ed98 : 0xfff90000`00000000 +00000000`0027ed20 00000000`06969bb0 : 000000c1`814ae873 00000000`00004022 00000000`0027ed98 00000000`06c0c188 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +00000000`0027ed28 000000c1`814ae873 : 00000000`00004022 00000000`0027ed98 00000000`06c0c188 00000000`00000000 : 0x6969bb0 +00000000`0027ed30 00000000`00004022 : 00000000`0027ed98 00000000`06c0c188 00000000`00000000 00000000`0027ed58 : 0xc1`814ae873 +00000000`0027ed38 00000000`0027ed98 : 00000000`06c0c188 00000000`00000000 00000000`0027ed58 fffe0000`069948c0 : 0x4022 +00000000`0027ed40 00000000`06c0c188 : 00000000`00000000 00000000`0027ed58 fffe0000`069948c0 fff90000`00000000 : 0x27ed98 +00000000`0027ed48 00000000`00000000 : 00000000`0027ed58 fffe0000`069948c0 fff90000`00000000 00000000`0027edc8 : 0x6c0c188 + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FOLLOWUP_IP: +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] +00000001`40144e62 cc int 3 + +FAULTING_SOURCE_CODE: + 600: static inline unsigned + 601: GetBytecodeLength(jsbytecode* pc) + 602: { + 603: JSOp op = (JSOp)*pc; +> 604: MOZ_ASSERT(op < JSOP_LIMIT); + 605: + 606: if (CodeSpec[op].length != -1) + 607: return CodeSpec[op].length; + 608: return GetVariableBytecodeLength(pc); + 609: } + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_dbg_64_dm_windows!js::GetBytecodeLength+52 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_dbg_64_dm_windows_62f79d676e0e + +IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-dbg-64-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # Child-SP RetAddr Call Site +00 00000000`0027e500 00000001`401d8fdd js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] +01 00000000`0027e540 00000001`4015d3ca js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] +02 00000000`0027e610 00000001`401fb883 js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] +03 00000000`0027e640 00000001`401fd30d js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] +04 00000000`0027e940 00000001`3fc08085 js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] +05 00000000`0027e9b0 00000001`402c23c5 js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\mozillaadmin\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] +06 00000000`0027ea20 00000001`402d677a js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +07 00000000`0027ea80 00000001`40756744 js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +08 00000000`0027eb10 000000c1`814a777e js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +09 00000000`0027ecd0 00000000`0027ed01 0xc1`814a777e +0a 00000000`0027ecd8 00000000`0697f100 0x27ed01 +0b 00000000`0027ece0 00000000`000006d0 0x697f100 +0c 00000000`0027ece8 00000000`00000008 0x6d0 +0d 00000000`0027ecf0 00000000`0027ed58 0x8 +0e 00000000`0027ecf8 00000000`0027ed10 0x27ed58 +0f 00000000`0027ed00 00000321`8aa30ceb 0x27ed10 +10 00000000`0027ed08 00000000`0027ed10 0x321`8aa30ceb +11 00000000`0027ed10 fff90000`00000000 0x27ed10 +12 00000000`0027ed18 00000001`40f2f940 0xfff90000`00000000 +13 00000000`0027ed20 00000000`06969bb0 js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +14 00000000`0027ed28 000000c1`814ae873 0x6969bb0 +15 00000000`0027ed30 00000000`00004022 0xc1`814ae873 +16 00000000`0027ed38 00000000`0027ed98 0x4022 +17 00000000`0027ed40 00000000`06c0c188 0x27ed98 +18 00000000`0027ed48 00000000`00000000 0x6c0c188 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +RetAddr : Args to Child : Call Site +00000001`401d8fdd : 00000000`06c13900 00000000`00000046 00000000`0697f101 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] +00000001`4015d3ca : 00000000`06c0d088 00000000`0697f1a8 00000000`00000002 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] +00000001`401fb883 : 00000000`0697f1a8 00000000`0027e740 00000000`068031b0 00000000`06807000 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] +00000001`401fd30d : 00000000`0027e5f0 00000000`00000000 00000000`06999c18 00000000`0027ed98 : js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] +00000001`3fc08085 : 00000000`06853800 00000000`0027ed68 00000000`06807000 00000000`0000001d : js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] +00000001`402c23c5 : 00000000`0027ebe8 00000000`0027ebe8 00000000`00000000 00000000`06999c18 : js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\mozillaadmin\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] +00000001`402d677a : 00000000`0027eb80 00000000`00000000 00000000`00000001 00000000`06853800 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +00000001`40756744 : 00000000`0000003a 00000000`00000000 00000000`00000000 00000000`06c1427d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +000000c1`814a777e : 00000000`0027ed01 00000000`0697f100 00000000`000006d0 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +00000000`0027ed01 : 00000000`0697f100 00000000`000006d0 00000000`00000008 00000000`0027ed58 : 0xc1`814a777e +00000000`0697f100 : 00000000`000006d0 00000000`00000008 00000000`0027ed58 00000000`0027ed10 : 0x27ed01 +00000000`000006d0 : 00000000`00000008 00000000`0027ed58 00000000`0027ed10 00000321`8aa30ceb : 0x697f100 +00000000`00000008 : 00000000`0027ed58 00000000`0027ed10 00000321`8aa30ceb 00000000`0027ed10 : 0x6d0 +00000000`0027ed58 : 00000000`0027ed10 00000321`8aa30ceb 00000000`0027ed10 fff90000`00000000 : 0x8 +00000000`0027ed10 : 00000321`8aa30ceb 00000000`0027ed10 fff90000`00000000 00000001`40f2f940 : 0x27ed58 +00000321`8aa30ceb : 00000000`0027ed10 fff90000`00000000 00000001`40f2f940 00000000`06969bb0 : 0x27ed10 +00000000`0027ed10 : fff90000`00000000 00000001`40f2f940 00000000`06969bb0 000000c1`814ae873 : 0x321`8aa30ceb +fff90000`00000000 : 00000001`40f2f940 00000000`06969bb0 000000c1`814ae873 00000000`00004022 : 0x27ed10 +00000001`40f2f940 : 00000000`06969bb0 000000c1`814ae873 00000000`00004022 00000000`0027ed98 : 0xfff90000`00000000 +00000000`06969bb0 : 000000c1`814ae873 00000000`00004022 00000000`0027ed98 00000000`06c0c188 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +000000c1`814ae873 : 00000000`00004022 00000000`0027ed98 00000000`06c0c188 00000000`00000000 : 0x6969bb0 +00000000`00004022 : 00000000`0027ed98 00000000`06c0c188 00000000`00000000 00000000`0027ed58 : 0xc1`814ae873 +00000000`0027ed98 : 00000000`06c0c188 00000000`00000000 00000000`0027ed58 fffe0000`069948c0 : 0x4022 +00000000`06c0c188 : 00000000`00000000 00000000`0027ed58 fffe0000`069948c0 fff90000`00000000 : 0x27ed98 +00000000`00000000 : 00000000`0027ed58 fffe0000`069948c0 fff90000`00000000 00000000`0027edc8 : 0x6c0c188 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-2b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-2b-crashlog.txt new file mode 100644 index 000000000..bff38c233 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-2b-crashlog.txt @@ -0,0 +1,381 @@ + +Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-dbg-64-dm-windows-62f79d676e0e.exe.1140.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: srv* +Executable search path is: +Windows 10 Version 14393 MP (8 procs) Free x64 +Product: WinNt, suite: SingleUserTS +Built by: 10.0.14393.0 (rs1_release.160715-1616) +Machine Name: +Debug session time: Tue Sep 20 17:58:35.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: not available +.................. +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +*** WARNING: Unable to verify checksum for js-dbg-64-dm-windows-62f79d676e0e.exe +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: +00007ff7`1e424e62 cc int 3 +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +The current thread doesn't have a guest (WoW) context. +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +rax=0000000000000000 rbx=0000024dbf40baac rcx=00000000ffffffff +rdx=0000000000000000 rsi=0000024dbf40ba9e rdi=0000024dbf4f2201 +rip=00007ff71e424e62 rsp=000000de223fe3d0 rbp=0000024dbf4f22e0 + r8=000000de223fcd78 r9=0000024dbebe0735 r10=0000000000000000 +r11=000000de223fe240 r12=0000024dbf414088 r13=0000024dbf40baad +r14=0000000000000000 r15=0000024dbf40ba91 +iopl=0 nv up ei pl nz na pe nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000200 +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: +00007ff7`1e424e62 cc int 3 +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604]: +00007ff7`1e424e62 cc int 3 +00007ff7`1e424e63 c70425000000005c020000 mov dword ptr [0],25Ch +00007ff7`1e424e6e ff158cf2ea00 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp_GetCurrentProcess (00007ff7`1f2d4100)] +00007ff7`1e424e74 488bc8 mov rcx,rax +00007ff7`1e424e77 ba03000000 mov edx,3 +00007ff7`1e424e7c ff1576f2ea00 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp_TerminateProcess (00007ff7`1f2d40f8)] +00007ff7`1e424e82 cc int 3 +00007ff7`1e424e83 488d159682b600 lea rdx,[js_dbg_64_dm_windows_62f79d676e0e!js::CodeSpec (00007ff7`1ef8d120)] +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00000000`1e424e62 ?? ?? ?? ?? ???? +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +00007ff7`1e424e62 cc c7 04 25 00 00 00 00 ...%.... +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + + +DUMP_CLASS: 2 + +DUMP_QUALIFIER: 400 + +CONTEXT: (.ecxr) +rax=0000000000000000 rbx=0000024dbf40baac rcx=00000000ffffffff +rdx=0000000000000000 rsi=0000024dbf40ba9e rdi=0000024dbf4f2201 +rip=00007ff71e424e62 rsp=000000de223fe3d0 rbp=0000024dbf4f22e0 + r8=000000de223fcd78 r9=0000024dbebe0735 r10=0000000000000000 +r11=000000de223fe240 r12=0000024dbf414088 r13=0000024dbf40baad +r14=0000000000000000 r15=0000024dbf40ba91 +iopl=0 nv up ei pl nz na pe nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000200 +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: +00007ff7`1e424e62 cc int 3 +Resetting default scope + +FAULTING_IP: +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] +00007ff7`1e424e62 cc int 3 + +EXCEPTION_RECORD: (.exr -1) +ExceptionAddress: 00007ff71e424e62 (js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x0000000000000052) + ExceptionCode: 80000003 (Break instruction exception) + ExceptionFlags: 00000000 +NumberParameters: 1 + Parameter[0]: 0000000000000000 + +DEFAULT_BUCKET_ID: STATUS_BREAKPOINT + +PROCESS_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_CODE_STR: 80000003 + +EXCEPTION_PARAMETER1: 0000000000000000 + +WATSON_BKT_PROCSTAMP: 57e18eec + +WATSON_BKT_PROCVER: 0.0.0.0 + +WATSON_BKT_MODULE: js-dbg-64-dm-windows-62f79d676e0e.exe + +WATSON_BKT_MODSTAMP: 57e18eec + +WATSON_BKT_MODOFFSET: 7b4e62 + +WATSON_BKT_MODVER: 0.0.0.0 + +BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) + +MODLIST_WITH_TSCHKSUM_HASH: abe9d48025cf202213900541e7ac7be6e710bc74 + +MODLIST_SHA1_HASH: dcd2f6f5a658c3db2c10f42a36d472a2d0dd71fd + +NTGLOBALFLAG: 0 + +APPLICATION_VERIFIER_FLAGS: 0 + +DUMP_FLAGS: 94 + +DUMP_TYPE: 1 + +APP: js-dbg-64-dm-windows-62f79d676e0e.exe + +ANALYSIS_SESSION_HOST: F1BRIX + +ANALYSIS_SESSION_TIME: 09-20-2016 17:58:36.0426 + +ANALYSIS_VERSION: 10.0.10586.567 amd64fre + +THREAD_ATTRIBUTES: +OS_LOCALE: ENU + +PROBLEM_CLASSES: + + + + + Tid [0x0] + Frame [0x00] + String [STATUS_BREAKPOINT] + Data Bucketing + + +BUGCHECK_STR: STATUS_BREAKPOINT + +LAST_CONTROL_TRANSFER: from 00007ff71e4b8fdd to 00007ff71e424e62 + +STACK_TEXT: +000000de`223fe3d0 00007ff7`1e4b8fdd : 0000024d`bf40ba00 00000000`00000046 0000024d`bf17f101 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 +000000de`223fe410 00007ff7`1e43d3ca : 0000024d`bf414088 0000024d`bf17f1a8 00000000`00000002 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad +000000de`223fe4e0 00007ff7`1e4db883 : 0000024d`bf17f1a8 000000de`223fe610 0000024d`bef031b0 0000024d`bef07000 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a +000000de`223fe510 00007ff7`1e4dd30d : 000000de`223fe4c0 00000000`00000000 0000024d`bf199c18 000000de`223fec68 : js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 +000000de`223fe810 00007ff7`1dee8085 : 0000024d`bef53800 000000de`223fec38 0000024d`bef07000 0000024d`0000001d : js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d +000000de`223fe880 00007ff7`1e5a23c5 : 000000de`223feab8 000000de`223feab8 00000000`00000000 0000024d`bf199c18 : js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 +000000de`223fe8f0 00007ff7`1e5b677a : 000000de`223fea50 00000000`00000000 00000000`00000001 0000024d`bef53800 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 +000000de`223fe950 00007ff7`1ea36744 : 00000000`0000003a 00000000`00000000 00000000`00000000 0000024d`bf40c22d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa +000000de`223fe9e0 00000032`c8c27cc8 : 000000de`223fec01 0000024d`bf17f100 00000000`000006d0 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 +000000de`223feba0 000000de`223fec01 : 0000024d`bf17f100 00000000`000006d0 00000000`00000008 000000de`223fec28 : 0x00000032`c8c27cc8 +000000de`223feba8 0000024d`bf17f100 : 00000000`000006d0 00000000`00000008 000000de`223fec28 000000de`223febe0 : 0x000000de`223fec01 +000000de`223febb0 00000000`000006d0 : 00000000`00000008 000000de`223fec28 000000de`223febe0 00000039`f0831b56 : 0x0000024d`bf17f100 +000000de`223febb8 00000000`00000008 : 000000de`223fec28 000000de`223febe0 00000039`f0831b56 000000de`223febe0 : 0x6d0 +000000de`223febc0 000000de`223fec28 : 000000de`223febe0 00000039`f0831b56 000000de`223febe0 fff90000`00000000 : 0x8 +000000de`223febc8 000000de`223febe0 : 00000039`f0831b56 000000de`223febe0 fff90000`00000000 00007ff7`1f20e940 : 0x000000de`223fec28 +000000de`223febd0 00000039`f0831b56 : 000000de`223febe0 fff90000`00000000 00007ff7`1f20e940 0000024d`bf169bb0 : 0x000000de`223febe0 +000000de`223febd8 000000de`223febe0 : fff90000`00000000 00007ff7`1f20e940 0000024d`bf169bb0 00000032`c8c2e353 : 0x00000039`f0831b56 +000000de`223febe0 fff90000`00000000 : 00007ff7`1f20e940 0000024d`bf169bb0 00000032`c8c2e353 00000000`00004022 : 0x000000de`223febe0 +000000de`223febe8 00007ff7`1f20e940 : 0000024d`bf169bb0 00000032`c8c2e353 00000000`00004022 000000de`223fec68 : 0xfff90000`00000000 +000000de`223febf0 0000024d`bf169bb0 : 00000032`c8c2e353 00000000`00004022 000000de`223fec68 0000024d`bf413188 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +000000de`223febf8 00000032`c8c2e353 : 00000000`00004022 000000de`223fec68 0000024d`bf413188 00000000`00000000 : 0x0000024d`bf169bb0 +000000de`223fec00 00000000`00004022 : 000000de`223fec68 0000024d`bf413188 00000000`00000000 000000de`223fec28 : 0x00000032`c8c2e353 +000000de`223fec08 000000de`223fec68 : 0000024d`bf413188 00000000`00000000 000000de`223fec28 fffe024d`bf1948c0 : 0x4022 +000000de`223fec10 0000024d`bf413188 : 00000000`00000000 000000de`223fec28 fffe024d`bf1948c0 fff90000`00000000 : 0x000000de`223fec68 +000000de`223fec18 00000000`00000000 : 000000de`223fec28 fffe024d`bf1948c0 fff90000`00000000 000000de`223fec98 : 0x0000024d`bf413188 + + +THREAD_SHA1_HASH_MOD_FUNC: d3894c7048206c05171326cc132d8418fcc2541e + +THREAD_SHA1_HASH_MOD_FUNC_OFFSET: d0314c578160f0147d7ac71520f1d8de34149e27 + +THREAD_SHA1_HASH_MOD: d74ca7572f85c7b2a13b54456d3881548f31a2b6 + +FOLLOWUP_IP: +js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] +00007ff7`1e424e62 cc int 3 + +FAULT_INSTR_CODE: 2504c7cc + +FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h + +FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h + +FAULTING_SOURCE_LINE_NUMBER: 604 + +FAULTING_SOURCE_CODE: + 600: static inline unsigned + 601: GetBytecodeLength(jsbytecode* pc) + 602: { + 603: JSOp op = (JSOp)*pc; +> 604: MOZ_ASSERT(op < JSOP_LIMIT); + 605: + 606: if (CodeSpec[op].length != -1) + 607: return CodeSpec[op].length; + 608: return GetVariableBytecodeLength(pc); + 609: } + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_dbg_64_dm_windows_62f79d676e0e + +IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e18eec + +STACK_COMMAND: .ecxr ; kb + +BUCKET_ID: STATUS_BREAKPOINT_js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 + +PRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINT_js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 + +BUCKET_ID_OFFSET: 52 + +BUCKET_ID_MODULE_STR: js_dbg_64_dm_windows_62f79d676e0e + +BUCKET_ID_MODTIMEDATESTAMP: 57e18eec + +BUCKET_ID_MODCHECKSUM: 0 + +BUCKET_ID_MODVER_STR: 0.0.0.0 + +BUCKET_ID_PREFIX_STR: STATUS_BREAKPOINT_ + +FAILURE_PROBLEM_CLASS: STATUS_BREAKPOINT + +FAILURE_EXCEPTION_CODE: 80000003 + +FAILURE_IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +FAILURE_FUNCTION_NAME: js::GetBytecodeLength + +BUCKET_ID_FUNCTION_STR: js::GetBytecodeLength + +FAILURE_SYMBOL_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength + +FAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_js-dbg-64-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength + +WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-dbg-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e18eec/js-dbg-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e18eec/80000003/007b4e62.htm?Retriage=1 + +TARGET_TIME: 2016-09-21T00:58:35.000Z + +OSBUILD: 14393 + +OSSERVICEPACK: 0 + +SERVICEPACK_NUMBER: 0 + +OS_REVISION: 0 + +SUITE_MASK: 256 + +PRODUCT_TYPE: 1 + +OSPLATFORM_TYPE: x64 + +OSNAME: Windows 10 + +OSEDITION: Windows 10 WinNt SingleUserTS + +USER_LCID: 0 + +OSBUILD_TIMESTAMP: 2016-07-15 19:21:29 + +BUILDDATESTAMP_STR: 160715-1616 + +BUILDLAB_STR: rs1_release + +BUILDOSVER_STR: 10.0.14393.0 + +ANALYSIS_SESSION_ELAPSED_TIME: 1a2 + +ANALYSIS_SOURCE: UM + +FAILURE_ID_HASH_STRING: um:status_breakpoint_80000003_js-dbg-64-dm-windows-62f79d676e0e.exe!js::getbytecodelength + +FAILURE_ID_HASH: {6684a19d-fe62-e5b1-14d4-33669a346a0f} + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # Child-SP RetAddr Call Site +00 000000de`223fe3d0 00007ff7`1e4b8fdd js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] +01 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::GetNextPc+0x8 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 843] +02 000000de`223fe410 00007ff7`1e43d3ca js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] +03 000000de`223fe4e0 00007ff7`1e4db883 js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] +04 000000de`223fe510 00007ff7`1e4dd30d js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] +05 000000de`223fe810 00007ff7`1dee8085 js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] +06 000000de`223fe880 00007ff7`1e5a23c5 js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\fuzz1win\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] +07 000000de`223fe8f0 00007ff7`1e5b677a js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +08 000000de`223fe950 00007ff7`1ea36744 js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +09 000000de`223fe9e0 00000032`c8c27cc8 js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +0a 000000de`223feba0 000000de`223fec01 0x00000032`c8c27cc8 +0b 000000de`223feba8 0000024d`bf17f100 0x000000de`223fec01 +0c 000000de`223febb0 00000000`000006d0 0x0000024d`bf17f100 +0d 000000de`223febb8 00000000`00000008 0x6d0 +0e 000000de`223febc0 000000de`223fec28 0x8 +0f 000000de`223febc8 000000de`223febe0 0x000000de`223fec28 +10 000000de`223febd0 00000039`f0831b56 0x000000de`223febe0 +11 000000de`223febd8 000000de`223febe0 0x00000039`f0831b56 +12 000000de`223febe0 fff90000`00000000 0x000000de`223febe0 +13 000000de`223febe8 00007ff7`1f20e940 0xfff90000`00000000 +14 000000de`223febf0 0000024d`bf169bb0 js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +15 000000de`223febf8 00000032`c8c2e353 0x0000024d`bf169bb0 +16 000000de`223fec00 00000000`00004022 0x00000032`c8c2e353 +17 000000de`223fec08 000000de`223fec68 0x4022 +18 000000de`223fec10 0000024d`bf413188 0x000000de`223fec68 +19 000000de`223fec18 00000000`00000000 0x0000024d`bf413188 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +RetAddr : Args to Child : Call Site +00007ff7`1e4b8fdd : 0000024d`bf40ba00 00000000`00000046 0000024d`bf17f101 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::GetNextPc+0x8 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 843] +00007ff7`1e43d3ca : 0000024d`bf414088 0000024d`bf17f1a8 00000000`00000002 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] +00007ff7`1e4db883 : 0000024d`bf17f1a8 000000de`223fe610 0000024d`bef031b0 0000024d`bef07000 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] +00007ff7`1e4dd30d : 000000de`223fe4c0 00000000`00000000 0000024d`bf199c18 000000de`223fec68 : js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] +00007ff7`1dee8085 : 0000024d`bef53800 000000de`223fec38 0000024d`bef07000 0000024d`0000001d : js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] +00007ff7`1e5a23c5 : 000000de`223feab8 000000de`223feab8 00000000`00000000 0000024d`bf199c18 : js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\fuzz1win\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] +00007ff7`1e5b677a : 000000de`223fea50 00000000`00000000 00000000`00000001 0000024d`bef53800 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +00007ff7`1ea36744 : 00000000`0000003a 00000000`00000000 00000000`00000000 0000024d`bf40c22d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +00000032`c8c27cc8 : 000000de`223fec01 0000024d`bf17f100 00000000`000006d0 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +000000de`223fec01 : 0000024d`bf17f100 00000000`000006d0 00000000`00000008 000000de`223fec28 : 0x00000032`c8c27cc8 +0000024d`bf17f100 : 00000000`000006d0 00000000`00000008 000000de`223fec28 000000de`223febe0 : 0x000000de`223fec01 +00000000`000006d0 : 00000000`00000008 000000de`223fec28 000000de`223febe0 00000039`f0831b56 : 0x0000024d`bf17f100 +00000000`00000008 : 000000de`223fec28 000000de`223febe0 00000039`f0831b56 000000de`223febe0 : 0x6d0 +000000de`223fec28 : 000000de`223febe0 00000039`f0831b56 000000de`223febe0 fff90000`00000000 : 0x8 +000000de`223febe0 : 00000039`f0831b56 000000de`223febe0 fff90000`00000000 00007ff7`1f20e940 : 0x000000de`223fec28 +00000039`f0831b56 : 000000de`223febe0 fff90000`00000000 00007ff7`1f20e940 0000024d`bf169bb0 : 0x000000de`223febe0 +000000de`223febe0 : fff90000`00000000 00007ff7`1f20e940 0000024d`bf169bb0 00000032`c8c2e353 : 0x00000039`f0831b56 +fff90000`00000000 : 00007ff7`1f20e940 0000024d`bf169bb0 00000032`c8c2e353 00000000`00004022 : 0x000000de`223febe0 +00007ff7`1f20e940 : 0000024d`bf169bb0 00000032`c8c2e353 00000000`00004022 000000de`223fec68 : 0xfff90000`00000000 +0000024d`bf169bb0 : 00000032`c8c2e353 00000000`00004022 000000de`223fec68 0000024d`bf413188 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +00000032`c8c2e353 : 00000000`00004022 000000de`223fec68 0000024d`bf413188 00000000`00000000 : 0x0000024d`bf169bb0 +00000000`00004022 : 000000de`223fec68 0000024d`bf413188 00000000`00000000 000000de`223fec28 : 0x00000032`c8c2e353 +000000de`223fec68 : 0000024d`bf413188 00000000`00000000 000000de`223fec28 fffe024d`bf1948c0 : 0x4022 +0000024d`bf413188 : 00000000`00000000 000000de`223fec28 fffe024d`bf1948c0 fff90000`00000000 : 0x000000de`223fec68 +00000000`00000000 : 000000de`223fec28 fffe024d`bf1948c0 fff90000`00000000 000000de`223fec98 : 0x0000024d`bf413188 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-3a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-3a-crashlog.txt new file mode 100644 index 000000000..6a71aa47f --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-3a-crashlog.txt @@ -0,0 +1,284 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-dbg-32-dm-windows-62f79d676e0e.exe.3684.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible +Product: WinNt, suite: SingleUserTS +Machine Name: +Debug session time: Fri Sep 23 15:55:20.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: 0 days 0:00:02.000 +.......................................... +This dump file has an exception of interest stored in it. +The stored exception information can be accessed via .ecxr. +(e64.c84): Access violation - code c0000005 (first/second chance not available) +eax=00000000 ebx=0041d454 ecx=2b2b2b2b edx=0a200310 esi=00000002 edi=00000000 +eip=77e9016d esp=0041d404 ebp=0041d4a0 iopl=0 nv up ei pl zr na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246 +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +ntdll!NtWaitForMultipleObjects+0x15: +77e9016d 83c404 add esp,4 +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=2b2ffff0 ebx=0041de08 ecx=2b2b2b2b edx=0a200310 esi=0041dc68 edi=0a200310 +eip=00f36a63 esp=0041dc04 ebp=0041dc2c iopl=0 nv up ei pl nz na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206 +*** WARNING: Unable to verify checksum for js-dbg-32-dm-windows-62f79d676e0e.exe +js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13: +00f36a63 8b00 mov eax,dword ptr [eax] ds:002b:2b2ffff0=???????? +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll!NtWaitForMultipleObjects+0x15: +77e9016d 83c404 add esp,4 +77e90170 c21400 ret 14h +77e90173 90 nop +ntdll!NtSetInformationObject: +77e90174 b859000000 mov eax,59h +77e90179 33c9 xor ecx,ecx +77e9017b 8d542404 lea edx,[esp+4] +77e9017f 64ff15c0000000 call dword ptr fs:[0C0h] +77e90186 83c404 add esp,4 +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00f36a63 8b 00 83 f8 .... +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +***** OS symbols are WRONG. Please fix symbols to do analysis. + +***** OS (WOW64 kernel32) symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: nt!IMAGE_NT_HEADERS32 *** +*** *** +************************************************************************* +Value unavailable error for addr +Value unavailable error for addr +Value unavailable error for addr +Value unavailable error for addr +Value unavailable error for addr +Value unavailable error for addr +Unable to load image C:\Windows\System32\ucrtbase.dll, Win32 error 0n2 +*** WARNING: Unable to verify timestamp for ucrtbase.dll +*** ERROR: Module load completed but symbols could not be loaded for ucrtbase.dll + +FAULTING_IP: +js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] +00f36a63 8b00 mov eax,dword ptr [eax] + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 00f36a63 (js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x00000013) + ExceptionCode: c0000005 (Access violation) + ExceptionFlags: 00000000 +NumberParameters: 2 + Parameter[0]: 00000000 + Parameter[1]: 2b2ffff0 +Attempt to read from address 2b2ffff0 + +PROCESS_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 76620000 kernel32 + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e2feea + +ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. + +EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. + +EXCEPTION_PARAMETER1: 00000000 + +EXCEPTION_PARAMETER2: 2b2ffff0 + +READ_ADDRESS: 2b2ffff0 + +FOLLOWUP_IP: +js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] +00f36a63 8b00 mov eax,dword ptr [eax] + +MOD_LIST: + +FAULTING_THREAD: 00000c84 + +BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_WRONG_SYMBOLS_FILL_PATTERN_2b2b2b2b + +PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +LAST_CONTROL_TRANSFER: from 015abad0 to 00f36a63 + +STACK_TEXT: +0041dc04 015abad0 0041de08 0041dc68 0041e650 js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] +0041dc2c 0159ab06 0a200310 0041e650 0041de08 js_dbg_32_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x90 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] +0041dc40 0157f054 0041dc68 0041e650 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0xa6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] +0041dc5c 0157d196 0041de08 0a200310 0041dc88 js_dbg_32_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * const>+0x44 [c:\users\mozillaadmin\shell-cache\js-dbg-32-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +0041dc80 01593309 0041de08 0041e650 01c511d8 js_dbg_32_dm_windows_62f79d676e0e!DispatchToTracer+0x36 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +0041dcb4 0199e4f9 0041de08 00000006 0041e638 js_dbg_32_dm_windows_62f79d676e0e!js::TraceRootRange+0x59 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 533] +0041dce0 014edb80 0041de08 0041dcfc 08c12508 js_dbg_32_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x219 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 73] +0041dd14 014edcff 0041de08 0041dd28 08c128a8 js_dbg_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x80 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +0041dd30 015b33af 08c12108 0041de08 08c12108 js_dbg_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x3f [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1456] +0041dda4 015a3ef2 0041de08 00000000 0041ddc4 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x8f [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +0041de6c 015a2d65 08c12108 00000007 0041deac js_dbg_32_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x362 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +0041df34 0110dd3d 08c12108 00000007 08c12000 js_dbg_32_dm_windows_62f79d676e0e!js::Nursery::collect+0x1a5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 587] +0041dfa0 011194bc 00000007 00000030 08c12508 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xed [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6519] +0041dfd8 0133679b 08c12000 00000000 0041e148 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::runDebugGC+0x2c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6766] +0041dff0 0132bc90 08c12000 00000010 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x3b [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +0041e004 01328849 08c12000 00000003 01b826ec js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x10 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] +0041e024 010541b3 08c12000 08c12000 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::Allocate+0x169 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +0041e04c 014207ee 08c12000 00000003 00000000 js_dbg_32_dm_windows_62f79d676e0e!JSObject::create+0x4b3 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +0041e08c 01420e13 08c12000 0041e0bc 00000003 js_dbg_32_dm_windows_62f79d676e0e!NewObject+0x18e [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] +0041e0d8 01478b98 00c12000 01b826ec 0041e130 js_dbg_32_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x133 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] +0041e1a0 0106888d 08c12000 01d09098 0041e1e8 js_dbg_32_dm_windows_62f79d676e0e!js::ProxyObject::New+0x368 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +0041e1bc 0104eb29 08c12000 01d09098 0041e1e8 js_dbg_32_dm_windows_62f79d676e0e!js::NewProxyObject+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 774] +0041e1f0 0104f507 08c12000 0a200360 01d09098 js_dbg_32_dm_windows_62f79d676e0e!js::Wrapper::New+0x69 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +0041e230 00fb9e99 08c12000 0041e2b0 0041e398 js_dbg_32_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xb7 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +0041e31c 00f13fa5 08c12000 0041e398 01b4da20 js_dbg_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x7b9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +0041e3b8 0106be4a 08c12000 0041e610 0041e460 js_dbg_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x245 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +0041e3e4 0106c0c2 08c3b000 0041e478 0041e620 js_dbg_32_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0xfa [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +0041e444 01071ca2 08c12000 0041e478 0041e460 js_dbg_32_dm_windows_62f79d676e0e!js::Proxy::call+0xb2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] +0041e47c 0149b2b6 08c12000 00000001 0041e610 js_dbg_32_dm_windows_62f79d676e0e!js::proxy_Call+0xd2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +0041e4a4 014a673c 08c3b000 00eb67a0 0041e58c js_dbg_32_dm_windows_62f79d676e0e!js::CallJSNative+0x86 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +0041e508 014a6429 08c12000 00000002 00000000 js_dbg_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x2bc [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] +0041e52c 0196cce4 08c12000 0041e610 0a575278 js_dbg_32_dm_windows_62f79d676e0e!InternalCall+0x119 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +0041e5c4 002f167c 0041e578 0041e668 0a55d189 js_dbg_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x364 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +WARNING: Frame IP not in any known module. Following frames may be wrong. +0041e6d0 01644acf 0eb114b0 00000004 0a55c4e0 0x2f167c +0041e5e8 ffffff82 01d16128 0a34e4e8 002f79f3 js_dbg_32_dm_windows_62f79d676e0e!EnterIon+0x2cf [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\ion.cpp @ 2837] +00000000 00000000 00000000 00000000 00000000 0xffffff82 + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FAULTING_SOURCE_CODE: + 1238: + 1239: inline Arena* + 1240: TenuredCell::arena() const + 1241: { +> 1242: MOZ_ASSERT(isTenured()); + 1243: uintptr_t addr = address(); + 1244: addr &= ~ArenaMask; + 1245: return reinterpret_cast(addr); + 1246: } + 1247: + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_dbg_32_dm_windows!js::gc::TenuredCell::arena+13 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_dbg_32_dm_windows_62f79d676e0e + +IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_c0000005_js-dbg-32-dm-windows-62f79d676e0e.exe!js::gc::TenuredCell::arena + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 0041d4a0 766319fc ntdll!NtWaitForMultipleObjects+0x15 +01 0041d4e8 766341d8 kernel32!WaitForMultipleObjectsEx+0x8e +02 0041d504 766580bc kernel32!WaitForMultipleObjects+0x18 +03 0041d570 76657f7b kernel32!GetApplicationRecoveryCallback+0x2a7 +04 0041d584 76657870 kernel32!GetApplicationRecoveryCallback+0x166 +05 0041d594 766577ef kernel32!UnhandledExceptionFilter+0x161 +06 0041d620 77ee5b67 kernel32!UnhandledExceptionFilter+0xe0 +07 0041f9c0 77ea98d5 ntdll!RtlKnownExceptionFilter+0xb7 +08 0041f9d8 00000000 ntdll!RtlInitializeExceptionChain+0x36 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +0041d4a0 766319fc 0041d454 0041d4c8 00000000 ntdll!NtWaitForMultipleObjects+0x15 +0041d4e8 766341d8 00000002 fffde000 00000000 kernel32!WaitForMultipleObjectsEx+0x8e +0041d504 766580bc 00000002 0041d538 00000000 kernel32!WaitForMultipleObjects+0x18 +0041d570 76657f7b 0041d650 00000001 00000001 kernel32!GetApplicationRecoveryCallback+0x2a7 +0041d584 76657870 0041d650 00000001 0041d620 kernel32!GetApplicationRecoveryCallback+0x166 +0041d594 766577ef 0041d650 00000001 259f5595 kernel32!UnhandledExceptionFilter+0x161 +0041d620 77ee5b67 00000000 77ee5a44 00000000 kernel32!UnhandledExceptionFilter+0xe0 +0041f9c0 77ea98d5 00e81f73 fffde000 00000000 ntdll!RtlKnownExceptionFilter+0xb7 +0041f9d8 00000000 00e81f73 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x36 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-3b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-3b-crashlog.txt new file mode 100644 index 000000000..815f392e0 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-3b-crashlog.txt @@ -0,0 +1,357 @@ + +Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-dbg-32-dm-windows-62f79d676e0e.exe.5072.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: srv* +Executable search path is: +Windows 10 Version 14393 MP (8 procs) Free x86 compatible +Product: WinNt, suite: SingleUserTS +Built by: 10.0.14393.0 (rs1_release.160715-1616) +Machine Name: +Debug session time: Tue Sep 20 17:58:57.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: not available +.................... +This dump file has an exception of interest stored in it. +The stored exception information can be accessed via .ecxr. +(13d0.1e6c): Access violation - code c0000005 (first/second chance not available) +eax=00000000 ebx=00000000 ecx=2b2b2b2b edx=04200310 esi=00000003 edi=00000003 +eip=770fe1bc esp=02b2cfb0 ebp=02b2d140 iopl=0 nv up ei pl nz ac po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212 +ntdll!NtWaitForMultipleObjects+0xc: +770fe1bc c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw + *** !wow64exts is only useful targeting architectures that support WoW *** +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +*** WARNING: Unable to verify checksum for js-dbg-32-dm-windows-62f79d676e0e.exe +eax=2b2ffff0 ebx=02b2deb8 ecx=2b2b2b2b edx=04200310 esi=02b2dd18 edi=04200310 +eip=00ed6a63 esp=02b2dcb4 ebp=02b2dcdc iopl=0 nv up ei pl nz na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206 +js_dbg_32_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x12 [inlined in js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13]: +00ed6a63 8b00 mov eax,dword ptr [eax] ds:002b:2b2ffff0=???????? +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_dbg_32_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x12 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] [inlined in js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242]]: +00ed6a63 8b00 mov eax,dword ptr [eax] +00ed6a65 83f801 cmp eax,1 +00ed6a68 7457 je js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x71 (00ed6ac1) +00ed6a6a 83f802 cmp eax,2 +00ed6a6d 744f je js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x6e (00ed6abe) +00ed6a6f 8b356875cb01 mov esi,dword ptr [js_dbg_32_dm_windows_62f79d676e0e!_imp____acrt_iob_func (01cb7568)] +00ed6a75 6853010000 push 153h +00ed6a7a 6820ecae01 push offset js_dbg_32_dm_windows_62f79d676e0e!`string' (01aeec20) +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00ed6a63 8b 00 83 f8 .... +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + + +DUMP_CLASS: 2 + +DUMP_QUALIFIER: 400 + +CONTEXT: (.ecxr) +eax=2b2ffff0 ebx=02b2deb8 ecx=2b2b2b2b edx=04200310 esi=02b2dd18 edi=04200310 +eip=00ed6a63 esp=02b2dcb4 ebp=02b2dcdc iopl=0 nv up ei pl nz na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206 +js_dbg_32_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x12 [inlined in js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13]: +00ed6a63 8b00 mov eax,dword ptr [eax] ds:002b:2b2ffff0=???????? +Resetting default scope + +FAULTING_IP: +js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] +00ed6a63 8b00 mov eax,dword ptr [eax] + +EXCEPTION_RECORD: (.exr -1) +ExceptionAddress: 00ed6a63 (js_dbg_32_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x00000012) + ExceptionCode: c0000005 (Access violation) + ExceptionFlags: 00000000 +NumberParameters: 2 + Parameter[0]: 00000000 + Parameter[1]: 2b2ffff0 +Attempt to read from address 2b2ffff0 + +DEFAULT_BUCKET_ID: INVALID_POINTER_READ + +PROCESS_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. + +EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. + +EXCEPTION_CODE_STR: c0000005 + +EXCEPTION_PARAMETER1: 00000000 + +EXCEPTION_PARAMETER2: 2b2ffff0 + +READ_ADDRESS: 2b2ffff0 + +FOLLOWUP_IP: +js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] +00ed6a63 8b00 mov eax,dword ptr [eax] + +BUGCHECK_STR: INVALID_POINTER_READ + +WATSON_BKT_PROCSTAMP: 57e1a04d + +WATSON_BKT_PROCVER: 0.0.0.0 + +WATSON_BKT_MODULE: js-dbg-32-dm-windows-62f79d676e0e.exe + +WATSON_BKT_MODSTAMP: 57e1a04d + +WATSON_BKT_MODOFFSET: b6a63 + +WATSON_BKT_MODVER: 0.0.0.0 + +BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) + +MODLIST_WITH_TSCHKSUM_HASH: de4429b5af575b8039a5f7787b9caed65d2bf3f4 + +MODLIST_SHA1_HASH: 321ac338a21bc4e5bbc909e35e09f64c6505c35a + +NTGLOBALFLAG: 0 + +APPLICATION_VERIFIER_FLAGS: 0 + +DUMP_FLAGS: 94 + +DUMP_TYPE: 1 + +APP: js-dbg-32-dm-windows-62f79d676e0e.exe + +ANALYSIS_SESSION_HOST: F1BRIX + +ANALYSIS_SESSION_TIME: 09-20-2016 17:58:58.0271 + +ANALYSIS_VERSION: 10.0.10586.567 amd64fre + +THREAD_ATTRIBUTES: +OS_LOCALE: ENU + +PROBLEM_CLASSES: + + + +INVALID_POINTER_READ + Tid [0x1e6c] + Frame [0x00]: js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena + + +LAST_CONTROL_TRANSFER: from 0154bad0 to 00ed6a63 + +STACK_TEXT: +02b2dcb4 0154bad0 02b2deb8 02b2dd18 02b2e700 js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13 +02b2dcdc 0153ab06 04200310 02b2e700 02b2deb8 js_dbg_32_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x90 +02b2dcf0 0151f054 02b2dd18 02b2e700 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0xa6 +02b2dd0c 0151d196 02b2deb8 04200310 02b2dd38 js_dbg_32_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * const>+0x44 +02b2dd30 01533309 02b2deb8 02b2e700 01bf0568 js_dbg_32_dm_windows_62f79d676e0e!DispatchToTracer+0x36 +02b2dd64 0193e4f9 02b2deb8 00000006 02b2e6e8 js_dbg_32_dm_windows_62f79d676e0e!js::TraceRootRange+0x59 +02b2dd90 0148db80 02b2deb8 02b2ddac 03212508 js_dbg_32_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x219 +02b2ddc4 0148dcff 02b2deb8 02b2ddd8 032128a8 js_dbg_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x80 +02b2dde0 015533af 03212108 02b2deb8 03212108 js_dbg_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x3f +02b2de54 01543ef2 02b2deb8 00000000 02b2de74 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x8f +02b2df1c 01542d65 03212108 00000007 02b2df5c js_dbg_32_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x362 +02b2dfe4 010add3d 03212108 00000007 03212000 js_dbg_32_dm_windows_62f79d676e0e!js::Nursery::collect+0x1a5 +02b2e050 010b94bc 00000007 00000030 03212508 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xed +02b2e088 012d679b 03212000 00000000 02b2e1f8 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::runDebugGC+0x2c +02b2e0a0 012cbc90 03212000 00000010 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x3b +02b2e0b4 012c8849 03212000 00000003 01b223a4 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x10 +02b2e0d4 00ff41b3 03212000 03212000 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::Allocate+0x169 +02b2e0fc 013c07ee 03212000 00000003 00000000 js_dbg_32_dm_windows_62f79d676e0e!JSObject::create+0x4b3 +02b2e13c 013c0e13 03212000 02b2e16c 00000003 js_dbg_32_dm_windows_62f79d676e0e!NewObject+0x18e +02b2e188 01418b98 00212000 01b223a4 02b2e1e0 js_dbg_32_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x133 +02b2e250 0100888d 03212000 01ca8098 02b2e298 js_dbg_32_dm_windows_62f79d676e0e!js::ProxyObject::New+0x368 +02b2e26c 00feeb29 03212000 01ca8098 02b2e298 js_dbg_32_dm_windows_62f79d676e0e!js::NewProxyObject+0x7d +02b2e2a0 00fef507 03212000 04200360 01ca8098 js_dbg_32_dm_windows_62f79d676e0e!js::Wrapper::New+0x69 +02b2e2e0 00f59e99 03212000 02b2e360 02b2e448 js_dbg_32_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xb7 +02b2e3cc 00eb3fa5 03212000 02b2e448 01aeda18 js_dbg_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x7b9 +02b2e468 0100be4a 03212000 02b2e6c0 02b2e510 js_dbg_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x245 +02b2e494 0100c0c2 0323b000 02b2e528 02b2e6d0 js_dbg_32_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0xfa +02b2e4f4 01011ca2 03212000 02b2e528 02b2e510 js_dbg_32_dm_windows_62f79d676e0e!js::Proxy::call+0xb2 +02b2e52c 0143b2b6 03212000 00000001 02b2e6c0 js_dbg_32_dm_windows_62f79d676e0e!js::proxy_Call+0xd2 +02b2e554 0144673c 0323b000 00e567af 02b2e63c js_dbg_32_dm_windows_62f79d676e0e!js::CallJSNative+0x86 +02b2e5b8 01446429 03212000 00000002 00000000 js_dbg_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x2bc +02b2e5dc 0190cce4 03212000 02b2e6c0 0327c278 js_dbg_32_dm_windows_62f79d676e0e!InternalCall+0x119 +02b2e674 0dcd167c 02b2e628 02b2e718 0449cb69 js_dbg_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x364 +WARNING: Frame IP not in any known module. Following frames may be wrong. +02b2e780 015e4acf 1f0714b0 00000004 0455c4e0 0xdcd167c +02b2e698 ffffff82 01cb5128 0434e4e8 0dcd79f3 js_dbg_32_dm_windows_62f79d676e0e!EnterIon+0x2cf +00000000 00000000 00000000 00000000 00000000 0xffffff82 + + +THREAD_SHA1_HASH_MOD_FUNC: c0b5e0af2635ad4df87021f287e799c8cf04fe23 + +THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 9ff6c334b59646bf8e061669824a7cc9d5ab53c3 + +THREAD_SHA1_HASH_MOD: f8cdc7b4b7359e881a3edb72b3670b512279713d + +FAULT_INSTR_CODE: f883008b + +FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h + +FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h + +FAULTING_SOURCE_LINE_NUMBER: 1242 + +FAULTING_SOURCE_CODE: + 334: return false; + 335: uintptr_t addr = uintptr_t(cell); + 336: addr &= ~js::gc::ChunkMask; + 337: addr |= js::gc::ChunkLocationOffset; +> 338: auto location = *reinterpret_cast(addr); + 339: MOZ_ASSERT(location == ChunkLocation::Nursery || location == ChunkLocation::TenuredHeap); + 340: return location == ChunkLocation::Nursery; + 341: } + 342: + 343: } /* namespace gc */ + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_dbg_32_dm_windows_62f79d676e0e + +IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e1a04d + +STACK_COMMAND: .ecxr ; kb + +BUCKET_ID: INVALID_POINTER_READ_js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 + +PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 + +BUCKET_ID_OFFSET: 13 + +BUCKET_ID_MODULE_STR: js_dbg_32_dm_windows_62f79d676e0e + +BUCKET_ID_MODTIMEDATESTAMP: 57e1a04d + +BUCKET_ID_MODCHECKSUM: 0 + +BUCKET_ID_MODVER_STR: 0.0.0.0 + +BUCKET_ID_PREFIX_STR: INVALID_POINTER_READ_ + +FAILURE_PROBLEM_CLASS: INVALID_POINTER_READ + +FAILURE_EXCEPTION_CODE: c0000005 + +FAILURE_IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe + +FAILURE_FUNCTION_NAME: js::gc::TenuredCell::arena + +BUCKET_ID_FUNCTION_STR: js::gc::TenuredCell::arena + +FAILURE_SYMBOL_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe!js::gc::TenuredCell::arena + +FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_js-dbg-32-dm-windows-62f79d676e0e.exe!js::gc::TenuredCell::arena + +WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-dbg-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a04d/js-dbg-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a04d/c0000005/000b6a63.htm?Retriage=1 + +TARGET_TIME: 2016-09-21T00:58:57.000Z + +OSBUILD: 14393 + +OSSERVICEPACK: 0 + +SERVICEPACK_NUMBER: 0 + +OS_REVISION: 0 + +SUITE_MASK: 256 + +PRODUCT_TYPE: 1 + +OSPLATFORM_TYPE: x86 + +OSNAME: Windows 10 + +OSEDITION: Windows 10 WinNt SingleUserTS + +USER_LCID: 0 + +OSBUILD_TIMESTAMP: 2016-07-15 18:33:42 + +BUILDDATESTAMP_STR: 160715-1616 + +BUILDLAB_STR: rs1_release + +BUILDOSVER_STR: 10.0.14393.0 + +ANALYSIS_SESSION_ELAPSED_TIME: 1198 + +ANALYSIS_SOURCE: UM + +FAILURE_ID_HASH_STRING: um:invalid_pointer_read_c0000005_js-dbg-32-dm-windows-62f79d676e0e.exe!js::gc::tenuredcell::arena + +FAILURE_ID_HASH: {6aa09f1b-6e89-a735-594e-e2e3e2f9c267} + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # ChildEBP RetAddr +00 02b2cfac 76761a30 ntdll!NtWaitForMultipleObjects+0xc +01 02b2d140 76761928 KERNELBASE!WaitForMultipleObjectsEx+0xf0 +02 02b2d15c 76de7062 KERNELBASE!WaitForMultipleObjects+0x18 +03 02b2d5d8 76de6aa6 kernel32!WerpReportFaultInternal+0x59d +04 02b2d5f4 76dbe7a9 kernel32!WerpReportFault+0x9b +05 02b2d5fc 767ed90a kernel32!BasepReportFault+0x19 +06 02b2d694 7712dc00 KERNELBASE!UnhandledExceptionFilter+0x25a +07 02b2fa80 770f05d4 ntdll!__RtlUserThreadStart+0x3d626 +08 02b2fa90 00000000 ntdll!_RtlUserThreadStart+0x1b +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +02b2cfac 76761a30 00000003 02b2d59c 00000001 ntdll!NtWaitForMultipleObjects+0xc +02b2d140 76761928 00000003 02b2d59c 00000000 KERNELBASE!WaitForMultipleObjectsEx+0xf0 +02b2d15c 76de7062 00000003 02b2d59c 00000000 KERNELBASE!WaitForMultipleObjects+0x18 +02b2d5d8 76de6aa6 00000000 00000000 00000001 kernel32!WerpReportFaultInternal+0x59d +02b2d5f4 76dbe7a9 02b2d694 767ed90a 02b2d6c4 kernel32!WerpReportFault+0x9b +02b2d5fc 767ed90a 02b2d6c4 00000001 9aee06ee kernel32!BasepReportFault+0x19 +02b2d694 7712dc00 02b2d6c4 771020b0 02b2fa80 KERNELBASE!UnhandledExceptionFilter+0x25a +02b2fa80 770f05d4 ffffffff 77112531 00000000 ntdll!__RtlUserThreadStart+0x3d626 +02b2fa90 00000000 00e21f5a 00db3000 00000000 ntdll!_RtlUserThreadStart+0x1b +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-4a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-4a-crashlog.txt new file mode 100644 index 000000000..c36ad7293 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-4a-crashlog.txt @@ -0,0 +1,318 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-32-dm-windows-62f79d676e0e.exe.2372.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible +Product: WinNt, suite: SingleUserTS +Machine Name: +Debug session time: Fri Sep 23 16:39:26.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: 0 days 0:00:01.000 +.......................................... +This dump file has an exception of interest stored in it. +The stored exception information can be accessed via .ecxr. +(944.bf0): Access violation - code c0000005 (first/second chance not available) +eax=00000000 ebx=002ad2dc ecx=2b2b2b2b edx=002ae2f0 esi=00000002 edi=00000000 +eip=77e9016d esp=002ad28c ebp=002ad328 iopl=0 nv up ei pl zr na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246 +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +ntdll!NtWaitForMultipleObjects+0x15: +77e9016d 83c404 add esp,4 +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=09bfff01 ebx=002adc18 ecx=2b2b2b2b edx=002ae2f0 esi=09b00310 edi=09b00310 +eip=00d44c59 esp=002ada8c ebp=002adc18 iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 +*** WARNING: Unable to verify checksum for js-32-dm-windows-62f79d676e0e.exe +js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9: +00d44c59 8b39 mov edi,dword ptr [ecx] ds:002b:2b2b2b2b=???????? +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll!NtWaitForMultipleObjects+0x15: +77e9016d 83c404 add esp,4 +77e90170 c21400 ret 14h +77e90173 90 nop +ntdll!NtSetInformationObject: +77e90174 b859000000 mov eax,59h +77e90179 33c9 xor ecx,ecx +77e9017b 8d542404 lea edx,[esp+4] +77e9017f 64ff15c0000000 call dword ptr fs:[0C0h] +77e90186 83c404 add esp,4 +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00d44c59 8b 39 81 ff .9.. +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** WARNING: Unable to verify checksum for mozglue.dll +***** OS symbols are WRONG. Please fix symbols to do analysis. + +***** OS (WOW64 kernel32) symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: nt!IMAGE_NT_HEADERS32 *** +*** *** +************************************************************************* +CvRegToMachine(x86) conversion failure for 0x7536 +CvRegToMachine(x86) conversion failure for 0x7536 +CvRegToMachine(x86) conversion failure for 0x7536 +CvRegToMachine(x86) conversion failure for 0x7536 +Value unavailable error for descr +Value unavailable error for kind +Value unavailable error for kind +Value unavailable error for nbytes +Value unavailable error for nbytes +Value unavailable error for nelements +Value unavailable error for descr +Value unavailable error for kind +Value unavailable error for kind +Value unavailable error for nbytes +Value unavailable error for nbytes +Value unavailable error for nelements +Value unavailable error for descr +Value unavailable error for kind +Value unavailable error for kind +Value unavailable error for nbytes +Value unavailable error for nbytes +Value unavailable error for nelements +*** WARNING: Unable to verify timestamp for ucrtbase.dll +*** ERROR: Module load completed but symbols could not be loaded for ucrtbase.dll + +FAULTING_IP: +js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00d44c59 8b39 mov edi,dword ptr [ecx] + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 00d44c59 (js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x00000009) + ExceptionCode: c0000005 (Access violation) + ExceptionFlags: 00000000 +NumberParameters: 2 + Parameter[0]: 00000000 + Parameter[1]: 2b2b2b2b +Attempt to read from address 2b2b2b2b + +PROCESS_NAME: js-32-dm-windows-62f79d676e0e.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 76620000 kernel32 + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e30071 + +ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. + +EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. + +EXCEPTION_PARAMETER1: 00000000 + +EXCEPTION_PARAMETER2: 2b2b2b2b + +READ_ADDRESS: 2b2b2b2b + +FOLLOWUP_IP: +js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00d44c59 8b39 mov edi,dword ptr [ecx] + +MOD_LIST: + +FAULTING_THREAD: 00000bf0 + +BUGCHECK_STR: APPLICATION_FAULT_STRING_DEREFERENCE_INVALID_POINTER_READ_WRONG_SYMBOLS_FILL_PATTERN_2b2b2b2b + +PRIMARY_PROBLEM_CLASS: STRING_DEREFERENCE_FILL_PATTERN_2b2b2b2b + +DEFAULT_BUCKET_ID: STRING_DEREFERENCE_FILL_PATTERN_2b2b2b2b + +LAST_CONTROL_TRANSFER: from 00df2387 to 00d44c59 + +STACK_TEXT: +002ada98 00df2387 082104e8 002ae2f0 002ae2f0 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +002adabc 00de7d13 09b00310 00de94fa 002adad8 js_32_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x17 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] +002adac4 00de94fa 002adad8 09b00310 002adc18 js_32_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x33 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] +002adadc 00de8710 002adc18 002ae2f0 002adb00 js_32_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * const>+0x3a [c:\users\mozillaadmin\shell-cache\js-32-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +002adaf8 00dec158 002adc18 002ae2f0 010fae40 js_32_dm_windows_62f79d676e0e!DispatchToTracer+0x30 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +002adb20 00f4fae1 002adc18 00000006 002ae2d8 js_32_dm_windows_62f79d676e0e!js::TraceRootRange+0x48 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 520] +002adb44 00d964b4 08266269 00000003 082104e8 js_32_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x211 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 83] +002adb74 00d965e2 002adc18 002adb88 082107a0 js_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xa4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +002adb8c 00df5439 08210108 002adc18 08210108 js_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1456] +002adbec 00defb70 002adc18 00000000 002adc4c js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x39 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +002adca0 00def45c 08210108 00000007 002adcec js_32_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x320 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +002add70 00b935c9 08210108 00000007 082104c0 js_32_dm_windows_62f79d676e0e!js::Nursery::collect+0x10c [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 587] +002addcc 00b97549 00000007 00000030 08210000 js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x89 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6521] +002ade00 00ce14c6 08210000 082104c0 00cde17d js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::runDebugGC+0x29 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6766] +002ade0c 00cde17d 08210000 08210000 0109f690 js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x36 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +002ade24 00b8de4d 082104c0 00000003 00000003 js_32_dm_windows_62f79d676e0e!js::Allocate+0x8d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +002ade58 00d3f92c 08210000 00000003 00000000 js_32_dm_windows_62f79d676e0e!JSObject::create+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +002ade94 00d3fe56 08210000 002aded8 00000003 js_32_dm_windows_62f79d676e0e!NewObject+0x11c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] +002aded8 00d66156 08210000 0109f690 002adf48 js_32_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x166 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] +002adf80 00bb5c95 08210000 01185648 002adfbc js_32_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1a6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +002adf98 00c5a923 08210000 01185648 002adfbc js_32_dm_windows_62f79d676e0e!js::NewProxyObject+0x25 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 774] +002adfc0 00c5acac 08210000 09b00360 01185648 js_32_dm_windows_62f79d676e0e!js::Wrapper::New+0x63 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +002adff8 00c8c792 08210000 002ae054 002ae0b8 js_32_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x3c [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +002ae090 00b727f4 08210000 002ae0b8 0109561c js_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x392 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +002ae0e4 00bb70ba 08210000 002ae2b0 08210000 js_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x1c4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +002ae110 00bb7244 08210000 002ae154 002ae158 js_32_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x12a [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +002ae138 00bba0b6 08210000 002ae154 002ae158 js_32_dm_windows_62f79d676e0e!js::Proxy::call+0xc4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] +002ae160 00d76bd6 08210000 00000001 002ae2b0 js_32_dm_windows_62f79d676e0e!js::proxy_Call+0x66 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +002ae1b0 00d76ad3 0821b000 00bba050 00000000 js_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0xf6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] +002ae1cc 00f318ad 08210000 002ae200 0827b278 js_32_dm_windows_62f79d676e0e!InternalCall+0x63 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +002ae360 70e264d5 09e00238 002ae498 2ed907a0 js_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x2cd [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +002ae450 00e451f1 08210000 002ae468 002ae628 mozglue!je_free+0x15 [c:\users\mozillaadmin\trees\mozilla-central\memory\mozjemalloc\jemalloc.c @ 6485] +002ae4f4 00d84a6f 08210000 002ae5bc 002ae5cc js_32_dm_windows_62f79d676e0e!js::jit::IonCannon+0x121 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\ion.cpp @ 2935] +002ae58c 00d76d2d 08210000 002ae5bc 0827a418 js_32_dm_windows_62f79d676e0e!js::RunScript+0x12f [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] +002ae5d8 00d76ad3 08210000 002ae628 00000000 js_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x24d [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] +002ae5f4 00f318ad 08210000 002ae628 0827a418 js_32_dm_windows_62f79d676e0e!InternalCall+0x63 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +002ae758 00f56dde 2ed97259 00000001 002ae85c js_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x2cd [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +002ae834 00f57228 08210000 002ae864 09eb7d76 js_32_dm_windows_62f79d676e0e!EnterBaseline+0x13e [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] +002ae914 00d7f5d9 08210000 09ee7018 09eb7d76 js_32_dm_windows_62f79d676e0e!js::jit::EnterBaselineAtBranch+0x388 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 261] +002af370 00d84ba1 08210000 002af418 002af428 js_32_dm_windows_62f79d676e0e!Interpret+0x85d9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 1916] +002af408 00d739fc 08210000 002af418 010e3004 js_32_dm_windows_62f79d676e0e!js::RunScript+0x261 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 404] +002af454 00d738a5 08210000 002af4fc 09c56020 js_32_dm_windows_62f79d676e0e!js::ExecuteKernel+0xac [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 688] +002af490 00c771ca 08210000 002af4fc 09c56020 js_32_dm_windows_62f79d676e0e!js::Execute+0xf5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 717] +002af4b0 00c7bfc1 08210000 002af4d4 002af4fc js_32_dm_windows_62f79d676e0e!ExecuteScript+0x2a [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsapi.cpp @ 4314] +002af4d4 00b6c895 08210000 002af4fc 00aa2ff1 js_32_dm_windows_62f79d676e0e!JS_ExecuteScript+0x51 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsapi.cpp @ 4347] +002af560 00b6b836 08210000 00aa2ff1 0838efc8 js_32_dm_windows_62f79d676e0e!RunFile+0x115 [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 641] +002af584 00b6bc4a 08210000 00aa2ff1 00000000 js_32_dm_windows_62f79d676e0e!Process+0xc6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 1039] +002af634 00b6e1f6 08210000 002af714 08210000 js_32_dm_windows_62f79d676e0e!ProcessArgs+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 6930] +002af6b4 00b73536 08210000 002af714 009f0e60 js_32_dm_windows_62f79d676e0e!Shell+0x1a6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 7288] +002af7b4 01091e0e 00000004 00aa2f50 009f0e60 js_32_dm_windows_62f79d676e0e!main+0xc16 [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 7670] +002af7fc 7663336a fffde000 002af848 77ea9902 js_32_dm_windows_62f79d676e0e!__scrt_common_main_seh+0xf9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253] +WARNING: Stack unwind information not available. Following frames may be wrong. +002af808 77ea9902 fffde000 77b082e2 00000000 kernel32!BaseThreadInitThunk+0x12 +002af848 77ea98d5 01091e84 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x63 +002af860 00000000 01091e84 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x36 + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FAULTING_SOURCE_CODE: + 3671: + 3672: js::gc::AllocKind + 3673: JSObject::allocKindForTenure(const js::Nursery& nursery) const + 3674: { +> 3675: if (is()) { + 3676: const ArrayObject& aobj = as(); + 3677: MOZ_ASSERT(aobj.numFixedSlots() == 0); + 3678: + 3679: /* Use minimal size object if we are just going to copy the pointer. */ + 3680: if (!nursery.isInside(aobj.getElementsHeader())) + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_32_dm_windows!JSObject::allocKindForTenure+9 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_32_dm_windows_62f79d676e0e + +IMAGE_NAME: js-32-dm-windows-62f79d676e0e.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: STRING_DEREFERENCE_FILL_PATTERN_2b2b2b2b_c0000005_js-32-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 002ad328 766319fc ntdll!NtWaitForMultipleObjects+0x15 +01 002ad370 766341d8 kernel32!WaitForMultipleObjectsEx+0x8e +02 002ad38c 766580bc kernel32!WaitForMultipleObjects+0x18 +03 002ad3f8 76657f7b kernel32!GetApplicationRecoveryCallback+0x2a7 +04 002ad40c 76657870 kernel32!GetApplicationRecoveryCallback+0x166 +05 002ad41c 766577ef kernel32!UnhandledExceptionFilter+0x161 +06 002ad4a8 77ee5b67 kernel32!UnhandledExceptionFilter+0xe0 +07 002af848 77ea98d5 ntdll!RtlKnownExceptionFilter+0xb7 +08 002af860 00000000 ntdll!RtlInitializeExceptionChain+0x36 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +002ad328 766319fc 002ad2dc 002ad350 00000000 ntdll!NtWaitForMultipleObjects+0x15 +002ad370 766341d8 00000002 fffde000 00000000 kernel32!WaitForMultipleObjectsEx+0x8e +002ad38c 766580bc 00000002 002ad3c0 00000000 kernel32!WaitForMultipleObjects+0x18 +002ad3f8 76657f7b 002ad4d8 00000001 00000001 kernel32!GetApplicationRecoveryCallback+0x2a7 +002ad40c 76657870 002ad4d8 00000001 002ad4a8 kernel32!GetApplicationRecoveryCallback+0x166 +002ad41c 766577ef 002ad4d8 00000001 83ae004e kernel32!UnhandledExceptionFilter+0x161 +002ad4a8 77ee5b67 00000000 77ee5a44 00000000 kernel32!UnhandledExceptionFilter+0xe0 +002af848 77ea98d5 01091e84 fffde000 00000000 ntdll!RtlKnownExceptionFilter+0xb7 +002af860 00000000 01091e84 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x36 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-4b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-4b-crashlog.txt new file mode 100644 index 000000000..0ed383596 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-4b-crashlog.txt @@ -0,0 +1,368 @@ + +Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-32-dm-windows-62f79d676e0e.exe.6972.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: srv* +Executable search path is: +Windows 10 Version 14393 MP (8 procs) Free x86 compatible +Product: WinNt, suite: SingleUserTS +Built by: 10.0.14393.0 (rs1_release.160715-1616) +Machine Name: +Debug session time: Tue Sep 20 17:59:27.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: not available +.................... +This dump file has an exception of interest stored in it. +The stored exception information can be accessed via .ecxr. +(1b3c.135c): Access violation - code c0000005 (first/second chance not available) +eax=00000000 ebx=00000000 ecx=2b2b2b2b edx=016fe490 esi=00000003 edi=00000003 +eip=770fe1bc esp=016fcf28 ebp=016fd0b8 iopl=0 nv up ei pl nz na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206 +ntdll!NtWaitForMultipleObjects+0xc: +770fe1bc c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw + *** !wow64exts is only useful targeting architectures that support WoW *** +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +*** WARNING: Unable to verify checksum for js-32-dm-windows-62f79d676e0e.exe +eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 +eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 +js_32_dm_windows_62f79d676e0e!JSObject::is+0x2 [inlined in js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9]: +00404c59 8b39 mov edi,dword ptr [ecx] ds:002b:2b2b2b2b=???????? +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_32_dm_windows_62f79d676e0e!JSObject::is+0x2 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] [inlined in js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675]]: +00404c59 8b39 mov edi,dword ptr [ecx] +00404c5b 81ff708e7a00 cmp edi,offset js_32_dm_windows_62f79d676e0e!js::ArrayObject::class_ (007a8e70) +00404c61 7567 jne js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x7a (00404cca) +00404c63 8b442414 mov eax,dword ptr [esp+14h] +00404c67 8b4808 mov ecx,dword ptr [eax+8] +00404c6a 8b400c mov eax,dword ptr [eax+0Ch] +00404c6d 8d3c81 lea edi,[ecx+eax*4] +00404c70 3bcf cmp ecx,edi +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00404c59 8b 39 81 ff .9.. +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** WARNING: Unable to verify checksum for mozglue.dll + +DUMP_CLASS: 2 + +DUMP_QUALIFIER: 400 + +CONTEXT: (.ecxr) +eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 +eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 +js_32_dm_windows_62f79d676e0e!JSObject::is+0x2 [inlined in js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9]: +00404c59 8b39 mov edi,dword ptr [ecx] ds:002b:2b2b2b2b=???????? +Resetting default scope + +FAULTING_IP: +js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00404c59 8b39 mov edi,dword ptr [ecx] + +EXCEPTION_RECORD: (.exr -1) +ExceptionAddress: 00404c59 (js_32_dm_windows_62f79d676e0e!JSObject::is+0x00000002) + ExceptionCode: c0000005 (Access violation) + ExceptionFlags: 00000000 +NumberParameters: 2 + Parameter[0]: 00000000 + Parameter[1]: 2b2b2b2b +Attempt to read from address 2b2b2b2b + +PROCESS_NAME: js-32-dm-windows-62f79d676e0e.exe + +ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. + +EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. + +EXCEPTION_CODE_STR: c0000005 + +EXCEPTION_PARAMETER1: 00000000 + +EXCEPTION_PARAMETER2: 2b2b2b2b + +READ_ADDRESS: 2b2b2b2b + +FOLLOWUP_IP: +js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00404c59 8b39 mov edi,dword ptr [ecx] + +WATSON_BKT_PROCSTAMP: 57e1a1c7 + +WATSON_BKT_PROCVER: 0.0.0.0 + +WATSON_BKT_MODULE: js-32-dm-windows-62f79d676e0e.exe + +WATSON_BKT_MODSTAMP: 57e1a1c7 + +WATSON_BKT_MODOFFSET: 1f4c59 + +WATSON_BKT_MODVER: 0.0.0.0 + +BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) + +MODLIST_WITH_TSCHKSUM_HASH: 73a35fd2f0627611ab79875a8836e6e4d52e327f + +MODLIST_SHA1_HASH: 558287c6466b4e03fd3bbf5c37f2840a8cd2b134 + +NTGLOBALFLAG: 0 + +APPLICATION_VERIFIER_FLAGS: 0 + +DUMP_FLAGS: 94 + +DUMP_TYPE: 1 + +APP: js-32-dm-windows-62f79d676e0e.exe + +ANALYSIS_SESSION_HOST: F1BRIX + +ANALYSIS_SESSION_TIME: 09-20-2016 17:59:28.0621 + +ANALYSIS_VERSION: 10.0.10586.567 amd64fre + +THREAD_ATTRIBUTES: +OS_LOCALE: ENU + +PROBLEM_CLASSES: + + + +INVALID_POINTER_READ + Tid [0x135c] + Frame [0x00]: js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure + + + +FILL_PATTERN + Tid [0x135c] + Frame [0x00]: js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure + String [2b2b2b2b] + Failure Bucketing + Data Bucketing + + +BUGCHECK_STR: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +LAST_CONTROL_TRANSFER: from 004b2387 to 00404c59 + +STACK_TEXT: +016fdc38 004b2387 01e104e8 016fe490 016fe490 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9 +016fdc5c 004a7d13 02e00310 004a94fa 016fdc78 js_32_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x17 +016fdc64 004a94fa 016fdc78 02e00310 016fddb8 js_32_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x33 +016fdc7c 004a8710 016fddb8 016fe490 016fdca0 js_32_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * const>+0x3a +016fdc98 004ac158 016fddb8 016fe490 007bad80 js_32_dm_windows_62f79d676e0e!DispatchToTracer+0x30 +016fdcc0 0060fae1 016fddb8 00000006 016fe478 js_32_dm_windows_62f79d676e0e!js::TraceRootRange+0x48 +016fdce4 004564b4 01e66269 00000003 01e104e8 js_32_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x211 +016fdd14 004565e2 016fddb8 016fdd28 01e107a0 js_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xa4 +016fdd2c 004b5439 01e10108 016fddb8 01e10108 js_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x42 +016fdd8c 004afb70 016fddb8 00000000 016fddec js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x39 +016fde40 004af45c 01e10108 00000007 016fde8c js_32_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x320 +016fdf10 002535c9 01e10108 00000007 01e104c0 js_32_dm_windows_62f79d676e0e!js::Nursery::collect+0x10c +016fdf6c 00257549 00000007 00000030 01e10000 js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x89 +016fdfa0 003a14c6 01e10000 01e104c0 0039e17d js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::runDebugGC+0x29 +016fdfac 0039e17d 01e10000 01e10000 0075f658 js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x36 +016fdfc4 0024de4d 01e104c0 00000003 00000003 js_32_dm_windows_62f79d676e0e!js::Allocate+0x8d +016fdff8 003ff92c 01e10000 00000003 00000000 js_32_dm_windows_62f79d676e0e!JSObject::create+0x7d +016fe034 003ffe56 01e10000 016fe078 00000003 js_32_dm_windows_62f79d676e0e!NewObject+0x11c +016fe078 00426156 01e10000 0075f658 016fe0e8 js_32_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x166 +016fe120 00275c95 01e10000 00845648 016fe15c js_32_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1a6 +016fe138 0031a923 01e10000 00845648 016fe15c js_32_dm_windows_62f79d676e0e!js::NewProxyObject+0x25 +016fe160 0031acac 01e10000 02e00360 00845648 js_32_dm_windows_62f79d676e0e!js::Wrapper::New+0x63 +016fe198 0034c792 01e10000 016fe1f4 016fe258 js_32_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x3c +016fe230 002327f4 01e10000 016fe258 0075561c js_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x392 +016fe284 002770ba 01e10000 016fe450 01e10000 js_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x1c4 +016fe2b0 00277244 01e10000 016fe2f4 016fe2f8 js_32_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x12a +016fe2d8 0027a0b6 01e10000 016fe2f4 016fe2f8 js_32_dm_windows_62f79d676e0e!js::Proxy::call+0xc4 +016fe300 00436bd6 01e10000 00000001 016fe450 js_32_dm_windows_62f79d676e0e!js::proxy_Call+0x66 +016fe350 00436ad3 01e1b000 0027a050 00000000 js_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0xf6 +016fe36c 005f18ad 01e10000 016fe3a0 01e7b278 js_32_dm_windows_62f79d676e0e!InternalCall+0x63 +016fe500 667264d5 03100238 016fe638 05bc07a0 js_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x2cd +016fe5f0 005051f1 01e10000 016fe608 016fe7c8 mozglue!je_free+0x15 +016fe694 00444a6f 01e10000 016fe75c 016fe76c js_32_dm_windows_62f79d676e0e!js::jit::IonCannon+0x121 +016fe72c 00436d2d 01e10000 016fe75c 01e7a418 js_32_dm_windows_62f79d676e0e!js::RunScript+0x12f +016fe778 00436ad3 01e10000 016fe7c8 00000000 js_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x24d +016fe794 005f18ad 01e10000 016fe7c8 01e7a418 js_32_dm_windows_62f79d676e0e!InternalCall+0x63 +016fe900 00616dde 05bc7259 00000001 016fea04 js_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x2cd +00000000 00000000 00000000 00000000 00000000 js_32_dm_windows_62f79d676e0e!EnterBaseline+0x13e + + +THREAD_SHA1_HASH_MOD_FUNC: dadec48c6b3dc5c97ce17c572672a507b7d5f3ff + +THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 8debbd6bdb2e48af97b2e3ae2821e15d1265ac9a + +THREAD_SHA1_HASH_MOD: 5ce0af82a5736dbf77ca89eb64acd8f32b6d3b1a + +FAULT_INSTR_CODE: ff81398b + +FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp + +FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp + +FAULTING_SOURCE_LINE_NUMBER: 3675 + +FAULTING_SOURCE_CODE: + 559: * js::GetBuiltinClass). + 560: */ + 561: + 562: template +> 563: inline bool is() const { return getClass() == &T::class_; } + 564: + 565: template + 566: T& as() { + 567: MOZ_ASSERT(this->is()); + 568: return *static_cast(this); + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_32_dm_windows_62f79d676e0e + +IMAGE_NAME: js-32-dm-windows-62f79d676e0e.exe + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e1a1c7 + +STACK_COMMAND: .ecxr ; kb + +BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 + +PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 + +BUCKET_ID_OFFSET: 9 + +BUCKET_ID_MODULE_STR: js_32_dm_windows_62f79d676e0e + +BUCKET_ID_MODTIMEDATESTAMP: 57e1a1c7 + +BUCKET_ID_MODCHECKSUM: 0 + +BUCKET_ID_MODVER_STR: 0.0.0.0 + +BUCKET_ID_PREFIX_STR: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_ + +FAILURE_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +FAILURE_EXCEPTION_CODE: c0000005 + +FAILURE_IMAGE_NAME: js-32-dm-windows-62f79d676e0e.exe + +FAILURE_FUNCTION_NAME: JSObject::allocKindForTenure + +BUCKET_ID_FUNCTION_STR: JSObject::allocKindForTenure + +FAILURE_SYMBOL_NAME: js-32-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure + +FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_c0000005_js-32-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure + +WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a1c7/js-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a1c7/c0000005/001f4c59.htm?Retriage=1 + +TARGET_TIME: 2016-09-21T00:59:27.000Z + +OSBUILD: 14393 + +OSSERVICEPACK: 0 + +SERVICEPACK_NUMBER: 0 + +OS_REVISION: 0 + +SUITE_MASK: 256 + +PRODUCT_TYPE: 1 + +OSPLATFORM_TYPE: x86 + +OSNAME: Windows 10 + +OSEDITION: Windows 10 WinNt SingleUserTS + +USER_LCID: 0 + +OSBUILD_TIMESTAMP: 2016-07-15 18:33:42 + +BUILDDATESTAMP_STR: 160715-1616 + +BUILDLAB_STR: rs1_release + +BUILDOSVER_STR: 10.0.14393.0 + +ANALYSIS_SESSION_ELAPSED_TIME: f92 + +ANALYSIS_SOURCE: UM + +FAILURE_ID_HASH_STRING: um:invalid_pointer_read_fill_pattern_2b2b2b2b_c0000005_js-32-dm-windows-62f79d676e0e.exe!jsobject::allockindfortenure + +FAILURE_ID_HASH: {f1454121-9563-76f2-52d0-22e8be20d6fc} + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # ChildEBP RetAddr +00 016fcf24 76761a30 ntdll!NtWaitForMultipleObjects+0xc +01 016fd0b8 76761928 KERNELBASE!WaitForMultipleObjectsEx+0xf0 +02 016fd0d4 76de7062 KERNELBASE!WaitForMultipleObjects+0x18 +03 016fd550 76de6aa6 kernel32!WerpReportFaultInternal+0x59d +04 016fd56c 76dbe7a9 kernel32!WerpReportFault+0x9b +05 016fd574 767ed90a kernel32!BasepReportFault+0x19 +06 016fd60c 7712dc00 KERNELBASE!UnhandledExceptionFilter+0x25a +07 016ffa04 770f05d4 ntdll!__RtlUserThreadStart+0x3d626 +08 016ffa14 00000000 ntdll!_RtlUserThreadStart+0x1b +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +016fcf24 76761a30 00000003 016fd514 00000001 ntdll!NtWaitForMultipleObjects+0xc +016fd0b8 76761928 00000003 016fd514 00000000 KERNELBASE!WaitForMultipleObjectsEx+0xf0 +016fd0d4 76de7062 00000003 016fd514 00000000 KERNELBASE!WaitForMultipleObjects+0x18 +016fd550 76de6aa6 00000000 00000000 00000001 kernel32!WerpReportFaultInternal+0x59d +016fd56c 76dbe7a9 016fd60c 767ed90a 016fd63c kernel32!WerpReportFault+0x9b +016fd574 767ed90a 016fd63c 00000001 fdeab771 kernel32!BasepReportFault+0x19 +016fd60c 7712dc00 016fd63c 771020b0 016ffa04 KERNELBASE!UnhandledExceptionFilter+0x25a +016ffa04 770f05d4 ffffffff 77112535 00000000 ntdll!__RtlUserThreadStart+0x3d626 +016ffa14 00000000 00751e84 015a3000 00000000 ntdll!_RtlUserThreadStart+0x1b +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-5a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-5a-crashlog.txt new file mode 100644 index 000000000..ff0256260 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-5a-crashlog.txt @@ -0,0 +1,335 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-dbg-64-dm-windows-62f79d676e0e.exe.772.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x64 +Product: WinNt, suite: SingleUserTS +Machine Name: +Debug session time: Fri Sep 23 17:46:06.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: 0 days 0:00:02.000 +......................................... +This dump file has an exception of interest stored in it. +The stored exception information can be accessed via .ecxr. +(304.cb0): Access violation - code c0000005 (first/second chance not available) +*** WARNING: Unable to verify checksum for js-dbg-64-dm-windows-62f79d676e0e.exe +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: +00000001`3f4975db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +The current thread doesn't have an x86 context. +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +rax=0000000000000001 rbx=fffe2b2b2b2b2b2b rcx=fffe2b2b2b2fffe8 +rdx=0000000000000001 rsi=000000000040c078 rdi=0000000006a00420 +rip=000000013f4975db rsp=000000000040bc40 rbp=0000000000000006 + r8=0000000006633200 r9=000000014079b1a0 r10=0000000000000031 +r11=0000000000000033 r12=fffa7fffffffffff r13=fffc000000000000 +r14=000000000040c078 r15=000000014079b1a0 +iopl=0 nv up ei ng nz na po nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010284 +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: +00000001`3f4975db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338]: +00000001`3f4975db 8b11 mov edx,dword ptr [rcx] +00000001`3f4975dd 8d42ff lea eax,[rdx-1] +00000001`3f4975e0 83f801 cmp eax,1 +00000001`3f4975e3 7665 jbe js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x8a (00000001`3f49764a) +00000001`3f4975e5 b902000000 mov ecx,2 +00000001`3f4975ea ff1528e55d01 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp___acrt_iob_func (00000001`40a75b18)] +00000001`3f4975f0 4c8d0da9951e01 lea r9,[js_dbg_64_dm_windows_62f79d676e0e!`string' (00000001`40680ba0)] +00000001`3f4975f7 c744242053010000 mov dword ptr [rsp+20h],153h +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00000000`3f4975db ?? ?? ?? ?? ???? +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +00000001`3f4975db 8b 11 8d 42 ff 83 f8 01 ...B.... +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: nt!IMAGE_NT_HEADERS32 *** +*** *** +************************************************************************* +*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ucrtbase.dll - + +FAULTING_IP: +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +00000001`3f4975db 8b11 mov edx,dword ptr [rcx] + +EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 000000013f4975db (js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x000000000000001b) + ExceptionCode: c0000005 (Access violation) + ExceptionFlags: 00000000 +NumberParameters: 2 + Parameter[0]: 0000000000000000 + Parameter[1]: ffffffffffffffff +Attempt to read from address ffffffffffffffff + +PROCESS_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 0000000077c90000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e303d8 + +ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. + +EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. + +EXCEPTION_PARAMETER1: 0000000000000000 + +EXCEPTION_PARAMETER2: ffffffffffffffff + +READ_ADDRESS: ffffffffffffffff + +FOLLOWUP_IP: +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +00000001`3f4975db 8b11 mov edx,dword ptr [rcx] + +MOD_LIST: + +FAULTING_THREAD: 0000000000000cb0 + +BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_WRONG_SYMBOLS_FILL_PATTERN_2b2b2b2b + +PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +LAST_CONTROL_TRANSFER: from 000000013f4fc95e to 000000013f4975db + +STACK_TEXT: +00000000`0040bc40 00000001`3f4fc95e : 00000000`0707b2a0 00000000`0040dbfa 00000000`0040bfa8 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +00000000`0040bc80 00000001`3fed123e : 00000001`4073c8e8 00000000`00000000 00000000`0667b040 00000000`0040bd90 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] +00000000`0040bcc0 00000001`3febae69 : 00000000`0040bd98 00000001`3f4fa268 00000000`0040bfa8 00000000`0040bdc0 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] +00000000`0040bd10 00000001`3fe90a4b : 00000000`0040c078 00000001`3f4fc9cf 00000000`0040c050 00000000`0040bde8 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] +00000000`0040bd50 00000001`3fe8e54d : 00000000`070a7178 00000000`06a00420 00000000`0040d170 00000000`0040d170 : js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +00000000`0040bd90 00000001`3feb0592 : 00000000`0040c078 00000000`00000000 00000000`0040be28 00000001`3fe8e54d : js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +00000000`0040bde0 00000001`402276a8 : 00000000`0040c210 00000000`00fffa00 00000000`00000006 00000000`07097380 : js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 534] +00000000`0040be50 00000001`3fdbc517 : 00000000`0908690d 00000000`0040c210 00000000`0040c078 00000001`3f8150aa : js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +00000000`0040beb0 00000001`3fdbc70d : 00000000`0040c078 00000000`0040bfd9 00000000`0040c078 00000001`3f4bb1a0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +00000000`0040bf20 00000001`3fedbbcc : 00000000`06607a68 00000000`0040c078 00000000`00000000 00000001`3fec3ee0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +00000000`0040bf60 00000001`3fec75f9 : 00000000`06607a68 00000000`06607208 00000000`06607208 00000000`06607208 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +00000000`0040c040 00000001`3fec6266 : 01d215fd`08206b33 00000006`962215d5 00000000`06607a68 00000001`00000c01 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +00000000`0040c1d0 00000001`3f5f89b5 : 00000000`06685040 00000000`00000012 00000000`06607990 00000000`06685040 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +00000000`0040c370 00000001`3fb17a12 : 00000000`00000003 00000000`06607990 00000000`00000003 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6519] +00000000`0040c440 00000001`3fb0848d : 00000000`0900b048 00000000`06607000 00000000`00000000 00000001`3fb0c729 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +00000000`0040c490 00000001`3fb03c86 : 00000000`06607000 00000000`06607000 00000001`406c4320 00000000`00000001 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] +00000000`0040c4d0 00000001`3f5d5cd8 : 00000000`0040c5d8 00000000`00000000 00000000`00000000 00000001`3f77d24c : js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +00000000`0040c530 00000001`3fc8d13c : 00000001`409a0918 00000000`0040c8f0 00000001`406c4320 00000000`0040c5d8 : js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +00000000`0040c590 00000001`3fc8df54 : 00000000`06607000 00000000`0040c688 00000000`00000003 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] +00000000`0040c620 00000001`3fd1475e : fff90000`00000000 00000001`409a0918 00000000`0040c738 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] +00000000`0040c6d0 00000001`3f8549e9 : 00000000`0040cbb8 00000000`0040c840 00000000`0040c8a0 00000001`3f4bc62c : js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +00000000`0040c820 00000001`3f73b4e1 : 00000000`0900b030 00000001`3f483881 00000000`070aa1c0 00000000`0900b068 : js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +00000000`0040c860 00000001`3f73c740 : 00000000`0040c8a0 00000000`06607000 00000001`4070b2d8 00000000`0040d120 : js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +00000000`0040c8c0 00000001`3fa9100c : 00000000`00000002 00000000`0040ca40 00000000`0040cb48 00000000`0040c990 : js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +00000000`0040c940 00000001`3f4bcefa : 00000000`00000002 00000000`0040cbc9 00000000`0040cb48 00000001`406767a8 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +00000000`0040cb00 00000001`3f859fa0 : 00000000`00000001 00000000`070757f0 00000000`0040d120 00000000`0667b068 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +00000000`0040cc30 00000001`3f85a460 : 00000000`06607000 00000000`0040d130 00000000`0040cdb0 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +00000000`0040cca0 00000001`3f86312d : 00000000`070fe5d0 00000000`0040cdb0 00400000`00000000 000007fe`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] +00000000`0040cd70 00000001`3fd423c5 : 00000000`0040cfa8 00000001`3f42b086 00000000`0040d120 00000000`0040cdb0 : js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +00000000`0040cde0 00000001`3fd5677a : 00000000`09039000 00000000`00000000 00000000`00000002 00000000`0664a000 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +00000000`0040ce40 00000001`401d6744 : 00000000`0000003a 00000000`00000001 00000000`00000000 00000000`0908690d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +00000000`0040ced0 000002d6`90ee777e : 00000000`06607900 00000000`00000000 0000f0cd`91d70458 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +00000000`0040d090 00000000`06607900 : 00000000`00000000 0000f0cd`91d70458 00000000`00000008 00000000`0040d120 : 0x2d6`90ee777e +00000000`0040d098 00000000`00000000 : 0000f0cd`91d70458 00000000`00000008 00000000`0040d120 00000000`0040d0d8 : 0x6607900 + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FAULTING_SOURCE_CODE: + 334: return false; + 335: uintptr_t addr = uintptr_t(cell); + 336: addr &= ~js::gc::ChunkMask; + 337: addr |= js::gc::ChunkLocationOffset; +> 338: auto location = *reinterpret_cast(addr); + 339: MOZ_ASSERT(location == ChunkLocation::Nursery || location == ChunkLocation::TenuredHeap); + 340: return location == ChunkLocation::Nursery; + 341: } + 342: + 343: } /* namespace gc */ + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_dbg_64_dm_windows!js::gc::IsInsideNursery+1b + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_dbg_64_dm_windows_62f79d676e0e + +IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_c0000005_js-dbg-64-dm-windows-62f79d676e0e.exe!js::gc::IsInsideNursery + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # Child-SP RetAddr Call Site +00 00000000`0040bc40 00000001`3f4fc95e js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +01 00000000`0040bc80 00000001`3fed123e js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] +02 00000000`0040bcc0 00000001`3febae69 js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] +03 00000000`0040bd10 00000001`3fe90a4b js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] +04 00000000`0040bd50 00000001`3fe8e54d js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +05 00000000`0040bd90 00000001`3feb0592 js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +06 00000000`0040bde0 00000001`402276a8 js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 534] +07 00000000`0040be50 00000001`3fdbc517 js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +08 00000000`0040beb0 00000001`3fdbc70d js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +09 00000000`0040bf20 00000001`3fedbbcc js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +0a 00000000`0040bf60 00000001`3fec75f9 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +0b 00000000`0040c040 00000001`3fec6266 js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +0c 00000000`0040c1d0 00000001`3f5f89b5 js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +0d 00000000`0040c370 00000001`3fb17a12 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6519] +0e 00000000`0040c440 00000001`3fb0848d js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +0f 00000000`0040c490 00000001`3fb03c86 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] +10 00000000`0040c4d0 00000001`3f5d5cd8 js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +11 00000000`0040c530 00000001`3fc8d13c js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +12 00000000`0040c590 00000001`3fc8df54 js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] +13 00000000`0040c620 00000001`3fd1475e js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] +14 00000000`0040c6d0 00000001`3f8549e9 js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +15 00000000`0040c820 00000001`3f73b4e1 js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +16 00000000`0040c860 00000001`3f73c740 js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +17 00000000`0040c8c0 00000001`3fa9100c js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +18 00000000`0040c940 00000001`3f4bcefa js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +19 00000000`0040cb00 00000001`3f859fa0 js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +1a 00000000`0040cc30 00000001`3f85a460 js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +1b 00000000`0040cca0 00000001`3f86312d js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] +1c 00000000`0040cd70 00000001`3fd423c5 js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +1d 00000000`0040cde0 00000001`3fd5677a js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +1e 00000000`0040ce40 00000001`401d6744 js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +1f 00000000`0040ced0 000002d6`90ee777e js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +20 00000000`0040d090 00000000`06607900 0x2d6`90ee777e +21 00000000`0040d098 00000000`00000000 0x6607900 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +RetAddr : Args to Child : Call Site +00000001`3f4fc95e : 00000000`0707b2a0 00000000`0040dbfa 00000000`0040bfa8 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +00000001`3fed123e : 00000001`4073c8e8 00000000`00000000 00000000`0667b040 00000000`0040bd90 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] +00000001`3febae69 : 00000000`0040bd98 00000001`3f4fa268 00000000`0040bfa8 00000000`0040bdc0 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] +00000001`3fe90a4b : 00000000`0040c078 00000001`3f4fc9cf 00000000`0040c050 00000000`0040bde8 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] +00000001`3fe8e54d : 00000000`070a7178 00000000`06a00420 00000000`0040d170 00000000`0040d170 : js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +00000001`3feb0592 : 00000000`0040c078 00000000`00000000 00000000`0040be28 00000001`3fe8e54d : js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +00000001`402276a8 : 00000000`0040c210 00000000`00fffa00 00000000`00000006 00000000`07097380 : js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 534] +00000001`3fdbc517 : 00000000`0908690d 00000000`0040c210 00000000`0040c078 00000001`3f8150aa : js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +00000001`3fdbc70d : 00000000`0040c078 00000000`0040bfd9 00000000`0040c078 00000001`3f4bb1a0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +00000001`3fedbbcc : 00000000`06607a68 00000000`0040c078 00000000`00000000 00000001`3fec3ee0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +00000001`3fec75f9 : 00000000`06607a68 00000000`06607208 00000000`06607208 00000000`06607208 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +00000001`3fec6266 : 01d215fd`08206b33 00000006`962215d5 00000000`06607a68 00000001`00000c01 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +00000001`3f5f89b5 : 00000000`06685040 00000000`00000012 00000000`06607990 00000000`06685040 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +00000001`3fb17a12 : 00000000`00000003 00000000`06607990 00000000`00000003 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6519] +00000001`3fb0848d : 00000000`0900b048 00000000`06607000 00000000`00000000 00000001`3fb0c729 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +00000001`3fb03c86 : 00000000`06607000 00000000`06607000 00000001`406c4320 00000000`00000001 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] +00000001`3f5d5cd8 : 00000000`0040c5d8 00000000`00000000 00000000`00000000 00000001`3f77d24c : js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +00000001`3fc8d13c : 00000001`409a0918 00000000`0040c8f0 00000001`406c4320 00000000`0040c5d8 : js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +00000001`3fc8df54 : 00000000`06607000 00000000`0040c688 00000000`00000003 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] +00000001`3fd1475e : fff90000`00000000 00000001`409a0918 00000000`0040c738 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] +00000001`3f8549e9 : 00000000`0040cbb8 00000000`0040c840 00000000`0040c8a0 00000001`3f4bc62c : js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +00000001`3f73b4e1 : 00000000`0900b030 00000001`3f483881 00000000`070aa1c0 00000000`0900b068 : js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +00000001`3f73c740 : 00000000`0040c8a0 00000000`06607000 00000001`4070b2d8 00000000`0040d120 : js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +00000001`3fa9100c : 00000000`00000002 00000000`0040ca40 00000000`0040cb48 00000000`0040c990 : js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +00000001`3f4bcefa : 00000000`00000002 00000000`0040cbc9 00000000`0040cb48 00000001`406767a8 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +00000001`3f859fa0 : 00000000`00000001 00000000`070757f0 00000000`0040d120 00000000`0667b068 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +00000001`3f85a460 : 00000000`06607000 00000000`0040d130 00000000`0040cdb0 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +00000001`3f86312d : 00000000`070fe5d0 00000000`0040cdb0 00400000`00000000 000007fe`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] +00000001`3fd423c5 : 00000000`0040cfa8 00000001`3f42b086 00000000`0040d120 00000000`0040cdb0 : js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +00000001`3fd5677a : 00000000`09039000 00000000`00000000 00000000`00000002 00000000`0664a000 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +00000001`401d6744 : 00000000`0000003a 00000000`00000001 00000000`00000000 00000000`0908690d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +000002d6`90ee777e : 00000000`06607900 00000000`00000000 0000f0cd`91d70458 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +00000000`06607900 : 00000000`00000000 0000f0cd`91d70458 00000000`00000008 00000000`0040d120 : 0x2d6`90ee777e +00000000`00000000 : 0000f0cd`91d70458 00000000`00000008 00000000`0040d120 00000000`0040d0d8 : 0x6607900 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-5b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-5b-crashlog.txt new file mode 100644 index 000000000..5891f1816 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-5b-crashlog.txt @@ -0,0 +1,425 @@ + +Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-dbg-64-dm-windows-62f79d676e0e.exe.7448.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: srv* +Executable search path is: +Windows 10 Version 14393 MP (8 procs) Free x64 +Product: WinNt, suite: SingleUserTS +Built by: 10.0.14393.0 (rs1_release.160715-1616) +Machine Name: +Debug session time: Tue Sep 20 18:00:12.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: not available +................... +This dump file has an exception of interest stored in it. +The stored exception information can be accessed via .ecxr. +(1d18.19ec): Access violation - code c0000005 (first/second chance not available) +*** WARNING: Unable to verify checksum for js-dbg-64-dm-windows-62f79d676e0e.exe +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: +00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +The current thread doesn't have a guest (WoW) context. +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +rax=0000000000000001 rbx=fffe2b2b2b2b2b2b rcx=fffe2b2b2b2fffe8 +rdx=0000000000000001 rsi=000000c4a47fc528 rdi=0000021699700420 +rip=00007ff71dcf75db rsp=000000c4a47fc0f0 rbp=0000000000000006 + r8=0000021699633200 r9=00007ff71effa590 r10=0000000000000031 +r11=0000000000000033 r12=fffa7fffffffffff r13=fffc000000000000 +r14=000000c4a47fc528 r15=00007ff71effa590 +iopl=0 nv up ei ng nz na po nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010284 +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: +00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338]: +00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] +00007ff7`1dcf75dd 8d42ff lea eax,[rdx-1] +00007ff7`1dcf75e0 83f801 cmp eax,1 +00007ff7`1dcf75e3 7665 jbe js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x8a (00007ff7`1dcf764a) +00007ff7`1dcf75e5 b902000000 mov ecx,2 +00007ff7`1dcf75ea ff1528d55d01 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp___acrt_iob_func (00007ff7`1f2d4b18)] +00007ff7`1dcf75f0 4c8d0df9941e01 lea r9,[js_dbg_64_dm_windows_62f79d676e0e!`string' (00007ff7`1eee0af0)] +00007ff7`1dcf75f7 c744242053010000 mov dword ptr [rsp+20h],153h +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00000000`1dcf75db ?? ?? ?? ?? ???? +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +00007ff7`1dcf75db 8b 11 8d 42 ff 83 f8 01 ...B.... +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + + +DUMP_CLASS: 2 + +DUMP_QUALIFIER: 400 + +CONTEXT: (.ecxr) +rax=0000000000000001 rbx=fffe2b2b2b2b2b2b rcx=fffe2b2b2b2fffe8 +rdx=0000000000000001 rsi=000000c4a47fc528 rdi=0000021699700420 +rip=00007ff71dcf75db rsp=000000c4a47fc0f0 rbp=0000000000000006 + r8=0000021699633200 r9=00007ff71effa590 r10=0000000000000031 +r11=0000000000000033 r12=fffa7fffffffffff r13=fffc000000000000 +r14=000000c4a47fc528 r15=00007ff71effa590 +iopl=0 nv up ei ng nz na po nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010284 +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: +00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? +Resetting default scope + +FAULTING_IP: +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] + +EXCEPTION_RECORD: (.exr -1) +ExceptionAddress: 00007ff71dcf75db (js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x000000000000001b) + ExceptionCode: c0000005 (Access violation) + ExceptionFlags: 00000000 +NumberParameters: 2 + Parameter[0]: 0000000000000000 + Parameter[1]: ffffffffffffffff +Attempt to read from address ffffffffffffffff + +DEFAULT_BUCKET_ID: INVALID_POINTER_READ + +PROCESS_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. + +EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. + +EXCEPTION_CODE_STR: c0000005 + +EXCEPTION_PARAMETER1: 0000000000000000 + +EXCEPTION_PARAMETER2: ffffffffffffffff + +READ_ADDRESS: ffffffffffffffff + +FOLLOWUP_IP: +js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] + +BUGCHECK_STR: INVALID_POINTER_READ + +WATSON_BKT_PROCSTAMP: 57e18eec + +WATSON_BKT_PROCVER: 0.0.0.0 + +WATSON_BKT_MODULE: js-dbg-64-dm-windows-62f79d676e0e.exe + +WATSON_BKT_MODSTAMP: 57e18eec + +WATSON_BKT_MODOFFSET: 875db + +WATSON_BKT_MODVER: 0.0.0.0 + +BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) + +MODLIST_WITH_TSCHKSUM_HASH: c3ee048275799904ba4743295b065feeec8aa69b + +MODLIST_SHA1_HASH: 821636ff4f1bd5145f680b8840b1e121f5a2b869 + +NTGLOBALFLAG: 0 + +APPLICATION_VERIFIER_FLAGS: 0 + +DUMP_FLAGS: 94 + +DUMP_TYPE: 1 + +APP: js-dbg-64-dm-windows-62f79d676e0e.exe + +ANALYSIS_SESSION_HOST: F1BRIX + +ANALYSIS_SESSION_TIME: 09-20-2016 18:00:13.0679 + +ANALYSIS_VERSION: 10.0.10586.567 amd64fre + +THREAD_ATTRIBUTES: +OS_LOCALE: ENU + +PROBLEM_CLASSES: + + + +INVALID_POINTER_READ + Tid [0x19ec] + Frame [0x00]: js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery + + +LAST_CONTROL_TRANSFER: from 00007ff71dd5c95e to 00007ff71dcf75db + +STACK_TEXT: +000000c4`a47fc0f0 00007ff7`1dd5c95e : 00000216`9987b2a0 000000c4`a47fe0aa 000000c4`a47fc458 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b +000000c4`a47fc130 00007ff7`1e73123e : 00007ff7`1ef9c090 00000000`00000000 00000216`9967b040 000000c4`a47fc240 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe +000000c4`a47fc170 00007ff7`1e71ae69 : 000000c4`a47fc248 00007ff7`1dd5a268 000000c4`a47fc458 000000c4`a47fc270 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e +000000c4`a47fc1c0 00007ff7`1e6f0a4b : 000000c4`a47fc528 00007ff7`1dd5c9cf 000000c4`a47fc500 000000c4`a47fc298 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 +000000c4`a47fc200 00007ff7`1e6ee54d : 00000216`998a7128 00000216`99700420 000000c4`a47fd620 000000c4`a47fd620 : js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b +000000c4`a47fc240 00007ff7`1e710592 : 000000c4`a47fc528 00000000`00000000 000000c4`a47fc2d8 00007ff7`1e6ee54d : js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d +000000c4`a47fc290 00007ff7`1ea876a8 : 000000c4`a47fc6c0 00000000`00fffa00 00000000`00000006 00000216`99897380 : js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 +000000c4`a47fc300 00007ff7`1e61c517 : 00000216`99b8a72d 000000c4`a47fc6c0 000000c4`a47fc528 00007ff7`1e0750aa : js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 +000000c4`a47fc360 00007ff7`1e61c70d : 000000c4`a47fc528 000000c4`a47fc489 000000c4`a47fc528 000000c4`a47fc4b0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 +000000c4`a47fc3d0 00007ff7`1e73bbcc : 00000216`99607a68 000000c4`a47fc528 00000000`00000000 00007ff7`1e723ee0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d +000000c4`a47fc410 00007ff7`1e7275f9 : 00000216`99607a68 00000216`99607208 00000216`99607208 00000216`99607208 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc +000000c4`a47fc4f0 00007ff7`1e726266 : 01d213a3`8201cc20 00000216`99685040 00000216`99607a68 00007ff7`00001901 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 +000000c4`a47fc680 00007ff7`1de589b5 : 00000216`99685040 00000000`00000012 00000216`99607990 00000216`99685040 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 +000000c4`a47fc820 00007ff7`1e377a12 : 00000000`00000003 00000216`99607990 00000000`00000003 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 +000000c4`a47fc8f0 00007ff7`1e36848d : 00000216`99b0b048 00000216`99607000 00000000`00000000 00007ff7`1e36c729 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 +000000c4`a47fc940 00007ff7`1e363c86 : 00000216`99607000 00000216`99607000 00007ff7`1ef23e20 00000000`00000001 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d +000000c4`a47fc980 00007ff7`1de35cd8 : 000000c4`a47fca88 00000000`00000000 00000000`00000000 00007ff7`1dfdd24c : js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 +000000c4`a47fc9e0 00007ff7`1e4ed13c : 00007ff7`1f1ff918 000000c4`a47fcda0 00007ff7`1ef23e20 000000c4`a47fca88 : js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 +000000c4`a47fca40 00007ff7`1e4edf54 : 00000216`99607000 000000c4`a47fcb38 00000000`00000003 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc +000000c4`a47fcad0 00007ff7`1e57475e : fff90000`00000000 00007ff7`1f1ff918 000000c4`a47fcbe8 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 +000000c4`a47fcb80 00007ff7`1e0b49e9 : 000000c4`a47fd068 000000c4`a47fccf0 000000c4`a47fcd50 00007ff7`1dd1c62c : js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e +000000c4`a47fccd0 00007ff7`1df9b4e1 : 00000216`99b0b030 00007ff7`1dce3881 00000216`998aa1c0 00000216`99b0b068 : js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 +000000c4`a47fcd10 00007ff7`1df9c740 : 000000c4`a47fcd50 00000216`99607000 00007ff7`1ef6ac38 000000c4`a47fd5d0 : js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 +000000c4`a47fcd70 00007ff7`1e2f100c : 00000000`00000002 000000c4`a47fcef0 000000c4`a47fcff8 000000c4`a47fce40 : js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 +000000c4`a47fcdf0 00007ff7`1dd1cefa : 00000000`00000002 000000c4`a47fd079 000000c4`a47fcff8 00007ff7`1eed67a8 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c +000000c4`a47fcfb0 00007ff7`1e0b9fa0 : 00000000`00000001 00000216`998757f0 000000c4`a47fd5d0 00000216`9967b068 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a +000000c4`a47fd0e0 00007ff7`1e0ba460 : 00000216`99607000 000000c4`a47fd5e0 000000c4`a47fd260 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 +000000c4`a47fd150 00007ff7`1e0c312d : 00000216`998fe5d0 000000c4`a47fd260 00400000`00000000 00007ff8`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 +000000c4`a47fd220 00007ff7`1e5a23c5 : 000000c4`a47fd458 00007ff7`1dc8b0ae 000000c4`a47fd5d0 000000c4`a47fd260 : js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d +000000c4`a47fd290 00007ff7`1e5b677a : 00000216`99b39000 00000000`00000000 00000000`00000002 00000216`9964a000 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 +000000c4`a47fd2f0 00007ff7`1ea36744 : 00000000`0000003a 00000000`00000001 00000000`00000000 00000216`99b8a72d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa +000000c4`a47fd380 0000039b`922a7cc8 : 00000216`99607900 00000000`00000000 000055b5`62c38357 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 +000000c4`a47fd540 00000216`99607900 : 00000000`00000000 000055b5`62c38357 00000000`00000008 000000c4`a47fd5d0 : 0x0000039b`922a7cc8 +000000c4`a47fd548 00000000`00000000 : 000055b5`62c38357 00000000`00000008 000000c4`a47fd5d0 000000c4`a47fd588 : 0x00000216`99607900 + + +THREAD_SHA1_HASH_MOD_FUNC: 5056f69f618ba8c41a2b5a444c483e0375247881 + +THREAD_SHA1_HASH_MOD_FUNC_OFFSET: dcd40979492662defecc13af165b022c960612ad + +THREAD_SHA1_HASH_MOD: a40e3f321ec4083628359c103278f2e630eb749b + +FAULT_INSTR_CODE: 428d118b + +FAULTING_SOURCE_LINE: c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h + +FAULTING_SOURCE_FILE: c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h + +FAULTING_SOURCE_LINE_NUMBER: 338 + +FAULTING_SOURCE_CODE: + 334: return false; + 335: uintptr_t addr = uintptr_t(cell); + 336: addr &= ~js::gc::ChunkMask; + 337: addr |= js::gc::ChunkLocationOffset; +> 338: auto location = *reinterpret_cast(addr); + 339: MOZ_ASSERT(location == ChunkLocation::Nursery || location == ChunkLocation::TenuredHeap); + 340: return location == ChunkLocation::Nursery; + 341: } + 342: + 343: } /* namespace gc */ + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_dbg_64_dm_windows_62f79d676e0e + +IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e18eec + +STACK_COMMAND: .ecxr ; kb + +BUCKET_ID: INVALID_POINTER_READ_js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b + +PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b + +BUCKET_ID_OFFSET: 1b + +BUCKET_ID_MODULE_STR: js_dbg_64_dm_windows_62f79d676e0e + +BUCKET_ID_MODTIMEDATESTAMP: 57e18eec + +BUCKET_ID_MODCHECKSUM: 0 + +BUCKET_ID_MODVER_STR: 0.0.0.0 + +BUCKET_ID_PREFIX_STR: INVALID_POINTER_READ_ + +FAILURE_PROBLEM_CLASS: INVALID_POINTER_READ + +FAILURE_EXCEPTION_CODE: c0000005 + +FAILURE_IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe + +FAILURE_FUNCTION_NAME: js::gc::IsInsideNursery + +BUCKET_ID_FUNCTION_STR: js::gc::IsInsideNursery + +FAILURE_SYMBOL_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe!js::gc::IsInsideNursery + +FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_js-dbg-64-dm-windows-62f79d676e0e.exe!js::gc::IsInsideNursery + +WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-dbg-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e18eec/js-dbg-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e18eec/c0000005/000875db.htm?Retriage=1 + +TARGET_TIME: 2016-09-21T01:00:12.000Z + +OSBUILD: 14393 + +OSSERVICEPACK: 0 + +SERVICEPACK_NUMBER: 0 + +OS_REVISION: 0 + +SUITE_MASK: 256 + +PRODUCT_TYPE: 1 + +OSPLATFORM_TYPE: x64 + +OSNAME: Windows 10 + +OSEDITION: Windows 10 WinNt SingleUserTS + +USER_LCID: 0 + +OSBUILD_TIMESTAMP: 2016-07-15 19:21:29 + +BUILDDATESTAMP_STR: 160715-1616 + +BUILDLAB_STR: rs1_release + +BUILDOSVER_STR: 10.0.14393.0 + +ANALYSIS_SESSION_ELAPSED_TIME: 3ec + +ANALYSIS_SOURCE: UM + +FAILURE_ID_HASH_STRING: um:invalid_pointer_read_c0000005_js-dbg-64-dm-windows-62f79d676e0e.exe!js::gc::isinsidenursery + +FAILURE_ID_HASH: {de3fa82d-c01b-b80c-43d1-0ed172dbd9d3} + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # Child-SP RetAddr Call Site +00 000000c4`a47fc0f0 00007ff7`1dd5c95e js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +01 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::gc::Cell::isTenured+0x5 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 251] +02 000000c4`a47fc130 00007ff7`1e73123e js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] +03 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::zone+0xd [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1263] +04 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!JSObject::zone+0xd [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.h @ 312] +05 000000c4`a47fc170 00007ff7`1e71ae69 js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] +06 000000c4`a47fc1c0 00007ff7`1e6f0a4b js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] +07 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x12 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] +08 000000c4`a47fc200 00007ff7`1e6ee54d js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +09 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x14 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2241] +0a 000000c4`a47fc240 00007ff7`1e710592 js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +0b 000000c4`a47fc290 00007ff7`1ea876a8 js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 534] +0c (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!MarkLocals+0x23 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 26] +0d 000000c4`a47fc300 00007ff7`1e61c517 js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +0e 000000c4`a47fc360 00007ff7`1e61c70d js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +0f 000000c4`a47fc3d0 00007ff7`1e73bbcc js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +10 000000c4`a47fc410 00007ff7`1e7275f9 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +11 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeForMinorGC+0x2c [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 304] +12 000000c4`a47fc4f0 00007ff7`1e726266 js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +13 000000c4`a47fc680 00007ff7`1de589b5 js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +14 000000c4`a47fc820 00007ff7`1e377a12 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsgc.cpp @ 6519] +15 000000c4`a47fc8f0 00007ff7`1e36848d js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +16 000000c4`a47fc940 00007ff7`1e363c86 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] +17 000000c4`a47fc980 00007ff7`1de35cd8 js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +18 000000c4`a47fc9e0 00007ff7`1e4ed13c js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +19 000000c4`a47fca40 00007ff7`1e4edf54 js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 667] +1a 000000c4`a47fcad0 00007ff7`1e57475e js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 727] +1b 000000c4`a47fcb80 00007ff7`1e0b49e9 js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +1c 000000c4`a47fccd0 00007ff7`1df9b4e1 js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +1d 000000c4`a47fcd10 00007ff7`1df9c740 js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +1e 000000c4`a47fcd70 00007ff7`1e2f100c js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +1f 000000c4`a47fcdf0 00007ff7`1dd1cefa js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +20 000000c4`a47fcfb0 00007ff7`1e0b9fa0 js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +21 000000c4`a47fd0e0 00007ff7`1e0ba460 js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +22 000000c4`a47fd150 00007ff7`1e0c312d js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] +23 000000c4`a47fd220 00007ff7`1e5a23c5 js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +24 000000c4`a47fd290 00007ff7`1e5b677a js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +25 000000c4`a47fd2f0 00007ff7`1ea36744 js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +26 000000c4`a47fd380 0000039b`922a7cc8 js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +27 000000c4`a47fd540 00000216`99607900 0x0000039b`922a7cc8 +28 000000c4`a47fd548 00000000`00000000 0x00000216`99607900 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +RetAddr : Args to Child : Call Site +00007ff7`1dd5c95e : 00000216`9987b2a0 000000c4`a47fe0aa 000000c4`a47fc458 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::gc::Cell::isTenured+0x5 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 251] +00007ff7`1e73123e : 00007ff7`1ef9c090 00000000`00000000 00000216`9967b040 000000c4`a47fc240 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::zone+0xd [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1263] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!JSObject::zone+0xd [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.h @ 312] +00007ff7`1e71ae69 : 000000c4`a47fc248 00007ff7`1dd5a268 000000c4`a47fc458 000000c4`a47fc270 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] +00007ff7`1e6f0a4b : 000000c4`a47fc528 00007ff7`1dd5c9cf 000000c4`a47fc500 000000c4`a47fc298 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x12 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] +00007ff7`1e6ee54d : 00000216`998a7128 00000216`99700420 000000c4`a47fd620 000000c4`a47fd620 : js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x14 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2241] +00007ff7`1e710592 : 000000c4`a47fc528 00000000`00000000 000000c4`a47fc2d8 00007ff7`1e6ee54d : js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +00007ff7`1ea876a8 : 000000c4`a47fc6c0 00000000`00fffa00 00000000`00000006 00000216`99897380 : js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 534] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!MarkLocals+0x23 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 26] +00007ff7`1e61c517 : 00000216`99b8a72d 000000c4`a47fc6c0 000000c4`a47fc528 00007ff7`1e0750aa : js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +00007ff7`1e61c70d : 000000c4`a47fc528 000000c4`a47fc489 000000c4`a47fc528 000000c4`a47fc4b0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +00007ff7`1e73bbcc : 00000216`99607a68 000000c4`a47fc528 00000000`00000000 00007ff7`1e723ee0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +00007ff7`1e7275f9 : 00000216`99607a68 00000216`99607208 00000216`99607208 00000216`99607208 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeForMinorGC+0x2c [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 304] +00007ff7`1e726266 : 01d213a3`8201cc20 00000216`99685040 00000216`99607a68 00007ff7`00001901 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +00007ff7`1de589b5 : 00000216`99685040 00000000`00000012 00000216`99607990 00000216`99685040 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +00007ff7`1e377a12 : 00000000`00000003 00000216`99607990 00000000`00000003 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsgc.cpp @ 6519] +00007ff7`1e36848d : 00000216`99b0b048 00000216`99607000 00000000`00000000 00007ff7`1e36c729 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +00007ff7`1e363c86 : 00000216`99607000 00000216`99607000 00007ff7`1ef23e20 00000000`00000001 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] +00007ff7`1de35cd8 : 000000c4`a47fca88 00000000`00000000 00000000`00000000 00007ff7`1dfdd24c : js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +00007ff7`1e4ed13c : 00007ff7`1f1ff918 000000c4`a47fcda0 00007ff7`1ef23e20 000000c4`a47fca88 : js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +00007ff7`1e4edf54 : 00000216`99607000 000000c4`a47fcb38 00000000`00000003 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 667] +00007ff7`1e57475e : fff90000`00000000 00007ff7`1f1ff918 000000c4`a47fcbe8 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 727] +00007ff7`1e0b49e9 : 000000c4`a47fd068 000000c4`a47fccf0 000000c4`a47fcd50 00007ff7`1dd1c62c : js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +00007ff7`1df9b4e1 : 00000216`99b0b030 00007ff7`1dce3881 00000216`998aa1c0 00000216`99b0b068 : js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +00007ff7`1df9c740 : 000000c4`a47fcd50 00000216`99607000 00007ff7`1ef6ac38 000000c4`a47fd5d0 : js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +00007ff7`1e2f100c : 00000000`00000002 000000c4`a47fcef0 000000c4`a47fcff8 000000c4`a47fce40 : js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +00007ff7`1dd1cefa : 00000000`00000002 000000c4`a47fd079 000000c4`a47fcff8 00007ff7`1eed67a8 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +00007ff7`1e0b9fa0 : 00000000`00000001 00000216`998757f0 000000c4`a47fd5d0 00000216`9967b068 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +00007ff7`1e0ba460 : 00000216`99607000 000000c4`a47fd5e0 000000c4`a47fd260 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +00007ff7`1e0c312d : 00000216`998fe5d0 000000c4`a47fd260 00400000`00000000 00007ff8`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] +00007ff7`1e5a23c5 : 000000c4`a47fd458 00007ff7`1dc8b0ae 000000c4`a47fd5d0 000000c4`a47fd260 : js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +00007ff7`1e5b677a : 00000216`99b39000 00000000`00000000 00000000`00000002 00000216`9964a000 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +00007ff7`1ea36744 : 00000000`0000003a 00000000`00000001 00000000`00000000 00000216`99b8a72d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] +0000039b`922a7cc8 : 00000216`99607900 00000000`00000000 000055b5`62c38357 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +00000216`99607900 : 00000000`00000000 000055b5`62c38357 00000000`00000008 000000c4`a47fd5d0 : 0x0000039b`922a7cc8 +00000000`00000000 : 000055b5`62c38357 00000000`00000008 000000c4`a47fd5d0 000000c4`a47fd588 : 0x00000216`99607900 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-6a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-6a-crashlog.txt new file mode 100644 index 000000000..9435db190 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-6a-crashlog.txt @@ -0,0 +1,407 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-64-dm-windows-62f79d676e0e.exe.3256.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x64 +Product: WinNt, suite: SingleUserTS +Machine Name: +Debug session time: Fri Sep 23 17:52:12.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: 0 days 0:00:02.000 +......................................... +This dump file has an exception of interest stored in it. +The stored exception information can be accessed via .ecxr. +(cb8.7f8): Access violation - code c0000005 (first/second chance not available) +*** WARNING: Unable to verify checksum for js-64-dm-windows-62f79d676e0e.exe +js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13: +00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +The current thread doesn't have an x86 context. +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +rax=000000013fcfeef0 rbx=0000000008d00420 rcx=2b2b2b2b2b2b2b2b +rdx=000000000681b940 rsi=000000000034c7b0 rdi=0000000008d00420 +rip=000000013f869ff3 rsp=000000000034c4b0 rbp=fffe000000000000 + r8=000000000034c5b0 r9=000000000001fffc r10=000000000000061d +r11=000000000685a000 r12=000000013fd23a98 r13=fffa7fffffffffff +r14=000000000034d550 r15=0000000000000003 +iopl=0 nv up ei pl nz na pe nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 +js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13: +00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675]: +00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] +00000001`3f869ff6 4c3bc0 cmp r8,rax +00000001`3f869ff9 7575 jne js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x90 (00000001`3f86a070) +00000001`3f869ffb 4c8b4208 mov r8,qword ptr [rdx+8] +00000001`3f869fff 488b4210 mov rax,qword ptr [rdx+10h] +00000001`3f86a003 498d14c0 lea rdx,[r8+rax*8] +00000001`3f86a007 4c3bc2 cmp r8,rdx +00000001`3f86a00a 741f je js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x4b (00000001`3f86a02b) +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00000000`3f869ff3 ?? ?? ?? ?? ???? +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +00000001`3f869ff3 4c 8b 01 4c 3b c0 75 75 L..L;.uu +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: nt!IMAGE_NT_HEADERS32 *** +*** *** +************************************************************************* +*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - +*** ERROR: Symbol file could not be found. Defaulted to export symbols for ucrtbase.dll - + +FAULTING_IP: +js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] + +EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 000000013f869ff3 (js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x0000000000000013) + ExceptionCode: c0000005 (Access violation) + ExceptionFlags: 00000000 +NumberParameters: 2 + Parameter[0]: 0000000000000000 + Parameter[1]: ffffffffffffffff +Attempt to read from address ffffffffffffffff + +PROCESS_NAME: js-64-dm-windows-62f79d676e0e.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 0000000077c90000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e305a4 + +ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. + +EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. + +EXCEPTION_PARAMETER1: 0000000000000000 + +EXCEPTION_PARAMETER2: ffffffffffffffff + +READ_ADDRESS: ffffffffffffffff + +FOLLOWUP_IP: +js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] + +MOD_LIST: + +FAULTING_THREAD: 00000000000007f8 + +BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_WRONG_SYMBOLS_FILL_PATTERN_2b2b2b2b + +PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b + +LAST_CONTROL_TRANSFER: from 000000013f93a984 to 000000013f869ff3 + +STACK_TEXT: +00000000`0034c4b0 00000001`3f93a984 : 00000000`0034c730 00000000`090bb400 00000000`0681b000 00000001`3f8254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00000000`0034c4e0 00000001`3f92fe3c : 00000000`0034dd0a 00007fff`ffffffff fffe0000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] +00000000`0034c520 00000001`3f93348f : 00000000`08e73103 00000000`0034c7b0 00000000`00000000 00000000`00000003 : js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\mozillaadmin\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +00000000`0034c550 00000001`3fb90421 : 00000000`0034c7b0 00000000`08e771a8 00000000`00000003 00000000`091ff448 : js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 520] +00000000`0034c5b0 00000001`3f8c9da7 : 00000000`0917a2cd 00000000`0034c7b0 00000001`3f600000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +00000000`0034c5f0 00000001`3f8c9f0d : 00000000`0034c7b0 00000000`0681b940 00000000`06824b00 00000000`0681b200 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +00000000`0034c650 00000001`3f93f20e : 00000000`06824b00 00000000`06824b00 00000000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +00000000`0034c690 00000001`3f9376c4 : 00000000`06824b00 00000000`0681b940 00000000`06824b00 00000000`06824b00 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +00000000`0034c760 00000001`3f936e7d : 00000000`0034cc18 01d215fd`e1c035f9 00000000`06882080 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +00000000`0034c900 00000001`3f6762d6 : 00000000`0681b8f8 00000000`0034cae9 00000000`00000007 00000000`06882080 : js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +00000000`0034caa0 00000001`3f7ed102 : 00000000`0681b000 00000000`0681b8f8 00000000`0681b000 00000000`0681b8f8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6521] +00000000`0034cb50 00000001`3f7e9447 : 00000000`0681b000 00000000`00000001 00000000`0684bb78 00000000`3a9da8e8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +00000000`0034cb80 00000001`3f64c0c6 : 00000000`00000000 00000001`3fcb4058 00000000`00000000 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +00000000`0034cbd0 00000001`3f86378f : 00000000`06884000 00000000`00000000 00000000`00000001 00000000`0034cca0 : js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +00000000`0034cc60 00000001`3f863e75 : 00000000`0681b000 00000000`0034cd38 00000001`3fcb4058 00000000`00000000 : js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 668] +00000000`0034cce0 00000001`3f891a5b : 00000000`0681b000 00000000`00000000 00000000`0034cdf0 00000000`0034cde8 : js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] +00000000`0034cd70 00000001`3f6e26b4 : fff90000`00000000 00000000`00000000 00000000`0034cf20 00000001`3fe0de70 : js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +00000000`0034cea0 00000001`3f649d65 : 00000000`08e8d688 00000000`0034cf18 00000000`0034d501 00000000`0681b000 : js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +00000000`0034cee0 00000001`3f713807 : 00000000`0034d030 00000000`0034d070 00000000`0681b000 fffe0000`00000000 : js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +00000000`0034cf70 00000001`3f6265f4 : 00000000`0034d0f8 00000000`0034d120 00000000`0034d0d8 00000001`3fc8d4f0 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +00000000`0034d0a0 00000001`3f6e41c2 : 00000000`0681b000 00000001`3fa6c5ca 00000000`0034d500 00000000`0681b000 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +00000000`0034d150 00000001`3f6e43a0 : 00000000`0681b000 00000001`3fe0de50 00000000`0034d250 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +00000000`0034d1b0 00000001`3f6e7dfd : 00000000`0681b000 00000000`0034d250 00000000`0034d370 00000000`00000002 : js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] +00000000`0034d210 00000001`3f8a5a1f : 00000000`0034ed50 00000000`08e90a88 00000000`0034d568 00000000`06884040 : js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +00000000`0034d270 00000001`3fb69cc0 : 00000000`00000001 00000000`00000001 00000000`0034d410 00000000`0917a2cd : js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] +00000000`0034d310 00000249`c09e1b33 : 00000000`091ff410 00000000`00003800 00002c77`00000055 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +00000000`0034d470 00000000`091ff410 : 00000000`00003800 00002c77`00000055 00000000`00000001 00000000`0034d500 : 0x249`c09e1b33 +00000000`0034d478 00000000`00003800 : 00002c77`00000055 00000000`00000001 00000000`0034d500 00000000`0034d4b8 : 0x91ff410 +00000000`0034d480 00002c77`00000055 : 00000000`00000001 00000000`0034d500 00000000`0034d4b8 00000000`091f9300 : 0x3800 +00000000`0034d488 00000000`00000001 : 00000000`0034d500 00000000`0034d4b8 00000000`091f9300 00000000`0034d4b8 : 0x2c77`00000055 +00000000`0034d490 00000000`0034d500 : 00000000`0034d4b8 00000000`091f9300 00000000`0034d4b8 00000000`091ff398 : 0x1 +00000000`0034d498 00000000`0034d4b8 : 00000000`091f9300 00000000`0034d4b8 00000000`091ff398 fff90000`00000000 : 0x34d500 +00000000`0034d4a0 00000000`091f9300 : 00000000`0034d4b8 00000000`091ff398 fff90000`00000000 00000001`3fe1c5b0 : 0x34d4b8 +00000000`0034d4a8 00000000`0034d4b8 : 00000000`091ff398 fff90000`00000000 00000001`3fe1c5b0 00000000`08e61520 : 0x91f9300 +00000000`0034d4b0 00000000`091ff398 : fff90000`00000000 00000001`3fe1c5b0 00000000`08e61520 00000249`c09ea773 : 0x34d4b8 +00000000`0034d4b8 fff90000`00000000 : 00000001`3fe1c5b0 00000000`08e61520 00000249`c09ea773 00000000`00004822 : 0x91ff398 +00000000`0034d4c0 00000001`3fe1c5b0 : 00000000`08e61520 00000249`c09ea773 00000000`00004822 00000000`0034d568 : 0xfff90000`00000000 +00000000`0034d4c8 00000000`08e61520 : 00000249`c09ea773 00000000`00004822 00000000`0034d568 00000000`091ff410 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +00000000`0034d4d0 00000249`c09ea773 : 00000000`00004822 00000000`0034d568 00000000`091ff410 00000000`00000001 : 0x8e61520 +00000000`0034d4d8 00000000`00004822 : 00000000`0034d568 00000000`091ff410 00000000`00000001 00000000`0034d500 : 0x249`c09ea773 +00000000`0034d4e0 00000000`0034d568 : 00000000`091ff410 00000000`00000001 00000000`0034d500 fffe0000`08d00480 : 0x4822 +00000000`0034d4e8 00000000`091ff410 : 00000000`00000001 00000000`0034d500 fffe0000`08d00480 fffe0000`08ea21c0 : 0x34d568 +00000000`0034d4f0 00000000`00000001 : 00000000`0034d500 fffe0000`08d00480 fffe0000`08ea21c0 fffa8000`08e8d688 : 0x91ff410 +00000000`0034d4f8 00000000`0034d500 : fffe0000`08d00480 fffe0000`08ea21c0 fffa8000`08e8d688 00000000`0034d598 : 0x1 +00000000`0034d500 fffe0000`08d00480 : fffe0000`08ea21c0 fffa8000`08e8d688 00000000`0034d598 00000000`091ff410 : 0x34d500 +00000000`0034d508 fffe0000`08ea21c0 : fffa8000`08e8d688 00000000`0034d598 00000000`091ff410 00000249`c09edf7d : 0xfffe0000`08d00480 +00000000`0034d510 fffa8000`08e8d688 : 00000000`0034d598 00000000`091ff410 00000249`c09edf7d 00000000`00006821 : 0xfffe0000`08ea21c0 +00000000`0034d518 00000000`0034d598 : 00000000`091ff410 00000249`c09edf7d 00000000`00006821 fffa8000`08e8d688 : 0xfffa8000`08e8d688 +00000000`0034d520 00000000`091ff410 : 00000249`c09edf7d 00000000`00006821 fffa8000`08e8d688 fffe0000`08e74260 : 0x34d598 +00000000`0034d528 00000249`c09edf7d : 00000000`00006821 fffa8000`08e8d688 fffe0000`08e74260 fffe0000`08e74280 : 0x91ff410 +00000000`0034d530 00000000`00006821 : fffa8000`08e8d688 fffe0000`08e74260 fffe0000`08e74280 fffe0000`08d00420 : 0x249`c09edf7d +00000000`0034d538 fffa8000`08e8d688 : fffe0000`08e74260 fffe0000`08e74280 fffe0000`08d00420 fffa0000`0000000e : 0x6821 +00000000`0034d540 fffe0000`08e74260 : fffe0000`08e74280 fffe0000`08d00420 fffa0000`0000000e fff90000`00000000 : 0xfffa8000`08e8d688 +00000000`0034d548 fffe0000`08e74280 : fffe0000`08d00420 fffa0000`0000000e fff90000`00000000 00000000`00000000 : 0xfffe0000`08e74260 +00000000`0034d550 fffe0000`08d00420 : fffa0000`0000000e fff90000`00000000 00000000`00000000 fff90000`00000000 : 0xfffe0000`08e74280 +00000000`0034d558 fffa0000`0000000e : fff90000`00000000 00000000`00000000 fff90000`00000000 00000000`00000068 : 0xfffe0000`08d00420 +00000000`0034d560 fff90000`00000000 : 00000000`00000000 fff90000`00000000 00000000`00000068 00000000`08e72040 : 0xfffa0000`0000000e +00000000`0034d568 00000000`00000000 : fff90000`00000000 00000000`00000068 00000000`08e72040 00000000`00000000 : 0xfff90000`00000000 + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FAULTING_SOURCE_CODE: + 3671: + 3672: js::gc::AllocKind + 3673: JSObject::allocKindForTenure(const js::Nursery& nursery) const + 3674: { +> 3675: if (is()) { + 3676: const ArrayObject& aobj = as(); + 3677: MOZ_ASSERT(aobj.numFixedSlots() == 0); + 3678: + 3679: /* Use minimal size object if we are just going to copy the pointer. */ + 3680: if (!nursery.isInside(aobj.getElementsHeader())) + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_64_dm_windows!JSObject::allocKindForTenure+13 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_64_dm_windows_62f79d676e0e + +IMAGE_NAME: js-64-dm-windows-62f79d676e0e.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_c0000005_js-64-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # Child-SP RetAddr Call Site +00 00000000`0034c4b0 00000001`3f93a984 js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +01 00000000`0034c4e0 00000001`3f92fe3c js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] +02 00000000`0034c520 00000001`3f93348f js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\mozillaadmin\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +03 00000000`0034c550 00000001`3fb90421 js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 520] +04 00000000`0034c5b0 00000001`3f8c9da7 js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +05 00000000`0034c5f0 00000001`3f8c9f0d js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +06 00000000`0034c650 00000001`3f93f20e js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +07 00000000`0034c690 00000001`3f9376c4 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +08 00000000`0034c760 00000001`3f936e7d js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +09 00000000`0034c900 00000001`3f6762d6 js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +0a 00000000`0034caa0 00000001`3f7ed102 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6521] +0b 00000000`0034cb50 00000001`3f7e9447 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +0c 00000000`0034cb80 00000001`3f64c0c6 js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +0d 00000000`0034cbd0 00000001`3f86378f js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +0e 00000000`0034cc60 00000001`3f863e75 js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 668] +0f 00000000`0034cce0 00000001`3f891a5b js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] +10 00000000`0034cd70 00000001`3f6e26b4 js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +11 00000000`0034cea0 00000001`3f649d65 js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +12 00000000`0034cee0 00000001`3f713807 js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +13 00000000`0034cf70 00000001`3f6265f4 js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +14 00000000`0034d0a0 00000001`3f6e41c2 js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +15 00000000`0034d150 00000001`3f6e43a0 js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +16 00000000`0034d1b0 00000001`3f6e7dfd js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] +17 00000000`0034d210 00000001`3f8a5a1f js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +18 00000000`0034d270 00000001`3fb69cc0 js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] +19 00000000`0034d310 00000249`c09e1b33 js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +1a 00000000`0034d470 00000000`091ff410 0x249`c09e1b33 +1b 00000000`0034d478 00000000`00003800 0x91ff410 +1c 00000000`0034d480 00002c77`00000055 0x3800 +1d 00000000`0034d488 00000000`00000001 0x2c77`00000055 +1e 00000000`0034d490 00000000`0034d500 0x1 +1f 00000000`0034d498 00000000`0034d4b8 0x34d500 +20 00000000`0034d4a0 00000000`091f9300 0x34d4b8 +21 00000000`0034d4a8 00000000`0034d4b8 0x91f9300 +22 00000000`0034d4b0 00000000`091ff398 0x34d4b8 +23 00000000`0034d4b8 fff90000`00000000 0x91ff398 +24 00000000`0034d4c0 00000001`3fe1c5b0 0xfff90000`00000000 +25 00000000`0034d4c8 00000000`08e61520 js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +26 00000000`0034d4d0 00000249`c09ea773 0x8e61520 +27 00000000`0034d4d8 00000000`00004822 0x249`c09ea773 +28 00000000`0034d4e0 00000000`0034d568 0x4822 +29 00000000`0034d4e8 00000000`091ff410 0x34d568 +2a 00000000`0034d4f0 00000000`00000001 0x91ff410 +2b 00000000`0034d4f8 00000000`0034d500 0x1 +2c 00000000`0034d500 fffe0000`08d00480 0x34d500 +2d 00000000`0034d508 fffe0000`08ea21c0 0xfffe0000`08d00480 +2e 00000000`0034d510 fffa8000`08e8d688 0xfffe0000`08ea21c0 +2f 00000000`0034d518 00000000`0034d598 0xfffa8000`08e8d688 +30 00000000`0034d520 00000000`091ff410 0x34d598 +31 00000000`0034d528 00000249`c09edf7d 0x91ff410 +32 00000000`0034d530 00000000`00006821 0x249`c09edf7d +33 00000000`0034d538 fffa8000`08e8d688 0x6821 +34 00000000`0034d540 fffe0000`08e74260 0xfffa8000`08e8d688 +35 00000000`0034d548 fffe0000`08e74280 0xfffe0000`08e74260 +36 00000000`0034d550 fffe0000`08d00420 0xfffe0000`08e74280 +37 00000000`0034d558 fffa0000`0000000e 0xfffe0000`08d00420 +38 00000000`0034d560 fff90000`00000000 0xfffa0000`0000000e +39 00000000`0034d568 00000000`00000000 0xfff90000`00000000 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +RetAddr : Args to Child : Call Site +00000001`3f93a984 : 00000000`0034c730 00000000`090bb400 00000000`0681b000 00000001`3f8254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00000001`3f92fe3c : 00000000`0034dd0a 00007fff`ffffffff fffe0000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] +00000001`3f93348f : 00000000`08e73103 00000000`0034c7b0 00000000`00000000 00000000`00000003 : js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\mozillaadmin\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +00000001`3fb90421 : 00000000`0034c7b0 00000000`08e771a8 00000000`00000003 00000000`091ff448 : js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 520] +00000001`3f8c9da7 : 00000000`0917a2cd 00000000`0034c7b0 00000001`3f600000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +00000001`3f8c9f0d : 00000000`0034c7b0 00000000`0681b940 00000000`06824b00 00000000`0681b200 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +00000001`3f93f20e : 00000000`06824b00 00000000`06824b00 00000000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +00000001`3f9376c4 : 00000000`06824b00 00000000`0681b940 00000000`06824b00 00000000`06824b00 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +00000001`3f936e7d : 00000000`0034cc18 01d215fd`e1c035f9 00000000`06882080 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +00000001`3f6762d6 : 00000000`0681b8f8 00000000`0034cae9 00000000`00000007 00000000`06882080 : js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +00000001`3f7ed102 : 00000000`0681b000 00000000`0681b8f8 00000000`0681b000 00000000`0681b8f8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6521] +00000001`3f7e9447 : 00000000`0681b000 00000000`00000001 00000000`0684bb78 00000000`3a9da8e8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +00000001`3f64c0c6 : 00000000`00000000 00000001`3fcb4058 00000000`00000000 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +00000001`3f86378f : 00000000`06884000 00000000`00000000 00000000`00000001 00000000`0034cca0 : js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +00000001`3f863e75 : 00000000`0681b000 00000000`0034cd38 00000001`3fcb4058 00000000`00000000 : js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 668] +00000001`3f891a5b : 00000000`0681b000 00000000`00000000 00000000`0034cdf0 00000000`0034cde8 : js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] +00000001`3f6e26b4 : fff90000`00000000 00000000`00000000 00000000`0034cf20 00000001`3fe0de70 : js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +00000001`3f649d65 : 00000000`08e8d688 00000000`0034cf18 00000000`0034d501 00000000`0681b000 : js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +00000001`3f713807 : 00000000`0034d030 00000000`0034d070 00000000`0681b000 fffe0000`00000000 : js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +00000001`3f6265f4 : 00000000`0034d0f8 00000000`0034d120 00000000`0034d0d8 00000001`3fc8d4f0 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +00000001`3f6e41c2 : 00000000`0681b000 00000001`3fa6c5ca 00000000`0034d500 00000000`0681b000 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +00000001`3f6e43a0 : 00000000`0681b000 00000001`3fe0de50 00000000`0034d250 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +00000001`3f6e7dfd : 00000000`0681b000 00000000`0034d250 00000000`0034d370 00000000`00000002 : js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] +00000001`3f8a5a1f : 00000000`0034ed50 00000000`08e90a88 00000000`0034d568 00000000`06884040 : js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +00000001`3fb69cc0 : 00000000`00000001 00000000`00000001 00000000`0034d410 00000000`0917a2cd : js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] +00000249`c09e1b33 : 00000000`091ff410 00000000`00003800 00002c77`00000055 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +00000000`091ff410 : 00000000`00003800 00002c77`00000055 00000000`00000001 00000000`0034d500 : 0x249`c09e1b33 +00000000`00003800 : 00002c77`00000055 00000000`00000001 00000000`0034d500 00000000`0034d4b8 : 0x91ff410 +00002c77`00000055 : 00000000`00000001 00000000`0034d500 00000000`0034d4b8 00000000`091f9300 : 0x3800 +00000000`00000001 : 00000000`0034d500 00000000`0034d4b8 00000000`091f9300 00000000`0034d4b8 : 0x2c77`00000055 +00000000`0034d500 : 00000000`0034d4b8 00000000`091f9300 00000000`0034d4b8 00000000`091ff398 : 0x1 +00000000`0034d4b8 : 00000000`091f9300 00000000`0034d4b8 00000000`091ff398 fff90000`00000000 : 0x34d500 +00000000`091f9300 : 00000000`0034d4b8 00000000`091ff398 fff90000`00000000 00000001`3fe1c5b0 : 0x34d4b8 +00000000`0034d4b8 : 00000000`091ff398 fff90000`00000000 00000001`3fe1c5b0 00000000`08e61520 : 0x91f9300 +00000000`091ff398 : fff90000`00000000 00000001`3fe1c5b0 00000000`08e61520 00000249`c09ea773 : 0x34d4b8 +fff90000`00000000 : 00000001`3fe1c5b0 00000000`08e61520 00000249`c09ea773 00000000`00004822 : 0x91ff398 +00000001`3fe1c5b0 : 00000000`08e61520 00000249`c09ea773 00000000`00004822 00000000`0034d568 : 0xfff90000`00000000 +00000000`08e61520 : 00000249`c09ea773 00000000`00004822 00000000`0034d568 00000000`091ff410 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +00000249`c09ea773 : 00000000`00004822 00000000`0034d568 00000000`091ff410 00000000`00000001 : 0x8e61520 +00000000`00004822 : 00000000`0034d568 00000000`091ff410 00000000`00000001 00000000`0034d500 : 0x249`c09ea773 +00000000`0034d568 : 00000000`091ff410 00000000`00000001 00000000`0034d500 fffe0000`08d00480 : 0x4822 +00000000`091ff410 : 00000000`00000001 00000000`0034d500 fffe0000`08d00480 fffe0000`08ea21c0 : 0x34d568 +00000000`00000001 : 00000000`0034d500 fffe0000`08d00480 fffe0000`08ea21c0 fffa8000`08e8d688 : 0x91ff410 +00000000`0034d500 : fffe0000`08d00480 fffe0000`08ea21c0 fffa8000`08e8d688 00000000`0034d598 : 0x1 +fffe0000`08d00480 : fffe0000`08ea21c0 fffa8000`08e8d688 00000000`0034d598 00000000`091ff410 : 0x34d500 +fffe0000`08ea21c0 : fffa8000`08e8d688 00000000`0034d598 00000000`091ff410 00000249`c09edf7d : 0xfffe0000`08d00480 +fffa8000`08e8d688 : 00000000`0034d598 00000000`091ff410 00000249`c09edf7d 00000000`00006821 : 0xfffe0000`08ea21c0 +00000000`0034d598 : 00000000`091ff410 00000249`c09edf7d 00000000`00006821 fffa8000`08e8d688 : 0xfffa8000`08e8d688 +00000000`091ff410 : 00000249`c09edf7d 00000000`00006821 fffa8000`08e8d688 fffe0000`08e74260 : 0x34d598 +00000249`c09edf7d : 00000000`00006821 fffa8000`08e8d688 fffe0000`08e74260 fffe0000`08e74280 : 0x91ff410 +00000000`00006821 : fffa8000`08e8d688 fffe0000`08e74260 fffe0000`08e74280 fffe0000`08d00420 : 0x249`c09edf7d +fffa8000`08e8d688 : fffe0000`08e74260 fffe0000`08e74280 fffe0000`08d00420 fffa0000`0000000e : 0x6821 +fffe0000`08e74260 : fffe0000`08e74280 fffe0000`08d00420 fffa0000`0000000e fff90000`00000000 : 0xfffa8000`08e8d688 +fffe0000`08e74280 : fffe0000`08d00420 fffa0000`0000000e fff90000`00000000 00000000`00000000 : 0xfffe0000`08e74260 +fffe0000`08d00420 : fffa0000`0000000e fff90000`00000000 00000000`00000000 fff90000`00000000 : 0xfffe0000`08e74280 +fffa0000`0000000e : fff90000`00000000 00000000`00000000 fff90000`00000000 00000000`00000068 : 0xfffe0000`08d00420 +fff90000`00000000 : 00000000`00000000 fff90000`00000000 00000000`00000068 00000000`08e72040 : 0xfffa0000`0000000e +00000000`00000000 : fff90000`00000000 00000000`00000068 00000000`08e72040 00000000`00000000 : 0xfff90000`00000000 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-6b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-6b-crashlog.txt new file mode 100644 index 000000000..be1208be1 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-6b-crashlog.txt @@ -0,0 +1,503 @@ + +Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-64-dm-windows-62f79d676e0e.exe.6768.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: srv* +Executable search path is: +Windows 10 Version 14393 MP (8 procs) Free x64 +Product: WinNt, suite: SingleUserTS +Built by: 10.0.14393.0 (rs1_release.160715-1616) +Machine Name: +Debug session time: Tue Sep 20 18:00:30.000 2016 (UTC - 7:00) +System Uptime: not available +Process Uptime: not available +................... +This dump file has an exception of interest stored in it. +The stored exception information can be accessed via .ecxr. +(1a70.fb0): Access violation - code c0000005 (first/second chance not available) +*** WARNING: Unable to verify checksum for js-64-dm-windows-62f79d676e0e.exe +js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [inlined in js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13]: +00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +The current thread doesn't have a guest (WoW) context. +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b +rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 +rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 + r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 +r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff +r14=000000e87fbfd0e0 r15=0000000000000003 +iopl=0 nv up ei pl nz na pe nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 +js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [inlined in js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13]: +00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] [inlined in js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675]]: +00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] +00007ff7`4d469ff6 4c3bc0 cmp r8,rax +00007ff7`4d469ff9 7575 jne js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x90 (00007ff7`4d46a070) +00007ff7`4d469ffb 4c8b4208 mov r8,qword ptr [rdx+8] +00007ff7`4d469fff 488b4210 mov rax,qword ptr [rdx+10h] +00007ff7`4d46a003 498d14c0 lea rdx,[r8+rax*8] +00007ff7`4d46a007 4c3bc2 cmp r8,rdx +00007ff7`4d46a00a 741f je js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x4b (00007ff7`4d46a02b) +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +00000000`4d469ff3 ?? ?? ?? ?? ???? +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +00007ff7`4d469ff3 4c 8b 01 4c 3b c0 75 75 L..L;.uu +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + + +DUMP_CLASS: 2 + +DUMP_QUALIFIER: 400 + +CONTEXT: (.ecxr) +rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b +rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 +rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 + r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 +r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff +r14=000000e87fbfd0e0 r15=0000000000000003 +iopl=0 nv up ei pl nz na pe nc +cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 +js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [inlined in js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13]: +00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? +Resetting default scope + +FAULTING_IP: +js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] + +EXCEPTION_RECORD: (.exr -1) +ExceptionAddress: 00007ff74d469ff3 (js_64_dm_windows_62f79d676e0e!JSObject::is+0x000000000000000a) + ExceptionCode: c0000005 (Access violation) + ExceptionFlags: 00000000 +NumberParameters: 2 + Parameter[0]: 0000000000000000 + Parameter[1]: ffffffffffffffff +Attempt to read from address ffffffffffffffff + +DEFAULT_BUCKET_ID: INVALID_POINTER_READ + +PROCESS_NAME: js-64-dm-windows-62f79d676e0e.exe + +ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. + +EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. + +EXCEPTION_CODE_STR: c0000005 + +EXCEPTION_PARAMETER1: 0000000000000000 + +EXCEPTION_PARAMETER2: ffffffffffffffff + +READ_ADDRESS: ffffffffffffffff + +FOLLOWUP_IP: +js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] + +BUGCHECK_STR: INVALID_POINTER_READ + +WATSON_BKT_PROCSTAMP: 57e190a5 + +WATSON_BKT_PROCVER: 0.0.0.0 + +WATSON_BKT_MODULE: js-64-dm-windows-62f79d676e0e.exe + +WATSON_BKT_MODSTAMP: 57e190a5 + +WATSON_BKT_MODOFFSET: 269ff3 + +WATSON_BKT_MODVER: 0.0.0.0 + +BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) + +MODLIST_WITH_TSCHKSUM_HASH: 457e1f2f1cc45eb2070f5117d6ffe3c804e96e7f + +MODLIST_SHA1_HASH: b28e2d2d138839537b07d015219b4414560841f3 + +NTGLOBALFLAG: 0 + +APPLICATION_VERIFIER_FLAGS: 0 + +DUMP_FLAGS: 94 + +DUMP_TYPE: 1 + +APP: js-64-dm-windows-62f79d676e0e.exe + +ANALYSIS_SESSION_HOST: F1BRIX + +ANALYSIS_SESSION_TIME: 09-20-2016 18:00:31.0708 + +ANALYSIS_VERSION: 10.0.10586.567 amd64fre + +THREAD_ATTRIBUTES: +OS_LOCALE: ENU + +PROBLEM_CLASSES: + + + +INVALID_POINTER_READ + Tid [0xfb0] + Frame [0x00]: js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure + + +LAST_CONTROL_TRANSFER: from 00007ff74d53a984 to 00007ff74d469ff3 + +STACK_TEXT: +000000e8`7fbfc040 00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 +000000e8`7fbfc070 00007ff7`4d52fe3c : 000000e8`7fbfd89a 00007fff`ffffffff fffe0000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 +000000e8`7fbfc0b0 00007ff7`4d53348f : 00000285`ef21b803 000000e8`7fbfc340 00000000`00000000 00000000`00000003 : js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac +000000e8`7fbfc0e0 00007ff7`4d790421 : 000000e8`7fbfc340 00000285`ef5771a8 00000000`00000003 00000285`ef8ff448 : js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf +000000e8`7fbfc140 00007ff7`4d4c9da7 : 00000285`ef87a2cd 000000e8`7fbfc340 00007ff7`4d200000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 +000000e8`7fbfc180 00007ff7`4d4c9f0d : 000000e8`7fbfc340 00000285`ef21b940 00000285`ef224b00 00000285`ef21b200 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 +000000e8`7fbfc1e0 00007ff7`4d53f20e : 00000285`ef224b00 00000285`ef224b00 00000285`ef21b200 000000e8`7fbfc2c0 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d +000000e8`7fbfc220 00007ff7`4d5376c4 : 00000285`ef224b00 00000285`ef21b940 00000285`ef224b00 00000285`ef224b00 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e +000000e8`7fbfc2f0 00007ff7`4d536e7d : 01d213a3`8cbecbd1 000000e8`7fbfc978 00000285`ef282080 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 +000000e8`7fbfc490 00007ff7`4d2762d6 : 00000285`ef21b8f8 000000e8`7fbfc679 00000000`00000007 00000285`ef282080 : js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d +000000e8`7fbfc630 00007ff7`4d3ed102 : 00000285`ef21b000 00000285`ef21b8f8 00000285`ef21b000 00000285`ef21b8f8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 +000000e8`7fbfc6e0 00007ff7`4d3e9447 : 00000285`ef21b000 000000e8`00000001 00000285`ef24bae8 00000000`7e60cc68 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 +000000e8`7fbfc710 00007ff7`4d24c0c6 : 00000000`00000000 00007ff7`4d8b4018 00000000`00000000 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 +000000e8`7fbfc760 00007ff7`4d46378f : 00000285`ef284000 00000000`00000000 00000000`00000001 000000e8`7fbfc830 : js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 +000000e8`7fbfc7f0 00007ff7`4d463e75 : 00000285`ef21b000 000000e8`7fbfc8c8 00007ff7`4d8b4018 00000000`00000000 : js_64_dm_windows_62f79d676e0e!NewObject+0x16f +000000e8`7fbfc870 00007ff7`4d491a5b : 00000285`ef21b000 00000000`00000000 000000e8`7fbfc980 000000e8`7fbfc978 : js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 +000000e8`7fbfc900 00007ff7`4d2e26b4 : fff90000`00000000 00000000`00000000 000000e8`7fbfcab0 00007ff7`4da0de70 : js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db +000000e8`7fbfca30 00007ff7`4d249d65 : 00000285`ef58d688 000000e8`7fbfcaa8 000000e8`7fbfd001 00000285`ef21b000 : js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 +000000e8`7fbfca70 00007ff7`4d313807 : 000000e8`7fbfcbc0 000000e8`7fbfcc00 00000285`ef21b000 fffe0000`00000000 : js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 +000000e8`7fbfcb00 00007ff7`4d2265f4 : 000000e8`7fbfcc88 000000e8`7fbfccb0 000000e8`7fbfcc68 00007ff7`4d88d4f0 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 +000000e8`7fbfcc30 00007ff7`4d2e41c2 : 00000285`ef21b000 00007ff7`4d66c5ca 000000e8`7fbfd090 00000285`ef21b000 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 +000000e8`7fbfcce0 00007ff7`4d2e43a0 : 00000285`ef21b000 00007ff7`4da0de50 000000e8`7fbfcde0 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 +000000e8`7fbfcd40 00007ff7`4d2e7dfd : 00000285`ef21b000 000000e8`7fbfcde0 000000e8`7fbfcf00 00000000`00000002 : js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 +000000e8`7fbfcda0 00007ff7`4d4a5a1f : 000000e8`7fbfe8e0 00000285`ef590a88 000000e8`7fbfd0f8 00000285`ef284040 : js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d +000000e8`7fbfce00 00007ff7`4d769cc0 : 00000000`00000001 00000000`00000001 000000e8`7fbfcfa0 00000285`ef87a2cd : js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f +000000e8`7fbfcea0 00000372`d2ed1c0d : 00000285`ef8ff410 00000000`00003800 0000ee80`00000055 00000285`00000001 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 +000000e8`7fbfd000 00000285`ef8ff410 : 00000000`00003800 0000ee80`00000055 00000285`00000001 000000e8`7fbfd090 : 0x00000372`d2ed1c0d +000000e8`7fbfd008 00000000`00003800 : 0000ee80`00000055 00000285`00000001 000000e8`7fbfd090 000000e8`7fbfd048 : 0x00000285`ef8ff410 +000000e8`7fbfd010 0000ee80`00000055 : 00000285`00000001 000000e8`7fbfd090 000000e8`7fbfd048 00000285`ef8f9300 : 0x3800 +000000e8`7fbfd018 00000285`00000001 : 000000e8`7fbfd090 000000e8`7fbfd048 00000285`ef8f9300 000000e8`7fbfd048 : 0x0000ee80`00000055 +000000e8`7fbfd020 000000e8`7fbfd090 : 000000e8`7fbfd048 00000285`ef8f9300 000000e8`7fbfd048 00000285`ef8ff398 : 0x00000285`00000001 +000000e8`7fbfd028 000000e8`7fbfd048 : 00000285`ef8f9300 000000e8`7fbfd048 00000285`ef8ff398 fff90000`00000000 : 0x000000e8`7fbfd090 +000000e8`7fbfd030 00000285`ef8f9300 : 000000e8`7fbfd048 00000285`ef8ff398 fff90000`00000000 00007ff7`4da1c5b0 : 0x000000e8`7fbfd048 +000000e8`7fbfd038 000000e8`7fbfd048 : 00000285`ef8ff398 fff90000`00000000 00007ff7`4da1c5b0 00000285`ef561520 : 0x00000285`ef8f9300 +000000e8`7fbfd040 00000285`ef8ff398 : fff90000`00000000 00007ff7`4da1c5b0 00000285`ef561520 00000372`d2edb443 : 0x000000e8`7fbfd048 +000000e8`7fbfd048 fff90000`00000000 : 00007ff7`4da1c5b0 00000285`ef561520 00000372`d2edb443 00000000`00004822 : 0x00000285`ef8ff398 +000000e8`7fbfd050 00007ff7`4da1c5b0 : 00000285`ef561520 00000372`d2edb443 00000000`00004822 000000e8`7fbfd0f8 : 0xfff90000`00000000 +000000e8`7fbfd058 00000285`ef561520 : 00000372`d2edb443 00000000`00004822 000000e8`7fbfd0f8 00000285`ef8ff410 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +000000e8`7fbfd060 00000372`d2edb443 : 00000000`00004822 000000e8`7fbfd0f8 00000285`ef8ff410 00000000`00000001 : 0x00000285`ef561520 +000000e8`7fbfd068 00000000`00004822 : 000000e8`7fbfd0f8 00000285`ef8ff410 00000000`00000001 000000e8`7fbfd090 : 0x00000372`d2edb443 +000000e8`7fbfd070 000000e8`7fbfd0f8 : 00000285`ef8ff410 00000000`00000001 000000e8`7fbfd090 fffe0285`ef400480 : 0x4822 +000000e8`7fbfd078 00000285`ef8ff410 : 00000000`00000001 000000e8`7fbfd090 fffe0285`ef400480 fffe0285`ef5a21c0 : 0x000000e8`7fbfd0f8 +000000e8`7fbfd080 00000000`00000001 : 000000e8`7fbfd090 fffe0285`ef400480 fffe0285`ef5a21c0 fffa8285`ef58d688 : 0x00000285`ef8ff410 +000000e8`7fbfd088 000000e8`7fbfd090 : fffe0285`ef400480 fffe0285`ef5a21c0 fffa8285`ef58d688 000000e8`7fbfd128 : 0x1 +000000e8`7fbfd090 fffe0285`ef400480 : fffe0285`ef5a21c0 fffa8285`ef58d688 000000e8`7fbfd128 00000285`ef8ff410 : 0x000000e8`7fbfd090 +000000e8`7fbfd098 fffe0285`ef5a21c0 : fffa8285`ef58d688 000000e8`7fbfd128 00000285`ef8ff410 000001e3`e8e60659 : 0xfffe0285`ef400480 +000000e8`7fbfd0a0 fffa8285`ef58d688 : 000000e8`7fbfd128 00000285`ef8ff410 000001e3`e8e60659 00000000`00006821 : 0xfffe0285`ef5a21c0 +000000e8`7fbfd0a8 000000e8`7fbfd128 : 00000285`ef8ff410 000001e3`e8e60659 00000000`00006821 fffa8285`ef58d688 : 0xfffa8285`ef58d688 +000000e8`7fbfd0b0 00000285`ef8ff410 : 000001e3`e8e60659 00000000`00006821 fffa8285`ef58d688 fffe0285`ef574260 : 0x000000e8`7fbfd128 +000000e8`7fbfd0b8 000001e3`e8e60659 : 00000000`00006821 fffa8285`ef58d688 fffe0285`ef574260 fffe0285`ef574280 : 0x00000285`ef8ff410 +000000e8`7fbfd0c0 00000000`00006821 : fffa8285`ef58d688 fffe0285`ef574260 fffe0285`ef574280 fffe0285`ef400420 : 0x000001e3`e8e60659 +000000e8`7fbfd0c8 fffa8285`ef58d688 : fffe0285`ef574260 fffe0285`ef574280 fffe0285`ef400420 fffa0000`0000000e : 0x6821 +000000e8`7fbfd0d0 fffe0285`ef574260 : fffe0285`ef574280 fffe0285`ef400420 fffa0000`0000000e fff90000`00000000 : 0xfffa8285`ef58d688 +000000e8`7fbfd0d8 fffe0285`ef574280 : fffe0285`ef400420 fffa0000`0000000e fff90000`00000000 00000000`00000000 : 0xfffe0285`ef574260 +000000e8`7fbfd0e0 fffe0285`ef400420 : fffa0000`0000000e fff90000`00000000 00000000`00000000 fff90000`00000000 : 0xfffe0285`ef574280 +000000e8`7fbfd0e8 fffa0000`0000000e : fff90000`00000000 00000000`00000000 fff90000`00000000 00000000`00000068 : 0xfffe0285`ef400420 +000000e8`7fbfd0f0 fff90000`00000000 : 00000000`00000000 fff90000`00000000 00000000`00000068 00000285`ef572040 : 0xfffa0000`0000000e +000000e8`7fbfd0f8 00000000`00000000 : fff90000`00000000 00000000`00000068 00000285`ef572040 00000000`00000000 : 0xfff90000`00000000 + + +THREAD_SHA1_HASH_MOD_FUNC: 88d9aafc54237ff5b6e38cf2545e813bbce86d66 + +THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 57f40accb145976916a7e2344c183e855eda1750 + +THREAD_SHA1_HASH_MOD: bd5e9ec3202cd697484202e24bb53788e16c3016 + +FAULT_INSTR_CODE: 4c018b4c + +FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp + +FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp + +FAULTING_SOURCE_LINE_NUMBER: 3675 + +FAULTING_SOURCE_CODE: + 31: template<> + 32: inline bool + 33: JSObject::is() const + 34: { +> 35: return js::IsWrapper(const_cast(this)); + 36: } + 37: + 38: template<> + 39: inline bool + 40: JSObject::is() const + + +SYMBOL_STACK_INDEX: 0 + +SYMBOL_NAME: js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_64_dm_windows_62f79d676e0e + +IMAGE_NAME: js-64-dm-windows-62f79d676e0e.exe + +DEBUG_FLR_IMAGE_TIMESTAMP: 57e190a5 + +STACK_COMMAND: .ecxr ; kb + +BUCKET_ID: INVALID_POINTER_READ_js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 + +PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 + +BUCKET_ID_OFFSET: 13 + +BUCKET_ID_MODULE_STR: js_64_dm_windows_62f79d676e0e + +BUCKET_ID_MODTIMEDATESTAMP: 57e190a5 + +BUCKET_ID_MODCHECKSUM: 0 + +BUCKET_ID_MODVER_STR: 0.0.0.0 + +BUCKET_ID_PREFIX_STR: INVALID_POINTER_READ_ + +FAILURE_PROBLEM_CLASS: INVALID_POINTER_READ + +FAILURE_EXCEPTION_CODE: c0000005 + +FAILURE_IMAGE_NAME: js-64-dm-windows-62f79d676e0e.exe + +FAILURE_FUNCTION_NAME: JSObject::allocKindForTenure + +BUCKET_ID_FUNCTION_STR: JSObject::allocKindForTenure + +FAILURE_SYMBOL_NAME: js-64-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure + +FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_js-64-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure + +WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e190a5/js-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e190a5/c0000005/00269ff3.htm?Retriage=1 + +TARGET_TIME: 2016-09-21T01:00:30.000Z + +OSBUILD: 14393 + +OSSERVICEPACK: 0 + +SERVICEPACK_NUMBER: 0 + +OS_REVISION: 0 + +SUITE_MASK: 256 + +PRODUCT_TYPE: 1 + +OSPLATFORM_TYPE: x64 + +OSNAME: Windows 10 + +OSEDITION: Windows 10 WinNt SingleUserTS + +USER_LCID: 0 + +OSBUILD_TIMESTAMP: 2016-07-15 19:21:29 + +BUILDDATESTAMP_STR: 160715-1616 + +BUILDLAB_STR: rs1_release + +BUILDOSVER_STR: 10.0.14393.0 + +ANALYSIS_SESSION_ELAPSED_TIME: 378 + +ANALYSIS_SOURCE: UM + +FAILURE_ID_HASH_STRING: um:invalid_pointer_read_c0000005_js-64-dm-windows-62f79d676e0e.exe!jsobject::allockindfortenure + +FAILURE_ID_HASH: {24fae786-bacf-09c0-8a42-5b9e11dae900} + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 + # Child-SP RetAddr Call Site +00 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\wrapperobject.h @ 35] +01 000000e8`7fbfc040 00007ff7`4d53a984 js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +02 000000e8`7fbfc070 00007ff7`4d52fe3c js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] +03 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x35 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] +04 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x35 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] +05 000000e8`7fbfc0b0 00007ff7`4d53348f js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\fuzz1win\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +06 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2241] +07 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!DispatchToTracer+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +08 000000e8`7fbfc0e0 00007ff7`4d790421 js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 520] +09 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!MarkLocals+0x26 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 26] +0a 000000e8`7fbfc140 00007ff7`4d4c9da7 js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +0b 000000e8`7fbfc180 00007ff7`4d4c9f0d js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +0c 000000e8`7fbfc1e0 00007ff7`4d53f20e js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +0d 000000e8`7fbfc220 00007ff7`4d5376c4 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +0e (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeForMinorGC+0x2c [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 304] +0f 000000e8`7fbfc2f0 00007ff7`4d536e7d js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +10 000000e8`7fbfc490 00007ff7`4d2762d6 js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +11 000000e8`7fbfc630 00007ff7`4d3ed102 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsgc.cpp @ 6521] +12 000000e8`7fbfc6e0 00007ff7`4d3e9447 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +13 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] +14 000000e8`7fbfc710 00007ff7`4d24c0c6 js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +15 000000e8`7fbfc760 00007ff7`4d46378f js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +16 000000e8`7fbfc7f0 00007ff7`4d463e75 js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 668] +17 000000e8`7fbfc870 00007ff7`4d491a5b js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 727] +18 000000e8`7fbfc900 00007ff7`4d2e26b4 js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +19 000000e8`7fbfca30 00007ff7`4d249d65 js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +1a (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x75 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +1b 000000e8`7fbfca70 00007ff7`4d313807 js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +1c 000000e8`7fbfcb00 00007ff7`4d2265f4 js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +1d 000000e8`7fbfcc30 00007ff7`4d2e41c2 js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +1e 000000e8`7fbfcce0 00007ff7`4d2e43a0 js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +1f 000000e8`7fbfcd40 00007ff7`4d2e7dfd js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] +20 000000e8`7fbfcda0 00007ff7`4d4a5a1f js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +21 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::CallJSNative+0x38 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +22 000000e8`7fbfce00 00007ff7`4d769cc0 js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] +23 000000e8`7fbfcea0 00000372`d2ed1c0d js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +24 000000e8`7fbfd000 00000285`ef8ff410 0x00000372`d2ed1c0d +25 000000e8`7fbfd008 00000000`00003800 0x00000285`ef8ff410 +26 000000e8`7fbfd010 0000ee80`00000055 0x3800 +27 000000e8`7fbfd018 00000285`00000001 0x0000ee80`00000055 +28 000000e8`7fbfd020 000000e8`7fbfd090 0x00000285`00000001 +29 000000e8`7fbfd028 000000e8`7fbfd048 0x000000e8`7fbfd090 +2a 000000e8`7fbfd030 00000285`ef8f9300 0x000000e8`7fbfd048 +2b 000000e8`7fbfd038 000000e8`7fbfd048 0x00000285`ef8f9300 +2c 000000e8`7fbfd040 00000285`ef8ff398 0x000000e8`7fbfd048 +2d 000000e8`7fbfd048 fff90000`00000000 0x00000285`ef8ff398 +2e 000000e8`7fbfd050 00007ff7`4da1c5b0 0xfff90000`00000000 +2f 000000e8`7fbfd058 00000285`ef561520 js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +30 000000e8`7fbfd060 00000372`d2edb443 0x00000285`ef561520 +31 000000e8`7fbfd068 00000000`00004822 0x00000372`d2edb443 +32 000000e8`7fbfd070 000000e8`7fbfd0f8 0x4822 +33 000000e8`7fbfd078 00000285`ef8ff410 0x000000e8`7fbfd0f8 +34 000000e8`7fbfd080 00000000`00000001 0x00000285`ef8ff410 +35 000000e8`7fbfd088 000000e8`7fbfd090 0x1 +36 000000e8`7fbfd090 fffe0285`ef400480 0x000000e8`7fbfd090 +37 000000e8`7fbfd098 fffe0285`ef5a21c0 0xfffe0285`ef400480 +38 000000e8`7fbfd0a0 fffa8285`ef58d688 0xfffe0285`ef5a21c0 +39 000000e8`7fbfd0a8 000000e8`7fbfd128 0xfffa8285`ef58d688 +3a 000000e8`7fbfd0b0 00000285`ef8ff410 0x000000e8`7fbfd128 +3b 000000e8`7fbfd0b8 000001e3`e8e60659 0x00000285`ef8ff410 +3c 000000e8`7fbfd0c0 00000000`00006821 0x000001e3`e8e60659 +3d 000000e8`7fbfd0c8 fffa8285`ef58d688 0x6821 +3e 000000e8`7fbfd0d0 fffe0285`ef574260 0xfffa8285`ef58d688 +3f 000000e8`7fbfd0d8 fffe0285`ef574280 0xfffe0285`ef574260 +40 000000e8`7fbfd0e0 fffe0285`ef400420 0xfffe0285`ef574280 +41 000000e8`7fbfd0e8 fffa0000`0000000e 0xfffe0285`ef400420 +42 000000e8`7fbfd0f0 fff90000`00000000 0xfffa0000`0000000e +43 000000e8`7fbfd0f8 00000000`00000000 0xfff90000`00000000 +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +RetAddr : Args to Child : Call Site +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\wrapperobject.h @ 35] +00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] +00007ff7`4d52fe3c : 000000e8`7fbfd89a 00007fff`ffffffff fffe0000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x35 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x35 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] +00007ff7`4d53348f : 00000285`ef21b803 000000e8`7fbfc340 00000000`00000000 00000000`00000003 : js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\fuzz1win\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2241] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!DispatchToTracer+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 663] +00007ff7`4d790421 : 000000e8`7fbfc340 00000285`ef5771a8 00000000`00000003 00000285`ef8ff448 : js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 520] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!MarkLocals+0x26 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 26] +00007ff7`4d4c9da7 : 00000285`ef87a2cd 000000e8`7fbfc340 00007ff7`4d200000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] +00007ff7`4d4c9f0d : 000000e8`7fbfc340 00000285`ef21b940 00000285`ef224b00 00000285`ef21b200 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] +00007ff7`4d53f20e : 00000285`ef224b00 00000285`ef224b00 00000285`ef21b200 000000e8`7fbfc2c0 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] +00007ff7`4d5376c4 : 00000285`ef224b00 00000285`ef21b940 00000285`ef224b00 00000285`ef224b00 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeForMinorGC+0x2c [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 304] +00007ff7`4d536e7d : 01d213a3`8cbecbd1 000000e8`7fbfc978 00000285`ef282080 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] +00007ff7`4d2762d6 : 00000285`ef21b8f8 000000e8`7fbfc679 00000000`00000007 00000285`ef282080 : js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] +00007ff7`4d3ed102 : 00000285`ef21b000 00000285`ef21b8f8 00000285`ef21b000 00000285`ef21b8f8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsgc.cpp @ 6521] +00007ff7`4d3e9447 : 00000285`ef21b000 000000e8`00000001 00000285`ef24bae8 00000000`7e60cc68 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] +00007ff7`4d24c0c6 : 00000000`00000000 00007ff7`4d8b4018 00000000`00000000 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] +00007ff7`4d46378f : 00000285`ef284000 00000000`00000000 00000000`00000001 000000e8`7fbfc830 : js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobjinlines.h @ 378] +00007ff7`4d463e75 : 00000285`ef21b000 000000e8`7fbfc8c8 00007ff7`4d8b4018 00000000`00000000 : js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 668] +00007ff7`4d491a5b : 00000285`ef21b000 00000000`00000000 000000e8`7fbfc980 000000e8`7fbfc978 : js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 727] +00007ff7`4d2e26b4 : fff90000`00000000 00000000`00000000 000000e8`7fbfcab0 00007ff7`4da0de70 : js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] +00007ff7`4d249d65 : 00000285`ef58d688 000000e8`7fbfcaa8 000000e8`7fbfd001 00000285`ef21b000 : js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x75 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] +00007ff7`4d313807 : 000000e8`7fbfcbc0 000000e8`7fbfcc00 00000285`ef21b000 fffe0000`00000000 : js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] +00007ff7`4d2265f4 : 000000e8`7fbfcc88 000000e8`7fbfccb0 000000e8`7fbfcc68 00007ff7`4d88d4f0 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartment.cpp @ 445] +00007ff7`4d2e41c2 : 00000285`ef21b000 00007ff7`4d66c5ca 000000e8`7fbfd090 00000285`ef21b000 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] +00007ff7`4d2e43a0 : 00000285`ef21b000 00007ff7`4da0de50 000000e8`7fbfcde0 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] +00007ff7`4d2e7dfd : 00000285`ef21b000 000000e8`7fbfcde0 000000e8`7fbfcf00 00000000`00000002 : js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] +00007ff7`4d4a5a1f : 000000e8`7fbfe8e0 00000285`ef590a88 000000e8`7fbfd0f8 00000285`ef284040 : js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] +(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::CallJSNative+0x38 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] +00007ff7`4d769cc0 : 00000000`00000001 00000000`00000001 000000e8`7fbfcfa0 00000285`ef87a2cd : js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] +00000372`d2ed1c0d : 00000285`ef8ff410 00000000`00003800 0000ee80`00000055 00000285`00000001 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] +00000285`ef8ff410 : 00000000`00003800 0000ee80`00000055 00000285`00000001 000000e8`7fbfd090 : 0x00000372`d2ed1c0d +00000000`00003800 : 0000ee80`00000055 00000285`00000001 000000e8`7fbfd090 000000e8`7fbfd048 : 0x00000285`ef8ff410 +0000ee80`00000055 : 00000285`00000001 000000e8`7fbfd090 000000e8`7fbfd048 00000285`ef8f9300 : 0x3800 +00000285`00000001 : 000000e8`7fbfd090 000000e8`7fbfd048 00000285`ef8f9300 000000e8`7fbfd048 : 0x0000ee80`00000055 +000000e8`7fbfd090 : 000000e8`7fbfd048 00000285`ef8f9300 000000e8`7fbfd048 00000285`ef8ff398 : 0x00000285`00000001 +000000e8`7fbfd048 : 00000285`ef8f9300 000000e8`7fbfd048 00000285`ef8ff398 fff90000`00000000 : 0x000000e8`7fbfd090 +00000285`ef8f9300 : 000000e8`7fbfd048 00000285`ef8ff398 fff90000`00000000 00007ff7`4da1c5b0 : 0x000000e8`7fbfd048 +000000e8`7fbfd048 : 00000285`ef8ff398 fff90000`00000000 00007ff7`4da1c5b0 00000285`ef561520 : 0x00000285`ef8f9300 +00000285`ef8ff398 : fff90000`00000000 00007ff7`4da1c5b0 00000285`ef561520 00000372`d2edb443 : 0x000000e8`7fbfd048 +fff90000`00000000 : 00007ff7`4da1c5b0 00000285`ef561520 00000372`d2edb443 00000000`00004822 : 0x00000285`ef8ff398 +00007ff7`4da1c5b0 : 00000285`ef561520 00000372`d2edb443 00000000`00004822 000000e8`7fbfd0f8 : 0xfff90000`00000000 +00000285`ef561520 : 00000372`d2edb443 00000000`00004822 000000e8`7fbfd0f8 00000285`ef8ff410 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo +00000372`d2edb443 : 00000000`00004822 000000e8`7fbfd0f8 00000285`ef8ff410 00000000`00000001 : 0x00000285`ef561520 +00000000`00004822 : 000000e8`7fbfd0f8 00000285`ef8ff410 00000000`00000001 000000e8`7fbfd090 : 0x00000372`d2edb443 +000000e8`7fbfd0f8 : 00000285`ef8ff410 00000000`00000001 000000e8`7fbfd090 fffe0285`ef400480 : 0x4822 +00000285`ef8ff410 : 00000000`00000001 000000e8`7fbfd090 fffe0285`ef400480 fffe0285`ef5a21c0 : 0x000000e8`7fbfd0f8 +00000000`00000001 : 000000e8`7fbfd090 fffe0285`ef400480 fffe0285`ef5a21c0 fffa8285`ef58d688 : 0x00000285`ef8ff410 +000000e8`7fbfd090 : fffe0285`ef400480 fffe0285`ef5a21c0 fffa8285`ef58d688 000000e8`7fbfd128 : 0x1 +fffe0285`ef400480 : fffe0285`ef5a21c0 fffa8285`ef58d688 000000e8`7fbfd128 00000285`ef8ff410 : 0x000000e8`7fbfd090 +fffe0285`ef5a21c0 : fffa8285`ef58d688 000000e8`7fbfd128 00000285`ef8ff410 000001e3`e8e60659 : 0xfffe0285`ef400480 +fffa8285`ef58d688 : 000000e8`7fbfd128 00000285`ef8ff410 000001e3`e8e60659 00000000`00006821 : 0xfffe0285`ef5a21c0 +000000e8`7fbfd128 : 00000285`ef8ff410 000001e3`e8e60659 00000000`00006821 fffa8285`ef58d688 : 0xfffa8285`ef58d688 +00000285`ef8ff410 : 000001e3`e8e60659 00000000`00006821 fffa8285`ef58d688 fffe0285`ef574260 : 0x000000e8`7fbfd128 +000001e3`e8e60659 : 00000000`00006821 fffa8285`ef58d688 fffe0285`ef574260 fffe0285`ef574280 : 0x00000285`ef8ff410 +00000000`00006821 : fffa8285`ef58d688 fffe0285`ef574260 fffe0285`ef574280 fffe0285`ef400420 : 0x000001e3`e8e60659 +fffa8285`ef58d688 : fffe0285`ef574260 fffe0285`ef574280 fffe0285`ef400420 fffa0000`0000000e : 0x6821 +fffe0285`ef574260 : fffe0285`ef574280 fffe0285`ef400420 fffa0000`0000000e fff90000`00000000 : 0xfffa8285`ef58d688 +fffe0285`ef574280 : fffe0285`ef400420 fffa0000`0000000e fff90000`00000000 00000000`00000000 : 0xfffe0285`ef574260 +fffe0285`ef400420 : fffa0000`0000000e fff90000`00000000 00000000`00000000 fff90000`00000000 : 0xfffe0285`ef574280 +fffa0000`0000000e : fff90000`00000000 00000000`00000000 fff90000`00000000 00000000`00000068 : 0xfffe0285`ef400420 +fff90000`00000000 : 00000000`00000000 fff90000`00000000 00000000`00000068 00000285`ef572040 : 0xfffa0000`0000000e +00000000`00000000 : fff90000`00000000 00000000`00000068 00000285`ef572040 00000000`00000000 : 0xfff90000`00000000 +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-7c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-7c-crashlog.txt new file mode 100644 index 000000000..df65f35d8 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-7c-crashlog.txt @@ -0,0 +1,269 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-32-windows-42c95d88aaaa.exe.2396.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 9600 MP (16 procs) Free x86 compatible +Product: Server, suite: TerminalServer SingleUserTS +Machine Name: +Debug session time: Tue Oct 4 11:31:24.000 2016 (UTC + 0:00) +System Uptime: not available +Process Uptime: 0 days 0:00:01.000 +...................................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +eax=00000000 ebx=00000000 ecx=6802052b edx=00000000 esi=00000003 edi=00000003 +eip=77a5c7ec esp=0053d6c4 ebp=0053d84c iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 +Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +ntdll+0x3c7ec: +77a5c7ec c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=00c8a948 ebx=0053e32c ecx=6802052b edx=00000000 esi=25d8094b edi=0053e370 +eip=25d80b01 esp=0053e370 ebp=ffe00000 iopl=0 nv up ei pl zr na pe cy +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000247 +25d80b01 cc int 3 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +*** WARNING: Unable to verify timestamp for kernel32.dll +*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll +*** WARNING: Unable to verify checksum for mozglue.dll +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll+0x3c7ec: +77a5c7ec c21400 ret 14h +77a5c7ef 90 nop +77a5c7f0 b85b000000 mov eax,5Bh +77a5c7f5 64ff15c0000000 call dword ptr fs:[0C0h] +77a5c7fc c21000 ret 10h +77a5c7ff 90 nop +77a5c800 b85c000000 mov eax,5Ch +77a5c805 64ff15c0000000 call dword ptr fs:[0C0h] +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +25d80b01 cc f2 0f 10 .... +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** WARNING: Unable to verify checksum for js-32-windows-42c95d88aaaa.exe +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +*** WARNING: Unable to verify timestamp for KERNELBASE.dll +*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll + +FAULTING_IP: ++205 +25d80b01 cc int 3 + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 25d80b01 +ExceptionCode: 80000003 (Break instruction exception) +ExceptionFlags: 00000000 +NumberParameters: 1 +Parameter[0]: 00000000 + +DEFAULT_BUCKET_ID: WRONG_SYMBOLS + +PROCESS_NAME: js-32-windows-42c95d88aaaa.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +MODULE_NAME: mozglue + +FAULTING_MODULE: 77a20000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 57f38bd2 + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_PARAMETER1: 00000000 + +MOD_LIST: + +FAULTING_THREAD: 00000f68 + +PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS + +BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS + +LAST_CONTROL_TRANSFER: from 746c37f5 to 25d80b01 + +STACK_TEXT: +WARNING: Frame IP not in any known module. Following frames may be wrong. +0053e39c 746c37f5 010000f0 08900850 01000044 0x25d80b01 +0053e430 014f5ac7 25d80010 00000003 0053e780 mozglue!arena_run_dalloc+0x205 [c:\users\administrator\trees\mozilla-central\memory\mozjemalloc\jemalloc.c @ 3916] +0053e508 014f78b1 08410000 0053e520 0053e6c8 js_32_windows_42c95d88aaaa!EnterIon+0xc7 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2823] +0053e5a8 0136d44f 08410000 0053e668 0053e678 js_32_windows_42c95d88aaaa!js::jit::IonCannon+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2921] +0053e640 0135f77e 08410000 0053e668 087121a8 js_32_windows_42c95d88aaaa!js::RunScript+0x12f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] +0053e684 0135f51e 08410000 0053e6c8 00000000 js_32_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x24e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] +0053e698 015eacd3 08410000 0053e6c8 087121a8 js_32_windows_42c95d88aaaa!InternalCall+0x5e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +0053e72c 0066129f 08410000 0053e7f8 087121a8 js_32_windows_42c95d88aaaa!js::jit::DoCallFallback+0x2c3 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] +0053e844 746c64d5 08700910 000c03a0 08410000 0x66129f +0053e860 014f5ac7 14e2a1d0 00000003 0053ebb0 mozglue!je_free+0x15 [c:\users\administrator\trees\mozilla-central\memory\mozjemalloc\jemalloc.c @ 6485] +0053e938 014f78b1 08410000 0053e950 0053eaf8 js_32_windows_42c95d88aaaa!EnterIon+0xc7 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2823] +0053e9d8 0136d44f 08410000 0053ea98 0053eaa8 js_32_windows_42c95d88aaaa!js::jit::IonCannon+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2921] +0053ea70 0135f77e 08410000 0053ea98 08706700 js_32_windows_42c95d88aaaa!js::RunScript+0x12f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] +0053eab4 0135f51e 08410000 0053eaf8 00000000 js_32_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x24e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] +0053eac8 015eacd3 08410000 0053eaf8 08706700 js_32_windows_42c95d88aaaa!InternalCall+0x5e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +0053ec48 014f5ac7 14e294e0 00000001 0053ef98 js_32_windows_42c95d88aaaa!js::jit::DoCallFallback+0x2c3 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] +0053ed20 014f78b1 08410000 0053ed38 0053eee0 js_32_windows_42c95d88aaaa!EnterIon+0xc7 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2823] +0053edc0 0136d44f 08410000 0053ee80 0053ee90 js_32_windows_42c95d88aaaa!js::jit::IonCannon+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2921] +0053ee58 0135f77e 08410000 0053ee80 084f30b0 js_32_windows_42c95d88aaaa!js::RunScript+0x12f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] +0053ee9c 0135f51e 08410000 0053eee0 00000000 js_32_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x24e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] +0053eeb0 015eacd3 08410000 0053eee0 084f30b0 js_32_windows_42c95d88aaaa!InternalCall+0x5e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +0053ef44 0066129f 08410000 0053efd8 084f30b0 js_32_windows_42c95d88aaaa!js::jit::DoCallFallback+0x2c3 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] +0053efa0 084f30b0 3c8c63c4 00005021 00000000 0x66129f +0053f0d0 014f5ac7 14e24e90 00000002 0053f420 0x84f30b0 +0053f1a8 014f78b1 08410000 0053f1c0 0053f368 js_32_windows_42c95d88aaaa!EnterIon+0xc7 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2823] +0053f248 0136d44f 08410000 0053f308 0053f318 js_32_windows_42c95d88aaaa!js::jit::IonCannon+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2921] +0053f2e0 0135f77e 08410000 0053f308 08930010 js_32_windows_42c95d88aaaa!js::RunScript+0x12f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] +0053f324 0135f51e 08410000 0053f368 00000000 js_32_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x24e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] +0053f338 015eacd3 08410000 0053f368 08930010 js_32_windows_42c95d88aaaa!InternalCall+0x5e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +0053f4a8 015ee5ae 3de10540 00000000 00000000 js_32_windows_42c95d88aaaa!js::jit::DoCallFallback+0x2c3 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] +0053f580 015eebe1 08410000 0053f598 0866a0a0 js_32_windows_42c95d88aaaa!EnterBaseline+0x13e [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] +0053f620 0136d4f5 08410000 0053f6c8 0053f6d8 js_32_windows_42c95d88aaaa!js::jit::EnterBaselineMethod+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 193] +0053f6b8 0135c26c 08410000 0053f6c8 0176a914 js_32_windows_42c95d88aaaa!js::RunScript+0x1d5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 394] +0053f704 0135c115 08410000 0053f7ac 086b80c0 js_32_windows_42c95d88aaaa!js::ExecuteKernel+0xac [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 688] +0053f740 012ee21a 08410000 0053f7ac 086b80c0 js_32_windows_42c95d88aaaa!js::Execute+0xf5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 717] +0053f760 012f2d21 08410000 0053f784 0053f7ac js_32_windows_42c95d88aaaa!ExecuteScript+0x2a [c:\users\administrator\trees\mozilla-central\js\src\jsapi.cpp @ 4307] +0053f784 0120cab5 08410000 0053f7ac 00739fbd js_32_windows_42c95d88aaaa!JS_ExecuteScript+0x51 [c:\users\administrator\trees\mozilla-central\js\src\jsapi.cpp @ 4340] +0053f810 0120ba3f 08410000 00739fbd 06c9efc8 js_32_windows_42c95d88aaaa!RunFile+0x115 [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 644] +0053f834 0120bcf2 08410000 00739fbd 00000000 js_32_windows_42c95d88aaaa!Process+0xaf [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 1062] +0053f8e4 0120e416 08410000 0053f9ac 08410000 js_32_windows_42c95d88aaaa!ProcessArgs+0x242 [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7082] +0053f964 0121396e 08410000 0053f9ac 00d1ee70 js_32_windows_42c95d88aaaa!Shell+0x1a6 [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7467] +0053fa4c 01735cce 00000012 00739e18 00d1ee70 js_32_windows_42c95d88aaaa!main+0xc4e [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7852] +0053fa94 75b17c04 fef3e000 75b17be0 69dbe9d8 js_32_windows_42c95d88aaaa!__scrt_common_main_seh+0xf9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253] +0053faa8 77a7ab8f fef3e000 6bb63335 00000000 kernel32+0x17c04 +0053faf0 77a7ab5a ffffffff 77a60008 00000000 ntdll+0x5ab8f +0053fb00 00000000 01735d44 fef3e000 00000000 ntdll+0x5ab5a + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FOLLOWUP_IP: +mozglue!arena_run_dalloc+205 [c:\users\administrator\trees\mozilla-central\memory\mozjemalloc\jemalloc.c @ 3916] +746c37f5 8b4624 mov eax,dword ptr [esi+24h] + +FAULTING_SOURCE_CODE: +3912: arena_avail_tree_insert(&arena->runs_avail, &chunk->map[run_ind]); +3913: +3914: /* Deallocate chunk if it is now completely unused. */ +3915: if ((chunk->map[arena_chunk_header_npages].bits & (~pagesize_mask | +> 3916: CHUNK_MAP_ALLOCATED)) == arena_maxclass) +3917: arena_chunk_dealloc(arena, chunk); +3918: +3919: /* Enforce opt_dirty_max. */ +3920: if (arena->ndirty > opt_dirty_max) +3921: arena_purge(arena, false); + + +SYMBOL_STACK_INDEX: 1 + +SYMBOL_NAME: mozglue!arena_run_dalloc+205 + +FOLLOWUP_NAME: MachineOwner + +IMAGE_NAME: mozglue.dll + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_mozglue.dll!arena_run_dalloc + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 +# ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 0053d84c 75b17b89 ntdll+0x3c7ec +01 0053d868 75b707bf kernel32+0x17b89 +02 0053dca8 75b70295 kernel32+0x707bf +03 0053dcc0 75f6f605 kernel32+0x70295 +04 0053dd4c 77acf154 KERNELBASE+0xbf605 +05 0053faf0 77a7ab5a ntdll+0xaf154 +06 0053fb00 00000000 ntdll+0x5ab5a +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +0053d84c 75b17b89 00000003 0053d890 00000000 ntdll+0x3c7ec +0053d868 75b707bf 00000003 0053d890 00000000 kernel32+0x17b89 +0053dca8 75b70295 00000000 00000001 00000000 kernel32+0x707bf +0053dcc0 75f6f605 0053dd7c 00000001 69ecfe8a kernel32+0x70295 +0053dd4c 77acf154 0053dd7c 77a60830 0053faf0 KERNELBASE+0xbf605 +0053faf0 77a7ab5a ffffffff 77a60008 00000000 ntdll+0xaf154 +0053fb00 00000000 01735d44 fef3e000 00000000 ntdll+0x5ab5a +0:000> q +quit: diff --git a/FTB/Signatures/tests/resources/cdb-8c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-8c-crashlog.txt new file mode 100644 index 000000000..75fa84360 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-8c-crashlog.txt @@ -0,0 +1,207 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-dbg-32-prof-dm-windows-42c95d88aaaa.exe.4052.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 9600 MP (16 procs) Free x86 compatible +Product: Server, suite: TerminalServer SingleUserTS +Machine Name: +Debug session time: Tue Oct 4 12:50:31.000 2016 (UTC + 0:00) +System Uptime: not available +Process Uptime: 0 days 0:00:04.000 +...................................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +eax=00000000 ebx=00000000 ecx=73f1705d edx=00ea9210 esi=00000003 edi=00000003 +eip=7752c7ec esp=00ea9ad4 ebp=00ea9c5c iopl=0 nv up ei pl nz na pe nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206 +Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +ntdll+0x3c7ec: +7752c7ec c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=00000000 ebx=00000000 ecx=73f1705d edx=00ea9210 esi=00000383 edi=0a03d110 +eip=0142865d esp=00eaa780 ebp=00eaa7ec iopl=0 nv up ei pl nz ac po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212 +*** WARNING: Unable to verify checksum for js-dbg-32-prof-dm-windows-42c95d88aaaa.exe +js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+0x3d: +0142865d cc int 3 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +*** WARNING: Unable to verify timestamp for kernel32.dll +*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll+0x3c7ec: +7752c7ec c21400 ret 14h +7752c7ef 90 nop +7752c7f0 b85b000000 mov eax,5Bh +7752c7f5 64ff15c0000000 call dword ptr fs:[0C0h] +7752c7fc c21000 ret 10h +7752c7ff 90 nop +7752c800 b85c000000 mov eax,5Ch +7752c805 64ff15c0000000 call dword ptr fs:[0C0h] +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +0142865d cc 6a 03 c7 .j.. +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** WARNING: Unable to verify checksum for mozglue.dll +*** WARNING: Unable to verify timestamp for ucrtbase.dll +*** ERROR: Module load completed but symbols could not be loaded for ucrtbase.dll +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +*** WARNING: Unable to verify timestamp for KERNELBASE.dll +*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll + +FAULTING_IP: +js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+3d [c:\users\administrator\trees\mozilla-central\js\src\jit\rangeanalysis.h @ 578] +0142865d cc int 3 + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 0142865d (js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+0x0000003d) +ExceptionCode: 80000003 (Break instruction exception) +ExceptionFlags: 00000000 +NumberParameters: 1 +Parameter[0]: 00000000 + +PROCESS_NAME: js-dbg-32-prof-dm-windows-42c95d88aaaa.exe + +MODULE_NAME: unknown + +FAULTING_MODULE: 774f0000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 0 + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_PARAMETER1: 00000000 + +MOD_LIST: + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD] + +LAST_CONTROL_TRANSFER: from 01406a04 to 0142865d + +FAULTING_THREAD: ffffffff + +BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS_STACKIMMUNE + +PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS_STACKIMMUNE + +DEFAULT_BUCKET_ID: WRONG_SYMBOLS_STACKIMMUNE + +STACK_TEXT: +00000000 00000000 unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe+0x0 + + +SYMBOL_NAME: unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe + +FOLLOWUP_NAME: MachineOwner + +IMAGE_NAME: unknown + +STACK_COMMAND: ** Pseudo Context ** ; kb + +FAILURE_BUCKET_ID: WRONG_SYMBOLS_STACKIMMUNE_80000003_unknown!Unloaded + +BUCKET_ID: APPLICATION_FAULT_WRONG_SYMBOLS_STACKIMMUNE_unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 +# ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 00ea9c5c 761e7b89 ntdll+0x3c7ec +01 00ea9c78 762407bf kernel32+0x17b89 +02 00eaa0b8 76240295 kernel32+0x707bf +03 00eaa0d0 76eef605 kernel32+0x70295 +04 00eaa15c 7759f154 KERNELBASE+0xbf605 +05 00eafaf0 7754ab5a ntdll+0xaf154 +06 00eafb00 00000000 ntdll+0x5ab5a +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +00ea9c5c 761e7b89 00000003 00ea9ca0 00000000 ntdll+0x3c7ec +00ea9c78 762407bf 00000003 00ea9ca0 00000000 kernel32+0x17b89 +00eaa0b8 76240295 00000000 00000001 00000000 kernel32+0x707bf +00eaa0d0 76eef605 00eaa18c 00000001 6ead305c kernel32+0x70295 +00eaa15c 7759f154 00eaa18c 77530830 00eafaf0 KERNELBASE+0xbf605 +00eafaf0 7754ab5a ffffffff 7752fffc 00000000 ntdll+0xaf154 +00eafb00 00000000 01051f50 fef0e000 00000000 ntdll+0x5ab5a +0:000> q +quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/cdb-9c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-9c-crashlog.txt new file mode 100644 index 000000000..7ea13d561 --- /dev/null +++ b/FTB/Signatures/tests/resources/cdb-9c-crashlog.txt @@ -0,0 +1,260 @@ + +Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 +Copyright (c) Microsoft Corporation. All rights reserved. + + +Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-32-prof-windows-42c95d88aaaa.exe.5948.dmp] +User Mini Dump File: Only registers, stack and portions of memory are available + +Symbol search path is: *** Invalid *** +**************************************************************************** +* Symbol loading may be unreliable without a symbol search path. * +* Use .symfix to have the debugger choose a symbol path. * +* After setting your symbol path, use .reload to refresh symbol locations. * +**************************************************************************** +Executable search path is: +Windows 7 Version 9600 MP (16 procs) Free x86 compatible +Product: Server, suite: TerminalServer SingleUserTS +Machine Name: +Debug session time: Tue Oct 4 12:45:24.000 2016 (UTC + 0:00) +System Uptime: not available +Process Uptime: 0 days 0:00:01.000 +...................................... +This dump file has a breakpoint exception stored in it. +The stored exception information can be accessed via .ecxr. +eax=00000000 ebx=00000000 ecx=00000400 edx=73e74f80 esi=00000003 edi=00000003 +eip=774ec7ec esp=00b0dd54 ebp=00b0dedc iopl=0 nv up ei pl nz na po nc +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 +Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +ntdll+0x3c7ec: +774ec7ec c21400 ret 14h +0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes +Toggle for 32-bit/64-bit modes +0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +See http://people.mozilla.org/~aklotz/windbgcheatsheet.html +0:000> !wow64exts.sw +!wow64exts.sw : command invalid on non-64bit target +0:000> .echo Display lines in stack trace +Display lines in stack trace +0:000> .lines +Line number information will be loaded +0:000> .echo .ecxr switches to the exception context frame +.ecxr switches to the exception context frame +0:000> .ecxr +eax=00000020 ebx=00b0ea18 ecx=00000400 edx=73e74f80 esi=ffffff8c edi=00b0ea00 +eip=0f2bb4f3 esp=00b0ea00 ebp=00b0eab0 iopl=0 nv up ei pl zr na pe cy +cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000247 +0f2bb4f3 cc int 3 +*** WARNING: Unable to verify timestamp for ntdll.dll +*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll +*** WARNING: Unable to verify timestamp for kernel32.dll +*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll +0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" +Inspect program counter, equivalent of gdb's "x/i $pc" +0:000> u +ntdll+0x3c7ec: +774ec7ec c21400 ret 14h +774ec7ef 90 nop +774ec7f0 b85b000000 mov eax,5Bh +774ec7f5 64ff15c0000000 call dword ptr fs:[0C0h] +774ec7fc c21000 ret 10h +774ec7ff 90 nop +774ec800 b85c000000 mov eax,5Ch +774ec805 64ff15c0000000 call dword ptr fs:[0C0h] +0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" +0:000> db @@c++(@eip) L4 +0f2bb4f3 cc f2 0f 10 .... +0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" +0:000> db @@c++(@rip) L8 +Bad register error at '@rip) ' +0:000> .echo To switch frames: .frame /r /c +To switch frames: .frame /r /c +0:000> .echo Then inspect locals using: dv +Then inspect locals using: dv +0:000> .echo Running !analyze +Running !analyze +0:000> !analyze -v +******************************************************************************* +* * +* Exception Analysis * +* * +******************************************************************************* + +*** WARNING: Unable to verify checksum for js-32-prof-windows-42c95d88aaaa.exe +***** OS symbols are WRONG. Please fix symbols to do analysis. + +************************************************************************* +*** *** +*** *** +*** Your debugger is not using the correct symbols *** +*** *** +*** In order for this command to work properly, your symbol path *** +*** must point to .pdb files that have full type information. *** +*** *** +*** Certain .pdb files (such as the public OS symbols) do not *** +*** contain the required information. Contact the group that *** +*** provided you with these symbols if you need this command to *** +*** work. *** +*** *** +*** Type referenced: ntdll!_PEB *** +*** *** +************************************************************************* +********************************************************************* +* Symbols can not be loaded because symbol path is not initialized. * +* * +* The Symbol Path can be set by: * +* using the _NT_SYMBOL_PATH environment variable. * +* using the -y argument when starting the debugger. * +* using .sympath and .sympath+ * +********************************************************************* +*** WARNING: Unable to verify timestamp for KERNELBASE.dll +*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll + +FAULTING_IP: ++1d8 +0f2bb4f3 cc int 3 + +EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) +ExceptionAddress: 0f2bb4f3 +ExceptionCode: 80000003 (Break instruction exception) +ExceptionFlags: 00000000 +NumberParameters: 1 +Parameter[0]: 00000000 + +DEFAULT_BUCKET_ID: WRONG_SYMBOLS + +PROCESS_NAME: js-32-prof-windows-42c95d88aaaa.exe + +ADDITIONAL_DEBUG_TEXT: +Use '!findthebuild' command to search for the target build information. +If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. + +FAULTING_MODULE: 774b0000 ntdll + +DEBUG_FLR_IMAGE_TIMESTAMP: 57f38c83 + +ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. + +EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid + +EXCEPTION_PARAMETER1: 00000000 + +MOD_LIST: + +FAULTING_THREAD: 00001640 + +PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS + +BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS + +IP_ON_HEAP: 08dbf970 +The fault address in not in any loaded module, please check your build's rebase +log at \bin\build_logs\timebuild\ntrebase.log for module which may +contain the address if it were loaded. + +FRAME_ONE_INVALID: 1 + +LAST_CONTROL_TRANSFER: from 08dbf970 to 0f2bb4f3 + +STACK_TEXT: +WARNING: Frame IP not in any known module. Following frames may be wrong. +00b0eab0 08dbf970 0f2baaf4 00006021 00000001 0xf2bb4f3 +00b0ebf8 00e9a9a8 00fd1326 08a10000 00b0ed08 0x8dbf970 +00b0ece8 0125dd0c 00b0ed98 0125dd0c 08a10000 js_32_prof_windows_42c95d88aaaa!js::AddTypePropertyId+0x1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] +00b0ea18 ffffff81 08c59110 ffffff8c 00000000 js_32_prof_windows_42c95d88aaaa!js::jit::EnterBaselineMethod+0x11c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 193] +00b0ee30 00fd9793 08a10000 00b0ee4c 08db2740 0xffffff81 +00b0ee74 00fd953f 08a10000 00b0ef04 00000000 js_32_prof_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x243 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] +00b0ee8c 0125a0d6 08a10000 00b0ef04 08db2740 js_32_prof_windows_42c95d88aaaa!InternalCall+0x5f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +00b0ef1c 1e71129f 08a10000 00b0efb8 0100003a js_32_prof_windows_42c95d88aaaa!js::jit::DoCallFallback+0x266 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] +00b0eff4 00fd1326 08a10000 00b0f100 00b0f0e8 0x1e71129f +00b0f008 0125d6bc 0f2b9970 00000001 00b0f368 js_32_prof_windows_42c95d88aaaa!js::Activation::Activation+0x36 [c:\users\administrator\trees\mozilla-central\js\src\vm\stack-inl.h @ 854] +00b0ef40 ffffff82 014a7730 08c494e8 1e7176c3 js_32_prof_windows_42c95d88aaaa!EnterBaseline+0x15c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] +00b0f188 00fe6375 00000000 00fe6375 08a10000 0xffffff82 +00b0f228 00fd9793 08a10000 00b0f244 08dd90b0 js_32_prof_windows_42c95d88aaaa!js::RunScript+0x1d5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 394] +00b0f26c 00fd953f 08a10000 00b0f2fc 00000000 js_32_prof_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x243 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] +00b0f284 0125a0d6 08a10000 00b0f2fc 08dd90b0 js_32_prof_windows_42c95d88aaaa!InternalCall+0x5f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +00b0f314 1e71129f 08a10000 00b0f3a8 0100003a js_32_prof_windows_42c95d88aaaa!js::jit::DoCallFallback+0x266 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] +00b0f370 08dd90b0 0f2b3fa5 00005021 00000000 0x1e71129f +00b0f48c 00fd1326 08a10000 00b0f598 00b0f580 0x8dd90b0 +00b0f4a0 0125d6bc 1d97e790 00000002 00b0f800 js_32_prof_windows_42c95d88aaaa!js::Activation::Activation+0x36 [c:\users\administrator\trees\mozilla-central\js\src\vm\stack-inl.h @ 854] +00b0f338 ffffff82 014a7730 08c494e8 1e7176c3 js_32_prof_windows_42c95d88aaaa!EnterBaseline+0x15c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] +00b0f620 00fe6375 00000000 00fe6375 08a10000 0xffffff82 +00b0f6c0 00fd9793 08a10000 00b0f6dc 08fd2010 js_32_prof_windows_42c95d88aaaa!js::RunScript+0x1d5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 394] +00b0f704 00fd953f 08a10000 00b0f794 00000000 js_32_prof_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x243 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] +00b0f71c 0125a0d6 08a10000 00b0f794 08fd2010 js_32_prof_windows_42c95d88aaaa!InternalCall+0x5f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] +00b0f7ac 1e71129f 08a10000 00b0f838 0100003a js_32_prof_windows_42c95d88aaaa!js::jit::DoCallFallback+0x266 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] +00b0f880 0125d6bc 35630010 00000000 00000000 0x1e71129f +00b0f7d0 ffffff82 014a7730 08c494e8 1e7176c3 js_32_prof_windows_42c95d88aaaa!EnterBaseline+0x15c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] +00b0f880 0125d6bc 35630010 00000000 00000000 0xffffff82 +00b0f958 0125dd0c 00b0fa08 0125dd0c 08a10000 js_32_prof_windows_42c95d88aaaa!EnterBaseline+0x15c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] +00b0fa00 00fe6375 08a10000 00fe6375 08a10000 js_32_prof_windows_42c95d88aaaa!js::jit::EnterBaselineMethod+0x11c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 193] +00b0faa0 00fd68f4 08a10000 00b0fab0 013dc8d4 js_32_prof_windows_42c95d88aaaa!js::RunScript+0x1d5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 394] +00b0faf0 00fd67ab 08a10000 00b0fc04 08c57020 js_32_prof_windows_42c95d88aaaa!js::ExecuteKernel+0xa4 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 688] +00b0fb30 00f69dc6 08a10000 00b0fc04 08c57020 js_32_prof_windows_42c95d88aaaa!js::Execute+0xeb [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 717] +00b0fb54 00f6e54d 08a10000 00b0fb78 00b0fc04 js_32_prof_windows_42c95d88aaaa!ExecuteScript+0x26 [c:\users\administrator\trees\mozilla-central\js\src\jsapi.cpp @ 4307] +00b0fb7c 00e8c434 08a10000 00b0fc04 00d29fb7 js_32_prof_windows_42c95d88aaaa!JS_ExecuteScript+0x4d [c:\users\administrator\trees\mozilla-central\js\src\jsapi.cpp @ 4340] +00b0fc0c 00e8b4cf 08a10000 00d29fb7 071befc8 js_32_prof_windows_42c95d88aaaa!RunFile+0xf4 [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 644] +00b0fc30 00e8b74e 08a10000 00d29fb7 00000000 js_32_prof_windows_42c95d88aaaa!Process+0xaf [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 1062] +00b0fce0 00e8dd0e 08a10000 00b0fdc4 08a10000 js_32_prof_windows_42c95d88aaaa!ProcessArgs+0x20e [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7082] +00b0fd64 00e9332f 08a10000 00b0fdc4 06ccee70 js_32_prof_windows_42c95d88aaaa!Shell+0x18e [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7467] +00b0fe50 013a7bbe 00000010 00d29e30 06ccee70 js_32_prof_windows_42c95d88aaaa!main+0xcdf [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7852] +00b0fe98 75027c04 fe77d000 75027be0 843a73d1 js_32_prof_windows_42c95d88aaaa!__scrt_common_main_seh+0xf9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253] +00b0feac 7750ab8f fe77d000 86701c6a 00000000 kernel32+0x17c04 +00b0fef4 7750ab5a ffffffff 774f000d 00000000 ntdll+0x5ab8f +00b0ff04 00000000 013a7c34 fe77d000 00000000 ntdll+0x5ab5a + + +STACK_COMMAND: ~0s; .ecxr ; kb + +FOLLOWUP_IP: +js_32_prof_windows_42c95d88aaaa!js::AddTypePropertyId+1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] +00e9a9a8 8b4dfc mov ecx,dword ptr [ebp-4] + +SYMBOL_STACK_INDEX: 2 + +SYMBOL_NAME: js_32_prof_windows!js::AddTypePropertyId+1d8 + +FOLLOWUP_NAME: MachineOwner + +MODULE_NAME: js_32_prof_windows_42c95d88aaaa + +IMAGE_NAME: js-32-prof-windows-42c95d88aaaa.exe + +BUCKET_ID: WRONG_SYMBOLS + +FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-32-prof-windows-42c95d88aaaa.exe!js::AddTypePropertyId + +Followup: MachineOwner +--------- + +0:000> .echo Backtrace of faulting thread, limited to 50 frames +Backtrace of faulting thread, limited to 50 frames +0:000> ~#kn 50 +# ChildEBP RetAddr +WARNING: Stack unwind information not available. Following frames may be wrong. +00 00b0dedc 75027b89 ntdll+0x3c7ec +01 00b0def8 750807bf kernel32+0x17b89 +02 00b0e338 75080295 kernel32+0x707bf +03 00b0e350 74eef605 kernel32+0x70295 +04 00b0e3dc 7755f154 KERNELBASE+0xbf605 +05 00b0fef4 7750ab5a ntdll+0xaf154 +06 00b0ff04 00000000 ntdll+0x5ab5a +0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) +Backtrace, limited to 50 frames (should execute after .ecxr) +0:000> kb 50 +ChildEBP RetAddr Args to Child +WARNING: Stack unwind information not available. Following frames may be wrong. +00b0dedc 75027b89 00000003 00b0df20 00000000 ntdll+0x3c7ec +00b0def8 750807bf 00000003 00b0df20 00000000 kernel32+0x17b89 +00b0e338 75080295 00000000 00000001 00000000 kernel32+0x707bf +00b0e350 74eef605 00b0e40c 00000001 85c44d68 kernel32+0x70295 +00b0e3dc 7755f154 00b0e40c 774f0830 00b0fef4 KERNELBASE+0xbf605 +00b0fef4 7750ab5a ffffffff 774f000d 00000000 ntdll+0xaf154 +00b0ff04 00000000 013a7c34 fe77d000 00000000 ntdll+0x5ab5a +0:000> q +quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/minidump-example.txt b/FTB/Signatures/tests/resources/minidump-example.txt new file mode 100644 index 000000000..dc2b2a68b --- /dev/null +++ b/FTB/Signatures/tests/resources/minidump-example.txt @@ -0,0 +1,811 @@ +OS|Linux|0.0.0 Linux 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 +CPU|amd64|family 6 model 30 stepping 5|8 +Crash|SIGSEGV|0x3e800006acb|0 +Module|firefox-bin||firefox-bin|0D19D899740636ED3DFD7E676772A1D80|0x00400000|0x00428fff|1 +Module|libXss.so.1.0.0||libXss.so.1.0.0|1C6D41787DF49947006B88449F69AA540|0x7fafe19fc000|0x7fafe1bfffff|0 +Module|libcroco-0.6.so.3.0.1||libcroco-0.6.so.3.0.1|22664AB68E5BEB3A7EFE5FB23DA9CE8C0|0x7fafe4c8e000|0x7fafe4ec7fff|0 +Module|librsvg-2.so.2.36.1||librsvg-2.so.2.36.1|5E7887C693FFC7801F9F2D0AE68F20CB0|0x7fafe4ec8000|0x7fafe50fcfff|0 +Module|libpixbufloader-svg.so||libpixbufloader-svg.so|7D5337AA457155C701380177FB8482920|0x7fafe50fd000|0x7fafe52fffff|0 +Module|Ubuntu-L.ttf||Ubuntu-L.ttf|000000000000000000000000000000000|0x7fafe9733000|0x7fafe97fefff|0 +Module|DejaVuSans.ttf||DejaVuSans.ttf|000000000000000000000000000000000|0x7fafebe3d000|0x7fafebeecfff|0 +Module|Ubuntu-R.ttf||Ubuntu-R.ttf|000000000000000000000000000000000|0x7fafed951000|0x7fafed9fefff|0 +Module|libpixbufloader-png.so||libpixbufloader-png.so|C44D4C71D3F787F134AFB3044425AED00|0x7fafee5d5000|0x7fafee7dafff|0 +Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7fafee7db000|0x7fafefe9afff|0 +Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7fafefe9b000|0x7faff40fffff|0 +Module|DroidSerif-Regular.ttf||DroidSerif-Regular.ttf|000000000000000000000000000000000|0x7faff44a4000|0x7faff44cefff|0 +Module|libnssckbi.so||libnssckbi.so|E70DC15381A536C15F890A72C96628BA0|0x7faff672a000|0x7faff69d6fff|0 +Module|libfreebl3.so||libfreebl3.so|0ACA871B0359A52F8948419A28D020A30|0x7faff69d7000|0x7faff6c84fff|0 +Module|libnssdbm3.so||libnssdbm3.so|7D772AB0DE05613945E1C0CC633164980|0x7faff6c89000|0x7faff6eb4fff|0 +Module|libsoftokn3.so||libsoftokn3.so|E70A781902D609967FFBAD8C9513A8180|0x7faff6eb5000|0x7faff70fffff|0 +Module|webappsstore.sqlite-shm||webappsstore.sqlite-shm|000000000000000000000000000000000|0x7faff7406000|0x7faff740dfff|0 +Module|places.sqlite-shm||places.sqlite-shm|000000000000000000000000000000000|0x7faff740e000|0x7faff7415fff|0 +Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7faff7416000|0x7faff74fefff|0 +Module|SYSV00000000 (deleted)||SYSV00000000 (deleted)|000000000000000000000000000000000|0x7faff8201000|0x7faff8260fff|0 +Module|mime.cache||mime.cache|000000000000000000000000000000000|0x7faff8261000|0x7faff827ffff|0 +Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7faff8280000|0x7faff828afff|0 +Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7faff828b000|0x7faff82adfff|0 +Module|libibus-1.0.so.0.401.0||libibus-1.0.so.0.401.0|E702D690AE6BED7B45E625E55308CA630|0x7faff82ae000|0x7faff84f3fff|0 +Module|im-ibus.so||im-ibus.so|2D54EC404DE29598D386B63CA6BF12F90|0x7faff84f5000|0x7faff86fbfff|0 +Module|pango-basic-fc.so||pango-basic-fc.so|B7268AAC58CEE3550C7DFA5D9D85113F0|0x7faff86fc000|0x7faff88fefff|0 +Module|Ubuntu-R.ttf||Ubuntu-R.ttf|000000000000000000000000000000000|0x7faff94a8000|0x7faff94fefff|0 +Module|mime.cache||mime.cache|000000000000000000000000000000000|0x7faffad07000|0x7faffad08fff|0 +Module|DroidSansMono.ttf||DroidSansMono.ttf|000000000000000000000000000000000|0x7faffad1a000|0x7faffad36fff|0 +Module|c05880de57d1f5e948fdfacc138775d9-le64.cache-3||c05880de57d1f5e948fdfacc138775d9-le64.cache-3|000000000000000000000000000000000|0x7faffad37000|0x7faffad37fff|0 +Module|945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-3||945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-3|000000000000000000000000000000000|0x7faffad38000|0x7faffad40fff|0 +Module|99e8ed0e538f840c565b6ed5dad60d56-le64.cache-3||99e8ed0e538f840c565b6ed5dad60d56-le64.cache-3|000000000000000000000000000000000|0x7faffad41000|0x7faffad42fff|0 +Module|a6d8cf8e4ec09cdbc8633c31745a07dd-le64.cache-3||a6d8cf8e4ec09cdbc8633c31745a07dd-le64.cache-3|000000000000000000000000000000000|0x7faffad43000|0x7faffad4afff|0 +Module|2cd17615ca594fa2959ae173292e504c-le64.cache-3||2cd17615ca594fa2959ae173292e504c-le64.cache-3|000000000000000000000000000000000|0x7faffad4b000|0x7faffad4efff|0 +Module|fd9505950c048a77dc4b710eb6a628ed-le64.cache-3||fd9505950c048a77dc4b710eb6a628ed-le64.cache-3|000000000000000000000000000000000|0x7faffad4f000|0x7faffad4ffff|0 +Module|ddc79d3ea06a7c6ffa86ede85f3bb5df-le64.cache-3||ddc79d3ea06a7c6ffa86ede85f3bb5df-le64.cache-3|000000000000000000000000000000000|0x7faffad50000|0x7faffad52fff|0 +Module|e7071f4a29fa870f4323321c154eba04-le64.cache-3||e7071f4a29fa870f4323321c154eba04-le64.cache-3|000000000000000000000000000000000|0x7faffad53000|0x7faffad53fff|0 +Module|a2ab74764b07279e7c36ddb1d302cf26-le64.cache-3||a2ab74764b07279e7c36ddb1d302cf26-le64.cache-3|000000000000000000000000000000000|0x7faffad54000|0x7faffad54fff|0 +Module|c69f04ab05004e31a6d5e715764f16d8-le64.cache-3||c69f04ab05004e31a6d5e715764f16d8-le64.cache-3|000000000000000000000000000000000|0x7faffad55000|0x7faffad56fff|0 +Module|b5ea634b0fb353b8ea17632d1f9ef766-le64.cache-3||b5ea634b0fb353b8ea17632d1f9ef766-le64.cache-3|000000000000000000000000000000000|0x7faffad57000|0x7faffad59fff|0 +Module|646addb8444faa74ee138aa00ab0b6a0-le64.cache-3||646addb8444faa74ee138aa00ab0b6a0-le64.cache-3|000000000000000000000000000000000|0x7faffad5a000|0x7faffad5bfff|0 +Module|a755afe4a08bf5b97852ceb7400b47bc-le64.cache-3||a755afe4a08bf5b97852ceb7400b47bc-le64.cache-3|000000000000000000000000000000000|0x7faffad5c000|0x7faffad61fff|0 +Module|20bd79ad97094406f7d1b9654bfbd926-le64.cache-3||20bd79ad97094406f7d1b9654bfbd926-le64.cache-3|000000000000000000000000000000000|0x7faffad62000|0x7faffad63fff|0 +Module|libbrowsercomps.so||libbrowsercomps.so|3CC53D32E284DB3BD998919704B6DEB30|0x7faffb0eb000|0x7faffb2fffff|0 +Module|9c0624108b9a2ae8552f664125be8356-le64.cache-3||9c0624108b9a2ae8552f664125be8356-le64.cache-3|000000000000000000000000000000000|0x7faffb400000|0x7faffb404fff|0 +Module|6d41288fd70b0be22e8c3a91e032eec0-le64.cache-3||6d41288fd70b0be22e8c3a91e032eec0-le64.cache-3|000000000000000000000000000000000|0x7faffb405000|0x7faffb40dfff|0 +Module|da1bd5ca8443ffe22927a23ce431d198-le64.cache-3||da1bd5ca8443ffe22927a23ce431d198-le64.cache-3|000000000000000000000000000000000|0x7faffb40e000|0x7faffb40ffff|0 +Module|04aabc0a78ac019cf9454389977116d2-le64.cache-3||04aabc0a78ac019cf9454389977116d2-le64.cache-3|000000000000000000000000000000000|0x7faffb410000|0x7faffb41ffff|0 +Module|385c0604a188198f04d133e54aba7fe7-le64.cache-3||385c0604a188198f04d133e54aba7fe7-le64.cache-3|000000000000000000000000000000000|0x7faffb420000|0x7faffb422fff|0 +Module|ddd4086aec35a5275babba44bb759c3c-le64.cache-3||ddd4086aec35a5275babba44bb759c3c-le64.cache-3|000000000000000000000000000000000|0x7faffb423000|0x7faffb424fff|0 +Module|4794a0821666d79190d59a36cb4f44b5-le64.cache-3||4794a0821666d79190d59a36cb4f44b5-le64.cache-3|000000000000000000000000000000000|0x7faffb425000|0x7faffb425fff|0 +Module|8801497958630a81b71ace7c5f9b32a8-le64.cache-3||8801497958630a81b71ace7c5f9b32a8-le64.cache-3|000000000000000000000000000000000|0x7faffb426000|0x7faffb428fff|0 +Module|365b55f210c0a22e9a19e35191240f32-le64.cache-3||365b55f210c0a22e9a19e35191240f32-le64.cache-3|000000000000000000000000000000000|0x7faffb429000|0x7faffb456fff|0 +Module|52f7bdb7ce746bfd7eaa1985bd9cfa93-le64.cache-3||52f7bdb7ce746bfd7eaa1985bd9cfa93-le64.cache-3|000000000000000000000000000000000|0x7faffb457000|0x7faffb45efff|0 +Module|libmozgnome.so||libmozgnome.so|2A849C7077320B1D5BDB9D9A16AE841C0|0x7faffc4e2000|0x7faffc6f6fff|0 +Module|libdbusservice.so||libdbusservice.so|0EC37D3542DD394C6F96153A4E474B610|0x7faffc6f7000|0x7faffc8fffff|0 +Module|0d8c3b2ac0904cb8a57a757ad11a4a08-le64.cache-3||0d8c3b2ac0904cb8a57a757ad11a4a08-le64.cache-3|000000000000000000000000000000000|0x7faffca00000|0x7faffca00fff|0 +Module|3047814df9a2f067bd2d96a2b9c36e5a-le64.cache-3||3047814df9a2f067bd2d96a2b9c36e5a-le64.cache-3|000000000000000000000000000000000|0x7faffca01000|0x7faffca05fff|0 +Module|omni.ja||omni.ja|000000000000000000000000000000000|0x7faffca06000|0x7faffd51afff|0 +Module|omni.ja||omni.ja|000000000000000000000000000000000|0x7faffd51b000|0x7faffe039fff|0 +Module|libgpg-error.so.0.8.0||libgpg-error.so.0.8.0|5AD2FB740865668A171A37912C5FD4CF0|0x7faffe83b000|0x7faffea3efff|0 +Module|libp11-kit.so.0.0.0||libp11-kit.so.0.0.0|1B58E7771DC59DBA0D1D9D72AE9F8DE40|0x7faffea3f000|0x7faffec50fff|0 +Module|libtasn1.so.3.1.12||libtasn1.so.3.1.12|425E8D1B35A9CACAD55D4B9E208AAE2A0|0x7faffec51000|0x7faffee61fff|0 +Module|libORBitCosNaming-2.so.0.1.0||libORBitCosNaming-2.so.0.1.0|952A0448200ABF9A3F8FFCEB3D0F77F90|0x7faffee62000|0x7fafff068fff|0 +Module|libgcrypt.so.11.7.0||libgcrypt.so.11.7.0|C0BB9281FA6D4AAE0D58199D5E9BFFEB0|0x7fafff069000|0x7fafff2e6fff|0 +Module|libutil-2.15.so||libutil-2.15.so|6FF8867791C7874100B82302B5ED2F9F0|0x7fafff2e7000|0x7fafff4e9fff|0 +Module|libavahi-client.so.3.2.9||libavahi-client.so.3.2.9|81AF3A2B95968204957317231F995E020|0x7fafff4ea000|0x7fafff6fafff|0 +Module|libavahi-common.so.3.5.3||libavahi-common.so.3.5.3|45F54D483C5EB3C56D1BCCB1CDF1170F0|0x7fafff6fb000|0x7fafff906fff|0 +Module|libavahi-glib.so.1.0.2||libavahi-glib.so.1.0.2|531736E78B3E3E7103694008A0FE28F90|0x7fafff907000|0x7fafffb0afff|0 +Module|libgnutls.so.26.21.8||libgnutls.so.26.21.8|D0797B18564E20075594A5BCAED9C0C60|0x7fafffb0b000|0x7fafffdc5fff|0 +Module|libgailutil.so.18.0.1||libgailutil.so.18.0.1|72ACC6E9E767156C75BA9658D91015D50|0x7fafffdc7000|0x7faffffcefff|0 +Module|libpopt.so.0.0.0||libpopt.so.0.0.0|53CF6E63E2963051093E39CDC63B59EB0|0x7faffffcf000|0x7fb0001dafff|0 +Module|libxml2.so.2.7.8||libxml2.so.2.7.8|17BDD9D9537B18BAD637B288144345B20|0x7fb0001db000|0x7fb000534fff|0 +Module|libORBit-2.so.0.1.0||libORBit-2.so.0.1.0|721699122CCECE63A6E2A74492E71DCD0|0x7fb000536000|0x7fb0007a3fff|0 +Module|libbonobo-activation.so.4.0.0||libbonobo-activation.so.4.0.0|6B32741B5548A425AA5EE68457F19DF40|0x7fb0007a4000|0x7fb0009bdfff|0 +Module|libbonobo-2.so.0.0.0||libbonobo-2.so.0.0.0|D897FF610210D8618CFE5907022D24950|0x7fb0009be000|0x7fb000c32fff|0 +Module|libgnome-keyring.so.0.2.0||libgnome-keyring.so.0.2.0|50934FF6988C62EF2485132784971F060|0x7fb000c33000|0x7fb000e54fff|0 +Module|libgconf-2.so.4.1.5||libgconf-2.so.4.1.5|78D27F8280A740A8D28DA95341D922E50|0x7fb000e55000|0x7fb001082fff|0 +Module|libgnomevfs-2.so.0.2400.4||libgnomevfs-2.so.0.2400.4|A1072EFFBB949558CFB122C96358B7FE0|0x7fb001083000|0x7fb0012edfff|0 +Module|libart_lgpl_2.so.2.3.21||libart_lgpl_2.so.2.3.21|921CD218C8F7A9DC14191D2419D37C340|0x7fb0012ef000|0x7fb001507fff|0 +Module|libgnome-2.so.0.3200.1||libgnome-2.so.0.3200.1|F7B54C36941CEC98656804CB5DEBA2A50|0x7fb001508000|0x7fb00171efff|0 +Module|libgnomecanvas-2.so.0.3000.3||libgnomecanvas-2.so.0.3000.3|A4B011436BAFDE331FD59A11B38274DE0|0x7fb00171f000|0x7fb001953fff|0 +Module|libbonoboui-2.so.0.0.0||libbonoboui-2.so.0.0.0|849E31076BC867928491E763B01722210|0x7fb001954000|0x7fb001bc0fff|0 +Module|libgnomeui-2.so.0.2400.5||libgnomeui-2.so.0.2400.5|AC622823C087F1E741F8E24D44622F5B0|0x7fb001bc2000|0x7fb001e5bfff|0 +Module|libogg.so.0.7.1||libogg.so.0.7.1|7CE65CFFE1B17992BD92FE37057278080|0x7fb001e5d000|0x7fb002063fff|0 +Module|libvorbis.so.0.4.5||libvorbis.so.0.4.5|27C649ED8648B8DE0C0D1C927A80D0D10|0x7fb002064000|0x7fb00228ffff|0 +Module|libltdl.so.7.3.0||libltdl.so.7.3.0|7BE3533A4405F6BBB1B845FD45BB6BE30|0x7fb002290000|0x7fb002499fff|0 +Module|libtdb.so.1.2.9||libtdb.so.1.2.9|97146C5E103A9352B4A804F435255AB70|0x7fb00249a000|0x7fb0026aafff|0 +Module|libvorbisfile.so.3.3.4||libvorbisfile.so.3.3.4|4E3CC52B1F33A13045018DA670EDC8660|0x7fb0026ab000|0x7fb0028b2fff|0 +Module|libcanberra.so.0.2.5||libcanberra.so.0.2.5|FDE735E04FD3D9D0B5044A096A13AEA20|0x7fb0028b3000|0x7fb002ac2fff|0 +Module|libcanberra-gtk.so.0.1.8||libcanberra-gtk.so.0.1.8|1D8BEEADE64BADDEC610E1576DEE6B990|0x7fb002ac3000|0x7fb002cc7fff|0 +Module|libcanberra-gtk-module.so||libcanberra-gtk-module.so|464DC0156A5FA84FAC9FCE1E8325E28B0|0x7fb002cc8000|0x7fb002ecdfff|0 +Module|libmurrine.so||libmurrine.so|56A56852CAE0D5FEB3447AF00A58DF620|0x7fb002ece000|0x7fb0030fefff|0 +Module|56cf4f4769d0f4abc89a4895d7bd3ae1-le64.cache-3||56cf4f4769d0f4abc89a4895d7bd3ae1-le64.cache-3|000000000000000000000000000000000|0x7fb003a00000|0x7fb003a00fff|0 +Module|libdconfsettings.so||libdconfsettings.so|AAA0B3FAC1F9932AE94C47E1E4FDDCDD0|0x7fb003a82000|0x7fb003c89fff|0 +Module|liboverlay-scrollbar-0.2.so.0.0.16||liboverlay-scrollbar-0.2.so.0.0.16|343EDF37DE058829301797C8495160AC0|0x7fb003c8a000|0x7fb003e9afff|0 +Module|libnss_files-2.15.so||libnss_files-2.15.so|1C734D5F2B5C3610309A92B6E8A30B360|0x7fb003e9b000|0x7fb0040a7fff|0 +Module|libnss_nis-2.15.so||libnss_nis-2.15.so|8233136DF7FFA42BBDFF65766B57ECE10|0x7fb0040a8000|0x7fb0042b3fff|0 +Module|libnsl-2.15.so||libnsl-2.15.so|7F6EA508230A652EDF2D8A5E011C06610|0x7fb0042b4000|0x7fb0044cbfff|0 +Module|libnss_compat-2.15.so||libnss_compat-2.15.so|6D33FE1C9B7112BC70B118A6580DC3710|0x7fb0044ce000|0x7fb0046d6fff|0 +Module|UTF-16.so||UTF-16.so|F483538C59760F4799491B9373FB8B460|0x7fb0046d7000|0x7fb0048dafff|0 +Module|locale-archive||locale-archive|000000000000000000000000000000000|0x7fb0048db000|0x7fb004d1dfff|0 +Module|libuuid.so.1.3.0||libuuid.so.1.3.0|037E18FB575A87D9023DD035D91A4BAA0|0x7fb00551f000|0x7fb005723fff|0 +Module|libXdmcp.so.6.0.0||libXdmcp.so.6.0.0|D347AE60E4BF77744E66850C9808F9740|0x7fb005724000|0x7fb005929fff|0 +Module|libXau.so.6.0.0||libXau.so.6.0.0|D7A73167BC2EEF9029813AE5658A46F80|0x7fb00592a000|0x7fb005b2cfff|0 +Module|libICE.so.6.3.0||libICE.so.6.3.0|FFF38C3C84584E4FF36B7A774838500F0|0x7fb005b2d000|0x7fb005d43fff|0 +Module|libSM.so.6.0.1||libSM.so.6.0.1|76EE351B24B6C4C90EA61295C8418F470|0x7fb005d47000|0x7fb005f4efff|0 +Module|libxcb.so.1.1.0||libxcb.so.1.1.0|C95AB2CAC726A1E597FDE920942A9D370|0x7fb005f4f000|0x7fb00616cfff|0 +Module|libxcb-render.so.0.0.0||libxcb-render.so.0.0.0|12379286A5FC1108AEE4EFB17E618C840|0x7fb00616d000|0x7fb006376fff|0 +Module|libxcb-shm.so.0.0.0||libxcb-shm.so.0.0.0|77C14B0F157DE886CEE2761A5A43E7AA0|0x7fb006377000|0x7fb006579fff|0 +Module|libpng12.so.0.46.0||libpng12.so.0.46.0|4A2127A3BE4729BFBC602AE1F64BB2110|0x7fb00657a000|0x7fb0067a1fff|0 +Module|libpixman-1.so.0.24.4||libpixman-1.so.0.24.4|B9997FF15D5DB7DDD6E300FABE6F319B0|0x7fb0067a2000|0x7fb006a28fff|0 +Module|libXcursor.so.1.0.2||libXcursor.so.1.0.2|8BE2FFC59D6737AB92BE5CC674AE56A40|0x7fb006a29000|0x7fb006c32fff|0 +Module|libXrandr.so.2.2.0||libXrandr.so.2.2.0|802E879DE6FC03D3E30A388D1A7048B00|0x7fb006c33000|0x7fb006e3bfff|0 +Module|libXi.so.6.1.0||libXi.so.6.1.0|99C16AC55063CCAE3BA5D3804569EBFE0|0x7fb006e3c000|0x7fb00704afff|0 +Module|libXinerama.so.1.0.0||libXinerama.so.1.0.0|264CDEE62F23276313EDA6A67DB77A4C0|0x7fb00704b000|0x7fb00724dfff|0 +Module|libresolv-2.15.so||libresolv-2.15.so|E0E46E8814494E526A28601CB19B39160|0x7fb00724e000|0x7fb007467fff|0 +Module|libselinux.so.1||libselinux.so.1|D6AB0928E3C1FF183F3531FAA90ECF6C0|0x7fb00746a000|0x7fb007687fff|0 +Module|libpcre.so.3.12.1||libpcre.so.3.12.1|AE2C57A4C060656D726044F50CB6157C0|0x7fb007689000|0x7fb0078c5fff|0 +Module|libffi.so.6.0.0||libffi.so.6.0.0|42A1B026EC977965C9307A512B0CAF360|0x7fb0078c6000|0x7fb007acdfff|0 +Module|libexpat.so.1.5.2||libexpat.so.1.5.2|3B42437F3CB4CF8D6D2A684BF416A07F0|0x7fb007ace000|0x7fb007cf7fff|0 +Module|libz.so.1.2.3.4||libz.so.1.2.3.4|FCEC95F691F35D8D34989398A14B7ECD0|0x7fb007cf8000|0x7fb007f0efff|0 +Module|libgthread-2.0.so.0.3200.1||libgthread-2.0.so.0.3200.1|C1226354620C103F73EEA1B5FB7893010|0x7fb007f0f000|0x7fb008110fff|0 +Module|libXt.so.6.0.0||libXt.so.6.0.0|8135EEBF46BB9BD5E86CFAE6212742A00|0x7fb008111000|0x7fb008375fff|0 +Module|libX11.so.6.3.0||libX11.so.6.3.0|8C39D4DF4B38C9E4F96A4BFA63E4D8BE0|0x7fb008377000|0x7fb0086aafff|0 +Module|libgmodule-2.0.so.0.3200.1||libgmodule-2.0.so.0.3200.1|C66A8AB87D16694CF937DAC0F6B664FE0|0x7fb0086ab000|0x7fb0088aefff|0 +Module|libcairo.so.2.11000.2||libcairo.so.2.11000.2|004D8C7F57D6CB9C78B06248BF6F693C0|0x7fb0088af000|0x7fb008b69fff|0 +Module|libpango-1.0.so.0.3000.0||libpango-1.0.so.0.3000.0|0B6484B366839F9BF893C4DB919339F10|0x7fb008b6d000|0x7fb008db5fff|0 +Module|libpangocairo-1.0.so.0.3000.0||libpangocairo-1.0.so.0.3000.0|7399CB0203754BE8423998526C341E330|0x7fb008db6000|0x7fb008fc1fff|0 +Module|libgdk_pixbuf-2.0.so.0.2600.1||libgdk_pixbuf-2.0.so.0.2600.1|DD9021B2B36B59B6A7BADEE89691AACC0|0x7fb008fc2000|0x7fb0091e1fff|0 +Module|libgdk-x11-2.0.so.0.2400.10||libgdk-x11-2.0.so.0.2400.10|1960A8873DF41407FD59D74CBF7D82630|0x7fb0091e2000|0x7fb009493fff|0 +Module|libpangoft2-1.0.so.0.3000.0||libpangoft2-1.0.so.0.3000.0|D8A3307209551AF5DEE20873B11FA7F30|0x7fb009494000|0x7fb0096bdfff|0 +Module|libgio-2.0.so.0.3200.1||libgio-2.0.so.0.3200.1|3254E51FD3C9E24591957B11F0AFCC8F0|0x7fb0096be000|0x7fb009a0afff|0 +Module|libatk-1.0.so.0.20409.1||libatk-1.0.so.0.20409.1|2DF4A21F3F393CFE003DACC1115DE6500|0x7fb009a0d000|0x7fb009c2efff|0 +Module|libgtk-x11-2.0.so.0.2400.10||libgtk-x11-2.0.so.0.2400.10|FE0171FDF49D945524BB3F5A55FE7D8C0|0x7fb009c2f000|0x7fb00a266fff|0 +Module|libglib-2.0.so.0.3200.1||libglib-2.0.so.0.3200.1|591CE068AF1ED2994F588DAAB7DBF8D50|0x7fb00a269000|0x7fb00a55cfff|0 +Module|libgobject-2.0.so.0.3200.1||libgobject-2.0.so.0.3200.1|DDB5411470C81C34A74AF761A403BABB0|0x7fb00a55e000|0x7fb00a7acfff|0 +Module|libdbus-1.so.3.5.8||libdbus-1.so.3.5.8|14DF88D8296067351AA73723270CEFF00|0x7fb00a7ad000|0x7fb00a9f0fff|0 +Module|libdbus-glib-1.so.2.2.2||libdbus-glib-1.so.2.2.2|43DADC5BB1EB2202A20A4EFA5428AAB10|0x7fb00a9f1000|0x7fb00ac17fff|0 +Module|libasound.so.2.0.0||libasound.so.2.0.0|896C3492FAD29202B4C06B6350B60B2B0|0x7fb00ac18000|0x7fb00af04fff|0 +Module|libXcomposite.so.1.0.0||libXcomposite.so.1.0.0|97F3C5EFD90926A6E10C735BECB8DF5F0|0x7fb00af05000|0x7fb00b107fff|0 +Module|libXfixes.so.3.1.0||libXfixes.so.3.1.0|7A77FFC53CFBA7CE9A005472E748108E0|0x7fb00b108000|0x7fb00b30dfff|0 +Module|libXdamage.so.1.1.0||libXdamage.so.1.1.0|3A428B268049BDD9441ADBDA982CC0960|0x7fb00b30e000|0x7fb00b510fff|0 +Module|libXext.so.6.4.0||libXext.so.6.4.0|C0A8D6FF2E55C2A80ADB6344E5A1D5C80|0x7fb00b511000|0x7fb00b721fff|0 +Module|libXrender.so.1.3.0||libXrender.so.1.3.0|223BF9CD7303011C68BBAA246F9207720|0x7fb00b722000|0x7fb00b92bfff|0 +Module|libfontconfig.so.1.4.4||libfontconfig.so.1.4.4|75729F923954F8363FBC14AD02152B4E0|0x7fb00b92c000|0x7fb00bb61fff|0 +Module|libfreetype.so.6.8.0||libfreetype.so.6.8.0|1414E18E6804ACCEEBB283FC33EE0F780|0x7fb00bb62000|0x7fb00bdfdfff|0 +Module|libxul.so||libxul.so|2E110ACEEBDD217E61ECFE13D97D63B20|0x7fb00bdfe000|0x7fb0113bbfff|0 +Module|libmozsqlite3.so||libmozsqlite3.so|1634A084C336B51601918912331BF2360|0x7fb0114ad000|0x7fb01178afff|0 +Module|libssl3.so||libssl3.so|DF3D6916CE7D7116A5B29211FC893B2C0|0x7fb01178b000|0x7fb0119e8fff|0 +Module|libsmime3.so||libsmime3.so|AD809EB2480CDA697A07EBDD21F0C67C0|0x7fb0119e9000|0x7fb011c18fff|0 +Module|libnss3.so||libnss3.so|C05FEE6A1D99B3157111A2A65F038F490|0x7fb011c19000|0x7fb011f7afff|0 +Module|libnssutil3.so||libnssutil3.so|5EC5EE9D732F04C3657305593046F3790|0x7fb011f7c000|0x7fb0121affff|0 +Module|libplds4.so||libplds4.so|AE047F3EB887A6F907FDD9A4F546D6310|0x7fb0121b1000|0x7fb0123b3fff|0 +Module|libplc4.so||libplc4.so|4BA74C15641F4585EFC08180AAEED5D50|0x7fb0123b4000|0x7fb0125b7fff|0 +Module|libnspr4.so||libnspr4.so|87988E2199DC9895B24BBA7B959FFB660|0x7fb0125b8000|0x7fb0127fcfff|0 +Module|de9486f0b47a4d768a594cb4198cb1c6-le64.cache-3||de9486f0b47a4d768a594cb4198cb1c6-le64.cache-3|000000000000000000000000000000000|0x7fb012a00000|0x7fb012a02fff|0 +Module|libc-2.15.so||libc-2.15.so|45AF61A258D312D4EBECFC54D3317BDF0|0x7fb012a03000|0x7fb012dbafff|0 +Module|libgcc_s.so.1||libgcc_s.so.1|ADD74D5C94FA5A3E18AD415D91D5E5090|0x7fb012dc0000|0x7fb012fd5fff|0 +Module|libm-2.15.so||libm-2.15.so|5C4748B68510CE72C8605CFF06F62AE50|0x7fb012fd6000|0x7fb0132cffff|0 +Module|libstdc++.so.6.0.18||libstdc++.so.6.0.18|C8C3FB885A6714123E0C6EE228D355F60|0x7fb0132d0000|0x7fb0135befff|0 +Module|librt-2.15.so||librt-2.15.so|375B2C35503AC4E6AB881A5DB6F5766F0|0x7fb0135d4000|0x7fb0137dbfff|0 +Module|libdl-2.15.so||libdl-2.15.so|55AF81D1BB1D3EC49D55913D532635FD0|0x7fb0137dc000|0x7fb0139dffff|0 +Module|libpthread-2.15.so||libpthread-2.15.so|9DAF40C397EE7CC1730F7D03693286C50|0x7fb0139e0000|0x7fb013bf8fff|0 +Module|ld-2.15.so||ld-2.15.so|3719FB5302A0741ADF25B3DBDA629B630|0x7fb013bfd000|0x7fb013c1efff|0 +Module|b9d506c9ac06c20b433354fa67a72993-le64.cache-3||b9d506c9ac06c20b433354fa67a72993-le64.cache-3|000000000000000000000000000000000|0x7fb013c1f000|0x7fb013c1ffff|0 +Module|d52a8644073d54c13679302ca1180695-le64.cache-3||d52a8644073d54c13679302ca1180695-le64.cache-3|000000000000000000000000000000000|0x7fb013c20000|0x7fb013c2ffff|0 +Module|e13b20fdb08344e0e664864cc2ede53d-le64.cache-3||e13b20fdb08344e0e664864cc2ede53d-le64.cache-3|000000000000000000000000000000000|0x7fb013c30000|0x7fb013c42fff|0 +Module|gschemas.compiled||gschemas.compiled|000000000000000000000000000000000|0x7fb013dc6000|0x7fb013debfff|0 +Module|b47c4e1ecd0709278f4910c18777a504-le64.cache-3||b47c4e1ecd0709278f4910c18777a504-le64.cache-3|000000000000000000000000000000000|0x7fb013df2000|0x7fb013df6fff|0 +Module|3f7329c5293ffd510edef78f73874cfd-le64.cache-3||3f7329c5293ffd510edef78f73874cfd-le64.cache-3|000000000000000000000000000000000|0x7fb013df7000|0x7fb013dfcfff|0 +Module|7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-3||7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-3|000000000000000000000000000000000|0x7fb013dfd000|0x7fb013e01fff|0 +Module|user||user|000000000000000000000000000000000|0x7fb013e12000|0x7fb013e14fff|0 +Module|gconv-modules.cache||gconv-modules.cache|000000000000000000000000000000000|0x7fb013e15000|0x7fb013e1bfff|0 +Module|user||user|000000000000000000000000000000000|0x7fb013e1c000|0x7fb013e1cfff|0 +Module|linux-gate.so||linux-gate.so|75C70C0C697CFC3335A55C90475D300A0|0x7fff353ff000|0x7fff353fffff|0 + +0|0|libc-2.15.so||||0xe6b03 +0|1|libxul.so|PollWrapper|hg:hg.mozilla.org/mozilla-central:widget/gtk/nsAppShell.cpp:944fb6e682b8|44|0xf +0|2|libpopt.so.0.0.0||||0x30ffe +0|3|libpopt.so.0.0.0||||0x31006 +0|4|libglib-2.0.so.0.3200.1||||0x47ff5 +0|5|libglib-2.0.so.0.3200.1||||0x48123 +0|6|libxul.so|nsAppShell::ProcessNextNativeEvent(bool)|hg:hg.mozilla.org/mozilla-central:widget/gtk/nsAppShell.cpp:944fb6e682b8|156|0x4 +0|7|libxul.so|nsBaseAppShell::DoProcessNextNativeEvent(bool, unsigned int)|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:944fb6e682b8|140|0xf +0|8|libpopt.so.0.0.0||||0x30fff +0|9|libxul.so|nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal*, bool, unsigned int)|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:944fb6e682b8|298|0xa +0|10|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|812|0x1f +0|11|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +0|12|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +0|13|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +0|14|libxul.so|mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|140|0xd +0|15|libxul.so|_fini|||0x1fb8de7 +0|16|libxul.so|_fini|||0x2384f07 +0|17|libxul.so||||0x9ea75d +0|18|libxul.so|nsLocalFile::AppendRelativePath(nsAString_internal const&)|hg:hg.mozilla.org/mozilla-central:xpcom/io/nsLocalFileUnix.cpp:944fb6e682b8|2121|0xb +0|19|||||0x7fff3534a7cf +0|20|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +0|21|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +0|22|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +0|23|libxul.so|nsBaseAppShell::Run()|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:944fb6e682b8|164|0xc +0|24|libxul.so|nsAppStartup::Run()|hg:hg.mozilla.org/mozilla-central:toolkit/components/startup/nsAppStartup.cpp:944fb6e682b8|281|0x5 +0|25|libc-2.15.so||||0x8a3ff +0|26|libxul.so|XREMain::XRE_mainRun()|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:944fb6e682b8|4173|0x14 +0|27|libxul.so|NS_LogAddRef|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsTraceRefcnt.cpp:944fb6e682b8|983|0x4 +0|28|libxul.so|NS_LogRelease|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsTraceRefcnt.cpp:944fb6e682b8|1038|0x4 +0|29|libxul.so|_fini|||0x518e49 +0|30|libxul.so|nsLocalFile::AppendRelativePath(nsAString_internal const&)|hg:hg.mozilla.org/mozilla-central:xpcom/io/nsLocalFileUnix.cpp:944fb6e682b8|2121|0xb +0|31|||||0x7fff3534a93f +0|32|libxul.so|nsComponentManagerImpl::Release()|hg:hg.mozilla.org/mozilla-central:xpcom/components/nsComponentManager.cpp:944fb6e682b8|934|0xa +0|33|libxul.so|nsLocalFile::AppendRelativePath(nsAString_internal const&)|hg:hg.mozilla.org/mozilla-central:xpcom/io/nsLocalFileUnix.cpp:944fb6e682b8|2121|0xb +0|34|||||0x7fff3534a9af +0|35|libxul.so|XREMain::XRE_main(int, char**, nsXREAppData const*)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:944fb6e682b8|4249|0x4 +0|36|libxul.so|XRE_main|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:944fb6e682b8|4469|0x4 +0|37|libxul.so|_fini|||0x23090e7 +0|38|libxul.so|_fini|||0x230912f +0|39|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +0|40|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 +0|41|libpopt.so.0.0.0||||0x3103e +0|42|firefox-bin|do_main|hg:hg.mozilla.org/mozilla-central:browser/app/nsBrowserApp.cpp:944fb6e682b8|294|0x5 +0|43|firefox-bin|_fini|||0x375 +1|0|libc-2.15.so||||0xe6b03 +1|1|libglib-2.0.so.0.3200.1||||0x47ff5 +1|2|libglib-2.0.so.0.3200.1||||0x48459 +1|3|libdconfsettings.so||||0x498a +1|4|libglib-2.0.so.0.3200.1||||0x699a4 +1|5|libpthread-2.15.so||||0x7e99 +2|0|libc-2.15.so||||0xe6b03 +2|1|libglib-2.0.so.0.3200.1||||0x47ff5 +2|2|libglib-2.0.so.0.3200.1||||0x48459 +2|3|libgio-2.0.so.0.3200.1||||0xc92c5 +2|4|libglib-2.0.so.0.3200.1||||0x699a4 +2|5|libpthread-2.15.so||||0x7e99 +3|0|libc-2.15.so||||0xee6d9 +3|1|libxul.so|epoll_wait|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/third_party/libevent/epoll_sub.c:944fb6e682b8|63|0x9 +3|2|libxul.so|epoll_dispatch|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/third_party/libevent/epoll.c:944fb6e682b8|407|0x14 +3|3|libxul.so|event_base_loop|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/third_party/libevent/event.c:944fb6e682b8|1607|0x8 +3|4|libxul.so|_fini|||0x1f031c7 +3|5|libxul.so|MessageLoop::DoWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|442|0x7 +3|6|libxul.so|base::MessagePumpLibevent::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_pump_libevent.cc:944fb6e682b8|357|0xd +3|7|libstdc++.so.6.0.18||||0x10487 +3|8|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +3|9|libxul.so|LockImpl::Unlock()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/lock_impl_posix.cc:944fb6e682b8|46|0x4 +3|10|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +3|11|libxul.so|base::Thread::ThreadMain()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/thread.cc:944fb6e682b8|170|0x7 +3|12|libxul.so|_fini|||0x1fded17 +4|0|libpthread-2.15.so||||0xbd84 +4|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +4|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +4|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +4|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +4|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +4|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +4|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +4|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +4|9|libxul.so|_fini|||0x1fb8de7 +4|10|libxul.so|_fini|||0x2384f07 +4|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +4|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +4|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +4|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +4|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +4|16|libpthread-2.15.so||||0x7e99 +5|0|libc-2.15.so||||0xe6b03 +5|1|libnspr4.so|_pr_poll_with_poll|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptio.c:944fb6e682b8|3922|0x11 +5|2|libpopt.so.0.0.0||||0x31000 +5|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +5|4|libxul.so|PLDHashEntryHdr* PLDHashTable::SearchTable<(PLDHashTable::SearchReason)0>(void const*, unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/pldhash.cpp:944fb6e682b8|388|0xc +5|5|libxul.so|mozilla::net::nsHttpConnectionMgr::GetSpdyPreferredConn(mozilla::net::nsHttpConnectionMgr::nsConnectionEntry*)|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/http/nsHttpConnectionMgr.cpp:944fb6e682b8|2329|0x7 +5|6|libxul.so|mozilla::net::nsHttpConnectionMgr::ProcessSpdyPendingQ(mozilla::net::nsHttpConnectionMgr::nsConnectionEntry*)|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/http/nsHttpConnectionMgr.cpp:944fb6e682b8|2261|0x4 +5|7|libxul.so|mozilla::DeadlockDetector::CheckAcquisition(mozilla::BlockingResourceBase const*, mozilla::BlockingResourceBase const*)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/DeadlockDetector.h:944fb6e682b8|114|0x7 +5|8|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +5|9|libxul.so|mozilla::net::nsHttpConnectionMgr::ProcessPendingQForEntry(mozilla::net::nsHttpConnectionMgr::nsConnectionEntry*, bool)|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/http/nsHttpConnectionMgr.cpp:944fb6e682b8|1184|0x4 +5|10|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +5|11|libplds4.so|PL_CompareStrings|hg:hg.mozilla.org/mozilla-central:nsprpub/lib/ds/plhash.c:944fb6e682b8|476|0x4 +5|12|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 +5|13|firefox-bin|arena_dalloc|hg:hg.mozilla.org/mozilla-central:memory/mozjemalloc/jemalloc.c:944fb6e682b8|1685|0xb +5|14|libxul.so|_fini|||0x39793e +5|15|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +5|16|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 +5|17|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +5|18|linux-gate.so||||0x958 +5|19|libxul.so|nsSocketTransportService::Poll(bool, unsigned int*, mozilla::BaseTimeDuration*)|hg:hg.mozilla.org/mozilla-central:netwerk/base/nsSocketTransportService2.cpp:944fb6e682b8|427|0xd +5|20|libxul.so|nsSocketTransportService::DoPollIteration(bool, mozilla::BaseTimeDuration*)|hg:hg.mozilla.org/mozilla-central:netwerk/base/nsSocketTransportService2.cpp:944fb6e682b8|1000|0x13 +5|21|libxul.so|nsSocketTransportService::Run()|hg:hg.mozilla.org/mozilla-central:netwerk/base/nsSocketTransportService2.cpp:944fb6e682b8|793|0x16 +5|22|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 +5|23|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +5|24|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +5|25|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa +5|26|libxul.so|_fini|||0x1fb8de7 +5|27|libxul.so|_fini|||0x2384f07 +5|28|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +5|29|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +5|30|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +5|31|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +5|32|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +5|33|libpthread-2.15.so||||0x7e99 +6|0|libpthread-2.15.so||||0xbd84 +6|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +6|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +6|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +6|4|libpthread-2.15.so||||0x7e99 +7|0|libpthread-2.15.so||||0xbd84 +7|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +7|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +7|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +7|4|libpthread-2.15.so||||0x7e99 +8|0|libpthread-2.15.so||||0xbd84 +8|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +8|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +8|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +8|4|libpthread-2.15.so||||0x7e99 +9|0|libpthread-2.15.so||||0xbd84 +9|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +9|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +9|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +9|4|libpthread-2.15.so||||0x7e99 +10|0|libpthread-2.15.so||||0xbd84 +10|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +10|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +10|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +10|4|libpthread-2.15.so||||0x7e99 +11|0|libpthread-2.15.so||||0xbd84 +11|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +11|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +11|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +11|4|libpthread-2.15.so||||0x7e99 +12|0|libpthread-2.15.so||||0xbd84 +12|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +12|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +12|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +12|4|libpthread-2.15.so||||0x7e99 +13|0|libpthread-2.15.so||||0xbd84 +13|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +13|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +13|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +13|4|libpthread-2.15.so||||0x7e99 +14|0|libpthread-2.15.so||||0xbd84 +14|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +14|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +14|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +14|4|libpthread-2.15.so||||0x7e99 +15|0|libpthread-2.15.so||||0xbd84 +15|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +15|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +15|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +15|4|libpthread-2.15.so||||0x7e99 +16|0|libpthread-2.15.so||||0xbd84 +16|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +16|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +16|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +16|4|libpthread-2.15.so||||0x7e99 +17|0|libpthread-2.15.so||||0xbd84 +17|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +17|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 +17|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +17|4|libpthread-2.15.so||||0x7e99 +18|0|libpthread-2.15.so||||0xbd84 +18|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +18|2|libxul.so|Watchdog::Sleep(unsigned int)|hg:hg.mozilla.org/mozilla-central:js/xpconnect/src/XPCJSRuntime.cpp:944fb6e682b8|1096|0x7 +18|3|libxul.so|WatchdogMain|hg:hg.mozilla.org/mozilla-central:js/xpconnect/src/XPCJSRuntime.cpp:944fb6e682b8|1091|0x4 +18|4|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +18|5|libpthread-2.15.so||||0x7e99 +19|0|libpthread-2.15.so||||0xbd84 +19|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +19|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb +19|3|libxul.so|mozilla::HangMonitor::ThreadMain(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/Monitor.h:944fb6e682b8|88|0xa +19|4|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +19|5|libpthread-2.15.so||||0x7e99 +20|0|libpthread-2.15.so||||0xc0fe +20|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 +20|2|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|387|0xa +20|3|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb +20|4|libxul.so|TimerThread::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|363|0xa +20|5|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 +20|6|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +20|7|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +20|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa +20|9|libxul.so|_fini|||0x1fb8de7 +20|10|libxul.so|_fini|||0x2384f07 +20|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +20|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +20|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +20|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +20|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +20|16|libpthread-2.15.so||||0x7e99 +21|0|libpthread-2.15.so||||0xbd84 +21|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +21|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb +21|3|libpopt.so.0.0.0||||0x30ffe +21|4|libxul.so|mozilla::net::CacheIOThread::ThreadFunc()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/Monitor.h:944fb6e682b8|40|0xf +21|5|libxul.so|_fini|||0x115528 +21|6|libxul.so|mozilla::net::CacheIOThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:netwerk/cache2/CacheIOThread.cpp:944fb6e682b8|167|0x7 +21|7|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +21|8|libpthread-2.15.so||||0x7e99 +22|0|libpthread-2.15.so||||0xbd84 +22|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +22|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +22|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +22|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +22|5|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +22|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +22|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +22|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +22|9|libxul.so|_fini|||0x1fb8de7 +22|10|libxul.so|_fini|||0x2384f07 +22|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +22|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +22|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +22|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +22|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +22|16|libpthread-2.15.so||||0x7e99 +23|0|libpthread-2.15.so||||0xbd84 +23|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +23|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb +23|3|libpopt.so.0.0.0||||0x30ffe +23|4|libxul.so|nsCertVerificationThread::Run()|hg:hg.mozilla.org/mozilla-central:security/manager/ssl/src/nsCertVerificationThread.cpp:944fb6e682b8|115|0xa +23|5|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +23|6|libpthread-2.15.so||||0x7e99 +24|0|libpthread-2.15.so||||0xbd84 +24|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +24|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +24|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +24|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +24|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +24|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +24|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +24|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +24|9|libxul.so|_fini|||0x1fb8de7 +24|10|libxul.so|_fini|||0x2384f07 +24|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +24|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +24|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +24|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +24|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +24|16|libpthread-2.15.so||||0x7e99 +25|0|libpthread-2.15.so||||0xbd84 +25|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +25|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +25|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +25|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +25|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +25|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +25|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +25|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +25|9|libxul.so|_fini|||0x1fb8de7 +25|10|libxul.so|_fini|||0x2384f07 +25|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +25|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +25|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +25|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +25|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +25|16|libpthread-2.15.so||||0x7e99 +26|0|libpthread-2.15.so||||0xbd84 +26|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +26|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +26|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +26|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +26|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +26|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +26|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +26|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +26|9|libxul.so|_fini|||0x1fb8de7 +26|10|libxul.so|_fini|||0x2384f07 +26|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +26|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +26|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +26|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +26|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +26|16|libpthread-2.15.so||||0x7e99 +27|0|libpthread-2.15.so||||0xbd84 +27|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +27|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb +27|3|libxul.so|mozilla::dom::workers::WorkerPrivate::WaitForWorkerEvents(unsigned int)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5649|0x4 +27|4|libxul.so|mozilla::dom::workers::WorkerPrivate::DoRunLoop(JSContext*)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5110|0xa +27|5|libpopt.so.0.0.0||||0x31000 +27|6|libxul.so|js::CurrentThreadCanAccessRuntime(JSRuntime*)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Runtime.cpp:944fb6e682b8|804|0xb +27|7|libxul.so|WorkerThreadPrimaryRunnable::Run|hg:hg.mozilla.org/mozilla-central:dom/workers/RuntimeService.cpp:944fb6e682b8|2725|0x4 +27|8|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 +27|9|libxul.so|_fini|||0x225e047 +27|10|libxul.so|_fini|||0x1fb05f7 +27|11|libxul.so|_fini|||0x1fb0657 +27|12|libxul.so|_fini|||0x1fb0f17 +27|13|libxul.so|_fini|||0x1fb0f47 +28|0|libpthread-2.15.so||||0xbd84 +28|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +28|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +28|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +28|4|libxul.so|nsTimerImpl::Release()|hg:hg.mozilla.org/mozilla-central:memory/mozalloc/mozalloc.h:944fb6e682b8|205|0x7 +28|5|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +28|6|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +28|7|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +28|8|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +28|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +28|10|libxul.so|_fini|||0x1fb8de7 +28|11|libxul.so|_fini|||0x2384f07 +28|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +28|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +28|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +28|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +28|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +28|17|libpthread-2.15.so||||0x7e99 +29|0|libpthread-2.15.so||||0xbd84 +29|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +29|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb +29|3|libxul.so|mozilla::dom::workers::WorkerPrivate::WaitForWorkerEvents(unsigned int)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5649|0x4 +29|4|libxul.so|mozilla::dom::workers::WorkerPrivate::DoRunLoop(JSContext*)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5110|0xa +29|5|libpopt.so.0.0.0||||0x31000 +29|6|libxul.so|js::CurrentThreadCanAccessRuntime(JSRuntime*)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Runtime.cpp:944fb6e682b8|804|0xb +29|7|libxul.so|WorkerThreadPrimaryRunnable::Run|hg:hg.mozilla.org/mozilla-central:dom/workers/RuntimeService.cpp:944fb6e682b8|2725|0x4 +29|8|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +29|9|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 +29|10|libxul.so|_fini|||0x225e047 +29|11|libxul.so|_fini|||0x1fb05f7 +29|12|libxul.so|_fini|||0x1fb0657 +29|13|libxul.so|_fini|||0x1fb0f17 +29|14|libxul.so|_fini|||0x1fb0f47 +30|0|libpthread-2.15.so||||0xbd84 +30|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +30|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +30|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +30|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +30|5|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +30|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +30|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +30|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +30|9|libxul.so|_fini|||0x1fb8de7 +30|10|libxul.so|_fini|||0x2384f07 +30|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +30|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +30|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +30|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +30|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +30|16|libpthread-2.15.so||||0x7e99 +31|0|libpthread-2.15.so||||0xc0fe +31|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 +31|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe +31|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +31|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +31|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 +31|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 +31|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +31|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +31|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +31|10|libxul.so|_fini|||0x1fb8de7 +31|11|libxul.so|_fini|||0x2384f07 +31|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +31|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +31|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +31|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +31|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +31|17|libc-2.15.so||||0x3b2827 +31|18|libpthread-2.15.so||||0x7e99 +32|0|libpthread-2.15.so||||0xbd84 +32|1|libxul.so|ConditionVariable::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/condition_variable_posix.cc:944fb6e682b8|40|0x8 +32|2|libxul.so|base::WaitableEvent::Enqueue(base::WaitableEvent::Waiter*)|hg:hg.mozilla.org/mozilla-central:memory/mozalloc/mozalloc.h:944fb6e682b8|181|0x4 +32|3|libxul.so|base::WaitableEvent::TimedWait(base::TimeDelta const&)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|195|0x7 +32|4|libxul.so|_fini|||0x1fdf227 +32|5|libxul.so|base::WaitableEvent::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|201|0x10 +32|6|libxul.so|base::MessagePumpDefault::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_pump_default.cc:944fb6e682b8|60|0x8 +32|7|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +32|8|libxul.so|LockImpl::Unlock()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/lock_impl_posix.cc:944fb6e682b8|46|0x4 +32|9|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +32|10|libxul.so|base::Thread::ThreadMain()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/thread.cc:944fb6e682b8|170|0x7 +32|11|libxul.so|_fini|||0x1fded17 +33|0|libpthread-2.15.so||||0xbd84 +33|1|libxul.so|ConditionVariable::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/condition_variable_posix.cc:944fb6e682b8|40|0x8 +33|2|libxul.so|base::WaitableEvent::Enqueue(base::WaitableEvent::Waiter*)|hg:hg.mozilla.org/mozilla-central:memory/mozalloc/mozalloc.h:944fb6e682b8|181|0x4 +33|3|libxul.so|base::WaitableEvent::TimedWait(base::TimeDelta const&)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|195|0x7 +33|4|libxul.so|_fini|||0x1fdf227 +33|5|libxul.so|base::WaitableEvent::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|201|0x10 +33|6|libxul.so|base::MessagePumpDefault::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_pump_default.cc:944fb6e682b8|60|0x8 +33|7|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +33|8|libxul.so|LockImpl::Unlock()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/lock_impl_posix.cc:944fb6e682b8|46|0x4 +33|9|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +33|10|libxul.so|base::Thread::ThreadMain()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/thread.cc:944fb6e682b8|170|0x7 +33|11|libxul.so|_fini|||0x1fded17 +34|0|libpthread-2.15.so||||0xbd84 +34|1|libxul.so|ConditionVariable::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/condition_variable_posix.cc:944fb6e682b8|40|0x8 +34|2|libxul.so|base::WaitableEvent::Enqueue(base::WaitableEvent::Waiter*)|hg:hg.mozilla.org/mozilla-central:memory/mozalloc/mozalloc.h:944fb6e682b8|181|0x4 +34|3|libxul.so|base::WaitableEvent::TimedWait(base::TimeDelta const&)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|195|0x7 +34|4|libxul.so|_fini|||0x1fdf227 +34|5|libxul.so|_fini|||0x14c997 +34|6|libxul.so|base::WaitableEvent::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|201|0x10 +34|7|libxul.so|base::MessagePumpDefault::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_pump_default.cc:944fb6e682b8|60|0x8 +34|8|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +34|9|libxul.so|LockImpl::Unlock()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/lock_impl_posix.cc:944fb6e682b8|46|0x4 +34|10|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +34|11|libxul.so|base::Thread::ThreadMain()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/thread.cc:944fb6e682b8|170|0x7 +34|12|libxul.so|_fini|||0x1fded17 +35|0|libpthread-2.15.so||||0xbd84 +35|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +35|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb +35|3|libxul.so|mozilla::dom::workers::WorkerPrivate::WaitForWorkerEvents(unsigned int)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5649|0x4 +35|4|libxul.so|mozilla::dom::workers::WorkerPrivate::DoRunLoop(JSContext*)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5110|0xa +35|5|libpopt.so.0.0.0||||0x31000 +35|6|libxul.so|js::CurrentThreadCanAccessRuntime(JSRuntime*)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Runtime.cpp:944fb6e682b8|804|0xb +35|7|libxul.so|WorkerThreadPrimaryRunnable::Run|hg:hg.mozilla.org/mozilla-central:dom/workers/RuntimeService.cpp:944fb6e682b8|2725|0x4 +35|8|libxul.so|_fini|||0x225e047 +35|9|libxul.so|_fini|||0x1fb05f7 +35|10|libxul.so|_fini|||0x1fb0657 +35|11|libxul.so|_fini|||0x1fb0f17 +35|12|libxul.so|_fini|||0x1fb0f47 +36|0|libpthread-2.15.so||||0xc0fe +36|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 +36|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe +36|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +36|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +36|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 +36|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 +36|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +36|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +36|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa +36|10|libxul.so|_fini|||0x1fb8de7 +36|11|libxul.so|_fini|||0x2384f07 +36|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +36|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +36|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +36|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +36|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +36|17|libc-2.15.so||||0x3b2827 +36|18|libpthread-2.15.so||||0x7e99 +37|0|libpthread-2.15.so||||0xbd84 +37|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +37|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +37|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +37|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +37|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +37|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +37|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +37|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +37|9|libxul.so|_fini|||0x1fb8de7 +37|10|libxul.so|_fini|||0x2384f07 +37|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +37|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +37|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +37|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +37|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +37|16|libc-2.15.so||||0x3b2827 +37|17|libpthread-2.15.so||||0x7e99 +38|0|libpthread-2.15.so||||0xc0fe +38|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 +38|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe +38|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +38|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +38|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 +38|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 +38|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +38|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +38|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa +38|10|libxul.so|_fini|||0x1fb8de7 +38|11|libxul.so|_fini|||0x2384f07 +38|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +38|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +38|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +38|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +38|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +38|17|libc-2.15.so||||0x3b2827 +38|18|libpthread-2.15.so||||0x7e99 +39|0|libpthread-2.15.so||||0xc0fe +39|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 +39|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe +39|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +39|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +39|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 +39|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 +39|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +39|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +39|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa +39|10|libxul.so|_fini|||0x1fb8de7 +39|11|libxul.so|_fini|||0x2384f07 +39|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +39|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +39|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +39|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +39|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +39|17|libc-2.15.so||||0x3b2827 +39|18|libpthread-2.15.so||||0x7e99 +40|0|libpthread-2.15.so||||0xbd84 +40|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +40|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +40|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +40|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +40|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +40|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +40|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +40|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +40|9|libxul.so|_fini|||0x1fb8de7 +40|10|libxul.so|_fini|||0x2384f07 +40|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +40|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +40|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +40|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +40|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +40|16|libpthread-2.15.so||||0x7e99 +41|0|libpthread-2.15.so||||0xc0fe +41|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 +41|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe +41|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa +41|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +41|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 +41|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 +41|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +41|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +41|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +41|10|libxul.so|_fini|||0x1fb8de7 +41|11|libxul.so|_fini|||0x2384f07 +41|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +41|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +41|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +41|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +41|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +41|17|libpthread-2.15.so||||0x7e99 +42|0|libpthread-2.15.so||||0xbd84 +42|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +42|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +42|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +42|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +42|5|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd +42|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +42|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +42|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +42|9|libxul.so|_fini|||0x1fb8de7 +42|10|libxul.so|_fini|||0x2384f07 +42|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +42|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +42|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +42|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +42|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +42|16|libpthread-2.15.so||||0x7e99 +43|0|libpthread-2.15.so||||0xbd84 +43|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +43|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +43|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +43|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +43|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +43|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +43|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +43|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +43|9|libxul.so|_fini|||0x1fb8de7 +43|10|libxul.so|_fini|||0x2384f07 +43|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +43|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +43|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +43|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +43|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +43|16|libpthread-2.15.so||||0x7e99 +44|0|libpthread-2.15.so||||0xbd84 +44|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 +44|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb +44|3|libpopt.so.0.0.0||||0x30ffe +44|4|libxul.so|mozilla::dom::DOMStorageDBThread::ThreadFunc()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/Monitor.h:944fb6e682b8|40|0xe +44|5|libnspr4.so|PR_SetCurrentThreadName|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|1766|0xd +44|6|libpthread-2.15.so||||0x10daf +44|7|libxul.so|mozilla::dom::DOMStorageDBThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:dom/storage/DOMStorageDBThread.cpp:944fb6e682b8|286|0x7 +44|8|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +44|9|libpthread-2.15.so||||0x7e99 +45|0|libpthread-2.15.so||||0xbd84 +45|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +45|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +45|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +45|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +45|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +45|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +45|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +45|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +45|9|libxul.so|_fini|||0x1fb8de7 +45|10|libxul.so|_fini|||0x2384f07 +45|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +45|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +45|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +45|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +45|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +45|16|libpthread-2.15.so||||0x7e99 +46|0|libpthread-2.15.so||||0xbd84 +46|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +46|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +46|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +46|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +46|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +46|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +46|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +46|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +46|9|libxul.so|_fini|||0x1fb8de7 +46|10|libxul.so|_fini|||0x2384f07 +46|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +46|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +46|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +46|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +46|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +46|16|libpthread-2.15.so||||0x7e99 +47|0|libpthread-2.15.so||||0xbd84 +47|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb +47|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb +47|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb +47|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 +47|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 +47|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc +47|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 +47|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd +47|9|libxul.so|_fini|||0x1fb8de7 +47|10|libxul.so|_fini|||0x2384f07 +47|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 +47|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 +47|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 +47|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 +47|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 +47|16|libpthread-2.15.so||||0x7e99 diff --git a/FTB/Signatures/tests/resources/tsan-lock-report.txt b/FTB/Signatures/tests/resources/tsan-lock-report.txt new file mode 100644 index 000000000..412e63393 --- /dev/null +++ b/FTB/Signatures/tests/resources/tsan-lock-report.txt @@ -0,0 +1,18 @@ +WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=16628) + Cycle in lock order graph: M1924 (0x7b2c00038ad0) => M1864 (0x7b2c00038130) => M1903 (0x7b2c000386b0) => M1924 + Mutex M1864 acquired here while holding mutex M1924 in main thread: + #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4139:3 (SanctionsTestServer+0x7abe6) + #1 PR_Lock nsprpub/pr/src/pthreads/ptsynch.c:176:10 (libnspr4.so+0x2bf48) + #2 sftk_hasAttribute security/nss/lib/softoken/pkcs11u.c:327:5 (libsoftokn3.so+0x38453) + #3 sftk_CopyObject security/nss/lib/softoken/pkcs11u.c:1607:22 (libsoftokn3.so+0x3b124) + Mutex M1903 acquired here while holding mutex M1864 in main thread: + #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4139:3 (SanctionsTestServer+0x7abe6) + #1 PR_Lock nsprpub/pr/src/pthreads/ptsynch.c:176:10 (libnspr4.so+0x2bf48) + #2 sftk_hasAttribute security/nss/lib/softoken/pkcs11u.c:327:5 (libsoftokn3.so+0x38453) + #3 sftk_CopyObject security/nss/lib/softoken/pkcs11u.c:1607:22 (libsoftokn3.so+0x3b124) + Mutex M1924 acquired here while holding mutex M1930 in main thread: + #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4139:3 (SanctionsTestServer+0x7abe6) + #1 PR_Lock nsprpub/pr/src/pthreads/ptsynch.c:176:10 (libnspr4.so+0x2bf48) + #2 sftk_hasAttribute security/nss/lib/softoken/pkcs11u.c:327:5 (libsoftokn3.so+0x38453) + #3 sftk_CopyObject security/nss/lib/softoken/pkcs11u.c:1607:22 (libsoftokn3.so+0x3b124) +SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) nsprpub/pr/src/pthreads/ptsynch.c:176:10 in PR_Lock diff --git a/FTB/Signatures/tests/resources/tsan-report-atomic-swapped.txt b/FTB/Signatures/tests/resources/tsan-report-atomic-swapped.txt new file mode 100644 index 000000000..431700367 --- /dev/null +++ b/FTB/Signatures/tests/resources/tsan-report-atomic-swapped.txt @@ -0,0 +1,170 @@ +WARNING: ThreadSanitizer: data race (pid=1185) + Atomic read of size 1 at 0x7b340005d160 by thread T28 (mutexes: write M169301924272001376): + #0 pthread_mutex_unlock /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4153:3 (firefox+0x755a6) + #1 mozilla::detail::MutexImpl::unlock() /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:185:3 (firefox+0x1231e8) + #2 Unlock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:76:25 (libxul.so+0x3a872a1) + #3 Unlock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:34:26 (libxul.so+0x3a872a1) + #4 ~MonitorAutoLock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:70:34 (libxul.so+0x3a872a1) + #5 operator() /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:762:7 (libxul.so+0x3a872a1) + #6 mozilla::detail::RunnableFunction::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:559:5 (libxul.so+0x3a872a1) + #7 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #8 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #9 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:332:5 (libxul.so+0x12af068) + #10 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #11 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #12 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #13 nsThread::ThreadFunc(void*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:464:10 (libxul.so+0xa6adb5) + #14 _pt_root /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x46a4f) + Previous write of size 1 at 0x7b340005d160 by main thread: + #0 pthread_mutex_destroy /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1242:3 (firefox+0x58976) + #1 mozilla::detail::MutexImpl::~MutexImpl() /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:119:3 (firefox+0x122fc8) + #2 ~OffTheBooksMutex /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:60:3 (libxul.so+0x3a822d5) + #3 ~Mutex /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:133:37 (libxul.so+0x3a822d5) + #4 ~Monitor /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:30:22 (libxul.so+0x3a822d5) + #5 mozilla::MediaCache::~MediaCache() /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:317:3 (libxul.so+0x3a822d5) + #6 Release /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:150:3 (libxul.so+0x3a81b25) + #7 detail::ProxyReleaseEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsProxyRelease.h:36:5 (libxul.so+0x3a81b25) + #8 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) + #9 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #10 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #11 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) + #12 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) + #13 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) + #14 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) + #15 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) + #16 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) + #17 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #18 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #19 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) + #20 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) + #21 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) + #22 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) + #23 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) + #24 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) + #25 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #26 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #27 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) + #28 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) + #29 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) + #30 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) + #31 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) + #32 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) + #33 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #34 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #35 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) + #36 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) + #37 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) + #38 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) + #39 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) + #40 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) + #41 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #42 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #43 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) + #44 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) + #45 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #46 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #47 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #48 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) + #49 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) + #50 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) + #51 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #52 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #53 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #54 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) + #55 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) + #56 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) + #57 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) + Location is heap block of size 200 at 0x7b340005d150 allocated by main thread: + #0 malloc /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:650:5 (firefox+0x558c4) + #1 moz_xmalloc /builds/worker/workspace/build/src/memory/mozalloc/mozalloc.cpp:52:15 (firefox+0xc9e48) + #2 operator new /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/cxxalloc.h:33:10 (libxul.so+0x3a61ca0) + #3 mozilla::MediaCache::GetMediaCache(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:801:31 (libxul.so+0x3a61ca0) + #4 mozilla::MediaCacheStream::Init(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:2661:17 (libxul.so+0x3a6b530) + #5 mozilla::ChannelMediaResource::Open(nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:520:30 (libxul.so+0x3a3f7bc) + #6 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaDecoder.cpp:264:19 (libxul.so+0x3a3bc09) + #7 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5046:27 (libxul.so+0x3949095) + #8 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5129:10 (libxul.so+0x392864a) + #9 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1244:7 (libxul.so+0x3927906) + #10 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:707:20 (libxul.so+0xfdf0de) + #11 mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:557:3 (libxul.so+0xfe58c0) + #12 operator() /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:411:15 (libxul.so+0x102a422) + #13 std::_Function_handler const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&)::$_5>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2 (libxul.so+0x102a422) + #14 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xf59143) + #15 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:80:25 (libxul.so+0xf59143) + #16 mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:261:10 (libxul.so+0xf41d95) + #17 mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:401:12 (libxul.so+0xfe4c65) + #18 mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PHttpChannelChild.cpp:862:28 (libxul.so+0x14b5303) + #19 mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:8355:32 (libxul.so+0x13af7d0) + #20 mozilla::dom::ContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/dom/ipc/ContentChild.cpp:3877:25 (libxul.so+0x427d540) + #21 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2215:25 (libxul.so+0x12aaaf6) + #22 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2137:9 (libxul.so+0x12a916a) + #23 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1976:3 (libxul.so+0x12a9d51) + #24 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2007:13 (libxul.so+0x12aa289) + #25 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) + #26 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #27 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #28 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) + #29 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) + #30 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #31 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #32 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #33 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) + #34 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) + #35 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) + #36 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #37 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #38 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #39 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) + #40 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) + #41 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) + #42 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) + Mutex M169301924272001376 is already destroyed. + Thread T28 'MediaCache' (tid=1299, running) created by main thread at: + #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:967:3 (firefox+0x571ab) + #1 _PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x3dc53) + #2 PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x32152) + #3 nsThread::Init(nsTSubstring const&) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:670:8 (libxul.so+0xa6c24a) + #4 nsThreadManager::NewNamedThread(nsTSubstring const&, unsigned int, nsIThread**) /builds/worker/workspace/build/src/xpcom/threads/nsThreadManager.cpp:621:12 (libxul.so+0xa72975) + #5 NS_NewNamedThread(nsTSubstring const&, nsIThread**, nsIRunnable*, unsigned int) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:139:57 (libxul.so+0xa74a68) + #6 NS_NewNamedThread<11> /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:65:10 (libxul.so+0x3a61a76) + #7 mozilla::MediaCache::GetMediaCache(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:772:19 (libxul.so+0x3a61a76) + #8 mozilla::MediaCacheStream::Init(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:2661:17 (libxul.so+0x3a6b530) + #9 mozilla::ChannelMediaResource::Open(nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:520:30 (libxul.so+0x3a3f7bc) + #10 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaDecoder.cpp:264:19 (libxul.so+0x3a3bc09) + #11 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5046:27 (libxul.so+0x3949095) + #12 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5129:10 (libxul.so+0x392864a) + #13 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1244:7 (libxul.so+0x3927906) + #14 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:707:20 (libxul.so+0xfdf0de) + #15 mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:557:3 (libxul.so+0xfe58c0) + #16 operator() /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:411:15 (libxul.so+0x102a422) + #17 std::_Function_handler const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&)::$_5>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2 (libxul.so+0x102a422) + #18 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xf59143) + #19 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:80:25 (libxul.so+0xf59143) + #20 mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:261:10 (libxul.so+0xf41d95) + #21 mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:401:12 (libxul.so+0xfe4c65) + #22 mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PHttpChannelChild.cpp:862:28 (libxul.so+0x14b5303) + #23 mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:8355:32 (libxul.so+0x13af7d0) + #24 mozilla::dom::ContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/dom/ipc/ContentChild.cpp:3877:25 (libxul.so+0x427d540) + #25 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2215:25 (libxul.so+0x12aaaf6) + #26 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2137:9 (libxul.so+0x12a916a) + #27 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1976:3 (libxul.so+0x12a9d51) + #28 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2007:13 (libxul.so+0x12aa289) + #29 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) + #30 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #31 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #32 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) + #33 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) + #34 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #35 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #36 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #37 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) + #38 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) + #39 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) + #40 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #41 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #42 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #43 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) + #44 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) + #45 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) + #46 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) +SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:119:3 in mozilla::detail::MutexImpl::~MutexImpl() diff --git a/FTB/Signatures/tests/resources/tsan-report-atomic.txt b/FTB/Signatures/tests/resources/tsan-report-atomic.txt new file mode 100644 index 000000000..007a76a15 --- /dev/null +++ b/FTB/Signatures/tests/resources/tsan-report-atomic.txt @@ -0,0 +1,170 @@ +WARNING: ThreadSanitizer: data race (pid=1185) + Write of size 1 at 0x7b340005d160 by main thread: + #0 pthread_mutex_destroy /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1242:3 (firefox+0x58976) + #1 mozilla::detail::MutexImpl::~MutexImpl() /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:119:3 (firefox+0x122fc8) + #2 ~OffTheBooksMutex /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:60:3 (libxul.so+0x3a822d5) + #3 ~Mutex /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:133:37 (libxul.so+0x3a822d5) + #4 ~Monitor /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:30:22 (libxul.so+0x3a822d5) + #5 mozilla::MediaCache::~MediaCache() /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:317:3 (libxul.so+0x3a822d5) + #6 Release /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:150:3 (libxul.so+0x3a81b25) + #7 detail::ProxyReleaseEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsProxyRelease.h:36:5 (libxul.so+0x3a81b25) + #8 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) + #9 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #10 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #11 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) + #12 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) + #13 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) + #14 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) + #15 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) + #16 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) + #17 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #18 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #19 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) + #20 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) + #21 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) + #22 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) + #23 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) + #24 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) + #25 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #26 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #27 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) + #28 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) + #29 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) + #30 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) + #31 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) + #32 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) + #33 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #34 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #35 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) + #36 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) + #37 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) + #38 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) + #39 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) + #40 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) + #41 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #42 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #43 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) + #44 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) + #45 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #46 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #47 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #48 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) + #49 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) + #50 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) + #51 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #52 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #53 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #54 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) + #55 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) + #56 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) + #57 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) + Previous atomic read of size 1 at 0x7b340005d160 by thread T28 (mutexes: write M169301924272001376): + #0 pthread_mutex_unlock /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4153:3 (firefox+0x755a6) + #1 mozilla::detail::MutexImpl::unlock() /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:185:3 (firefox+0x1231e8) + #2 Unlock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:76:25 (libxul.so+0x3a872a1) + #3 Unlock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:34:26 (libxul.so+0x3a872a1) + #4 ~MonitorAutoLock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:70:34 (libxul.so+0x3a872a1) + #5 operator() /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:762:7 (libxul.so+0x3a872a1) + #6 mozilla::detail::RunnableFunction::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:559:5 (libxul.so+0x3a872a1) + #7 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #8 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #9 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:332:5 (libxul.so+0x12af068) + #10 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #11 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #12 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #13 nsThread::ThreadFunc(void*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:464:10 (libxul.so+0xa6adb5) + #14 _pt_root /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x46a4f) + Location is heap block of size 200 at 0x7b340005d150 allocated by main thread: + #0 malloc /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:650:5 (firefox+0x558c4) + #1 moz_xmalloc /builds/worker/workspace/build/src/memory/mozalloc/mozalloc.cpp:52:15 (firefox+0xc9e48) + #2 operator new /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/cxxalloc.h:33:10 (libxul.so+0x3a61ca0) + #3 mozilla::MediaCache::GetMediaCache(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:801:31 (libxul.so+0x3a61ca0) + #4 mozilla::MediaCacheStream::Init(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:2661:17 (libxul.so+0x3a6b530) + #5 mozilla::ChannelMediaResource::Open(nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:520:30 (libxul.so+0x3a3f7bc) + #6 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaDecoder.cpp:264:19 (libxul.so+0x3a3bc09) + #7 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5046:27 (libxul.so+0x3949095) + #8 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5129:10 (libxul.so+0x392864a) + #9 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1244:7 (libxul.so+0x3927906) + #10 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:707:20 (libxul.so+0xfdf0de) + #11 mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:557:3 (libxul.so+0xfe58c0) + #12 operator() /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:411:15 (libxul.so+0x102a422) + #13 std::_Function_handler const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&)::$_5>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2 (libxul.so+0x102a422) + #14 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xf59143) + #15 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:80:25 (libxul.so+0xf59143) + #16 mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:261:10 (libxul.so+0xf41d95) + #17 mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:401:12 (libxul.so+0xfe4c65) + #18 mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PHttpChannelChild.cpp:862:28 (libxul.so+0x14b5303) + #19 mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:8355:32 (libxul.so+0x13af7d0) + #20 mozilla::dom::ContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/dom/ipc/ContentChild.cpp:3877:25 (libxul.so+0x427d540) + #21 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2215:25 (libxul.so+0x12aaaf6) + #22 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2137:9 (libxul.so+0x12a916a) + #23 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1976:3 (libxul.so+0x12a9d51) + #24 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2007:13 (libxul.so+0x12aa289) + #25 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) + #26 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #27 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #28 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) + #29 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) + #30 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #31 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #32 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #33 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) + #34 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) + #35 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) + #36 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #37 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #38 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #39 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) + #40 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) + #41 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) + #42 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) + Mutex M169301924272001376 is already destroyed. + Thread T28 'MediaCache' (tid=1299, running) created by main thread at: + #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:967:3 (firefox+0x571ab) + #1 _PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x3dc53) + #2 PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x32152) + #3 nsThread::Init(nsTSubstring const&) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:670:8 (libxul.so+0xa6c24a) + #4 nsThreadManager::NewNamedThread(nsTSubstring const&, unsigned int, nsIThread**) /builds/worker/workspace/build/src/xpcom/threads/nsThreadManager.cpp:621:12 (libxul.so+0xa72975) + #5 NS_NewNamedThread(nsTSubstring const&, nsIThread**, nsIRunnable*, unsigned int) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:139:57 (libxul.so+0xa74a68) + #6 NS_NewNamedThread<11> /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:65:10 (libxul.so+0x3a61a76) + #7 mozilla::MediaCache::GetMediaCache(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:772:19 (libxul.so+0x3a61a76) + #8 mozilla::MediaCacheStream::Init(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:2661:17 (libxul.so+0x3a6b530) + #9 mozilla::ChannelMediaResource::Open(nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:520:30 (libxul.so+0x3a3f7bc) + #10 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaDecoder.cpp:264:19 (libxul.so+0x3a3bc09) + #11 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5046:27 (libxul.so+0x3949095) + #12 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5129:10 (libxul.so+0x392864a) + #13 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1244:7 (libxul.so+0x3927906) + #14 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:707:20 (libxul.so+0xfdf0de) + #15 mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:557:3 (libxul.so+0xfe58c0) + #16 operator() /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:411:15 (libxul.so+0x102a422) + #17 std::_Function_handler const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&)::$_5>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2 (libxul.so+0x102a422) + #18 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xf59143) + #19 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:80:25 (libxul.so+0xf59143) + #20 mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:261:10 (libxul.so+0xf41d95) + #21 mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:401:12 (libxul.so+0xfe4c65) + #22 mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PHttpChannelChild.cpp:862:28 (libxul.so+0x14b5303) + #23 mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:8355:32 (libxul.so+0x13af7d0) + #24 mozilla::dom::ContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/dom/ipc/ContentChild.cpp:3877:25 (libxul.so+0x427d540) + #25 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2215:25 (libxul.so+0x12aaaf6) + #26 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2137:9 (libxul.so+0x12a916a) + #27 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1976:3 (libxul.so+0x12a9d51) + #28 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2007:13 (libxul.so+0x12aa289) + #29 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) + #30 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) + #31 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) + #32 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) + #33 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) + #34 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #35 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #36 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #37 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) + #38 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) + #39 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) + #40 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) + #41 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) + #42 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) + #43 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) + #44 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) + #45 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) + #46 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) +SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:119:3 in mozilla::detail::MutexImpl::~MutexImpl() diff --git a/FTB/Signatures/tests/resources/tsan-report.txt b/FTB/Signatures/tests/resources/tsan-report.txt new file mode 100644 index 000000000..bd553497f --- /dev/null +++ b/FTB/Signatures/tests/resources/tsan-report.txt @@ -0,0 +1,160 @@ +================== +WARNING: ThreadSanitizer: data race (pid=7233) + Write of size 8 at 0x7ba400001260 by main thread: + #0 js::ProtectedData, unsigned long>::operator++() /srv/repos/mozilla-central/js/src/threading/ProtectedData.h:95:31 (js+0x116d9d3) + #1 js::gc::GCRuntime::incMajorGcNumber() /srv/repos/mozilla-central/js/src/gc/GCRuntime.h:411 (js+0x116d9d3) + #2 js::gc::GCRuntime::gcCycle(bool, js::SliceBudget&, JS::gcreason::Reason) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7443 (js+0x116d9d3) + #3 js::gc::GCRuntime::collect(bool, js::SliceBudget, JS::gcreason::Reason) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7626:25 (js+0x116f262) + #4 js::gc::GCRuntime::runDebugGC() /srv/repos/mozilla-central/js/src/gc/GC.cpp (js+0x1144fc0) + #5 js::gc::GCRuntime::gcIfNeededAtAllocation(JSContext*) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:312:9 (js+0x1144b7d) + #6 bool js::gc::GCRuntime::checkAllocatorState<(js::AllowGC)1>(JSContext*, js::gc::AllocKind) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:273:14 (js+0x1198856) + #7 JSString* js::AllocateString(JSContext*, js::gc::InitialHeap) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:179 (js+0x1198856) + #8 JSThinInlineString* js::Allocate(JSContext*, js::gc::InitialHeap) /srv/repos/mozilla-central/js/src/gc/Allocator.h:47:34 (js+0xea965d) + #9 JSThinInlineString* JSThinInlineString::new_<(js::AllowGC)1>(JSContext*) /srv/repos/mozilla-central/js/src/vm/StringType-inl.h:279 (js+0xea965d) + #10 JSInlineString* js::AllocateInlineString<(js::AllowGC)1, unsigned char>(JSContext*, unsigned long, unsigned char**) /srv/repos/mozilla-central/js/src/vm/StringType-inl.h:34 (js+0xea965d) + #11 JSInlineString* js::NewInlineString<(js::AllowGC)1, unsigned char>(JSContext*, mozilla::Range) /srv/repos/mozilla-central/js/src/vm/StringType-inl.h:60 (js+0xea965d) + #12 JSFlatString* js::NewStringCopyNDontDeflate<(js::AllowGC)1, unsigned char>(JSContext*, unsigned char const*, unsigned long) /srv/repos/mozilla-central/js/src/vm/StringType.cpp:1605 (js+0xea965d) + #13 JSFlatString* js::NewStringCopyN<(js::AllowGC)1, unsigned char>(JSContext*, unsigned char const*, unsigned long) /srv/repos/mozilla-central/js/src/vm/StringType.cpp:1655:12 (js+0xeaa919) + #14 JSFlatString* js::NewStringCopyN<(js::AllowGC)1>(JSContext*, char const*, unsigned long) /srv/repos/mozilla-central/js/src/vm/StringType.h:1473:12 (js+0xc17f7d) + #15 JSFlatString* js::NewStringCopyZ<(js::AllowGC)1>(JSContext*, char const*) /srv/repos/mozilla-central/js/src/vm/StringType.h:1493 (js+0xc17f7d) + #16 JS_NewStringCopyZ(JSContext*, char const*) /srv/repos/mozilla-central/js/src/jsapi.cpp:5826 (js+0xc17f7d) + #17 js::ErrorToException(JSContext*, JSErrorReport*, JSErrorFormatString const* (*)(void*, unsigned int), void*) /srv/repos/mozilla-central/js/src/jsexn.cpp:678 (js+0xc17f7d) + #18 ReportError(JSContext*, JSErrorReport*, JSErrorFormatString const* (*)(void*, unsigned int), void*) /srv/repos/mozilla-central/js/src/vm/JSContext.cpp:249:5 (js+0xd816ec) + #19 js::ReportErrorNumberVA(JSContext*, unsigned int, JSErrorFormatString const* (*)(void*, unsigned int), void*, unsigned int, js::ErrorArgumentsType, __va_list_tag*) /srv/repos/mozilla-central/js/src/vm/JSContext.cpp:836 (js+0xd816ec) + #20 JS_ReportErrorFlagsAndNumberLatin1(JSContext*, unsigned int, JSErrorFormatString const* (*)(void*, unsigned int), void*, unsigned int, ...) /srv/repos/mozilla-central/js/src/jsapi.cpp:6620:10 (js+0xc0d975) + #21 js::ReportValueErrorFlags(JSContext*, unsigned int, unsigned int, int, JS::Handle, JS::Handle, char const*, char const*) /srv/repos/mozilla-central/js/src/vm/JSContext.cpp:961:10 (js+0xd81e35) + #22 js::ReportIsNotFunction(JSContext*, JS::Handle, int, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:321:5 (js+0x66e8ef) + #23 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:445 (js+0x66e8ef) + #24 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) + #25 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x665658) + #26 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3093 (js+0x665658) + #27 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) + #28 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) + #29 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) + #30 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) + #31 ExecuteScript(JSContext*, JS::AutoVector&, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4771:12 (js+0xc04b13) + #32 JS_ExecuteScript(JSContext*, JS::AutoVector&, JS::Handle, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4792:12 (js+0xc048d0) + #33 Evaluate(JSContext*, unsigned int, JS::Value*) /srv/repos/mozilla-central/js/src/shell/js.cpp:2016:14 (js+0x4f3c71) + #34 js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/JSContext-inl.h:280:15 (js+0x66ec4a) + #35 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:471 (js+0x66ec4a) + #36 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) + #37 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x665658) + #38 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3093 (js+0x665658) + #39 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) + #40 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:493:15 (js+0x66ef86) + #41 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) + #42 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x66f2e0) + #43 js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jit/BaselineIC.cpp:2372:14 (js+0x7524ae) + #44 (0x7fb689344e31) + #45 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:2044:28 (js+0x659034) + #46 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) + #47 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) + #48 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) + #49 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) + #50 JS_ExecuteScript(JSContext*, JS::Handle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4785:12 (js+0xc0486c) + #51 RunFile(JSContext*, char const*, _IO_FILE*, bool) /srv/repos/mozilla-central/js/src/shell/js.cpp:837:14 (js+0x507bfe) + #52 Process(JSContext*, char const*, bool, FileKind) /srv/repos/mozilla-central/js/src/shell/js.cpp:1307 (js+0x507bfe) + #53 ProcessArgs(JSContext*, js::cli::OptionParser*) /srv/repos/mozilla-central/js/src/shell/js.cpp:8475:14 (js+0x4eafda) + #54 Shell(JSContext*, js::cli::OptionParser*, char**) /srv/repos/mozilla-central/js/src/shell/js.cpp:8866 (js+0x4eafda) + #55 main /srv/repos/mozilla-central/js/src/shell/js.cpp:9339 (js+0x4eafda) + + Previous read of size 8 at 0x7ba400001260 by thread T10 (mutexes: write M35): + #0 js::gc::GCRuntime::majorGCCount() const /srv/repos/mozilla-central/js/src/gc/GCRuntime.h:410:44 (js+0xd5f5e5) + #1 js::SourceCompressionTask::shouldStart() const /srv/repos/mozilla-central/js/src/vm/HelperThreads.h:825 (js+0xd5f5e5) + #2 js::GlobalHelperThreadState::scheduleCompressionTasks(js::AutoLockHelperThreadState const&) /srv/repos/mozilla-central/js/src/vm/HelperThreads.cpp:1472 (js+0xd5f5e5) + #3 js::GlobalHelperThreadState::startHandlingCompressionTasks(js::AutoLockHelperThreadState const&) /srv/repos/mozilla-central/js/src/vm/HelperThreads.cpp:1460 (js+0xd5f5e5) + #4 js::gc::GCRuntime::beginMarkPhase(JS::gcreason::Reason, js::gc::AutoTraceSession&) /srv/repos/mozilla-central/js/src/gc/GC.cpp:4431:29 (js+0x115ed43) + #5 js::gc::GCRuntime::incrementalCollectSlice(js::SliceBudget&, JS::gcreason::Reason, js::gc::AutoTraceSession&) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7096:14 (js+0x116c05d) + #6 js::gc::GCRuntime::gcCycle(bool, js::SliceBudget&, JS::gcreason::Reason) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7483:5 (js+0x116da9f) + #7 js::gc::GCRuntime::collect(bool, js::SliceBudget, JS::gcreason::Reason) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7626:25 (js+0x116f262) + #8 js::gc::GCRuntime::runDebugGC() /srv/repos/mozilla-central/js/src/gc/GC.cpp (js+0x1144fc0) + #9 js::gc::GCRuntime::gcIfNeededAtAllocation(JSContext*) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:312:9 (js+0x1144b7d) + #10 bool js::gc::GCRuntime::checkAllocatorState<(js::AllowGC)1>(JSContext*, js::gc::AllocKind) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:273:14 (js+0x119a489) + #11 js::AccessorShape* js::Allocate(JSContext*) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:222 (js+0x119a489) + #12 js::Shape::new_(JSContext*, JS::Handle, unsigned int) /srv/repos/mozilla-central/js/src/vm/Shape-inl.h:111:22 (js+0xe6eeb7) + #13 js::PropertyTree::inlinedGetChild(JSContext*, js::Shape*, JS::Handle) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:1736:20 (js+0xe44255) + #14 js::PropertyTree::getChild(JSContext*, js::Shape*, JS::Handle) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:1749 (js+0xe44255) + #15 js::Shape::replaceLastProperty(JSContext*, js::StackBaseShape&, js::TaggedProto, JS::Handle) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:284:39 (js+0xe43527) + #16 js::Shape::setObjectFlags(JSContext*, js::BaseShape::Flag, js::TaggedProto, js::Shape*) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:1387:12 (js+0xe50009) + #17 JSObject::setFlags(JSContext*, JS::Handle, js::BaseShape::Flag, JSObject::GenerateShape) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:1346 (js+0xe50009) + #18 JSObject::setNewGroupUnknown(JSContext*, js::Class const*, JS::Handle) /srv/repos/mozilla-central/js/src/vm/ObjectGroup.cpp:346:12 (js+0xdf077b) + #19 CreateArrayPrototype(JSContext*, JSProtoKey) /srv/repos/mozilla-central/js/src/builtin/Array.cpp:3705:10 (js+0x5728df) + #20 js::GlobalObject::resolveConstructor(JSContext*, JS::Handle, JSProtoKey) /srv/repos/mozilla-central/js/src/vm/GlobalObject.cpp:202:17 (js+0xd52fef) + #21 js::GlobalObject::ensureConstructor(JSContext*, JS::Handle, JSProtoKey) /srv/repos/mozilla-central/js/src/vm/GlobalObject.h:155:16 (js+0xdf69ee) + #22 js::GlobalObject::getOrCreatePrototype(JSContext*, JSProtoKey) /srv/repos/mozilla-central/js/src/vm/GlobalObject.h:169 (js+0xdf69ee) + #23 js::ObjectGroup::allocationSiteGroup(JSContext*, JSScript*, unsigned char*, JSProtoKey, JS::Handle) /srv/repos/mozilla-central/js/src/vm/ObjectGroup.cpp:1440 (js+0xdf69ee) + #24 js::NewArrayOperation(JSContext*, JS::Handle, unsigned char*, unsigned int, js::NewObjectKind) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:5061:17 (js+0x67a7b8) + #25 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3753:21 (js+0x66a31c) + #26 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) + #27 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) + #28 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) + #29 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) + #30 ExecuteScript(JSContext*, JS::AutoVector&, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4771:12 (js+0xc04b13) + #31 JS_ExecuteScript(JSContext*, JS::AutoVector&, JS::Handle, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4792:12 (js+0xc048d0) + #32 Evaluate(JSContext*, unsigned int, JS::Value*) /srv/repos/mozilla-central/js/src/shell/js.cpp:2016:14 (js+0x4f3c71) + #33 js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/JSContext-inl.h:280:15 (js+0x66ec4a) + #34 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:471 (js+0x66ec4a) + #35 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) + #36 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x665658) + #37 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3093 (js+0x665658) + #38 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) + #39 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) + #40 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) + #41 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) + #42 JS_ExecuteScript(JSContext*, JS::Handle, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4778:12 (js+0xc0461e) + #43 WorkerMain(void*) /srv/repos/mozilla-central/js/src/shell/js.cpp:3623:9 (js+0x502477) + #44 void js::detail::ThreadTrampoline::callMain<0ul>(std::integer_sequence) /srv/repos/mozilla-central/js/src/threading/Thread.h:242:5 (js+0x50cffd) + #45 js::detail::ThreadTrampoline::Start(void*) /srv/repos/mozilla-central/js/src/threading/Thread.h:235 (js+0x50cffd) + + Location is heap block of size 19224 at 0x7ba400000000 allocated by main thread: + #0 malloc (js+0x465e0c) + #1 SystemMalloc::malloc(unsigned long) /srv/repos/mozilla-central/memory/build/malloc_decls.h:37:1 (js+0x512769) + #2 DummyArenaAllocator::moz_arena_malloc(unsigned long, unsigned long) /srv/repos/mozilla-central/memory/build/malloc_decls.h:37 (js+0x512769) + #3 moz_arena_malloc /srv/repos/mozilla-central/memory/build/malloc_decls.h:115 (js+0x512769) + #4 js_malloc(unsigned long) /srv/repos/mozilla-central/js/src/opt64tsan/dist/include/js/Utility.h:388:12 (js+0xd803a4) + #5 JSRuntime* js_new(JSRuntime*&&&) /srv/repos/mozilla-central/js/src/opt64tsan/dist/include/js/Utility.h:504 (js+0xd803a4) + #6 js::NewContext(unsigned int, unsigned int, JSRuntime*) /srv/repos/mozilla-central/js/src/vm/JSContext.cpp:139 (js+0xd803a4) + #7 JS_NewContext(unsigned int, unsigned int, JSRuntime*) /srv/repos/mozilla-central/js/src/jsapi.cpp:472:12 (js+0xbe8476) + #8 main /srv/repos/mozilla-central/js/src/shell/js.cpp:9259:21 (js+0x4e7bf2) + + Mutex M35 (0x7b54000001b8) created at: + #0 pthread_mutex_init (js+0x448d2a) + #1 mozilla::detail::MutexImpl::MutexImpl() /srv/repos/mozilla-central/mozglue/misc/Mutex_posix.cpp:95:3 (js+0x5133b9) + #2 js::Mutex::Mutex(js::MutexId const&) /srv/repos/mozilla-central/js/src/threading/Mutex.h:37:12 (js+0xd57f66) + #3 js::GlobalHelperThreadState::GlobalHelperThreadState() /srv/repos/mozilla-central/js/src/vm/HelperThreads.cpp:999 (js+0xd57f66) + #4 js::GlobalHelperThreadState* js_new() /srv/repos/mozilla-central/js/src/opt64tsan/dist/include/js/Utility.h:504 (js+0xd57f66) + #5 js::CreateHelperThreadsState() /srv/repos/mozilla-central/js/src/vm/HelperThreads.cpp:52 (js+0xd57f66) + #6 JS::detail::InitWithFailureDiagnostic(bool) /srv/repos/mozilla-central/js/src/vm/Initialization.cpp:132:5 (js+0xd644f3) + #7 JS_Init() /srv/repos/mozilla-central/js/src/opt64tsan/dist/include/js/Initialization.h:95:13 (js+0x4e1503) + #8 main /srv/repos/mozilla-central/js/src/shell/js.cpp:8995 (js+0x4e1503) + + Thread T10 (tid=9289, running) created by main thread at: + #0 pthread_create (js+0x448946) + #1 js::Thread::create(void* (*)(void*), void*) /srv/repos/mozilla-central/js/src/threading/posix/Thread.cpp:115:7 (js+0xc687d5) + #2 bool js::Thread::init(void (&&&)(void*), WorkerInput*&&&) /srv/repos/mozilla-central/js/src/threading/Thread.h:124:12 (js+0x50cf75) + #3 EvalInWorker(JSContext*, unsigned int, JS::Value*) /srv/repos/mozilla-central/js/src/shell/js.cpp:3697:33 (js+0x4f6e0b) + #4 js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/JSContext-inl.h:280:15 (js+0x66ec4a) + #5 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:471 (js+0x66ec4a) + #6 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) + #7 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x665658) + #8 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3093 (js+0x665658) + #9 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) + #10 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:493:15 (js+0x66ef86) + #11 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) + #12 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x66f2e0) + #13 js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jit/BaselineIC.cpp:2372:14 (js+0x7524ae) + #14 (0x7fb689344e31) + #15 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:2044:28 (js+0x659034) + #16 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) + #17 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) + #18 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) + #19 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) + #20 JS_ExecuteScript(JSContext*, JS::Handle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4785:12 (js+0xc0486c) + #21 RunFile(JSContext*, char const*, _IO_FILE*, bool) /srv/repos/mozilla-central/js/src/shell/js.cpp:837:14 (js+0x507bfe) + #22 Process(JSContext*, char const*, bool, FileKind) /srv/repos/mozilla-central/js/src/shell/js.cpp:1307 (js+0x507bfe) + #23 ProcessArgs(JSContext*, js::cli::OptionParser*) /srv/repos/mozilla-central/js/src/shell/js.cpp:8475:14 (js+0x4eafda) + #24 Shell(JSContext*, js::cli::OptionParser*, char**) /srv/repos/mozilla-central/js/src/shell/js.cpp:8866 (js+0x4eafda) + #25 main /srv/repos/mozilla-central/js/src/shell/js.cpp:9339 (js+0x4eafda) + +SUMMARY: ThreadSanitizer: data race /srv/repos/mozilla-central/js/src/threading/ProtectedData.h:95:31 in js::ProtectedData, unsigned long>::operator++() +================== diff --git a/FTB/Signatures/tests/resources/tsan-report2.txt b/FTB/Signatures/tests/resources/tsan-report2.txt new file mode 100644 index 000000000..3f809693c --- /dev/null +++ b/FTB/Signatures/tests/resources/tsan-report2.txt @@ -0,0 +1,70 @@ +WARNING: ThreadSanitizer: data race (pid=1126) + Write of size 8 at 0x7b7c001d0d08 by thread T43: + #0 free /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:706:3 (firefox+0x55f18) + #1 _dl_deallocate_tls (ld-linux-x86-64.so.2+0x139a7) + Previous write of size 8 at 0x7b7c001d0d08 by thread T5 (mutexes: write M176): + #0 set /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/ThreadLocal.h:161:12 (libxul.so+0x5ebeca6) + #1 set /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/ThreadLocal.h:209:32 (libxul.so+0x5ebeca6) + #2 ResetAutoProfilerLabelProfilingStack /builds/worker/workspace/build/src/tools/profiler/core/platform.cpp:1308:48 (libxul.so+0x5ebeca6) + #3 profiler_unregister_thread() /builds/worker/workspace/build/src/tools/profiler/core/platform.cpp:4555:5 (libxul.so+0x5ebeca6) + #4 nsThread::ThreadFunc(void*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:493:3 (libxul.so+0xa67142) + #5 _pt_root /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:209:5 (libnspr4.so+0x46756) + Mutex M176 (0x7f0d76677d90) created at: + #0 pthread_mutex_init /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1225:3 (firefox+0x587ed) + #1 mozilla::detail::MutexImpl::MutexImpl(mozilla::recordreplay::Behavior) /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:103:3 (firefox+0x122e72) + #2 PSMutex /builds/worker/workspace/build/src/tools/profiler/core/platform.cpp:258:9 (libxul.so+0x90553e) + #3 __cxx_global_var_init /builds/worker/workspace/build/src/tools/profiler/core/platform.cpp:1243:16 (libxul.so+0x90553e) + #4 _GLOBAL__sub_I_Unified_cpp_tools_profiler0.cpp /builds/worker/workspace/build/src/obj-firefox/tools/profiler/Unified_cpp_tools_profiler0.cpp (libxul.so+0x90553e) + #5 (ld-linux-x86-64.so.2+0x106c9) + #6 GetLibHandle /builds/worker/workspace/build/src/xpcom/glue/standalone/nsXPCOMGlue.cpp:85:29 (firefox+0xc989f) + #7 ReadDependentCB /builds/worker/workspace/build/src/xpcom/glue/standalone/nsXPCOMGlue.cpp:135:29 (firefox+0xc989f) + #8 XPCOMGlueLoad /builds/worker/workspace/build/src/xpcom/glue/standalone/nsXPCOMGlue.cpp:309:10 (firefox+0xc989f) + #9 mozilla::GetBootstrap(char const*, mozilla::LibLoadingStrategy) /builds/worker/workspace/build/src/xpcom/glue/standalone/nsXPCOMGlue.cpp:377:7 (firefox+0xc989f) + #10 InitXPCOMGlue(mozilla::LibLoadingStrategy) /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:231:16 (firefox+0xc8bc1) + #11 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:324:17 (firefox+0xc8506) + Thread T5 'SaveScripts' (tid=1310, finished) created by main thread at: + #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:967:3 (firefox+0x571ab) + #1 _PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:466:14 (libnspr4.so+0x3dc53) + #2 PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:541:12 (libnspr4.so+0x32152) + #3 nsThread::Init(nsTSubstring const&) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:670:8 (libxul.so+0xa6847a) + #4 nsThreadManager::NewNamedThread(nsTSubstring const&, unsigned int, nsIThread**) /builds/worker/workspace/build/src/xpcom/threads/nsThreadManager.cpp:621:12 (libxul.so+0xa6eba5) + #5 NS_NewNamedThread(nsTSubstring const&, nsIThread**, nsIRunnable*, unsigned int) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:139:57 (libxul.so+0xa70c98) + #6 NS_NewNamedThread<12> /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:69:10 (libxul.so+0x181772d) + #7 mozilla::ScriptPreloader::StartCacheWrite() /builds/worker/workspace/build/src/js/xpconnect/loader/ScriptPreloader.cpp:261:13 (libxul.so+0x181772d) + #8 mozilla::ScriptPreloader::Observe(nsISupports*, char const*, char16_t const*) /builds/worker/workspace/build/src/js/xpconnect/loader/ScriptPreloader.cpp:317:7 (libxul.so+0x1817e5d) + #9 nsObserverList::NotifyObservers(nsISupports*, char const*, char16_t const*) /builds/worker/workspace/build/src/xpcom/ds/nsObserverList.cpp:65:19 (libxul.so+0x9d59f3) + #10 nsObserverService::NotifyObservers(nsISupports*, char const*, char16_t const*) /builds/worker/workspace/build/src/xpcom/ds/nsObserverService.cpp:291:19 (libxul.so+0x9d88a0) + #11 NS_InvokeByIndex /builds/worker/workspace/build/src/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:106 (libxul.so+0xa8b195) + #12 XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) /builds/worker/workspace/build/src/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:947:10 (libxul.so+0x187e1d1) + #13 CallJSNative /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:469:13 (libxul.so+0x64020b8) + #14 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:561:12 (libxul.so+0x64020b8) + #15 InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:624:10 (libxul.so+0x64030cb) + #16 CallFromStack /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:628:10 (libxul.so+0x63f4a48) + #17 Interpret(JSContext*, js::RunState&) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:3036:16 (libxul.so+0x63f4a48) + #18 js::RunScript(JSContext*, js::RunState&) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:441:10 (libxul.so+0x63e4381) + #19 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:596:13 (libxul.so+0x640251e) + #20 InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:624:10 (libxul.so+0x64030cb) + #21 js::Call(JSContext*, JS::Handle, JS::Handle, js::AnyInvokeArgs const&, JS::MutableHandle, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:641:8 (libxul.so+0x640317a) + #22 JS::Call(JSContext*, JS::Handle, JS::Handle, JS::HandleValueArray const&, JS::MutableHandle) /builds/worker/workspace/build/src/js/src/jsapi.cpp:2797:10 (libxul.so+0x64b6ece) + #23 mozilla::dom::IdleRequestCallback::Call(JSContext*, JS::Handle, mozilla::dom::IdleDeadline&, mozilla::ErrorResult&) /builds/worker/workspace/build/src/obj-firefox/dom/bindings/WindowBinding.cpp:803:8 (libxul.so+0x2e5dbd2) + #24 Call /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/WindowBinding.h:766:12 (libxul.so+0x24d3480) + #25 Call /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/WindowBinding.h:779:12 (libxul.so+0x24d3480) + #26 mozilla::dom::IdleRequest::IdleRun(nsPIDOMWindowInner*, double, bool) /builds/worker/workspace/build/src/dom/base/IdleRequest.cpp:62:13 (libxul.so+0x24d3480) + #27 nsGlobalWindowInner::RunIdleRequest(mozilla::dom::IdleRequest*, double, bool) /builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:664:12 (libxul.so+0x2360bd3) + #28 nsGlobalWindowInner::ExecuteIdleRequest(mozilla::TimeStamp) /builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:692:3 (libxul.so+0x235ff91) + #29 IdleRequestExecutor::Run() /builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:533:13 (libxul.so+0x235fc96) + #30 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6a8a3) + #31 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:486:10 (libxul.so+0xa6f4a2) + #32 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12a3e99) + #33 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x123c0ec) + #34 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x123c0ec) + #35 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x123c0ec) + #36 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46b7883) + #37 nsAppStartup::Run() /builds/worker/workspace/build/src/toolkit/components/startup/nsAppStartup.cpp:272:30 (libxul.so+0x61bd075) + #38 XREMain::XRE_mainRun() /builds/worker/workspace/build/src/toolkit/xre/nsAppRunner.cpp:4560:22 (libxul.so+0x62d02ae) + #39 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/workspace/build/src/toolkit/xre/nsAppRunner.cpp:4695:8 (libxul.so+0x62d0f2f) + #40 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/workspace/build/src/toolkit/xre/nsAppRunner.cpp:4746:21 (libxul.so+0x62d12f4) + #41 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x62da002) + #42 do_main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xc8a47) + #43 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:339:16 (firefox+0xc8a47) +SUMMARY: ThreadSanitizer: data race (/lib64/ld-linux-x86-64.so.2+0x139a7) in _dl_deallocate_tls diff --git a/FTB/Signatures/tests/resources/tsan-simple-leak-report.txt b/FTB/Signatures/tests/resources/tsan-simple-leak-report.txt new file mode 100644 index 000000000..76dd4357c --- /dev/null +++ b/FTB/Signatures/tests/resources/tsan-simple-leak-report.txt @@ -0,0 +1,4 @@ +WARNING: ThreadSanitizer: thread leak (pid=9509) + Thread T1 (tid=0, finished) created at: + #0 pthread_create tsan_interceptors.cc:683 (exe+0x00000001fb33) + #1 main thread_leak3.c:10 (exe+0x000000003c7e) diff --git a/FTB/Signatures/tests/resources/tsan-simple-race-report-swapped.txt b/FTB/Signatures/tests/resources/tsan-simple-race-report-swapped.txt new file mode 100644 index 000000000..c2e190130 --- /dev/null +++ b/FTB/Signatures/tests/resources/tsan-simple-race-report-swapped.txt @@ -0,0 +1,14 @@ +WARNING: ThreadSanitizer: data race (pid=9337) + Write of size 4 at 0x7fe3c3075190 by thread T1: + #0 foo2() simple_stack2.cc:20 (exe+0x000000003d0c) + #1 bar2() simple_stack2.cc:29 (exe+0x000000003d74) + #2 main simple_stack2.cc:41 (exe+0x000000003ddb) + + Previous read of size 4 at 0x7fe3c3075190 by main thread: + #0 foo1() simple_stack2.cc:9 (exe+0x000000003c9a) + #1 bar1() simple_stack2.cc:16 (exe+0x000000003ce4) + #2 Thread1(void*) simple_stack2.cc:34 (exe+0x000000003d99) + + Thread T1 (tid=9338, running) created at: + #0 pthread_create tsan_interceptors.cc:683 (exe+0x00000000de83) + #1 main simple_stack2.cc:40 (exe+0x000000003dd6) diff --git a/FTB/Signatures/tests/resources/tsan-simple-race-report.txt b/FTB/Signatures/tests/resources/tsan-simple-race-report.txt new file mode 100644 index 000000000..e1782d52c --- /dev/null +++ b/FTB/Signatures/tests/resources/tsan-simple-race-report.txt @@ -0,0 +1,14 @@ +WARNING: ThreadSanitizer: data race (pid=9337) + Write of size 4 at 0x7fe3c3075190 by thread T1: + #0 foo1() simple_stack2.cc:9 (exe+0x000000003c9a) + #1 bar1() simple_stack2.cc:16 (exe+0x000000003ce4) + #2 Thread1(void*) simple_stack2.cc:34 (exe+0x000000003d99) + + Previous read of size 4 at 0x7fe3c3075190 by main thread: + #0 foo2() simple_stack2.cc:20 (exe+0x000000003d0c) + #1 bar2() simple_stack2.cc:29 (exe+0x000000003d74) + #2 main simple_stack2.cc:41 (exe+0x000000003ddb) + + Thread T1 (tid=9338, running) created at: + #0 pthread_create tsan_interceptors.cc:683 (exe+0x00000000de83) + #1 main simple_stack2.cc:40 (exe+0x000000003dd6) diff --git a/FTB/Signatures/tests/resources/valgrind-cjm-01.txt b/FTB/Signatures/tests/resources/valgrind-cjm-01.txt new file mode 100644 index 000000000..1051dac88 --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-cjm-01.txt @@ -0,0 +1,11 @@ +==123== Thread 11 blah #1: +==123== Conditional jump or move depends on uninitialised value(s) +==123== at 0x5A7C18: PyObject_Free (blah.c:123) +==123== by 0x56D9E8: ??? (in /usr/bin/python3.6) +==123== by 0x574D35: PyDict_SetDefault (in /usr/bin/python3.6) +==123== by 0x4A6F0F: main (in /usr/bin/python3.6) +==123== Uninitialised value was created by a heap allocation +==123== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) +==123== by 0x637823: ??? (in /usr/bin/python3.6) +==123== by 0x4A6F0F: main (in /usr/bin/python3.6) +==123== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-cjm-02.txt b/FTB/Signatures/tests/resources/valgrind-cjm-02.txt new file mode 100755 index 000000000..56afb008c --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-cjm-02.txt @@ -0,0 +1,89 @@ +==23845== Memcheck, a memory error detector +==23845== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. +==23845== Using Valgrind-3.15.0.GIT-2cfe32ab11-20190318 and LibVEX; rerun with -h for copyright info +==23845== Command: ./a.out +==23845== Parent PID: 4587 +==23845== +--23845-- +--23845-- Valgrind options: +--23845-- -v +--23845-- --track-origins=yes +--23845-- --log-file=out.log.txt +--23845-- Contents of /proc/version: +--23845-- Linux version 4.15.0-46-generic (buildd@lgw01-amd64-038) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 +--23845-- +--23845-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand +--23845-- Page sizes: currently 4096, max supported 4096 +--23845-- Valgrind library directory: /usr/local/lib/valgrind +--23845-- Reading syms from /home/user/a.out +--23845-- object doesn't have a symbol table +--23845-- Reading syms from /lib/x86_64-linux-gnu/ld-2.27.so +--23845-- Considering /lib/x86_64-linux-gnu/ld-2.27.so .. +--23845-- .. CRC mismatch (computed 1b7c895e wanted 2943108a) +--23845-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.27.so .. +--23845-- .. CRC is valid +--23845-- Reading syms from /usr/local/lib/valgrind/memcheck-amd64-linux +--23845-- object doesn't have a dynamic symbol table +--23845-- Scheduler: using generic scheduler lock implementation. +--23845-- Reading suppressions file: /usr/local/lib/valgrind/default.supp +==23845== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-23845-by-user-on-??? +==23845== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-23845-by-user-on-??? +==23845== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-23845-by-user-on-??? +==23845== +==23845== TO CONTROL THIS PROCESS USING vgdb (which you probably +==23845== don't want to do, unless you know exactly what you're doing, +==23845== or are doing some strange experiment): +==23845== /usr/local/lib/valgrind/../../bin/vgdb --pid=23845 ...command... +==23845== +==23845== TO DEBUG THIS PROCESS USING GDB: start GDB like this +==23845== /path/to/gdb ./a.out +==23845== and then give GDB the following command +==23845== target remote | /usr/local/lib/valgrind/../../bin/vgdb --pid=23845 +==23845== --pid is optional if only one valgrind process is running +==23845== +--23845-- REDIR: 0x401f2f0 (ld-linux-x86-64.so.2:strlen) redirected to 0x580dcbc2 (vgPlain_amd64_linux_REDIR_FOR_strlen) +--23845-- REDIR: 0x401f0d0 (ld-linux-x86-64.so.2:index) redirected to 0x580dcbdc (vgPlain_amd64_linux_REDIR_FOR_index) +--23845-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-amd64-linux.so +--23845-- Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck-amd64-linux.so +==23845== WARNING: new redirection conflicts with existing -- ignoring it +--23845-- old: 0x0401f2f0 (strlen ) R-> (0000.0) 0x580dcbc2 vgPlain_amd64_linux_REDIR_FOR_strlen +--23845-- new: 0x0401f2f0 (strlen ) R-> (2007.0) 0x04c33280 strlen +--23845-- REDIR: 0x401d360 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c343b0 (strcmp) +--23845-- REDIR: 0x401f830 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c380e0 (mempcpy) +--23845-- Reading syms from /lib/x86_64-linux-gnu/libc-2.27.so +--23845-- Considering /lib/x86_64-linux-gnu/libc-2.27.so .. +--23845-- .. CRC mismatch (computed b1c74187 wanted 042cc048) +--23845-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so .. +--23845-- .. CRC is valid +--23845-- REDIR: 0x4edbc70 (libc.so.6:memmove) redirected to 0x4a2a6de (_vgnU_ifunc_wrapper) +--23845-- REDIR: 0x4fcb590 (libc.so.6:__strlen_avx2) redirected to 0x4c331c0 (strlen) +==23845== Conditional jump or move depends on uninitialised value(s) +==23845== at 0x4C331D8: strlen (vg_replace_strmem.c:461) +==23845== by 0x4EBD9D1: puts (ioputs.c:35) +==23845== by 0x1085D1: ??? (in /home/user/a.out) +==23845== by 0x4E5EB96: (below main) (libc-start.c:310) +==23845== Uninitialised value was created by a stack allocation +==23845== at 0x1085A0: ??? (in /home/user/a.out) +==23845== +--23845-- REDIR: 0x4ed4070 (libc.so.6:malloc) redirected to 0x4c2fd8d (malloc) +--23845-- REDIR: 0x4fcbab0 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x4c37d20 (mempcpy) +--23845-- REDIR: 0x4ed4950 (libc.so.6:free) redirected to 0x4c30f3a (free) +==23845== +==23845== HEAP SUMMARY: +==23845== in use at exit: 0 bytes in 0 blocks +==23845== total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated +==23845== +==23845== All heap blocks were freed -- no leaks are possible +==23845== +==23845== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) +==23845== +==23845== 1 errors in context 1 of 1: +==23845== Conditional jump or move depends on uninitialised value(s) +==23845== at 0x4C331D8: strlen (vg_replace_strmem.c:461) +==23845== by 0x4EBD9D1: puts (ioputs.c:35) +==23845== by 0x1085D1: ??? (in /home/user/a.out) +==23845== by 0x4E5EB96: (below main) (libc-start.c:310) +==23845== Uninitialised value was created by a stack allocation +==23845== at 0x1085A0: ??? (in /home/user/a.out) +==23845== +==23845== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/FTB/Signatures/tests/resources/valgrind-if-01.txt b/FTB/Signatures/tests/resources/valgrind-if-01.txt new file mode 100644 index 000000000..f7f390bdd --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-if-01.txt @@ -0,0 +1,7 @@ +==333== Invalid free() / delete / delete[] / realloc() +==333== at 0x124455: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==333== by 0xAD3452: main (main.c:123) +==333== Address 0x43f2931 is 9 bytes inside a block of size 18 free'd +==333== at 0x4C2B326: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==333== by 0xAD3452: main (main.c:123) +==333== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-if-02.txt b/FTB/Signatures/tests/resources/valgrind-if-02.txt new file mode 100644 index 000000000..f34546bdd --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-if-02.txt @@ -0,0 +1,24 @@ +==123== Memcheck, a memory error detector +==123== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. +==123== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info +==123== Command: ./a.out +==123== +==123== Invalid free() / delete / delete[] / realloc() +==123== at 0x4C2ECF0: free (vg_replace_malloc.c:530) +==123== by 0x400593: main (test.c:6) +==123== Address 0x5204040 is 0 bytes inside a block of size 100 free'd +==123== at 0x4C2ECF0: free (vg_replace_malloc.c:530) +==123== by 0x400587: main (test.c:5) +==123== Block was alloc'd at +==123== at 0x4C2DBF6: malloc (vg_replace_malloc.c:299) +==123== by 0x400577: main (test.c:4) +==123== +==123== +==123== HEAP SUMMARY: +==123== in use at exit: 0 bytes in 0 blocks +==123== total heap usage: 1 allocs, 2 frees, 100 bytes allocated +==123== +==123== All heap blocks were freed -- no leaks are possible +==123== +==123== For counts of detected and suppressed errors, rerun with: -v +==123== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/FTB/Signatures/tests/resources/valgrind-if-03.txt b/FTB/Signatures/tests/resources/valgrind-if-03.txt new file mode 100644 index 000000000..442f4c91f --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-if-03.txt @@ -0,0 +1,26 @@ +==321== by 0x4C2ECF0: test (test.c:530) +==321== by 0x4C2ECF0: test (test.c:530) +==321== by 0x4C2ECF0: test (test.c:530) +==321== by 0x4C2ECF0: test (test.c:530) +==321== by 0x4C2ECF0: test (test.c:530) +==321== by 0x4C2ECF0: test (test.c:530) + +== not valgrind log stuff +... +==321== This line looks interesting but should be ignored... +... +==321== Invalid free() / delete / delete[] / realloc() +...other junk... +==321== at 0x4C2ECF0: free (vg_replace_malloc.c:530) + +==321== by 0x400541: main (test.c:5) +.. +==321== Address 0xbadf00d is not stack'd, malloc'd or (recently) free'd +==321== +==321== ... +... + +==321== Invalid read of size 4 +==321== at 0x4C2ECF0: test (test.c:530) +==321== by 0x4C2ECF0: test (test.c:530) +==321== diff --git a/FTB/Signatures/tests/resources/valgrind-ir-01.txt b/FTB/Signatures/tests/resources/valgrind-ir-01.txt new file mode 100644 index 000000000..8703a7406 --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-ir-01.txt @@ -0,0 +1,6 @@ +==111== Invalid read of size 4 +==111== at 0x33296345CA: blah_func (in /foo/bar/test.so) +==111== by 0x52ADD7B: main (test.cpp:123) +==111== Address 0xbadf00d is 24 bytes inside a block of size 28 free'd +==111== at 0x4A05743: operator delete(void*) (vg_replace_malloc.c:346) +==111== by 0x52D590B: asdf() (foo.cpp:325) \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-ir-02.txt b/FTB/Signatures/tests/resources/valgrind-ir-02.txt new file mode 100644 index 000000000..c8458a590 --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-ir-02.txt @@ -0,0 +1,22 @@ +==109727== Memcheck, a memory error detector +==109727== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. +==109727== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info +==109727== Command: ./a.out +==109727== +==109727== Invalid read of size 4 +==109727== at 0x400580: main (test.c:6) +==109727== Address 0x5204068 is 24 bytes after a block of size 16 in arena "client" +==109727== +==109727== Invalid read of size 4 +==109727== at 0x40058A: main (test.c:7) +==109727== Address 0x520406c is 28 bytes after a block of size 16 in arena "client" +==109727== +==109727== +==109727== HEAP SUMMARY: +==109727== in use at exit: 0 bytes in 0 blocks +==109727== total heap usage: 1 allocs, 1 frees, 10 bytes allocated +==109727== +==109727== All heap blocks were freed -- no leaks are possible +==109727== +==109727== For counts of detected and suppressed errors, rerun with: -v +==109727== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-iw-01.txt b/FTB/Signatures/tests/resources/valgrind-iw-01.txt new file mode 100644 index 000000000..e4e5a060b --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-iw-01.txt @@ -0,0 +1,5 @@ +==123== Invalid write of size 8 +==123== at 0x4027D44: memcpy (main.c:123) +==123== by 0x804AEE8: main (main.c:321) +==123== Address 0x41414141 is not stack'd, malloc'd or (recently) free'd +==123== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-leak-01.txt b/FTB/Signatures/tests/resources/valgrind-leak-01.txt new file mode 100644 index 000000000..98b69a7bb --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-leak-01.txt @@ -0,0 +1,5 @@ +==24674== 102,400 bytes in 1,024 blocks are definitely lost in loss record 1 of 1 +==24674== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) +==24674== by 0x1086F4: test (free.c:9) +==24674== by 0x108761: main (free.c:23) +==24674== diff --git a/FTB/Signatures/tests/resources/valgrind-leak-02.txt b/FTB/Signatures/tests/resources/valgrind-leak-02.txt new file mode 100644 index 000000000..323ee9d69 --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-leak-02.txt @@ -0,0 +1,4 @@ +==444== 16 bytes in 1 blocks are possibly lost in loss record 30 of 844 +==444== at 0x4A05E1C: malloc (vg_replace_malloc.c:195) +==444== by 0x6525BE: test (in main) +==444== by 0x63C579: main (in main) diff --git a/FTB/Signatures/tests/resources/valgrind-nm-01.txt b/FTB/Signatures/tests/resources/valgrind-nm-01.txt new file mode 100755 index 000000000..1b66c3137 --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-nm-01.txt @@ -0,0 +1,4 @@ +==333== Argument 'size' of function malloc has a fishy (possibly negative) value: -1 +==333== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) +==333== by 0x10869D: main (free.c:6) +==333== diff --git a/FTB/Signatures/tests/resources/valgrind-pt-01.txt b/FTB/Signatures/tests/resources/valgrind-pt-01.txt new file mode 100644 index 000000000..3e0b7c0aa --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-pt-01.txt @@ -0,0 +1,11 @@ +==20956== +==20956== Process terminating with default action of signal 11 (SIGSEGV) +==20956== Access not within mapped region at address 0x0 +==20956== at 0x4C331C2: strlen (vg_replace_strmem.c:461) +==20956== by 0x4EBD9D1: puts (ioputs.c:35) +==20956== by 0x1086FF: main (free.c:9) +==20956== If you believe this happened as a result of a stack +==20956== overflow in your program's main thread (unlikely but +==20956== possible), you can try to increase the size of the +==20956== main thread stack using the --main-stacksize= flag. +==20956== The main thread stack size used in this run was 8388608. \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-sc-01.txt b/FTB/Signatures/tests/resources/valgrind-sc-01.txt new file mode 100755 index 000000000..b66e6ac85 --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-sc-01.txt @@ -0,0 +1,10 @@ +==111== Syscall param write(buf) points to uninitialised byte(s) +==111== at 0x4F4D154: write (write.c:27) +==111== by 0x1086B5: main (in a.out) +==111== Address 0x522e040 is 0 bytes inside a block of size 10 alloc'd +==111== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) +==111== by 0x10869B: main (in a.out) +==111== Uninitialised value was created by a heap allocation +==111== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) +==111== by 0x10869B: main (in a.out) +==111== diff --git a/FTB/Signatures/tests/resources/valgrind-sc-02.txt b/FTB/Signatures/tests/resources/valgrind-sc-02.txt new file mode 100644 index 000000000..5659d9110 --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-sc-02.txt @@ -0,0 +1,8 @@ +==222== Syscall param socketcall.sendto(msg) points to uninitialised byte(s) +==222== at 0x57835DC: send (send.c:33) +==222== by 0x405244: test (test.c:154) +==222== by 0x5A54E99: start_thread (pthread_create.c:308) +==222== Address 0x5e7b6b4 is 20 bytes inside a block of size 24 alloc'd +==222== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==222== by 0x5A54E99: start_thread (pthread_create.c:308) +==222== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-sdo-01.txt b/FTB/Signatures/tests/resources/valgrind-sdo-01.txt new file mode 100644 index 000000000..a4c04916c --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-sdo-01.txt @@ -0,0 +1,4 @@ +==1111== Source and destination overlap in memcpy(0x41bb2b0, 0x41bb070, 123) +==1111== at 0x4027BD6: memcpy (file.c:635) +==1111== by 0x804AEE8: main (file.c:1512) +==1111== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-uuv-01.txt b/FTB/Signatures/tests/resources/valgrind-uuv-01.txt new file mode 100644 index 000000000..9d480af87 --- /dev/null +++ b/FTB/Signatures/tests/resources/valgrind-uuv-01.txt @@ -0,0 +1,7 @@ +==222== Use of uninitialised value of size 8 +==222== by 0x11C92A94: foo<123>::Init() (bar.cpp:929) +==222== by 0x11C63345: bar::func >::Run() (file.cpp:432) +==222== by 0xFD534FC: non-virtual thunk to Run() (file.cpp:0) +==222== Uninitialised value was created by a heap allocation +==222== at 0x4C32373: memalign (vg_replace_malloc.c:908) +==222== by 0x4C32476: posix_memalign (vg_replace_malloc.c:1072) \ No newline at end of file diff --git a/FTB/Signatures/tests/test_CrashSignature.py b/FTB/Signatures/tests/test_CrashSignature.py index badf1cc05..2b226f67f 100644 --- a/FTB/Signatures/tests/test_CrashSignature.py +++ b/FTB/Signatures/tests/test_CrashSignature.py @@ -27,7 +27,6 @@ def test_SignatureCreateTest() -> None: config, auxCrashData=(FIXTURE_PATH / "trace_1.txt").read_text().splitlines(), ) - crashSig1 = crashInfo.createCrashSignature( forceCrashAddress=True, maxFrames=4, minimumSupportedVersion=10 ) diff --git a/Reporter/Reporter.py b/Reporter/Reporter.py index f42495412..49ac56ca1 100644 --- a/Reporter/Reporter.py +++ b/Reporter/Reporter.py @@ -196,7 +196,6 @@ def get(self, *args: Any, **kwds: Any) -> Any: """requests.get, with added support for FuzzManager authentication and retry on 5xx errors. - @type expected: int @param expected: HTTP status code for successful response (default: requests.codes["ok"]) """ @@ -210,7 +209,6 @@ def post(self, *args: Any, **kwds: Any) -> Any: """requests.post, with added support for FuzzManager authentication and retry on 5xx errors. - @type expected: int @param expected: HTTP status code for successful response (default: requests.codes["created"]) """ @@ -224,7 +222,6 @@ def patch(self, *args: Any, **kwds: Any) -> Any: """requests.patch, with added support for FuzzManager authentication and retry on 5xx errors. - @type expected: int @param expected: HTTP status code for successful response (default: requests.codes["created"]) """ diff --git a/TaskStatusReporter/__main__.py b/TaskStatusReporter/__main__.py index f4931274e..b5233046a 100644 --- a/TaskStatusReporter/__main__.py +++ b/TaskStatusReporter/__main__.py @@ -14,6 +14,9 @@ @contact: jschwartzentruber@mozilla.com """ + +from __future__ import annotations + import sys from .TaskStatusReporter import main diff --git a/misc/afl_libfuzzer/S3Manager.py b/misc/afl_libfuzzer/S3Manager.py index 683d299e6..72ec9e9c3 100644 --- a/misc/afl_libfuzzer/S3Manager.py +++ b/misc/afl_libfuzzer/S3Manager.py @@ -99,7 +99,6 @@ def download_libfuzzer_queues(self, corpus_dir: str) -> None: """ Synchronize files from open libFuzzer queues directly back into the local corpus directory. - @param corpus_dir: libFuzzer corpus directory """ remote_keys = list(self.bucket.list(self.remote_path_queues)) @@ -330,8 +329,6 @@ def download_build(self, build_dir: str) -> None: into the specified build directory. @param base_dir: Build directory - @param bucket_name: Name of the S3 bucket to use - @param project_name: Name of the project folder inside the S3 bucket """ # Clear any previous builds if os.path.exists(build_dir): diff --git a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py index 92aea6f3d..831f742d6 100755 --- a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py +++ b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py @@ -203,7 +203,7 @@ def command_file_to_list(cmd_file: str) -> tuple[int | None, list[str]]: @param cmd_file: Command line file containing list of commands @return: Test index in list and the command as a list of strings """ - cmdline = list() + cmdline = [] idx = 0 test_idx = None with open(cmd_file) as cmd_fp: @@ -289,7 +289,7 @@ def write_aggregated_stats_afl( fields.extend(wanted_fields_max) # Warnings to include - warnings: list[str] = list() + warnings: list[str] = [] aggregated_stats = {} @@ -1217,8 +1217,8 @@ def warn_local() -> None: s3m.clean_queue_dirs() print( - f"Downloading queues from s3://{opts.s3_bucket}/{opts.project}/queues/ to " - f"{queues_dir}" + "Downloading queues from s3://%s/%s/queues/ to %s" + % (opts.s3_bucket, opts.project, queues_dir) ) s3m.download_queue_dirs(opts.s3_corpus_refresh) @@ -1281,8 +1281,8 @@ def warn_local() -> None: # Download our current corpus into the queues directory as well print( - f"Downloading corpus from s3://{opts.s3_bucket}/{opts.project}/corpus/ to " - f"{queues_dir}" + "Downloading corpus from s3://%s/%s/corpus/ to %s" + % (opts.s3_bucket, opts.project, queues_dir) ) s3m.download_corpus(queues_dir) diff --git a/misc/ec2prices/simulator.py b/misc/ec2prices/simulator.py index 61d973a81..9d980a83b 100644 --- a/misc/ec2prices/simulator.py +++ b/misc/ec2prices/simulator.py @@ -46,9 +46,8 @@ def get_spot_price_per_region( """Gets spot prices of the specified region and instance type""" print( - "Region {} Instance Type {} Start {} End {}".format( - region_name, instance_type, start_time.isoformat(), end_time.isoformat() - ) + "Region %s Instance Type %s Start %s End %s" + % (region_name, instance_type, start_time.isoformat(), end_time.isoformat()) ) r = None @@ -190,8 +189,8 @@ def __init__(self, configFile: str) -> None: else: if "handler" not in sectionMap: print( - f"Warning: Simulation '{section}' has no handler set, " - "ignoring..." + "Warning: Simulation '%s' has no handler set, ignoring..." + % section ) continue @@ -248,7 +247,7 @@ def main() -> int: priceData = {} if os.path.isfile(cacheFile): - with open(cacheFile) as cacheFd: + with open(cacheFile, mode="r") as cacheFd: priceData = json.load(cacheFd, object_pairs_hook=OrderedDict) else: for hour in range(interval - 1, -1, -1): diff --git a/pyproject.toml b/pyproject.toml index e1d7a2816..bfb40658f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,9 +14,6 @@ omit = [ "*/.eggs/*", ] -[tool.django-stubs] -django_settings_module = "server.settings_test" - [tool.isort] known_first_party = [ "Collector", @@ -35,10 +32,6 @@ profile = "black" [tool.mypy] strict = true show_error_codes = true -plugins = [ -# "mypy_django_plugin.main", -# "mypy_drf_plugin.main", -] # Add Python modules to be ignored by mypy here [[tool.mypy.overrides]] diff --git a/repack_wheel.sh b/repack_wheel.sh new file mode 100755 index 000000000..429830ef3 --- /dev/null +++ b/repack_wheel.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -e -x + +# +# Remove 'extra_requires' from the wheel +# +# The 'extras' are only useful with the full source distribution. +# + +WORK="$(mktemp -d -t fm-twine-repack-XXXXXX)" +wheel unpack -d "$WORK" dist/FuzzManager-*.whl +grep -Ev "^(Provides-Extra: .*|Requires-Dist: .* ; extra == '.*')$" "$WORK"/FuzzManager-*/FuzzManager-*.dist-info/METADATA > "$WORK"/METADATA.new +mv "$WORK"/METADATA.new "$WORK"/FuzzManager-*/FuzzManager-*.dist-info/METADATA +wheel pack -d dist "$WORK"/FuzzManager-* +rm -rf "$WORK" diff --git a/requirements.txt b/requirements.txt index 692b04ac6..ca6a7f0d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -180,6 +180,7 @@ secretstorage==3.3.1 # via keyring six==1.16.0 # via + # FuzzManager (setup.py) # django-chartjs # isodate # python-dateutil @@ -192,9 +193,7 @@ toml==0.10.2 tomli==2.0.1 # via coverage typing-extensions==4.1.1 - # via - # FuzzManager (setup.py) - # importlib-metadata + # via importlib-metadata urllib3==1.26.8 # via # botocore diff --git a/server/celeryconf.py b/server/celeryconf.py index e538917c8..e3a1e7be1 100644 --- a/server/celeryconf.py +++ b/server/celeryconf.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os from celery import Celery diff --git a/server/covmanager/management/commands/setup_repository.py b/server/covmanager/management/commands/setup_repository.py index e5848d408..97f64a9be 100644 --- a/server/covmanager/management/commands/setup_repository.py +++ b/server/covmanager/management/commands/setup_repository.py @@ -56,6 +56,6 @@ def handle(self, name, provider, location, **opts: Any) -> None: repository.save() print( - f"Successfully created repository '{name}' with provider '{provider}' " - f"located at {location}" + "Successfully created repository '%s' with provider '%s' located at %s" + % (name, provider, location) ) diff --git a/server/covmanager/migrations/0001_initial.py b/server/covmanager/migrations/0001_initial.py index ae6be9335..0ed034f26 100644 --- a/server/covmanager/migrations/0001_initial.py +++ b/server/covmanager/migrations/0001_initial.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import django.core.files.storage import django.utils.timezone from django.db import migrations, models diff --git a/server/covmanager/migrations/0002_increase_collection_filename_length.py b/server/covmanager/migrations/0002_increase_collection_filename_length.py index 586254ef3..d9bbf7996 100644 --- a/server/covmanager/migrations/0002_increase_collection_filename_length.py +++ b/server/covmanager/migrations/0002_increase_collection_filename_length.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import django.core.files.storage from django.db import migrations, models diff --git a/server/covmanager/migrations/0003_collection_file_optional.py b/server/covmanager/migrations/0003_collection_file_optional.py index 16983e43a..75f256068 100644 --- a/server/covmanager/migrations/0003_collection_file_optional.py +++ b/server/covmanager/migrations/0003_collection_file_optional.py @@ -1,5 +1,7 @@ # Generated by Django 1.11.13 on 2018-07-20 14:20 +from __future__ import annotations + import django.db.models.deletion from django.db import migrations, models diff --git a/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py b/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py index 68f67d9ff..c0d505d6b 100644 --- a/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py +++ b/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py @@ -1,5 +1,7 @@ # Generated by Django 1.11.13 on 2018-09-03 15:00 +from __future__ import annotations + import django.db.models.deletion from django.db import migrations, models diff --git a/server/covmanager/migrations/0005_report.py b/server/covmanager/migrations/0005_report.py index 04becf8c7..19bde07d1 100644 --- a/server/covmanager/migrations/0005_report.py +++ b/server/covmanager/migrations/0005_report.py @@ -1,5 +1,7 @@ # Generated by Django 1.11.16 on 2019-05-22 20:01 +from __future__ import annotations + import django.db.models.deletion import django.utils.timezone from django.db import migrations, models diff --git a/server/covmanager/models.py b/server/covmanager/models.py index 2884d7658..3755732d9 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -29,7 +29,8 @@ class Repository(models.Model): def getInstance(self): # Dynamically instantiate the provider as requested providerModule = __import__( - f"covmanager.SourceCodeProvider.{self.classname}", fromlist=[self.classname] + f"covmanager.SourceCodeProvider.{self.classname}", + fromlist=[self.classname], ) providerClass = getattr(providerModule, self.classname) return providerClass(self.location) diff --git a/server/covmanager/tests/test_collections.py b/server/covmanager/tests/test_collections.py index ffa412efd..034571be3 100644 --- a/server/covmanager/tests/test_collections.py +++ b/server/covmanager/tests/test_collections.py @@ -21,7 +21,7 @@ from django.test.client import Client from django.urls import reverse -from .conftest import _result +from covmanager.tests.conftest import _result LOG = logging.getLogger("fm.covmanager.tests.collections") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name diff --git a/server/covmanager/tests/test_collections_rest.py b/server/covmanager/tests/test_collections_rest.py index 2c512ab47..8532921ca 100644 --- a/server/covmanager/tests/test_collections_rest.py +++ b/server/covmanager/tests/test_collections_rest.py @@ -22,8 +22,7 @@ from rest_framework.test import APIClient from covmanager.models import Collection - -from .conftest import _result, covType +from covmanager.tests.conftest import _result, covType LOG = logging.getLogger("fm.covmanager.tests.collections.rest") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name diff --git a/server/covmanager/tests/test_repositories.py b/server/covmanager/tests/test_repositories.py index cf46bfc75..2abfaed1a 100644 --- a/server/covmanager/tests/test_repositories.py +++ b/server/covmanager/tests/test_repositories.py @@ -19,7 +19,7 @@ from django.test.client import Client from django.urls import reverse -from .conftest import _result +from covmanager.tests.conftest import _result LOG = logging.getLogger("fm.covmanager.tests.repos") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name diff --git a/server/covmanager/tests/test_repositories_rest.py b/server/covmanager/tests/test_repositories_rest.py index 64c8db8e5..da38e5bad 100644 --- a/server/covmanager/tests/test_repositories_rest.py +++ b/server/covmanager/tests/test_repositories_rest.py @@ -19,9 +19,11 @@ from django.contrib.auth.models import User from rest_framework.test import APIClient -from .conftest import _result +from covmanager.tests.conftest import _result -LOG = logging.getLogger("fm.covmanager.tests.repos.rest") +LOG = logging.getLogger( + "fm.covmanager.tests.repos.rest" +) # pylint: disable=invalid-name pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name diff --git a/server/covmanager/views.py b/server/covmanager/views.py index ffbd26985..4fcf26d88 100644 --- a/server/covmanager/views.py +++ b/server/covmanager/views.py @@ -2,7 +2,7 @@ import json import os -from typing import Any, TypeVar, cast +from typing import Any, TypeVar from wsgiref.util import FileWrapper from django.conf import settings @@ -238,12 +238,12 @@ def collections_browse_api( def collections_diff_api(request: HttpRequest, path: str) -> HttpResponse: - collections: list[Collection] + collections: QuerySet[Collection] coverages = [] if "ids" in request.GET: ids = request.GET["ids"].split(",") - collections = cast(list[Collection], Collection.objects.filter(pk__in=ids)) + collections = Collection.objects.filter(pk__in=ids) if collections and len(collections) < 2: raise Http404("Need at least two collections") @@ -535,7 +535,7 @@ def repositories_search_api(request: HttpRequest) -> HttpResponse: ) return HttpResponse( - json.dumps({"results": results}), content_type="application/json" + json.dumps({"results": list(results)}), content_type="application/json" ) @@ -549,7 +549,7 @@ def tools_search_api(request: HttpRequest) -> HttpResponse: ) return HttpResponse( - json.dumps({"results": results}), content_type="application/json" + json.dumps({"results": list(results)}), content_type="application/json" ) diff --git a/server/crashmanager/Bugtracker/BugzillaREST.py b/server/crashmanager/Bugtracker/BugzillaREST.py index 9256fc17e..d9efebed5 100644 --- a/server/crashmanager/Bugtracker/BugzillaREST.py +++ b/server/crashmanager/Bugtracker/BugzillaREST.py @@ -62,8 +62,10 @@ def login(self, loginRequired: bool = True, forceLogin: bool = False) -> bool: if self.authToken is not None: return True - loginUrl = ( - f"{self.baseUrl}/login?login={self.username}&password={self.password}" + loginUrl = "{}/login?login={}&password={}".format( + self.baseUrl, + self.username, + self.password, ) response = requests.get(loginUrl) json = response.json() diff --git a/server/crashmanager/admin.py b/server/crashmanager/admin.py index 25a9cdb9b..b2fc02038 100644 --- a/server/crashmanager/admin.py +++ b/server/crashmanager/admin.py @@ -2,14 +2,8 @@ from django.contrib import admin -from crashmanager.models import ( # @UnresolvedImport - OS, - Bucket, - Bug, - CrashEntry, - Platform, - Product, -) +from crashmanager.models import Bug # @UnresolvedImport +from crashmanager.models import OS, Bucket, CrashEntry, Platform, Product admin.site.register(CrashEntry) admin.site.register(Bucket) diff --git a/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py b/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py index fae4ca6cb..438f1236d 100644 --- a/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py +++ b/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py @@ -1,5 +1,7 @@ # Generated by Django 1.11.20 on 2019-12-09 00:06 +from __future__ import annotations + import django.core.files.storage import django.db.migrations.operations.special import django.db.models.deletion diff --git a/server/crashmanager/migrations/0002_add_taskmanager.py b/server/crashmanager/migrations/0002_add_taskmanager.py index 9891757c6..99d3b541c 100644 --- a/server/crashmanager/migrations/0002_add_taskmanager.py +++ b/server/crashmanager/migrations/0002_add_taskmanager.py @@ -1,5 +1,7 @@ # Generated by Django 1.11.29 on 2020-04-03 04:18 +from __future__ import annotations + from django.db import migrations diff --git a/server/crashmanager/tests/fixtures/gdb_crash_data.txt b/server/crashmanager/tests/fixtures/gdb_crash_data.txt deleted file mode 100644 index 693c56606..000000000 --- a/server/crashmanager/tests/fixtures/gdb_crash_data.txt +++ /dev/null @@ -1,39 +0,0 @@ -GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 -(gdb) backtrace 0 -No stack. -(gdb) r -Starting program: /home/ubuntu/shell-cache/js-32-linux-dc70d241f90d/js-32-linux-dc70d241f90d --fuzzing-safe --no-threads --ion-eager bb2608227.js -Thread 1 "js-32-linux-dc7" received signal SIGSEGV, Segmentation fault. -0x33674039 in ?? () -(gdb) backtrace -#0 0x33674039 in ?? () -#1 0xf6b52820 in ?? () -#2 0xf6b52820 in ?? () -(gdb) info registers -eax 0xf7047000 -150704128 -ecx 0xffef 65519 -edx 0xffff8000 -32768 -ebx 0x9837ff4 159612916 -esp 0xffffba74 0xffffba74 -ebp 0xffffba74 0xffffba74 -esi 0xf6b52820 -155899872 -edi 0xf6f896c0 -151480640 -eip 0x33674039 0x33674039 -eflags 0x10283 [ CF SF IF RF ] -cs 0x23 35 -ss 0x2b 43 -ds 0x2b 43 -es 0x2b 43 -fs 0x0 0 -gs 0x63 99 -(gdb) print $_siginfo -$1 = {si_signo = 11, si_errno = 0, si_code = 2, _sigfault = {si_addr = 0xf7057000, _addr_lsb = 0, _addr_bnd = {_lower = 0x0, _upper = 0x0}}} -(gdb) x/8i $pc -=> 0x33674039: mov %dx,0x10(%eax,%ecx,1) - 0x3367403e: pop %ebp - 0x3367403f: pop %esi - 0x33674040: ret - 0x33674041: jmp 0x33674200 - 0x33674046: sub $0x4,%esp - 0x33674049: call 0x336743f0 - 0x3367404e: sub $0x4,%esp diff --git a/server/crashmanager/tests/test_bugproviders_rest.py b/server/crashmanager/tests/test_bugproviders_rest.py index a3597acbe..11c2b3b27 100644 --- a/server/crashmanager/tests/test_bugproviders_rest.py +++ b/server/crashmanager/tests/test_bugproviders_rest.py @@ -8,8 +8,7 @@ from rest_framework.test import APIClient from crashmanager.models import BugProvider - -from .conftest import _cm_result +from crashmanager.tests.conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.bugproviders.rest") diff --git a/server/crashmanager/tests/test_bugs.py b/server/crashmanager/tests/test_bugs.py index 2d25883a5..c14e85480 100644 --- a/server/crashmanager/tests/test_bugs.py +++ b/server/crashmanager/tests/test_bugs.py @@ -19,8 +19,7 @@ from django.urls import reverse from crashmanager.models import BugzillaTemplate - -from .conftest import _cm_result +from crashmanager.tests.conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.bugs") pytestmark = pytest.mark.usefixtures("crashmanager_test") diff --git a/server/crashmanager/tests/test_crashes.py b/server/crashmanager/tests/test_crashes.py index 2f6f0d699..2d6731542 100644 --- a/server/crashmanager/tests/test_crashes.py +++ b/server/crashmanager/tests/test_crashes.py @@ -18,8 +18,9 @@ from django.test.client import Client from django.urls import reverse +from crashmanager.tests.conftest import _cm_result + from . import assert_contains -from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.crashes") pytestmark = pytest.mark.usefixtures( diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index 581089475..e7bc26474 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -26,8 +26,7 @@ from Collector.Collector import DataType from crashmanager.models import CrashEntry from crashmanager.models import TestCase as cmTestCase - -from .conftest import _cm_result +from crashmanager.tests.conftest import _cm_result # What should be allowed: # @@ -516,7 +515,7 @@ def test_rest_crashes_report_crash_long_sig( ) -> None: """test that crash reporting works with an assertion message too long for shortSignature""" - data = { + data: DataType = { "rawStdout": "data on\nstdout", "rawStderr": "data on\nstderr", "rawCrashData": "Assertion failure: " + ("A" * 4096), diff --git a/server/crashmanager/tests/test_inbox_rest.py b/server/crashmanager/tests/test_inbox_rest.py index dfa56ed13..6e5442b90 100644 --- a/server/crashmanager/tests/test_inbox_rest.py +++ b/server/crashmanager/tests/test_inbox_rest.py @@ -33,8 +33,7 @@ Product, Tool, ) - -from .conftest import _cm_result +from crashmanager.tests.conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.inbox.rest") diff --git a/server/crashmanager/tests/test_rest_live.py b/server/crashmanager/tests/test_rest_live.py index ac218ef0a..fd89ac71b 100644 --- a/server/crashmanager/tests/test_rest_live.py +++ b/server/crashmanager/tests/test_rest_live.py @@ -28,9 +28,10 @@ @pytest.mark.skip def test_RESTCrashEntryInterface(live_server: LiveServer, fm_user: User) -> None: url_split = urlsplit(live_server.url) - url = ( - f"{url_split.scheme}://{url_split.hostname}:{url_split.port}" - "/crashmanager/rest/crashes/" + url = "{}://{}:{}/crashmanager/rest/crashes/".format( + url_split.scheme, + url_split.hostname, + url_split.port, ) # Must yield forbidden without authentication @@ -77,9 +78,10 @@ def test_RESTCrashEntryInterface(live_server: LiveServer, fm_user: User) -> None def test_RESTSignatureInterface(live_server: LiveServer) -> None: url_split = urlsplit(live_server.url) - url = ( - f"{url_split.scheme}://{url_split.hostname}:{url_split.port}" - "/crashmanager/rest/signatures/" + url = "{}://{}:{}/crashmanager/rest/signatures/".format( + url_split.scheme, + url_split.hostname, + url_split.port, ) # Must yield forbidden without authentication diff --git a/server/crashmanager/tests/test_signatures.py b/server/crashmanager/tests/test_signatures.py index cdfb3c851..928732545 100644 --- a/server/crashmanager/tests/test_signatures.py +++ b/server/crashmanager/tests/test_signatures.py @@ -21,9 +21,9 @@ from django.urls import reverse from crashmanager.models import Bucket, BucketWatch, CrashEntry +from crashmanager.tests.conftest import _cm_result from . import assert_contains -from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.signatures") pytestmark = pytest.mark.usefixtures( diff --git a/server/crashmanager/tests/test_signatures_rest.py b/server/crashmanager/tests/test_signatures_rest.py index 756be2aeb..31bc5855e 100644 --- a/server/crashmanager/tests/test_signatures_rest.py +++ b/server/crashmanager/tests/test_signatures_rest.py @@ -22,8 +22,7 @@ from rest_framework.test import APIClient from crashmanager.models import Bucket, Bug, CrashEntry, User - -from .conftest import _cm_result, _create_user +from crashmanager.tests.conftest import _cm_result, _create_user # What should be allowed: # diff --git a/server/crashmanager/tests/test_stats.py b/server/crashmanager/tests/test_stats.py index 8d5426c22..2dbc62cdc 100644 --- a/server/crashmanager/tests/test_stats.py +++ b/server/crashmanager/tests/test_stats.py @@ -19,8 +19,9 @@ from django.test.client import Client from django.urls import reverse +from crashmanager.tests.conftest import _cm_result + from . import assert_contains -from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.stats") VIEW_NAME = "crashmanager:stats" diff --git a/server/crashmanager/tests/test_templates_rest.py b/server/crashmanager/tests/test_templates_rest.py index c3f7ee8cb..305ac28af 100644 --- a/server/crashmanager/tests/test_templates_rest.py +++ b/server/crashmanager/tests/test_templates_rest.py @@ -8,8 +8,7 @@ from rest_framework.test import APIClient from crashmanager.models import BugzillaTemplate - -from .conftest import _cm_result +from crashmanager.tests.conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.templates.rest") diff --git a/server/crashmanager/tests/test_user_settings.py b/server/crashmanager/tests/test_user_settings.py index 08c93590e..cc261eba5 100644 --- a/server/crashmanager/tests/test_user_settings.py +++ b/server/crashmanager/tests/test_user_settings.py @@ -19,8 +19,7 @@ from django.urls import reverse from crashmanager.models import Tool, User - -from .conftest import _cm_result +from crashmanager.tests.conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.usersettings") pytestmark = pytest.mark.usefixtures("crashmanager_test") diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index 74c029f10..8ccc6965c 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -377,7 +377,7 @@ def get_price(sku) -> tuple[float, str]: zones = {} service_id = "6F81-5844-456A" # Compute Engine compute_skus_url = ( - f"https://cloudbilling.googleapis.com/v1/services/{service_id}/skus" + "https://cloudbilling.googleapis.com/v1/services/" + service_id + "/skus" ) def _get_skus_paginated(): diff --git a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py index d3707bcb7..381135d42 100644 --- a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py +++ b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py @@ -1,5 +1,7 @@ # Generated by Django 1.11.20 on 2019-12-09 00:08 +from __future__ import annotations + import django.core.files.storage import django.db.migrations.operations.special import django.db.models.deletion diff --git a/server/ec2spotmanager/tasks.py b/server/ec2spotmanager/tasks.py index 3e2e0d338..23d9557ae 100644 --- a/server/ec2spotmanager/tasks.py +++ b/server/ec2spotmanager/tasks.py @@ -117,9 +117,8 @@ def _determine_best_location( # zone+type is blacklisted because a previous spot request timed-out if ( cache.get( - "{}:blacklist:{}:{}:{}".format( - cloud_provider.get_name(), region, zone, instance_type - ) + "%s:blacklist:%s:%s:%s" + % (cloud_provider.get_name(), region, zone, instance_type) ) is not None ): diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index 5eff17fda..74a210074 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -11,8 +11,8 @@ from __future__ import annotations -from datetime import datetime import logging +from datetime import datetime from typing import cast from django.core.files.base import ContentFile diff --git a/server/ec2spotmanager/tests/test_configs.py b/server/ec2spotmanager/tests/test_configs.py index 913b4c534..cff0d278a 100644 --- a/server/ec2spotmanager/tests/test_configs.py +++ b/server/ec2spotmanager/tests/test_configs.py @@ -25,8 +25,12 @@ from . import assert_contains, create_config -LOG = logging.getLogger("fm.ec2spotmanager.tests.configs") -pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") +LOG = logging.getLogger( + "fm.ec2spotmanager.tests.configs" +) # pylint: disable=invalid-name +pytestmark = pytest.mark.usefixtures( + "ec2spotmanager_test" +) # pylint: disable=invalid-name @pytest.mark.parametrize( diff --git a/server/ec2spotmanager/tests/test_configs_rest.py b/server/ec2spotmanager/tests/test_configs_rest.py index e66e4ecd8..f90283241 100644 --- a/server/ec2spotmanager/tests/test_configs_rest.py +++ b/server/ec2spotmanager/tests/test_configs_rest.py @@ -22,8 +22,12 @@ from . import create_config -LOG = logging.getLogger("fm.ec2spotmanager.tests.configs.rest") -pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") +LOG = logging.getLogger( + "fm.ec2spotmanager.tests.configs.rest" +) # pylint: disable=invalid-name +pytestmark = pytest.mark.usefixtures( + "ec2spotmanager_test" +) # pylint: disable=invalid-name def test_rest_pool_configs_no_auth(api_client: APIClient) -> None: diff --git a/server/ec2spotmanager/tests/test_ec2spotmanager.py b/server/ec2spotmanager/tests/test_ec2spotmanager.py index 8f035c1b2..89c51ce52 100644 --- a/server/ec2spotmanager/tests/test_ec2spotmanager.py +++ b/server/ec2spotmanager/tests/test_ec2spotmanager.py @@ -19,8 +19,12 @@ from django.test.client import Client from django.urls import reverse -LOG = logging.getLogger("fm.ec2spotmanager.tests.ec2spotmanager") -pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") +LOG = logging.getLogger( + "fm.ec2spotmanager.tests.ec2spotmanager" +) # pylint: disable=invalid-name +pytestmark = pytest.mark.usefixtures( + "ec2spotmanager_test" +) # pylint: disable=invalid-name def test_ec2spotmanager_index(client: Client) -> None: diff --git a/server/ec2spotmanager/tests/test_pools_rest.py b/server/ec2spotmanager/tests/test_pools_rest.py index 5f428fedf..550647541 100644 --- a/server/ec2spotmanager/tests/test_pools_rest.py +++ b/server/ec2spotmanager/tests/test_pools_rest.py @@ -26,8 +26,12 @@ from . import create_config, create_pool -LOG = logging.getLogger("fm.ec2spotmanager.tests.pools.rest") -pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") +LOG = logging.getLogger( + "fm.ec2spotmanager.tests.pools.rest" +) # pylint: disable=invalid-name +pytestmark = pytest.mark.usefixtures( + "ec2spotmanager_test" +) # pylint: disable=invalid-name def test_rest_pool_cycle_no_auth(api_client: APIClient) -> None: diff --git a/server/ec2spotmanager/tests/test_status_rest.py b/server/ec2spotmanager/tests/test_status_rest.py index 076848b7e..14d54e11f 100644 --- a/server/ec2spotmanager/tests/test_status_rest.py +++ b/server/ec2spotmanager/tests/test_status_rest.py @@ -24,8 +24,12 @@ from . import create_instance -LOG = logging.getLogger("fm.ec2spotmanager.tests.status.rest") -pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") +LOG = logging.getLogger( + "fm.ec2spotmanager.tests.status.rest" +) # pylint: disable=invalid-name +pytestmark = pytest.mark.usefixtures( + "ec2spotmanager_test" +) # pylint: disable=invalid-name def test_rest_status_no_auth(api_client: APIClient) -> None: diff --git a/server/ec2spotmanager/tests/test_task_status.py b/server/ec2spotmanager/tests/test_task_status.py index bfb66b7a5..d30eb7a05 100644 --- a/server/ec2spotmanager/tests/test_task_status.py +++ b/server/ec2spotmanager/tests/test_task_status.py @@ -19,7 +19,9 @@ from . import create_config, create_pool -pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") +pytestmark = pytest.mark.usefixtures( + "ec2spotmanager_test" +) # pylint: disable=invalid-name def test_update_pool_status() -> None: diff --git a/server/server/views.py b/server/server/views.py index 4ea5d51e7..1a0ec68fb 100644 --- a/server/server/views.py +++ b/server/server/views.py @@ -74,12 +74,11 @@ def paginate_requested_list(request: HttpRequest, entries: QuerySet[Model]) -> P parameters 'page' and 'page_size'. """ page_size = request.GET.get("page_size") - if page_size: + if not page_size: + assert page_size is not None page_size_int = int(page_size) - else: page_size_int = 100 paginator = Paginator(entries, page_size_int) - page = request.GET.get("page") try: @@ -134,7 +133,8 @@ def json_to_query(json_str: str): raise RuntimeError(f"Invalid JSON: {e}") def get_query_obj( - obj: str | list[str] | int | dict[str, str] | None, key: str | None = None + obj: str | list[str] | int | dict[str, str] | None, + key: str | None = None, ) -> Q: if obj is None or isinstance(obj, (str, list, int)): diff --git a/server/taskmanager/apps.py b/server/taskmanager/apps.py index 2084e10d5..6f0864bef 100644 --- a/server/taskmanager/apps.py +++ b/server/taskmanager/apps.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.apps import AppConfig diff --git a/server/taskmanager/management/commands/taskmanager_pulse_listen.py b/server/taskmanager/management/commands/taskmanager_pulse_listen.py index 9ed258962..9199420b6 100644 --- a/server/taskmanager/management/commands/taskmanager_pulse_listen.py +++ b/server/taskmanager/management/commands/taskmanager_pulse_listen.py @@ -70,7 +70,8 @@ def callback(self, body, msg) -> None: msg.ack() return None raise RuntimeError( - "Unhandled message: {} on {}".format( + "Unhandled message: %s on %s" + % ( msg.delivery_info["routing_key"], msg.delivery_info["exchange"], ) diff --git a/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py b/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py index b27f074dd..b28bbedd9 100644 --- a/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py +++ b/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py @@ -1,5 +1,7 @@ # Generated by Django 2.2.12 on 2020-07-22 16:29 +from __future__ import annotations + import django.db.models.deletion from django.db import migrations, models diff --git a/server/taskmanager/tests/test_update_pools.py b/server/taskmanager/tests/test_update_pools.py index a6f9a1d55..6ebd7dcfb 100644 --- a/server/taskmanager/tests/test_update_pools.py +++ b/server/taskmanager/tests/test_update_pools.py @@ -20,8 +20,9 @@ from dateutil.parser import isoparse from pytest_mock import MockerFixture -# from taskmanager.cron import delete_expired from taskmanager.models import Pool, Task + +# from taskmanager.cron import delete_expired from taskmanager.tasks import update_pool_defns, update_task LOG = logging.getLogger("fm.taskmanager.tests.tasks") diff --git a/setup.cfg b/setup.cfg index 9061c20d3..aafab7529 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,6 +26,7 @@ keywords = fuzz fuzzing security test testing install_requires = fasteners>=0.14.1 requests>=2.20.1 + six>=1.12.0 typing_extensions>=4.0.0 packages = Collector @@ -67,3 +68,23 @@ test = pytest-django pytest-mock pytest-pythonpath +mypy = + black + boto3-stubs + celery-types + django-stubs + djangorestframework-stubs + flake8 + flynt + isort + mypy==0.940 + pytest-flake8 + pyupgrade-directories + types-boto + types-mock + types-PyYAML + types-python-dateutil + types-redis + types-requests + types-setuptools + yesqa diff --git a/setup.py b/setup.py index edd3c8492..81ca21d21 100755 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. + """setuptools install script""" from __future__ import annotations diff --git a/tox.ini b/tox.ini index 023185825..3f45092c6 100644 --- a/tox.ini +++ b/tox.ini @@ -37,23 +37,16 @@ deps = commands = codecov -[testenv:mypy] -commands = - mypy --install-types --non-interactive {posargs} -setenv = PYTHONPATH = {toxinidir}/server -deps = - mypy==0.931 - django-stubs>=1.9.0 - djangorestframework-stubs>=1.4.0 -usedevelop = true - [testenv:pypi] skip_install = true deps = twine + wheel commands = python setup.py sdist bdist_wheel + bash repack_wheel.sh twine upload --skip-existing dist/* +whitelist_externals = bash [flake8] ignore = From 92be504d3e02d0c26c4520ff49eff35c10183db9 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 15 Mar 2022 02:28:33 -0700 Subject: [PATCH 114/137] Revert "TEMP Changes from my other mypy-support branch" This reverts commit 763b1e29fe7e92b0b683326aaee8c69823af9476. --- .github/workflows/mypytmp.yml | 19 +- Collector/Collector.py | 17 +- Collector/__main__.py | 3 - Collector/tests/test_Collector.py | 6 +- CovReporter/CovReporter.py | 7 +- CovReporter/__main__.py | 3 - EC2Reporter/__main__.py | 3 - FTB/AssertionHelper.py | 1 + FTB/Running/GDB.py | 3 +- FTB/Signatures/CrashInfo.py | 235 +++-- FTB/Signatures/CrashSignature.py | 1 + FTB/Signatures/RegisterHelper.py | 2 +- FTB/Signatures/Symptom.py | 9 + .../apple-10-7-crash-report-example.txt | 238 ----- .../resources/apple-crash-report-example.txt | 59 -- .../tests/resources/cdb-10c-crashlog.txt | 214 ----- .../tests/resources/cdb-11c-crashlog.txt | 208 ----- .../tests/resources/cdb-12c-crashlog.txt | 220 ----- .../tests/resources/cdb-1a-crashlog.txt | 245 ------ .../tests/resources/cdb-1b-crashlog.txt | 329 ------- .../tests/resources/cdb-2a-crashlog.txt | 308 ------- .../tests/resources/cdb-2b-crashlog.txt | 381 -------- .../tests/resources/cdb-3a-crashlog.txt | 284 ------ .../tests/resources/cdb-3b-crashlog.txt | 357 -------- .../tests/resources/cdb-4a-crashlog.txt | 318 ------- .../tests/resources/cdb-4b-crashlog.txt | 368 -------- .../tests/resources/cdb-5a-crashlog.txt | 335 -------- .../tests/resources/cdb-5b-crashlog.txt | 425 --------- .../tests/resources/cdb-6a-crashlog.txt | 407 --------- .../tests/resources/cdb-6b-crashlog.txt | 503 ----------- .../tests/resources/cdb-7c-crashlog.txt | 269 ------ .../tests/resources/cdb-8c-crashlog.txt | 207 ----- .../tests/resources/cdb-9c-crashlog.txt | 260 ------ .../tests/resources/minidump-example.txt | 811 ------------------ .../tests/resources/tsan-lock-report.txt | 18 - .../resources/tsan-report-atomic-swapped.txt | 170 ---- .../tests/resources/tsan-report-atomic.txt | 170 ---- .../tests/resources/tsan-report.txt | 160 ---- .../tests/resources/tsan-report2.txt | 70 -- .../resources/tsan-simple-leak-report.txt | 4 - .../tsan-simple-race-report-swapped.txt | 14 - .../resources/tsan-simple-race-report.txt | 14 - .../tests/resources/valgrind-cjm-01.txt | 11 - .../tests/resources/valgrind-cjm-02.txt | 89 -- .../tests/resources/valgrind-if-01.txt | 7 - .../tests/resources/valgrind-if-02.txt | 24 - .../tests/resources/valgrind-if-03.txt | 26 - .../tests/resources/valgrind-ir-01.txt | 6 - .../tests/resources/valgrind-ir-02.txt | 22 - .../tests/resources/valgrind-iw-01.txt | 5 - .../tests/resources/valgrind-leak-01.txt | 5 - .../tests/resources/valgrind-leak-02.txt | 4 - .../tests/resources/valgrind-nm-01.txt | 4 - .../tests/resources/valgrind-pt-01.txt | 11 - .../tests/resources/valgrind-sc-01.txt | 10 - .../tests/resources/valgrind-sc-02.txt | 8 - .../tests/resources/valgrind-sdo-01.txt | 4 - .../tests/resources/valgrind-uuv-01.txt | 7 - FTB/Signatures/tests/test_CrashSignature.py | 1 + Reporter/Reporter.py | 3 + TaskStatusReporter/__main__.py | 3 - misc/afl_libfuzzer/S3Manager.py | 3 + misc/afl_libfuzzer/afl-libfuzzer-daemon.py | 12 +- misc/ec2prices/simulator.py | 11 +- pyproject.toml | 7 + repack_wheel.sh | 15 - requirements.txt | 5 +- server/celeryconf.py | 2 - .../management/commands/setup_repository.py | 4 +- server/covmanager/migrations/0001_initial.py | 2 - ...002_increase_collection_filename_length.py | 2 - .../0003_collection_file_optional.py | 2 - .../0004_reportconfiguration_reportsummary.py | 2 - server/covmanager/migrations/0005_report.py | 2 - server/covmanager/models.py | 3 +- server/covmanager/tests/test_collections.py | 2 +- .../covmanager/tests/test_collections_rest.py | 3 +- server/covmanager/tests/test_repositories.py | 2 +- .../tests/test_repositories_rest.py | 6 +- server/covmanager/views.py | 10 +- .../crashmanager/Bugtracker/BugzillaREST.py | 6 +- server/crashmanager/admin.py | 10 +- .../0001_squashed_0020_add_app_permissions.py | 2 - .../migrations/0002_add_taskmanager.py | 2 - .../tests/fixtures/gdb_crash_data.txt | 39 + .../tests/test_bugproviders_rest.py | 3 +- server/crashmanager/tests/test_bugs.py | 3 +- server/crashmanager/tests/test_crashes.py | 3 +- .../crashmanager/tests/test_crashes_rest.py | 5 +- server/crashmanager/tests/test_inbox_rest.py | 3 +- server/crashmanager/tests/test_rest_live.py | 14 +- server/crashmanager/tests/test_signatures.py | 2 +- .../tests/test_signatures_rest.py | 3 +- server/crashmanager/tests/test_stats.py | 3 +- .../crashmanager/tests/test_templates_rest.py | 3 +- .../crashmanager/tests/test_user_settings.py | 3 +- .../CloudProvider/GCECloudProvider.py | 2 +- .../0001_squashed_0013_add_gce_fields.py | 2 - server/ec2spotmanager/tasks.py | 5 +- server/ec2spotmanager/tests/__init__.py | 2 +- server/ec2spotmanager/tests/test_configs.py | 8 +- .../ec2spotmanager/tests/test_configs_rest.py | 8 +- .../tests/test_ec2spotmanager.py | 8 +- .../ec2spotmanager/tests/test_pools_rest.py | 8 +- .../ec2spotmanager/tests/test_status_rest.py | 8 +- .../ec2spotmanager/tests/test_task_status.py | 4 +- server/server/views.py | 8 +- server/taskmanager/apps.py | 2 - .../commands/taskmanager_pulse_listen.py | 3 +- ...wn_task_status_and_run_time_calculation.py | 2 - server/taskmanager/tests/test_update_pools.py | 3 +- setup.cfg | 21 - setup.py | 1 - tox.ini | 13 +- 114 files changed, 295 insertions(+), 7937 deletions(-) delete mode 100644 FTB/Signatures/tests/resources/apple-10-7-crash-report-example.txt delete mode 100644 FTB/Signatures/tests/resources/apple-crash-report-example.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-10c-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-11c-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-12c-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-1a-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-1b-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-2a-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-2b-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-3a-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-3b-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-4a-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-4b-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-5a-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-5b-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-6a-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-6b-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-7c-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-8c-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/cdb-9c-crashlog.txt delete mode 100644 FTB/Signatures/tests/resources/minidump-example.txt delete mode 100644 FTB/Signatures/tests/resources/tsan-lock-report.txt delete mode 100644 FTB/Signatures/tests/resources/tsan-report-atomic-swapped.txt delete mode 100644 FTB/Signatures/tests/resources/tsan-report-atomic.txt delete mode 100644 FTB/Signatures/tests/resources/tsan-report.txt delete mode 100644 FTB/Signatures/tests/resources/tsan-report2.txt delete mode 100644 FTB/Signatures/tests/resources/tsan-simple-leak-report.txt delete mode 100644 FTB/Signatures/tests/resources/tsan-simple-race-report-swapped.txt delete mode 100644 FTB/Signatures/tests/resources/tsan-simple-race-report.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-cjm-01.txt delete mode 100755 FTB/Signatures/tests/resources/valgrind-cjm-02.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-if-01.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-if-02.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-if-03.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-ir-01.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-ir-02.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-iw-01.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-leak-01.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-leak-02.txt delete mode 100755 FTB/Signatures/tests/resources/valgrind-nm-01.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-pt-01.txt delete mode 100755 FTB/Signatures/tests/resources/valgrind-sc-01.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-sc-02.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-sdo-01.txt delete mode 100644 FTB/Signatures/tests/resources/valgrind-uuv-01.txt delete mode 100755 repack_wheel.sh create mode 100644 server/crashmanager/tests/fixtures/gdb_crash_data.txt diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index e9b7b4de0..0b5e785b1 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -2,7 +2,7 @@ name: mypytmp on: push: - branches: [ mypy-support ] + branches: [ basic-mypy-infrastructure ] pull_request: branches: [ master ] @@ -50,20 +50,9 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: | python -u -m pip install --upgrade pip setuptools wheel - pip install --upgrade -e .[dev,server,taskmanager,docker,test,mypy] - - - name: Run flake8 - run: | - flake8 . - - - name: Run yesqa - run: | - find . -type f -name "*.py" -not -path "./build/*" | xargs yesqa - - - name: Run isort and all the rest - run: | - isort . && black . && pyup_dirs --py37-plus . && flynt . + pip install -r server/requirements3.7.txt + pip install --upgrade -e . - name: Run mypy run: | - mypy --install-types --non-interactive Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py + mypy Collector/ CovReporter/ EC2Reporter/ FTB/ Reporter/ TaskStatusReporter/ misc/ server/ setup.py diff --git a/Collector/Collector.py b/Collector/Collector.py index 28a21ecff..93fbb64a2 100755 --- a/Collector/Collector.py +++ b/Collector/Collector.py @@ -111,7 +111,8 @@ def refreshFromZip(self, zipFileName: str) -> None: os.remove(os.path.join(self.sigCacheDir, sigFile)) else: print( - f"Warning: Skipping deletion of non-signature file: {sigFile}", + "Warning: Skipping deletion of non-signature file:", + sigFile, file=sys.stderr, ) @@ -273,10 +274,11 @@ def generate( @remote_checks def download(self, crashId: int) -> tuple[str, dict[str, str]] | None: """ - Download all testcases for the specified bucketId. + Download the testcase for the specified crashId. - @param bucketId: ID of the requested bucket on the server side - @return: generator of filenames where tests were stored. + @param crashId: ID of the requested crash entry on the server side + @return: Tuple containing name of the file where the test was stored and the raw + JSON response """ assert self.serverHost is not None assert self.serverPort is not None @@ -780,14 +782,17 @@ def main(args: list[str] | None = None) -> int: if "args" in retJSON and retJSON["args"]: args = json.loads(retJSON["args"]) assert args is not None - print(f"Command line arguments: {' '.join(args)}") + print( + "Command line arguments:", + " ".join(args), + ) print("") if "env" in retJSON and retJSON["env"]: env = json.loads(retJSON["env"]) assert env is not None print( - "Environment variables: %s", + "Environment variables:", " ".join(f"{k} = {v}" for (k, v) in env.items()), ) print("") diff --git a/Collector/__main__.py b/Collector/__main__.py index e2e438b42..e8e4d3ae7 100644 --- a/Collector/__main__.py +++ b/Collector/__main__.py @@ -14,9 +14,6 @@ @contact: choller@mozilla.com """ - -from __future__ import annotations - import sys from .Collector import main diff --git a/Collector/tests/test_Collector.py b/Collector/tests/test_Collector.py index b3751429b..a30e78e5d 100644 --- a/Collector/tests/test_Collector.py +++ b/Collector/tests/test_Collector.py @@ -89,7 +89,7 @@ def test_collector_submit( # see that the issue was created in the server entry = CrashEntry.objects.get(pk=result["id"]) assert entry.rawStdout == "" - assert entry.rawStderr == asan_trace_crash + assert entry.rawStderr == asan_trace_crash.rstrip() assert entry.rawCrashData == "" assert entry.tool.name == "test-tool" assert entry.client.name == "test-fuzzer1" @@ -111,7 +111,7 @@ def test_collector_submit( with (tmp_path / ".fuzzmanagerconf").open("w") as fp: fp.write("[Main]\n") fp.write(f"serverhost = {url.hostname}\n") - fp.write("serverport = %d\n" % url.port) + fp.write(f"serverport = {url.port:d}\n") fp.write(f"serverproto = {url.scheme}\n") fp.write(f"serverauthtoken = {fm_user.token}\n") @@ -167,7 +167,7 @@ def test_collector_submit( ) # newer than the last result, will fail if the test db is active assert entry.rawStdout == "stdout data" assert entry.rawStderr == "stderr data" - assert entry.rawCrashData == asan_trace_crash + assert entry.rawCrashData == asan_trace_crash.rstrip() assert entry.tool.name == "tool2" assert entry.client.name == platform.node() assert entry.product.name == "mozilla-inbound" diff --git a/CovReporter/CovReporter.py b/CovReporter/CovReporter.py index f93ed7467..fb5a4a813 100755 --- a/CovReporter/CovReporter.py +++ b/CovReporter/CovReporter.py @@ -91,10 +91,9 @@ def submit( @param description: Optional description for this coverage data @param stats: An optional stats object as returned by create_combined_coverage """ - url = "{}://{}:{}/covmanager/rest/collections/".format( - self.serverProtocol, - self.serverHost, - self.serverPort, + url = ( + f"{self.serverProtocol}://{self.serverHost}:{self.serverPort}" + "/covmanager/rest/collections/" ) if version is None: diff --git a/CovReporter/__main__.py b/CovReporter/__main__.py index c2a6f103d..2b3f02d8c 100644 --- a/CovReporter/__main__.py +++ b/CovReporter/__main__.py @@ -14,9 +14,6 @@ @contact: choller@mozilla.com """ - -from __future__ import annotations - import sys from .CovReporter import main diff --git a/EC2Reporter/__main__.py b/EC2Reporter/__main__.py index 307a7390b..9213c88f0 100644 --- a/EC2Reporter/__main__.py +++ b/EC2Reporter/__main__.py @@ -14,9 +14,6 @@ @contact: choller@mozilla.com """ - -from __future__ import annotations - import sys from .EC2Reporter import main diff --git a/FTB/AssertionHelper.py b/FTB/AssertionHelper.py index 0c37db430..6b83c4f83 100644 --- a/FTB/AssertionHelper.py +++ b/FTB/AssertionHelper.py @@ -190,6 +190,7 @@ def getSanitizedAssertionPattern(msgs: list[str] | str | None) -> list[str] | st for use in signature matching. @param msgs: Assertion message(s) to be sanitized + @return: Sanitized assertion message (regular expression) """ assert msgs is not None diff --git a/FTB/Running/GDB.py b/FTB/Running/GDB.py index 3fe120489..e7993bdcc 100644 --- a/FTB/Running/GDB.py +++ b/FTB/Running/GDB.py @@ -32,7 +32,8 @@ def regAsHexStr(reg: str) -> str: mask = 0xFFFFFFFFFFFFFFFF else: mask = 0xFFFFFFFF - return f"0x{int(str(gdb.parse_and_eval('$' + reg)), 0) & mask:x}" # type: ignore[name-defined] # noqa @UndefinedVariable + val = int(str(gdb.parse_and_eval("$" + reg)), 0) & mask # type: ignore[name-defined] # noqa @UndefinedVariable + return f"0x{val:x}" def regAsIntStr(reg: str) -> str: diff --git a/FTB/Signatures/CrashInfo.py b/FTB/Signatures/CrashInfo.py index 32a84dd03..3f1d094dd 100644 --- a/FTB/Signatures/CrashInfo.py +++ b/FTB/Signatures/CrashInfo.py @@ -290,20 +290,7 @@ def fromRawCrashData( if stderr is not None: lines.extend(stderr) - result: ( - UBSanCrashInfo - | ASanCrashInfo - | LSanCrashInfo - | TSanCrashInfo - | AppleCrashInfo - | CDBCrashInfo - | GDBCrashInfo - | RustCrashInfo - | MinidumpCrashInfo - | ValgrindCrashInfo - | NoCrashInfo - | None - ) = None + result: CrashInfo | None = None for line in lines: if ubsanString in line and re.match(ubsanRegex, line) is not None: result = UBSanCrashInfo(stdout, stderr, configuration, auxCrashData) @@ -736,7 +723,7 @@ def __init__( if not expectedIndex == index: raise RuntimeError( - f"Fatal error parsing ASan trace (Index mismatch, got index " + "Fatal error parsing ASan trace (Index mismatch, got index " f"{index} but expected {expectedIndex})" ) @@ -892,7 +879,7 @@ def __init__( if expectedIndex != index: raise RuntimeError( - f"Fatal error parsing LSan trace (Index mismatch, got index " + "Fatal error parsing LSan trace (Index mismatch, got index " f"{index} but expected {expectedIndex})" ) @@ -1636,15 +1623,16 @@ def __init__( apple_crash_data = crashData or stderr inCrashingThread = False - for line in apple_crash_data: - # Crash address - if line.startswith("Exception Codes:"): - # Example: - # Exception Type: EXC_BAD_ACCESS (SIGABRT) - # Exception Codes: KERN_INVALID_ADDRESS at 0x00000001374b893e - address = line.split(" ")[-1] - if address.startswith("0x"): - self.crashAddress = int(address, 16) + if apple_crash_data is not None: + for line in apple_crash_data: + # Crash address + if line.startswith("Exception Codes:"): + # Example: + # Exception Type: EXC_BAD_ACCESS (SIGABRT) + # Exception Codes: KERN_INVALID_ADDRESS at 0x00000001374b893e + address = line.split(" ")[-1] + if address.startswith("0x"): + self.crashAddress = int(address, 16) # Start of stack for crashing thread if re.match(r"Thread \d+ Crashed:", line): @@ -1719,111 +1707,112 @@ def __init__( cdb_crash_data = crashData or stderr - for line in cdb_crash_data: - # Start of .ecxr data - if re.match(r"0:000> \.ecxr", line): - inEcxrData = True - continue - - if inEcxrData: - # 32-bit example: - # 0:000> .ecxr - # noqa eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 - # noqa eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc - # noqa cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 - # 64-bit example: - # 0:000> .ecxr - # rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b - # rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 - # rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 - # r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 - # r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff - # r14=000000e87fbfd0e0 r15=0000000000000003 - # iopl=0 nv up ei pl nz na pe nc - # noqa cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 - if line.startswith("cs="): - inEcxrData = False + if cdb_crash_data is not None: + for line in cdb_crash_data: + # Start of .ecxr data + if re.match(r"0:000> \.ecxr", line): + inEcxrData = True continue - # Crash address - # Extract the eip/rip specifically for use later - if "eip=" in line: - address = line.split("eip=")[1].split()[0] - self.crashAddress = int(address, 16) - elif "rip=" in line: - address = line.split("rip=")[1].split()[0] - self.crashAddress = int(address, 16) - - # First extract the line - # 32-bit example: - # eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b esi=02e00310 edi=02e00310 - # 64-bit example: - # rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b - matchLine = re.search(RegisterHelper.getRegisterPattern(), line) - if matchLine is not None: - ecxrData.extend(line.split()) - - # Next, put the eax/rax, ebx/rbx, etc. entries into a list of their own, - # then iterate - match = re.search(cdbRegisterPattern, line) - for instr in ecxrData: - match = re.search(cdbRegisterPattern, instr) - if match is not None: - register = match.group(1) - value = int(match.group(2), 16) - self.registers[register] = value - - # Crash instruction - # Start of crash instruction details - if line.startswith("FAULTING_IP"): - inCrashInstruction = True - continue - - if inCrashInstruction and not cInstruction: - if "PROCESS_NAME" in line: - inCrashInstruction = False - continue + if inEcxrData: + # 32-bit example: + # 0:000> .ecxr + # noqa eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 + # noqa eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc + # noqa cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 + # 64-bit example: + # 0:000> .ecxr + # noqa rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b + # noqa rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 + # noqa rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 + # noqa r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 + # noqa r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff + # r14=000000e87fbfd0e0 r15=0000000000000003 + # iopl=0 nv up ei pl nz na pe nc + # noqa cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 + if line.startswith("cs="): + inEcxrData = False + continue - # 64-bit binaries have a backtick in their addresses, - # e.g. 00007ff7`1e424e62 - lineWithoutBacktick = line.replace("`", "", 1) - if address and lineWithoutBacktick.startswith(address): - # 32-bit examples: - # 25d80b01 cc int 3 - # 00404c59 8b39 mov edi,dword ptr [ecx] + # Crash address + # Extract the eip/rip specifically for use later + if "eip=" in line: + address = line.split("eip=")[1].split()[0] + self.crashAddress = int(address, 16) + elif "rip=" in line: + address = line.split("rip=")[1].split()[0] + self.crashAddress = int(address, 16) + + # First extract the line + # 32-bit example: + # noqa eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 # 64-bit example: - # 00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] - cInstruction = line.split(None, 2)[-1] - # There may be multiple spaces inside the faulting instruction - cInstruction = " ".join(cInstruction.split()) - self.crashInstruction = cInstruction - - # Start of stack for crashing thread - if line.startswith("STACK_TEXT:"): - inCrashingThread = True - continue - - if inCrashingThread: - # 32-bit example: - # noqa "016fdc38 004b2387 01e104e8 016fe490 016fe490 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9" - # 64-bit example: - # noqa "000000e8`7fbfc040 00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13" - if ( - "STACK_COMMAND" in line - or "SYMBOL_NAME" in line - or "THREAD_SHA1_HASH_MOD_FUNC" in line - or "FAULTING_SOURCE_CODE" in line - ): - inCrashingThread = False + # noqa rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b + matchLine = re.search(RegisterHelper.getRegisterPattern(), line) + if matchLine is not None: + ecxrData.extend(line.split()) + + # Next, put the eax/rax, ebx/rbx, etc. entries into a list of their + # own, then iterate + match = re.search(cdbRegisterPattern, line) + for instr in ecxrData: + match = re.search(cdbRegisterPattern, instr) + if match is not None: + register = match.group(1) + value = int(match.group(2), 16) + self.registers[register] = value + + # Crash instruction + # Start of crash instruction details + if line.startswith("FAULTING_IP"): + inCrashInstruction = True continue - # Ignore cdb error and empty lines - if "Following frames may be wrong." in line or line.strip() == "": + if inCrashInstruction and not cInstruction: + if "PROCESS_NAME" in line: + inCrashInstruction = False + continue + + # 64-bit binaries have a backtick in their addresses, + # e.g. 00007ff7`1e424e62 + lineWithoutBacktick = line.replace("`", "", 1) + if address and lineWithoutBacktick.startswith(address): + # 32-bit examples: + # 25d80b01 cc int 3 + # 00404c59 8b39 mov edi,dword ptr [ecx] + # 64-bit example: + # noqa 00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] + cInstruction = line.split(None, 2)[-1] + # There may be multiple spaces inside the faulting instruction + cInstruction = " ".join(cInstruction.split()) + self.crashInstruction = cInstruction + + # Start of stack for crashing thread + if line.startswith("STACK_TEXT:"): + inCrashingThread = True continue - stackEntry = CDBCrashInfo.removeFilenameAndOffset(line) - stackEntry = CrashInfo.sanitizeStackFrame(stackEntry) - self.backtrace.append(stackEntry) + if inCrashingThread: + # 32-bit example: + # noqa "016fdc38 004b2387 01e104e8 016fe490 016fe490 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9" + # 64-bit example: + # noqa "000000e8`7fbfc040 00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13" + if ( + "STACK_COMMAND" in line + or "SYMBOL_NAME" in line + or "THREAD_SHA1_HASH_MOD_FUNC" in line + or "FAULTING_SOURCE_CODE" in line + ): + inCrashingThread = False + continue + + # Ignore cdb error and empty lines + if "Following frames may be wrong." in line or line.strip() == "": + continue + + stackEntry = CDBCrashInfo.removeFilenameAndOffset(line) + stackEntry = CrashInfo.sanitizeStackFrame(stackEntry) + self.backtrace.append(stackEntry) @staticmethod def removeFilenameAndOffset(stackEntry: str) -> str: @@ -1975,7 +1964,7 @@ def __init__( if not expectedIndex == index: raise RuntimeError( - f"Fatal error parsing TSan trace (Index mismatch, got index " + "Fatal error parsing TSan trace (Index mismatch, got index " f"{index} but expected {expectedIndex})" ) diff --git a/FTB/Signatures/CrashSignature.py b/FTB/Signatures/CrashSignature.py index c63b7f1b7..ede833b60 100644 --- a/FTB/Signatures/CrashSignature.py +++ b/FTB/Signatures/CrashSignature.py @@ -92,6 +92,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Match this signature against the given crash information @param crashInfo: The crash info to match the signature against + @return: True if the signature matches, False otherwise """ assert crashInfo.configuration is not None diff --git a/FTB/Signatures/RegisterHelper.py b/FTB/Signatures/RegisterHelper.py index 83a91e35a..06a264bc8 100644 --- a/FTB/Signatures/RegisterHelper.py +++ b/FTB/Signatures/RegisterHelper.py @@ -86,7 +86,7 @@ def getRegisterPattern() -> str: return ( "(" + "|".join(["%s"] * len(validRegisters)) - % tuple(["|".join(i) for i in validRegisters.values()]) + % tuple("|".join(i) for i in validRegisters.values()) + ")" ) diff --git a/FTB/Signatures/Symptom.py b/FTB/Signatures/Symptom.py index 16bf2927c..f41832795 100644 --- a/FTB/Signatures/Symptom.py +++ b/FTB/Signatures/Symptom.py @@ -46,6 +46,7 @@ def fromJSONObject(obj: dict[str, object]) -> Symptom: @type obj: map @param obj: Object as decoded from JSON + @return: Symptom subclass instance matching the given object """ if "type" not in obj: @@ -76,6 +77,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against + @return: True if the symptom matches, False otherwise """ return @@ -106,6 +108,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against + @return: True if the symptom matches, False otherwise """ checkedOutput = [] @@ -152,6 +155,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against + @return: True if the symptom matches, False otherwise """ @@ -179,6 +183,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against + @return: True if the symptom matches, False otherwise """ return self.stackSize.matches(len(crashInfo.backtrace)) @@ -199,6 +204,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against + @return: True if the symptom matches, False otherwise """ # In case the crash address is not available, @@ -229,6 +235,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against + @return: True if the symptom matches, False otherwise """ if crashInfo.crashInstruction is None: @@ -262,6 +269,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against + @return: True if the symptom matches, False otherwise """ @@ -296,6 +304,7 @@ def matches(self, crashInfo: CrashInfo) -> bool: Check if the symptom matches the given crash information @param crashInfo: The crash information to check against + @return: True if the symptom matches, False otherwise """ diff --git a/FTB/Signatures/tests/resources/apple-10-7-crash-report-example.txt b/FTB/Signatures/tests/resources/apple-10-7-crash-report-example.txt deleted file mode 100644 index 35f767d20..000000000 --- a/FTB/Signatures/tests/resources/apple-10-7-crash-report-example.txt +++ /dev/null @@ -1,238 +0,0 @@ -Process: js [55788] -Path: /Users/*/js -Identifier: js -Version: ??? (???) -Code Type: X86-64 (Native) -Parent Process: python [18478] - -Date/Time: 2017-03-12 15:55:36.820 -0700 -OS Version: Mac OS X Server 10.7.2 (11C74) -Report Version: 9 - -Crashed Thread: 0 Dispatch queue: com.apple.main-thread - -Exception Type: EXC_BAD_ACCESS (SIGSEGV) -Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 - -VM Regions Near 0: ---> -__TEXT 000000010542c000-00000001062b9000 [ 14.6M] r-x/rwx SM=COW /Users/* - -Application Specific Information: -objc[55788]: garbage collection is OFF - -Thread 0 Crashed:: Dispatch queue: com.apple.main-thread -0 js 0x000000010578119d js::jit::LIRGenerator::visitNearbyInt(js::jit::MNearbyInt*) + 669 -1 js 0x00000001057a97d8 js::jit::LIRGenerator::visitInstruction(js::jit::MInstruction*) + 56 -2 js 0x00000001057a9eaf js::jit::LIRGenerator::visitBlock(js::jit::MBasicBlock*) + 447 -3 js 0x00000001057aa58b js::jit::LIRGenerator::generate() + 203 -4 js 0x00000001056cb564 js::jit::GenerateLIR(js::jit::MIRGenerator*) + 468 -5 js 0x00000001056cc08f js::jit::CompileBackEnd(js::jit::MIRGenerator*) + 79 -6 js 0x00000001056ce1b0 _ZN2js3jitL7CompileEP9JSContextN2JS6HandleIP8JSScriptEEPNS0_13BaselineFrameEPhb + 4368 -7 js 0x00000001056cea0a js::jit::IonCompileScriptForBaseline(JSContext*, js::jit::BaselineFrame*, unsigned char*) + 890 -8 ??? 0x00001712df097601 0 + 25369818789377 -9 ??? 0x00001712df170c91 0 + 25369819679889 -10 ??? 0x0000000107f32b08 0 + 4428344072 -11 ??? 0x00001712df093e3b 0 + 25369818775099 -12 js 0x00000001056268b3 _ZL13EnterBaselineP9JSContextRN2js3jit12EnterJitDataE + 723 - -Thread 1: -0 libsystem_kernel.dylib 0x00007fff9905167a mach_msg_trap + 10 -1 libsystem_kernel.dylib 0x00007fff99050d71 mach_msg + 73 -2 libsystem_kernel.dylib 0x00007fff99049d39 semaphore_create + 148 -3 libsystem_c.dylib 0x00007fff979580f8 new_sem_from_pool + 155 -4 libsystem_c.dylib 0x00007fff9795919a _pthread_exit + 684 -5 libsystem_c.dylib 0x00007fff979578ca _pthread_start + 346 -6 libsystem_c.dylib 0x00007fff9795ab75 thread_start + 13 - -Thread 2: -0 libsystem_kernel.dylib 0x00007fff9905167a mach_msg_trap + 10 -1 libsystem_kernel.dylib 0x00007fff99050d71 mach_msg + 73 -2 js 0x0000000105e2a6b0 _ZL26MachExceptionHandlerThreadP9JSContext + 416 -3 js 0x0000000105457c6f _ZN2js6detail16ThreadTrampolineIRFvP9JSContextEJRS3_EE5StartEPv + 15 -4 libsystem_c.dylib 0x00007fff979578bf _pthread_start + 335 -5 libsystem_c.dylib 0x00007fff9795ab75 thread_start + 13 - -Thread 0 crashed with X86 Thread State (64-bit): -rax: 0x0000000000000000 rbx: 0x0000000107fb4a40 rcx: 0x0000000000000200 rdx: 0x00007fff65026e14 -rdi: 0x0000010000000203 rsi: 0x0000020000000200 rbp: 0x00007fff65026e90 rsp: 0x00007fff65026e60 -r8: 0x00007fff65026e1c r9: 0x00007fff65026e18 r10: 0x0000000000000081 r11: 0x0000000000000246 -r12: 0x0000000000000006 r13: 0x0000000107fb2e80 r14: 0x00007fff65027ef0 r15: 0x0000000107fb4a40 -rip: 0x000000010578119d rfl: 0x0000000000010202 cr2: 0x0000000000000000 -Logical CPU: 1 - -Binary Images: -0x10542c000 - 0x1062b8ff7 +js (??? - ???) <8183C357-C5B2-3F40-A0A5-E02D8E9FD1AD> /Users/*/js -0x1074a6000 - 0x1074a8fff com.apple.ExceptionHandling (1.5 - 10) /System/Library/Frameworks/ExceptionHandling.framework/Versions/A/ExceptionHandling -0x1074b1000 - 0x1074d7ff7 +libmozglue.dylib (??? - ???) <45B64222-11E5-3F19-A8DC-26D5A9B962B0> /Users/*/libmozglue.dylib -0x1074f1000 - 0x10776dff7 +libnss3.dylib (??? - ???) /Users/*/libnss3.dylib -0x7fff6502c000 - 0x7fff65060ac7 dyld (195.5 - ???) /usr/lib/dyld -0x7fff8df6e000 - 0x7fff8dfadfff com.apple.AE (527.7 - 527.7) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE -0x7fff8e22a000 - 0x7fff8e292ff7 com.apple.audio.CoreAudio (4.0.1 - 4.0.1) <7966E3BE-376B-371A-A21D-9BD763C0BAE7> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio -0x7fff8e293000 - 0x7fff8e298ff7 libsystem_network.dylib (??? - ???) <5DE7024E-1D2D-34A2-80F4-08326331A75B> /usr/lib/system/libsystem_network.dylib -0x7fff8e764000 - 0x7fff8e76aff7 libunwind.dylib (30.0.0 - compatibility 1.0.0) <1E9C6C8C-CBE8-3F4B-A5B5-E03E3AB53231> /usr/lib/system/libunwind.dylib -0x7fff8e76b000 - 0x7fff8e791ff7 com.apple.framework.familycontrols (3.0 - 300) <41A6DFC2-EAF5-390A-83A1-C8832528705C> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls -0x7fff8ee1e000 - 0x7fff8ee1efff com.apple.ApplicationServices (41 - 41) <89B6AD5B-5C75-3E83-8C2B-AA7F4C55E400> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices -0x7fff8ee80000 - 0x7fff8eeb0ff7 com.apple.DictionaryServices (1.2.1 - 158.2) <3FC86118-7553-38F7-8916-B329D2E94476> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices -0x7fff8eeb1000 - 0x7fff8efc9ff7 com.apple.DesktopServices (1.6.1 - 1.6.1) <4418EAA6-7163-3A77-ABD3-F8289796C81A> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv -0x7fff8efca000 - 0x7fff8f02afff libvDSP.dylib (325.4.0 - compatibility 1.0.0) <3A7521E6-5510-3FA7-AB65-79693A7A5839> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib -0x7fff8f12e000 - 0x7fff8f152ff7 com.apple.RemoteViewServices (1.2 - 39) <862849C8-84C1-32A1-B87E-B29E74778C9F> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices -0x7fff8f1a2000 - 0x7fff8f2fbfff com.apple.audio.toolbox.AudioToolbox (1.7.1 - 1.7.1) <4877267E-F736-3019-85D3-40A32A042A80> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox -0x7fff8f2fc000 - 0x7fff8f435fef com.apple.vImage (5.1 - 5.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage -0x7fff8f48a000 - 0x7fff8f48efff libdyld.dylib (195.5.0 - compatibility 1.0.0) <380C3F44-0CA7-3514-8080-46D1C9DF4FCD> /usr/lib/system/libdyld.dylib -0x7fff8f60f000 - 0x7fff8f62cff7 libxpc.dylib (77.17.0 - compatibility 1.0.0) <72A16104-2F23-3C22-B474-1953F06F9376> /usr/lib/system/libxpc.dylib -0x7fff8f62d000 - 0x7fff8f634ff7 com.apple.CommerceCore (1.0 - 17) <3894FE48-EDCE-30E9-9796-E2F959D92704> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore -0x7fff8f706000 - 0x7fff8f7a5fff com.apple.LaunchServices (480.21 - 480.21) <6BFADEA9-5BC1-3B53-A013-488EB7F1AB57> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices -0x7fff8f7a6000 - 0x7fff8f819fff libstdc++.6.dylib (52.0.0 - compatibility 7.0.0) <6BDD43E4-A4B1-379E-9ED5-8C713653DFF2> /usr/lib/libstdc++.6.dylib -0x7fff8f81a000 - 0x7fff8f85cff7 libcommonCrypto.dylib (55010.0.0 - compatibility 1.0.0) /usr/lib/system/libcommonCrypto.dylib -0x7fff8f85d000 - 0x7fff8f86fff7 libbsm.0.dylib (??? - ???) <349BB16F-75FA-363F-8D98-7A9C3FA90A0D> /usr/lib/libbsm.0.dylib -0x7fff8f870000 - 0x7fff8f876fff IOSurface (??? - ???) <03F95CAC-569C-3573-B3D7-2D211B8BDC56> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface -0x7fff8f8a5000 - 0x7fff8fe89fff libBLAS.dylib (??? - ???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib -0x7fff8fe8a000 - 0x7fff8feffff7 libc++.1.dylib (19.0.0 - compatibility 1.0.0) /usr/lib/libc++.1.dylib -0x7fff8ff00000 - 0x7fff90224fff com.apple.HIToolbox (1.8 - ???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox -0x7fff90282000 - 0x7fff902d6ff7 com.apple.ScalableUserInterface (1.0 - 1) <33563775-C662-313D-B7FA-3D575A9F3D41> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableUserInterface.framework/Versions/A/ScalableUserInterface -0x7fff902e5000 - 0x7fff902f0ff7 libc++abi.dylib (14.0.0 - compatibility 1.0.0) <8FF3D766-D678-36F6-84AC-423C878E6D14> /usr/lib/libc++abi.dylib -0x7fff9034e000 - 0x7fff9038ffff com.apple.QD (3.12 - ???) <983D6E1E-B8BD-3260-A960-13727351D867> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD -0x7fff90390000 - 0x7fff903a6fff libGL.dylib (??? - ???) <6A473BF9-4D35-34C6-9F8B-86B68091A9AF> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -0x7fff903d1000 - 0x7fff903d7fff libGFXShared.dylib (??? - ???) <343AE6C0-EB02-333C-8D35-DF6093B92758> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib -0x7fff90c7b000 - 0x7fff90c7cff7 libremovefile.dylib (21.0.0 - compatibility 1.0.0) <001E87FF-97DF-328D-B22F-16E3ACEF8864> /usr/lib/system/libremovefile.dylib -0x7fff90c7d000 - 0x7fff90d5efff com.apple.CoreServices.OSServices (478.29 - 478.29) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices -0x7fff90da9000 - 0x7fff90daafff liblangid.dylib (??? - ???) /usr/lib/liblangid.dylib -0x7fff90f64000 - 0x7fff90fb2fff libauto.dylib (??? - ???) /usr/lib/libauto.dylib -0x7fff90fb3000 - 0x7fff90fb8fff libGIF.dylib (??? - ???) <393E2DB5-9479-39A6-A75A-B5F20B852532> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib -0x7fff9116a000 - 0x7fff91187fff libPng.dylib (??? - ???) <3C70A94C-9442-3E11-AF51-C1B0EF81680E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib -0x7fff911b0000 - 0x7fff913b2fff libicucore.A.dylib (46.1.0 - compatibility 1.0.0) <38CD6ED3-C8E4-3CCD-89AC-9C3198803101> /usr/lib/libicucore.A.dylib -0x7fff913b3000 - 0x7fff913b3fff com.apple.CoreServices (53 - 53) <043C8026-8EDD-3241-B090-F589E24062EF> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices -0x7fff914f7000 - 0x7fff914fafff libCoreVMClient.dylib (??? - ???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib -0x7fff91500000 - 0x7fff91819ff7 com.apple.Foundation (6.7.1 - 833.20) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation -0x7fff91826000 - 0x7fff91827fff libunc.dylib (24.0.0 - compatibility 1.0.0) <337960EE-0A85-3DD0-A760-7134CF4C0AFF> /usr/lib/system/libunc.dylib -0x7fff91828000 - 0x7fff9183aff7 libz.1.dylib (1.2.5 - compatibility 1.0.0) <30CBEF15-4978-3DED-8629-7109880A19D4> /usr/lib/libz.1.dylib -0x7fff9183b000 - 0x7fff91892fff libTIFF.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib -0x7fff91916000 - 0x7fff91935fff libresolv.9.dylib (46.0.0 - compatibility 1.0.0) <33263568-E6F3-359C-A4FA-66AD1300F7D4> /usr/lib/libresolv.9.dylib -0x7fff9196e000 - 0x7fff91979fff com.apple.CommonAuth (2.1 - 2.0) /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth -0x7fff91996000 - 0x7fff9199dfff libcopyfile.dylib (85.1.0 - compatibility 1.0.0) <0AB51EE2-E914-358C-AC19-47BC024BDAE7> /usr/lib/system/libcopyfile.dylib -0x7fff9199e000 - 0x7fff9259fff7 com.apple.AppKit (6.7.2 - 1138.23) <5CD2C850-4F52-3BA2-BA11-3107DFD2D23C> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit -0x7fff932a7000 - 0x7fff932aefff com.apple.NetFS (4.0 - 4.0) <433EEE54-E383-3505-9154-45B909FD3AF0> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS -0x7fff93353000 - 0x7fff93527fff com.apple.CoreFoundation (6.7.1 - 635.15) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation -0x7fff93528000 - 0x7fff9352dfff com.apple.OpenDirectory (10.7 - 146) <91A87249-6A2F-3F89-A8DE-0E95C0B54A3A> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory -0x7fff9352e000 - 0x7fff93543fff com.apple.speech.synthesis.framework (4.0.74 - 4.0.74) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis -0x7fff93977000 - 0x7fff9399eff7 com.apple.PerformanceAnalysis (1.10 - 10) /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis -0x7fff942b1000 - 0x7fff94778fff FaceCoreLight (1.4.7 - compatibility 1.0.0) /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLight -0x7fff94779000 - 0x7fff947a4ff7 libxslt.1.dylib (3.24.0 - compatibility 3.0.0) <4DB5ED11-004B-36B5-AE5F-2AB714754241> /usr/lib/libxslt.1.dylib -0x7fff947fa000 - 0x7fff9486afff com.apple.datadetectorscore (3.0 - 179.4) <2A822A13-94B3-3A43-8724-98FDF698BB12> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore -0x7fff94889000 - 0x7fff9488bfff libquarantine.dylib (36.0.0 - compatibility 1.0.0) <4C3BFBC7-E592-3939-B376-1C2E2D7C5389> /usr/lib/system/libquarantine.dylib -0x7fff9488c000 - 0x7fff948bfff7 com.apple.GSS (2.1 - 2.0) <9A2C9736-DA10-367A-B376-2C7A584E6C7A> /System/Library/Frameworks/GSS.framework/Versions/A/GSS -0x7fff948fa000 - 0x7fff9495cfff com.apple.coreui (1.2.1 - 164.1) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI -0x7fff9495d000 - 0x7fff9495efff libdnsinfo.dylib (395.7.0 - compatibility 1.0.0) <37FEFE78-BCB5-37EC-8E99-747469BCA4C7> /usr/lib/system/libdnsinfo.dylib -0x7fff9495f000 - 0x7fff94976fff com.apple.MultitouchSupport.framework (220.62.1 - 220.62.1) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport -0x7fff950a2000 - 0x7fff950b9fff com.apple.CFOpenDirectory (10.7 - 146) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory -0x7fff950ba000 - 0x7fff950cdff7 libCRFSuite.dylib (??? - ???) <0B76941F-218E-30C8-B6DE-E15919F8DBEB> /usr/lib/libCRFSuite.dylib -0x7fff950ce000 - 0x7fff95234fff com.apple.CFNetwork (520.2.5 - 520.2.5) <406712D9-3F0C-3763-B4EB-868D01F1F042> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork -0x7fff95457000 - 0x7fff954dafef com.apple.Metadata (10.7.0 - 627.20) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata -0x7fff95501000 - 0x7fff955dffff com.apple.ImageIO.framework (3.1.1 - 3.1.1) <13E549F8-5BD6-3BAE-8C33-1D0BD269C081> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO -0x7fff955e0000 - 0x7fff95609fff libJPEG.dylib (??? - ???) <64D079F9-256A-323B-A837-84628B172F21> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib -0x7fff9560a000 - 0x7fff95685ff7 com.apple.print.framework.PrintCore (7.1 - 366.1) <3F140DEB-9F87-3672-97CC-F983752581AC> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore -0x7fff956ae000 - 0x7fff956b0fff libCVMSPluginSupport.dylib (??? - ???) <61D89F3C-C64D-3733-819F-8AAAE4E2E993> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib -0x7fff956b1000 - 0x7fff956bffff libdispatch.dylib (187.7.0 - compatibility 1.0.0) <712AAEAC-AD90-37F7-B71F-293FF8AE8723> /usr/lib/system/libdispatch.dylib -0x7fff956c0000 - 0x7fff959dcff7 com.apple.CoreServices.CarbonCore (960.18 - 960.18) <6020C3FB-6125-3EAE-A55D-1E77E38BEDEA> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore -0x7fff959df000 - 0x7fff959dffff com.apple.Cocoa (6.6 - ???) <7EC4D759-B2A6-3A99-AC75-809FED1500C6> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa -0x7fff95a01000 - 0x7fff95a1dff7 com.apple.GenerationalStorage (1.0 - 125) <31F60175-E38D-3C63-8D95-32CFE7062BCB> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage -0x7fff95a81000 - 0x7fff95a8fff7 libkxld.dylib (??? - ???) /usr/lib/system/libkxld.dylib -0x7fff95a90000 - 0x7fff95a91fff libsystem_sandbox.dylib (??? - ???) /usr/lib/system/libsystem_sandbox.dylib -0x7fff95aa1000 - 0x7fff95aacff7 com.apple.speech.recognition.framework (4.0.19 - 4.0.19) <48607E6E-8612-3267-9184-E948B1863B32> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition -0x7fff95c92000 - 0x7fff95cddff7 com.apple.SystemConfiguration (1.11.1 - 1.11) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration -0x7fff95ce2000 - 0x7fff95de5fff libsqlite3.dylib (9.6.0 - compatibility 9.0.0) <7F60B0FF-4946-3639-89AB-B540D318B249> /usr/lib/libsqlite3.dylib -0x7fff95e2f000 - 0x7fff95e6eff7 libGLImage.dylib (??? - ???) <2D1D8488-EC5F-3229-B983-CFDE0BB37586> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib -0x7fff95e73000 - 0x7fff95f26fff com.apple.CoreText (220.11.0 - ???) <4EA8E2DF-542D-38D5-ADB9-C0DAA73F898B> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText -0x7fff95f2a000 - 0x7fff95f2ffff libpam.2.dylib (3.0.0 - compatibility 3.0.0) /usr/lib/libpam.2.dylib -0x7fff95f30000 - 0x7fff95fd2ff7 com.apple.securityfoundation (5.0 - 55005) <2814D17E-E6BB-30A2-A62E-2D481AF514F2> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation -0x7fff9633c000 - 0x7fff96614ff7 com.apple.security (7.0 - 55010) <93713FF4-FE86-3B4C-8150-5FCC7F3320C8> /System/Library/Frameworks/Security.framework/Versions/A/Security -0x7fff9661a000 - 0x7fff966e1ff7 com.apple.ColorSync (4.7.0 - 4.7.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync -0x7fff966e2000 - 0x7fff9673dff7 com.apple.HIServices (1.10 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices -0x7fff9673e000 - 0x7fff96762fff com.apple.Kerberos (1.0 - 1) <1F826BCE-DA8F-381D-9C4C-A36AA0EA1CB9> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos -0x7fff96763000 - 0x7fff96777ff7 com.apple.LangAnalysis (1.7.0 - 1.7.0) <04C31EF0-912A-3004-A08F-CEC27030E0B2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis -0x7fff96778000 - 0x7fff967fcff7 com.apple.ApplicationServices.ATS (317.5.0 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS -0x7fff9682d000 - 0x7fff9682dfff libkeymgr.dylib (23.0.0 - compatibility 1.0.0) <61EFED6A-A407-301E-B454-CD18314F0075> /usr/lib/system/libkeymgr.dylib -0x7fff9682e000 - 0x7fff96881fff libFontRegistry.dylib (??? - ???) <57FBD85F-41A6-3DB9-B5F4-FCC6B260F1AD> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib -0x7fff96c5d000 - 0x7fff96c63fff com.apple.DiskArbitration (2.4.1 - 2.4.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration -0x7fff96c6b000 - 0x7fff96d70ff7 libFontParser.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib -0x7fff96d7d000 - 0x7fff96d80fff libRadiance.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib -0x7fff96dbf000 - 0x7fff96fd9fef com.apple.CoreData (104 - 358.12) <33B1FA75-7970-3751-9DCC-FF809D3E1FA2> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData -0x7fff96fe7000 - 0x7fff96ff5fff com.apple.NetAuth (3.1 - 3.1) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth -0x7fff97039000 - 0x7fff9712efff libiconv.2.dylib (7.0.0 - compatibility 7.0.0) <5C40E880-0706-378F-B864-3C2BD922D926> /usr/lib/libiconv.2.dylib -0x7fff9712f000 - 0x7fff9723bfff libcrypto.0.9.8.dylib (44.0.0 - compatibility 0.9.8) <3A8E1F89-5E26-3C8B-B538-81F5D61DBF8A> /usr/lib/libcrypto.0.9.8.dylib -0x7fff97546000 - 0x7fff97573ff7 com.apple.opencl (1.50.63 - 1.50.63) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL -0x7fff97637000 - 0x7fff9763bfff libmathCommon.A.dylib (2026.0.0 - compatibility 1.0.0) /usr/lib/system/libmathCommon.A.dylib -0x7fff9763c000 - 0x7fff9763efff com.apple.TrustEvaluationAgent (2.0 - 1) <1F31CAFF-C1C6-33D3-94E9-11B721761DDF> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent -0x7fff97858000 - 0x7fff97880ff7 com.apple.CoreVideo (1.7 - 70.1) <98F917B2-FB53-3EA3-B548-7E97B38309A7> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo -0x7fff97909000 - 0x7fff979e6fef libsystem_c.dylib (763.12.0 - compatibility 1.0.0) /usr/lib/system/libsystem_c.dylib -0x7fff979e7000 - 0x7fff97b86fff com.apple.QuartzCore (1.7 - 270.0) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore -0x7fff97b87000 - 0x7fff97b8ffff libsystem_dnssd.dylib (??? - ???) <998E3778-7B43-301C-9053-12045AB8544D> /usr/lib/system/libsystem_dnssd.dylib -0x7fff97b90000 - 0x7fff97c34fff com.apple.ink.framework (1.3.2 - 110) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink -0x7fff97c35000 - 0x7fff97c44ff7 com.apple.opengl (1.7.5 - 1.7.5) <2945F1A6-910C-3596-9988-5701B04BD821> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL -0x7fff981c8000 - 0x7fff9843bfff com.apple.CoreImage (7.82 - 1.0.1) <282801B6-5D80-3E2C-88A4-00FE29906D5A> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage -0x7fff98441000 - 0x7fff9844bff7 liblaunch.dylib (392.35.0 - compatibility 1.0.0) <8F8BB206-CECA-33A5-A105-4A01C3ED5D23> /usr/lib/system/liblaunch.dylib -0x7fff9844c000 - 0x7fff984e2ff7 libvMisc.dylib (325.4.0 - compatibility 1.0.0) <642D8D54-F9F5-3FBB-A96C-EEFE94C6278B> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib -0x7fff9850f000 - 0x7fff985f3def libobjc.A.dylib (228.0.0 - compatibility 1.0.0) /usr/lib/libobjc.A.dylib -0x7fff985f4000 - 0x7fff985f4fff com.apple.Accelerate (1.7 - Accelerate 1.7) <82DDF6F5-FBC3-323D-B71D-CF7ABC5CF568> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate -0x7fff986ff000 - 0x7fff98766fff com.apple.Symbolication (1.2 - 87) /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication -0x7fff98786000 - 0x7fff98786fff com.apple.vecLib (3.7 - vecLib 3.7) <9A58105C-B36E-35B5-812C-4ED693F2618F> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib -0x7fff98787000 - 0x7fff98889ff7 libxml2.2.dylib (10.3.0 - compatibility 10.0.0) <22F1D1B6-1761-3687-9EFD-036EA15FB2E4> /usr/lib/libxml2.2.dylib -0x7fff9888a000 - 0x7fff98997fff libJP2.dylib (??? - ???) <6052C973-9354-35CB-AAB9-31D00D8786F9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib -0x7fff989a3000 - 0x7fff989a8fff libcompiler_rt.dylib (6.0.0 - compatibility 1.0.0) <98ECD5F6-E85C-32A5-98CD-8911230CB66A> /usr/lib/system/libcompiler_rt.dylib -0x7fff989a9000 - 0x7fff989fbff7 libGLU.dylib (??? - ???) <3C9153A0-8499-3DC0-AAA4-9FA6E488BE13> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib -0x7fff989fc000 - 0x7fff989fcfff com.apple.audio.units.AudioUnit (1.7.1 - 1.7.1) <04C10813-CCE5-3333-8C72-E8E35E417B3B> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit -0x7fff98a01000 - 0x7fff98a6bfff com.apple.framework.IOKit (2.0 - ???) <87D55F1D-CDB5-3D13-A5F9-98EA4E22F8EE> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit -0x7fff98cf7000 - 0x7fff98d91ff7 com.apple.SearchKit (1.4.0 - 1.4.0) <4E70C394-773E-3A4B-A93C-59A88ABA9509> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit -0x7fff98dcd000 - 0x7fff98dcefff libDiagnosticMessagesClient.dylib (??? - ???) <3DCF577B-F126-302B-BCE2-4DB9A95B8598> /usr/lib/libDiagnosticMessagesClient.dylib -0x7fff98dcf000 - 0x7fff98dcffff com.apple.Accelerate.vecLib (3.7 - vecLib 3.7) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib -0x7fff98dd0000 - 0x7fff98e0afef com.apple.DebugSymbols (2.1 - 85) <7E0E17D9-C8D4-3117-B36A-506929F6FF72> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols -0x7fff98e0b000 - 0x7fff98e46ff7 libsystem_info.dylib (??? - ???) <9C8C2DCB-96DB-3471-9DCE-ADCC26BE2DD4> /usr/lib/system/libsystem_info.dylib -0x7fff98ffb000 - 0x7fff9903bff7 libcups.2.dylib (2.9.0 - compatibility 2.0.0) /usr/lib/libcups.2.dylib -0x7fff9903c000 - 0x7fff9905cfff libsystem_kernel.dylib (1699.24.8 - compatibility 1.0.0) /usr/lib/system/libsystem_kernel.dylib -0x7fff9905d000 - 0x7fff9948afff libLAPACK.dylib (??? - ???) <4F2E1055-2207-340B-BB45-E4F16171EE0D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib -0x7fff9948b000 - 0x7fff99494ff7 libsystem_notify.dylib (80.1.0 - compatibility 1.0.0) /usr/lib/system/libsystem_notify.dylib -0x7fff994a5000 - 0x7fff994a6ff7 libsystem_blocks.dylib (53.0.0 - compatibility 1.0.0) <8BCA214A-8992-34B2-A8B9-B74DEACA1869> /usr/lib/system/libsystem_blocks.dylib -0x7fff995f1000 - 0x7fff9961efe7 libSystem.B.dylib (159.1.0 - compatibility 1.0.0) <095FDD3C-3961-3865-A59B-A5B0A4B8B923> /usr/lib/libSystem.B.dylib -0x7fff99d29000 - 0x7fff99d97fff com.apple.CoreSymbolication (2.1 - 67) <194A355B-58C7-3B1E-A714-00F71ACCDB0A> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication -0x7fff99dea000 - 0x7fff99df0fff libmacho.dylib (800.0.0 - compatibility 1.0.0) <165514D7-1BFA-38EF-A151-676DCD21FB64> /usr/lib/system/libmacho.dylib -0x7fff99df5000 - 0x7fff99dfafff libcache.dylib (47.0.0 - compatibility 1.0.0) <1571C3AB-BCB2-38CD-B3B2-C5FC3F927C6A> /usr/lib/system/libcache.dylib -0x7fff9a05b000 - 0x7fff9a0e0ff7 com.apple.Heimdal (2.1 - 2.0) /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal -0x7fff9a0e1000 - 0x7fff9a7f4587 com.apple.CoreGraphics (1.600.0 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics - -External Modification Summary: -Calls made by other processes targeting this process: -task_for_pid: 0 -thread_create: 0 -thread_set_state: 0 -Calls made by this process: -task_for_pid: 0 -thread_create: 0 -thread_set_state: 0 -Calls made by all processes on this machine: -task_for_pid: 38830 -thread_create: 0 -thread_set_state: 0 - -VM Region Summary: -ReadOnly portion of Libraries: Total=162.1M resident=162.1M(100%) swapped_out_or_unallocated=0K(0%) -Writable regions: Total=33.8M written=10.5M(31%) resident=14.7M(43%) swapped_out=0K(0%) unallocated=19.2M(57%) - -REGION TYPE VIRTUAL -=========== ======= -(null) (reserved) 176K reserved VM address space (unallocated) -MALLOC 9404K -MALLOC guard page 16K -STACK GUARD 56.0M -Stack 9232K -VM_ALLOCATE 1.0G -__CI_BITMAP 80K -__DATA 22.6M -__IMAGE 1256K -__LINKEDIT 55.2M -__TEXT 106.9M -__UNICODE 544K -shared memory 12K -=========== ======= -TOTAL 1.3G -TOTAL, minus reserved VM space 1.3G \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/apple-crash-report-example.txt b/FTB/Signatures/tests/resources/apple-crash-report-example.txt deleted file mode 100644 index 3a34a720c..000000000 --- a/FTB/Signatures/tests/resources/apple-crash-report-example.txt +++ /dev/null @@ -1,59 +0,0 @@ -Process: js-dbg-64-dm-darwin-a523d4c7efe2 [27938] -Path: /Users/USER/*/js-dbg-64-dm-darwin-a523d4c7efe2 -Identifier: js-dbg-64-dm-darwin-a523d4c7efe2 -Version: ??? -Code Type: X86-64 (Native) -Parent Process: bash [27933] -Responsible: iTerm2 [91188] -User ID: 501 - -Date/Time: 2015-11-19 17:01:28.214 -0800 -OS Version: Mac OS X 10.11.1 (15B42) -Report Version: 11 -Anonymous UUID: 2D34C956-9487-7B72-EFCB-E61B989F1869 - - -Time Awake Since Boot: 25000 seconds - -System Integrity Protection: enabled - -Crashed Thread: 0 Dispatch queue: com.apple.main-thread - -Exception Type: EXC_BAD_ACCESS (SIGSEGV) -Exception Codes: KERN_PROTECTION_FAILURE at 0x00007fff5f3fff98 - -VM Regions Near 0x7fff5f3fff98: - Stack 00007000034c5000-0000700003547000 [ 520K] rw-/rwx SM=COW thread 59 ---> STACK GUARD 00007fff5bc00000-00007fff5f400000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0 - Stack 00007fff5f400000-00007fff5fc00000 [ 8192K] rw-/rwx SM=PRV thread 0 - -Thread 0 Crashed:: Dispatch queue: com.apple.main-thread -0 js-dbg-64-dm-darwin-a523d4c7efe2 0x00000001004b04c4 js::jit::MacroAssembler::Pop(js::jit::Register) + 180 (MacroAssembler-inl.h:50) -1 js-dbg-64-dm-darwin-a523d4c7efe2 0x0000000100395e01 js::jit::ICGetPropCallNativeCompiler::generateStubCode(js::jit::MacroAssembler&) + 1329 (SharedIC.cpp:3701) -2 js-dbg-64-dm-darwin-a523d4c7efe2 0x0000000100385112 js::jit::ICStubCompiler::getStubCode() + 242 (SharedIC.cpp:734) -3 js-dbg-64-dm-darwin-a523d4c7efe2 0x00000001003961e5 js::jit::ICGetPropCallNativeCompiler::getStub(js::jit::ICStubSpace*) + 245 (SharedIC.cpp:3721) -4 js-dbg-64-dm-darwin-a523d4c7efe2 0x000000010038fe57 js::jit::DoGetPropFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICGetProp_Fallback*, JS::MutableHandle, JS::MutableHandle) + 7687 (SharedIC.h:2872) -5 ??? 0x0000000101e48547 0 + 4326720839 -6 libsystem_c.dylib 0x00007fff841e10ff __cxa_finalize_ranges + 345 -7 XUL 0x0000000102cff002 0x101c38000 + 17592322 -8 com.apple.AppKit 0x00007fff957c91c5 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454 - -Thread 1: -0 libsystem_kernel.dylib 0x00007fff9700fc96 mach_msg_trap + 10 -1 libsystem_kernel.dylib 0x00007fff9700f0d7 mach_msg + 55 -2 js-dbg-64-dm-darwin-a523d4c7efe2 0x00000001000e0ebf AsmJSMachExceptionHandlerThread(void*) + 415 (AsmJSSignalHandlers.cpp:950) -3 js-dbg-64-dm-darwin-a523d4c7efe2 0x0000000100720c3f nspr::Thread::ThreadRoutine(void*) + 31 (Utility.h:369) -4 libsystem_pthread.dylib 0x00007fff96ef29b1 _pthread_body + 131 -5 libsystem_pthread.dylib 0x00007fff96ef292e _pthread_start + 168 -6 libsystem_pthread.dylib 0x00007fff96ef0385 thread_start + 13 - -Thread 0 crashed with X86 Thread State (64-bit): - rax: 0x0000000000000000 rbx: 0x00007fff7bb75bd0 rcx: 0x0000010000000203 rdx: 0x0000020000000200 - rdi: 0x00007fff7bb751e8 rsi: 0x0000000000012068 rbp: 0x00007fff5fbf95b0 rsp: 0x00007fff5fbf95a0 - r8: 0x0000000000000040 r9: 0x00007fff7bb751e0 r10: 0xffffffffffffffff r11: 0x00007fff8c7a7201 - r12: 0x00000000001e374a r13: 0x00007fff5fbf9680 r14: 0x00007fff5fbfa228 r15: 0x0000000000000002 - rip: 0x00000001004b04c4 rfl: 0x0000000000010206 cr2: 0x0000000000000000 - -Logical CPU: 0 -Error Code: 0x00000006 -Trap Number: 14 diff --git a/FTB/Signatures/tests/resources/cdb-10c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-10c-crashlog.txt deleted file mode 100644 index def0ed4fc..000000000 --- a/FTB/Signatures/tests/resources/cdb-10c-crashlog.txt +++ /dev/null @@ -1,214 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-32-prof-windows-42c95d88aaaa.exe.4652.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 9600 MP (16 procs) Free x86 compatible -Product: Server, suite: TerminalServer SingleUserTS -Machine Name: -Debug session time: Tue Oct 4 12:35:05.000 2016 (UTC + 0:00) -System Uptime: not available -Process Uptime: not available -...................................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -eax=00000000 ebx=00000000 ecx=5f7b6461 edx=00000000 esi=00000003 edi=00000003 -eip=774ec7ec esp=020ddc64 ebp=020dddec iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 -Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -ntdll+0x3c7ec: -774ec7ec c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=06fda948 ebx=020de8dc ecx=5f7b6461 edx=00000000 esi=1c2fbaab edi=020de910 -eip=1c2fbbb0 esp=020de910 ebp=00000018 iopl=0 nv up ei pl zr na pe cy -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000247 -1c2fbbb0 cc int 3 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -*** WARNING: Unable to verify timestamp for kernel32.dll -*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll -*** WARNING: Unable to verify checksum for js-32-prof-windows-42c95d88aaaa.exe -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll+0x3c7ec: -774ec7ec c21400 ret 14h -774ec7ef 90 nop -774ec7f0 b85b000000 mov eax,5Bh -774ec7f5 64ff15c0000000 call dword ptr fs:[0C0h] -774ec7fc c21000 ret 10h -774ec7ff 90 nop -774ec800 b85c000000 mov eax,5Ch -774ec805 64ff15c0000000 call dword ptr fs:[0C0h] -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -1c2fbbb0 cc f2 0f 10 .... -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -*** WARNING: Unable to verify timestamp for KERNELBASE.dll -*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll - -FAULTING_IP: -+82 -1c2fbbb0 cc int 3 - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 1c2fbbb0 -ExceptionCode: 80000003 (Break instruction exception) -ExceptionFlags: 00000000 -NumberParameters: 1 -Parameter[0]: 00000000 - -DEFAULT_BUCKET_ID: WRONG_SYMBOLS - -PROCESS_NAME: js-32-prof-windows-42c95d88aaaa.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 774b0000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 57f38c83 - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_PARAMETER1: 00000000 - -MOD_LIST: - -FAULTING_THREAD: 00001560 - -PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS - -BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS - -LAST_CONTROL_TRANSFER: from 0125f102 to 1c2fbbb0 - -STACK_TEXT: -WARNING: Frame IP not in any known module. Following frames may be wrong. -020de914 0125f102 09256748 020de9c8 00000044 0x1c2fbbb0 -020de9c8 ffffff82 00200000 ffffff81 ffffff81 js_32_prof_windows_42c95d88aaaa!js::jit::PrepareOsrTempData+0x82 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 121] -020dea38 00e9a9a8 00fd1326 08e10000 020deb48 0xffffff82 -020deaa8 010a7b82 08e36838 020deb88 00ff1fd0 js_32_prof_windows_42c95d88aaaa!js::AddTypePropertyId+0x1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] -00000000 00000000 00000000 00000000 00000000 js_32_prof_windows_42c95d88aaaa!JSObject::makeLazyGroup+0x212 [c:\users\administrator\trees\mozilla-central\js\src\vm\objectgroup.cpp @ 344] - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FOLLOWUP_IP: -js_32_prof_windows_42c95d88aaaa!js::jit::PrepareOsrTempData+82 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 121] -0125f102 83c418 add esp,18h - -SYMBOL_STACK_INDEX: 1 - -SYMBOL_NAME: js_32_prof_windows!js::jit::PrepareOsrTempData+82 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_32_prof_windows_42c95d88aaaa - -IMAGE_NAME: js-32-prof-windows-42c95d88aaaa.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-32-prof-windows-42c95d88aaaa.exe!js::jit::PrepareOsrTempData - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 -# ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 020dddec 75027b89 ntdll+0x3c7ec -01 020dde08 750807bf kernel32+0x17b89 -02 020de248 75080295 kernel32+0x707bf -03 020de260 74eef605 kernel32+0x70295 -04 020de2ec 7755f154 KERNELBASE+0xbf605 -05 020dfd40 7750ab5a ntdll+0xaf154 -06 020dfd50 00000000 ntdll+0x5ab5a -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -020dddec 75027b89 00000003 020dde30 00000000 ntdll+0x3c7ec -020dde08 750807bf 00000003 020dde30 00000000 kernel32+0x17b89 -020de248 75080295 00000000 00000001 00000000 kernel32+0x707bf -020de260 74eef605 020de31c 00000001 5a68f989 kernel32+0x70295 -020de2ec 7755f154 020de31c 774f0830 020dfd40 KERNELBASE+0xbf605 -020dfd40 7750ab5a ffffffff 774f000a 00000000 ntdll+0xaf154 -020dfd50 00000000 013a7c34 ff105000 00000000 ntdll+0x5ab5a -0:000> q -quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/cdb-11c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-11c-crashlog.txt deleted file mode 100644 index 649f8241a..000000000 --- a/FTB/Signatures/tests/resources/cdb-11c-crashlog.txt +++ /dev/null @@ -1,208 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-dbg-32-prof-dm-windows-42c95d88aaaa.exe.6940.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 9600 MP (16 procs) Free x86 compatible -Product: Server, suite: TerminalServer SingleUserTS -Machine Name: -Debug session time: Tue Oct 4 16:10:34.000 2016 (UTC + 0:00) -System Uptime: not available -Process Uptime: 0 days 0:00:02.000 -....................................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -eax=00000000 ebx=00000000 ecx=738f705d edx=00e7b0e0 esi=00000003 edi=00000003 -eip=76f0c7ec esp=00e7b9a4 ebp=00e7bb2c iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 -Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -ntdll+0x3c7ec: -76f0c7ec c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=00000000 ebx=00000000 ecx=738f705d edx=00e7b0e0 esi=00000383 edi=0ba37110 -eip=0156865d esp=00e7c650 ebp=00e7c6bc iopl=0 nv up ei pl nz ac pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000216 -*** WARNING: Unable to verify checksum for js-dbg-32-prof-dm-windows-42c95d88aaaa.exe -js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+0x3d: -0156865d cc int 3 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -*** WARNING: Unable to verify timestamp for kernel32.dll -*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll+0x3c7ec: -76f0c7ec c21400 ret 14h -76f0c7ef 90 nop -76f0c7f0 b85b000000 mov eax,5Bh -76f0c7f5 64ff15c0000000 call dword ptr fs:[0C0h] -76f0c7fc c21000 ret 10h -76f0c7ff 90 nop -76f0c800 b85c000000 mov eax,5Ch -76f0c805 64ff15c0000000 call dword ptr fs:[0C0h] -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -0156865d cc 6a 03 c7 .j.. -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** WARNING: Unable to verify checksum for mozglue.dll -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -*** WARNING: Unable to verify timestamp for KERNELBASE.dll -*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll -Unable to load image C:\Windows\System32\ucrtbase.dll, Win32 error 0n2 -*** WARNING: Unable to verify timestamp for ucrtbase.dll -*** ERROR: Module load completed but symbols could not be loaded for ucrtbase.dll - -FAULTING_IP: -js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+3d [c:\users\administrator\trees\mozilla-central\js\src\jit\rangeanalysis.h @ 578] -0156865d cc int 3 - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 0156865d (js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+0x0000003d) -ExceptionCode: 80000003 (Break instruction exception) -ExceptionFlags: 00000000 -NumberParameters: 1 -Parameter[0]: 00000000 - -PROCESS_NAME: js-dbg-32-prof-dm-windows-42c95d88aaaa.exe - -MODULE_NAME: unknown - -FAULTING_MODULE: 76ed0000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 0 - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_PARAMETER1: 00000000 - -MOD_LIST: - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD] - -LAST_CONTROL_TRANSFER: from 01546a04 to 0156865d - -FAULTING_THREAD: ffffffff - -BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS_STACKIMMUNE - -PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS_STACKIMMUNE - -DEFAULT_BUCKET_ID: WRONG_SYMBOLS_STACKIMMUNE - -STACK_TEXT: -00000000 00000000 unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe+0x0 - - -SYMBOL_NAME: unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe - -FOLLOWUP_NAME: MachineOwner - -IMAGE_NAME: unknown - -STACK_COMMAND: ** Pseudo Context ** ; kb - -FAILURE_BUCKET_ID: WRONG_SYMBOLS_STACKIMMUNE_80000003_unknown!Unloaded - -BUCKET_ID: APPLICATION_FAULT_WRONG_SYMBOLS_STACKIMMUNE_unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 -# ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 00e7bb2c 752d7b89 ntdll+0x3c7ec -01 00e7bb48 753307bf kernel32+0x17b89 -02 00e7bf88 75330295 kernel32+0x707bf -03 00e7bfa0 7491f605 kernel32+0x70295 -04 00e7c02c 76f7f154 KERNELBASE+0xbf605 -05 00e7ff10 76f2ab5a ntdll+0xaf154 -06 00e7ff20 00000000 ntdll+0x5ab5a -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -00e7bb2c 752d7b89 00000003 00e7bb70 00000000 ntdll+0x3c7ec -00e7bb48 753307bf 00000003 00e7bb70 00000000 kernel32+0x17b89 -00e7bf88 75330295 00000000 00000001 00000000 kernel32+0x707bf -00e7bfa0 7491f605 00e7c05c 00000001 fa5997c7 kernel32+0x70295 -00e7c02c 76f7f154 00e7c05c 76f10830 00e7ff10 KERNELBASE+0xbf605 -00e7ff10 76f2ab5a ffffffff 76f10007 00000000 ntdll+0xaf154 -00e7ff20 00000000 01191f50 ff929000 00000000 ntdll+0x5ab5a -0:000> q -quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/cdb-12c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-12c-crashlog.txt deleted file mode 100644 index cf92a9752..000000000 --- a/FTB/Signatures/tests/resources/cdb-12c-crashlog.txt +++ /dev/null @@ -1,220 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-32-prof-dm-windows-42c95d88aaaa.exe.1348.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 9600 MP (16 procs) Free x86 compatible -Product: Server, suite: TerminalServer SingleUserTS -Machine Name: -Debug session time: Wed Oct 5 01:53:46.000 2016 (UTC + 0:00) -System Uptime: not available -Process Uptime: not available -...................................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -eax=00000000 ebx=00000000 ecx=00000000 edx=73bf4f80 esi=00000003 edi=00000003 -eip=7726c7ec esp=0044dda4 ebp=0044df2c iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 -Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -ntdll+0x3c7ec: -7726c7ec c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=00000020 ebx=0044ea78 ecx=00000000 edx=73bf4f80 esi=ffffff8c edi=0044ea50 -eip=1fa0b7f8 esp=0044ea50 ebp=0044eb00 iopl=0 nv up ei pl zr na pe cy -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000247 -1fa0b7f8 cc int 3 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -*** WARNING: Unable to verify timestamp for kernel32.dll -*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll+0x3c7ec: -7726c7ec c21400 ret 14h -7726c7ef 90 nop -7726c7f0 b85b000000 mov eax,5Bh -7726c7f5 64ff15c0000000 call dword ptr fs:[0C0h] -7726c7fc c21000 ret 10h -7726c7ff 90 nop -7726c800 b85c000000 mov eax,5Ch -7726c805 64ff15c0000000 call dword ptr fs:[0C0h] -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -1fa0b7f8 cc f2 0f 10 .... -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** WARNING: Unable to verify checksum for js-32-prof-dm-windows-42c95d88aaaa.exe -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -*** WARNING: Unable to verify timestamp for KERNELBASE.dll -*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll - -FAULTING_IP: -+1d8 -1fa0b7f8 cc int 3 - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 1fa0b7f8 -ExceptionCode: 80000003 (Break instruction exception) -ExceptionFlags: 00000000 -NumberParameters: 1 -Parameter[0]: 00000000 - -DEFAULT_BUCKET_ID: WRONG_SYMBOLS - -PROCESS_NAME: js-32-prof-dm-windows-42c95d88aaaa.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 77230000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 57f3fe61 - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_PARAMETER1: 00000000 - -MOD_LIST: - -FAULTING_THREAD: 000004fc - -PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS - -BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS - -IP_ON_HEAP: 086ea550 -The fault address in not in any loaded module, please check your build's rebase -log at \bin\build_logs\timebuild\ntrebase.log for module which may -contain the address if it were loaded. - -FRAME_ONE_INVALID: 1 - -LAST_CONTROL_TRANSFER: from 086ea550 to 1fa0b7f8 - -STACK_TEXT: -WARNING: Frame IP not in any known module. Following frames may be wrong. -0044eb00 086ea550 1fa087ec 0000a021 00200000 0x1fa0b7f8 -0044ec88 0130a818 01441c16 08310000 0044ed98 0x86ea550 -0044ecf8 01517762 08336838 0044edd8 01462820 js_32_prof_dm_windows_42c95d88aaaa!js::AddTypePropertyId+0x1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] -00000000 00000000 00000000 00000000 00000000 js_32_prof_dm_windows_42c95d88aaaa!JSObject::makeLazyGroup+0x212 [c:\users\administrator\trees\mozilla-central\js\src\vm\objectgroup.cpp @ 344] - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FOLLOWUP_IP: -js_32_prof_dm_windows_42c95d88aaaa!js::AddTypePropertyId+1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] -0130a818 8b4dfc mov ecx,dword ptr [ebp-4] - -SYMBOL_STACK_INDEX: 2 - -SYMBOL_NAME: js_32_prof_dm_windows!js::AddTypePropertyId+1d8 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_32_prof_dm_windows_42c95d88aaaa - -IMAGE_NAME: js-32-prof-dm-windows-42c95d88aaaa.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-32-prof-dm-windows-42c95d88aaaa.exe!js::AddTypePropertyId - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 -# ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 0044df2c 76c57b89 ntdll+0x3c7ec -01 0044df48 76cb07bf kernel32+0x17b89 -02 0044e388 76cb0295 kernel32+0x707bf -03 0044e3a0 74d4f605 kernel32+0x70295 -04 0044e42c 772df154 KERNELBASE+0xbf605 -05 0044ff9c 7728ab5a ntdll+0xaf154 -06 0044ffac 00000000 ntdll+0x5ab5a -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -0044df2c 76c57b89 00000003 0044df70 00000000 ntdll+0x3c7ec -0044df48 76cb07bf 00000003 0044df70 00000000 kernel32+0x17b89 -0044e388 76cb0295 00000000 00000001 00000000 kernel32+0x707bf -0044e3a0 74d4f605 0044e45c 00000001 37adf25c kernel32+0x70295 -0044e42c 772df154 0044e45c 77270830 0044ff9c KERNELBASE+0xbf605 -0044ff9c 7728ab5a ffffffff 77270004 00000000 ntdll+0xaf154 -0044ffac 00000000 018182a4 ff7ab000 00000000 ntdll+0x5ab5a -0:000> q -quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/cdb-1a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-1a-crashlog.txt deleted file mode 100644 index dcd3eedb0..000000000 --- a/FTB/Signatures/tests/resources/cdb-1a-crashlog.txt +++ /dev/null @@ -1,245 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-dbg-32-dm-windows-62f79d676e0e.exe.2372.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible -Product: WinNt, suite: SingleUserTS -Machine Name: -Debug session time: Fri Sep 23 15:23:36.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: 0 days 0:00:02.000 -.......................................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -eax=00000000 ebx=0034e7ac ecx=6a24705d edx=0034d9d4 esi=00000002 edi=00000000 -eip=77e9016d esp=0034e75c ebp=0034e7f8 iopl=0 nv up ei pl zr na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246 -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -ntdll!NtWaitForMultipleObjects+0x15: -77e9016d 83c404 add esp,4 -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=00000000 ebx=00000001 ecx=6a24705d edx=0034d9d4 esi=0925b3ec edi=0925b3d1 -eip=01814577 esp=0034ef5c ebp=0034ef5c iopl=0 nv up ei pl nz na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206 -*** WARNING: Unable to verify checksum for js-dbg-32-dm-windows-62f79d676e0e.exe -js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47: -01814577 cc int 3 -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll!NtWaitForMultipleObjects+0x15: -77e9016d 83c404 add esp,4 -77e90170 c21400 ret 14h -77e90173 90 nop -ntdll!NtSetInformationObject: -77e90174 b859000000 mov eax,59h -77e90179 33c9 xor ecx,ecx -77e9017b 8d542404 lea edx,[esp+4] -77e9017f 64ff15c0000000 call dword ptr fs:[0C0h] -77e90186 83c404 add esp,4 -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -01814577 cc 6a 03 c7 .j.. -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -***** OS symbols are WRONG. Please fix symbols to do analysis. - -***** OS (WOW64 kernel32) symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: nt!IMAGE_NT_HEADERS32 *** -*** *** -************************************************************************* - -FAULTING_IP: -js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] -01814577 cc int 3 - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 01814577 (js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x00000047) - ExceptionCode: 80000003 (Break instruction exception) - ExceptionFlags: 00000000 -NumberParameters: 1 - Parameter[0]: 00000000 - -DEFAULT_BUCKET_ID: WRONG_SYMBOLS - -PROCESS_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 76620000 kernel32 - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e2feea - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_PARAMETER1: 00000000 - -MOD_LIST: - -FAULTING_THREAD: 00000d9c - -PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS - -BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS - -LAST_CONTROL_TRANSFER: from 0186f798 to 01814577 - -STACK_TEXT: -0034ef5c 0186f798 0925b3ec 08d12000 09061100 js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] -0034efdc 01823483 09061100 09061100 08d12000 js_dbg_32_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x788 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] -0034eff4 01886782 08d38000 090600a0 09061100 js_dbg_32_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x43 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] -0034f1b8 018875f3 08d12000 08d38000 0034f1d8 js_dbg_32_dm_windows_62f79d676e0e!GenerateLcovInfo+0x5c2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] -0034f1f4 014760ac 08d12000 0034f244 0034f344 js_dbg_32_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x33 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] -0034f234 0190b2b6 08d12000 00000000 00000000 js_dbg_32_dm_windows_62f79d676e0e!GetLcovInfo+0x14c [c:\users\mozillaadmin\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3420] -0034f25c 01916811 08d38000 01475f60 0034f344 js_dbg_32_dm_windows_62f79d676e0e!js::CallJSNative+0x86 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -0034f2c0 01916429 08d12000 00006000 00000000 js_dbg_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x391 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -0034f2e4 01ddcce4 08d12000 0034f344 092720e8 js_dbg_32_dm_windows_62f79d676e0e!InternalCall+0x119 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -0034f37c 1f6a167c 0034f330 0034f3f8 0925a815 js_dbg_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x364 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -WARNING: Frame IP not in any known module. Following frames may be wrong. -0034f440 01ab4acf 1f6aa000 00000000 00000000 0x1f6a167c -0034f3a0 ffffff82 02186128 0904e4e8 1f6a9163 js_dbg_32_dm_windows_62f79d676e0e!EnterIon+0x2cf [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\ion.cpp @ 2837] -00000000 00000000 00000000 00000000 00000000 0xffffff82 - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FOLLOWUP_IP: -js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] -01814577 cc int 3 - -FAULTING_SOURCE_CODE: - 600: static inline unsigned - 601: GetBytecodeLength(jsbytecode* pc) - 602: { - 603: JSOp op = (JSOp)*pc; -> 604: MOZ_ASSERT(op < JSOP_LIMIT); - 605: - 606: if (CodeSpec[op].length != -1) - 607: return CodeSpec[op].length; - 608: return GetVariableBytecodeLength(pc); - 609: } - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_dbg_32_dm_windows!js::GetBytecodeLength+47 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_dbg_32_dm_windows_62f79d676e0e - -IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-dbg-32-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 0034e7f8 766319fc ntdll!NtWaitForMultipleObjects+0x15 -01 0034e840 766341d8 kernel32!WaitForMultipleObjectsEx+0x8e -02 0034e85c 766580bc kernel32!WaitForMultipleObjects+0x18 -03 0034e8c8 76657f7b kernel32!GetApplicationRecoveryCallback+0x2a7 -04 0034e8dc 76657870 kernel32!GetApplicationRecoveryCallback+0x166 -05 0034e8ec 766577ef kernel32!UnhandledExceptionFilter+0x161 -06 0034e978 77ee5b67 kernel32!UnhandledExceptionFilter+0xe0 -07 0034fc50 77ea98d5 ntdll!RtlKnownExceptionFilter+0xb7 -08 0034fc68 00000000 ntdll!RtlInitializeExceptionChain+0x36 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -0034e7f8 766319fc 0034e7ac 0034e820 00000000 ntdll!NtWaitForMultipleObjects+0x15 -0034e840 766341d8 00000002 fffde000 00000000 kernel32!WaitForMultipleObjectsEx+0x8e -0034e85c 766580bc 00000002 0034e890 00000000 kernel32!WaitForMultipleObjects+0x18 -0034e8c8 76657f7b 0034e9a8 00000001 00000001 kernel32!GetApplicationRecoveryCallback+0x2a7 -0034e8dc 76657870 0034e9a8 00000001 0034e978 kernel32!GetApplicationRecoveryCallback+0x166 -0034e8ec 766577ef 0034e9a8 00000001 95527c76 kernel32!UnhandledExceptionFilter+0x161 -0034e978 77ee5b67 00000000 77ee5a44 00000000 kernel32!UnhandledExceptionFilter+0xe0 -0034fc50 77ea98d5 012f1f73 fffde000 00000000 ntdll!RtlKnownExceptionFilter+0xb7 -0034fc68 00000000 012f1f73 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x36 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-1b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-1b-crashlog.txt deleted file mode 100644 index e5143d71c..000000000 --- a/FTB/Signatures/tests/resources/cdb-1b-crashlog.txt +++ /dev/null @@ -1,329 +0,0 @@ - -Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-dbg-32-dm-windows-62f79d676e0e.exe.4192.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: srv* -Executable search path is: -Windows 10 Version 14393 MP (8 procs) Free x86 compatible -Product: WinNt, suite: SingleUserTS -Built by: 10.0.14393.0 (rs1_release.160715-1616) -Machine Name: -Debug session time: Tue Sep 20 17:58:22.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: not available -................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -eax=00000000 ebx=00000000 ecx=765e06ef edx=00000060 esi=00000003 edi=00000003 -eip=770fe1bc esp=02b2e118 ebp=02b2e2a8 iopl=0 nv up ei pl nz na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206 -ntdll!NtWaitForMultipleObjects+0xc: -770fe1bc c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw - *** !wow64exts is only useful targeting architectures that support WoW *** -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -*** WARNING: Unable to verify checksum for js-dbg-32-dm-windows-62f79d676e0e.exe -eax=00000000 ebx=00000001 ecx=765e06ef edx=00000060 esi=039604ec edi=039604d1 -eip=01344577 esp=02b2ee1c ebp=02b2ee1c iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 -js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47: -01344577 cc int 3 -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604]: -01344577 cc int 3 -01344578 6a03 push 3 -0134457a c705000000005c020000 mov dword ptr ds:[0],25Ch -01344584 ff158070cb01 call dword ptr [js_dbg_32_dm_windows_62f79d676e0e!_imp__GetCurrentProcess (01cb7080)] -0134458a 50 push eax -0134458b ff157c70cb01 call dword ptr [js_dbg_32_dm_windows_62f79d676e0e!_imp__TerminateProcess (01cb707c)] -01344591 8a04c5d0e7b701 mov al,byte ptr js_dbg_32_dm_windows_62f79d676e0e!js::CodeSpec (01b7e7d0)[eax*8] -01344598 3cff cmp al,0FFh -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -01344577 cc 6a 03 c7 .j.. -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - - -DUMP_CLASS: 2 - -DUMP_QUALIFIER: 400 - -CONTEXT: (.ecxr) -eax=00000000 ebx=00000001 ecx=765e06ef edx=00000060 esi=039604ec edi=039604d1 -eip=01344577 esp=02b2ee1c ebp=02b2ee1c iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 -js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47: -01344577 cc int 3 -Resetting default scope - -FAULTING_IP: -js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] -01344577 cc int 3 - -EXCEPTION_RECORD: (.exr -1) -ExceptionAddress: 01344577 (js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x00000047) - ExceptionCode: 80000003 (Break instruction exception) - ExceptionFlags: 00000000 -NumberParameters: 1 - Parameter[0]: 00000000 - -DEFAULT_BUCKET_ID: STATUS_BREAKPOINT - -PROCESS_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_CODE_STR: 80000003 - -EXCEPTION_PARAMETER1: 00000000 - -WATSON_BKT_PROCSTAMP: 57e1a04d - -WATSON_BKT_PROCVER: 0.0.0.0 - -WATSON_BKT_MODULE: js-dbg-32-dm-windows-62f79d676e0e.exe - -WATSON_BKT_MODSTAMP: 57e1a04d - -WATSON_BKT_MODOFFSET: 524577 - -WATSON_BKT_MODVER: 0.0.0.0 - -BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) - -MODLIST_WITH_TSCHKSUM_HASH: 49a2e61967a9127904a3e4021eee1b18fbbadd16 - -MODLIST_SHA1_HASH: 7a765fdbd5266a0acb1114b3be4f770812eac374 - -NTGLOBALFLAG: 0 - -APPLICATION_VERIFIER_FLAGS: 0 - -DUMP_FLAGS: 94 - -DUMP_TYPE: 1 - -APP: js-dbg-32-dm-windows-62f79d676e0e.exe - -ANALYSIS_SESSION_HOST: F1BRIX - -ANALYSIS_SESSION_TIME: 09-20-2016 17:58:23.0553 - -ANALYSIS_VERSION: 10.0.10586.567 amd64fre - -THREAD_ATTRIBUTES: -OS_LOCALE: ENU - -PROBLEM_CLASSES: - - - - - Tid [0x0] - Frame [0x00] - String [STATUS_BREAKPOINT] - Data Bucketing - - -BUGCHECK_STR: STATUS_BREAKPOINT - -LAST_CONTROL_TRANSFER: from 0139f798 to 01344577 - -STACK_TEXT: -02b2ee1c 0139f798 039604ec 03512000 03761100 js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x47 -02b2ee9c 01353483 03761100 03761100 03512000 js_dbg_32_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x788 -02b2eeb4 013b6782 03538000 037600a0 03761100 js_dbg_32_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x43 -02b2f078 013b75f3 03512000 03538000 02b2f098 js_dbg_32_dm_windows_62f79d676e0e!GenerateLcovInfo+0x5c2 -02b2f0b4 00fa60ac 03512000 02b2f104 02b2f204 js_dbg_32_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x33 -02b2f0f4 0143b2b6 03512000 00000000 00000000 js_dbg_32_dm_windows_62f79d676e0e!GetLcovInfo+0x14c -02b2f11c 01446811 03538000 00fa5f60 02b2f204 js_dbg_32_dm_windows_62f79d676e0e!js::CallJSNative+0x86 -02b2f180 01446429 03512000 00006000 00000000 js_dbg_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x391 -02b2f1a4 0190cce4 03512000 02b2f204 039710e8 js_dbg_32_dm_windows_62f79d676e0e!InternalCall+0x119 -02b2f23c 372c167c 02b2f1f0 02b2f2b8 0394a775 js_dbg_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x364 -WARNING: Frame IP not in any known module. Following frames may be wrong. -02b2f300 015e4acf 372ca000 00000000 00000000 0x372c167c -02b2f260 ffffff82 01cb5128 0374e4e8 372c9163 js_dbg_32_dm_windows_62f79d676e0e!EnterIon+0x2cf -00000000 00000000 00000000 00000000 00000000 0xffffff82 - - -THREAD_SHA1_HASH_MOD_FUNC: 982e0189f904ab5332c90b1402b462d775829a88 - -THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 84a065044ee6439455c4e2f7b9308b0181a554af - -THREAD_SHA1_HASH_MOD: 4922854b45388f6eb662cfb814183eb2916f95ec - -FOLLOWUP_IP: -js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] -01344577 cc int 3 - -FAULT_INSTR_CODE: c7036acc - -FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h - -FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h - -FAULTING_SOURCE_LINE_NUMBER: 604 - -FAULTING_SOURCE_CODE: - 600: static inline unsigned - 601: GetBytecodeLength(jsbytecode* pc) - 602: { - 603: JSOp op = (JSOp)*pc; -> 604: MOZ_ASSERT(op < JSOP_LIMIT); - 605: - 606: if (CodeSpec[op].length != -1) - 607: return CodeSpec[op].length; - 608: return GetVariableBytecodeLength(pc); - 609: } - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_dbg_32_dm_windows_62f79d676e0e - -IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e1a04d - -STACK_COMMAND: .ecxr ; kb - -BUCKET_ID: STATUS_BREAKPOINT_js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 - -PRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINT_js_dbg_32_dm_windows_62f79d676e0e!js::GetBytecodeLength+47 - -BUCKET_ID_OFFSET: 47 - -BUCKET_ID_MODULE_STR: js_dbg_32_dm_windows_62f79d676e0e - -BUCKET_ID_MODTIMEDATESTAMP: 57e1a04d - -BUCKET_ID_MODCHECKSUM: 0 - -BUCKET_ID_MODVER_STR: 0.0.0.0 - -BUCKET_ID_PREFIX_STR: STATUS_BREAKPOINT_ - -FAILURE_PROBLEM_CLASS: STATUS_BREAKPOINT - -FAILURE_EXCEPTION_CODE: 80000003 - -FAILURE_IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -FAILURE_FUNCTION_NAME: js::GetBytecodeLength - -BUCKET_ID_FUNCTION_STR: js::GetBytecodeLength - -FAILURE_SYMBOL_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength - -FAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_js-dbg-32-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength - -WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-dbg-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a04d/js-dbg-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a04d/80000003/00524577.htm?Retriage=1 - -TARGET_TIME: 2016-09-21T00:58:22.000Z - -OSBUILD: 14393 - -OSSERVICEPACK: 0 - -SERVICEPACK_NUMBER: 0 - -OS_REVISION: 0 - -SUITE_MASK: 256 - -PRODUCT_TYPE: 1 - -OSPLATFORM_TYPE: x86 - -OSNAME: Windows 10 - -OSEDITION: Windows 10 WinNt SingleUserTS - -USER_LCID: 0 - -OSBUILD_TIMESTAMP: 2016-07-15 18:33:42 - -BUILDDATESTAMP_STR: 160715-1616 - -BUILDLAB_STR: rs1_release - -BUILDOSVER_STR: 10.0.14393.0 - -ANALYSIS_SESSION_ELAPSED_TIME: 987 - -ANALYSIS_SOURCE: UM - -FAILURE_ID_HASH_STRING: um:status_breakpoint_80000003_js-dbg-32-dm-windows-62f79d676e0e.exe!js::getbytecodelength - -FAILURE_ID_HASH: {7407c034-3269-381a-c35e-dc0f05c0c82a} - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # ChildEBP RetAddr -00 02b2e114 76761a30 ntdll!NtWaitForMultipleObjects+0xc -01 02b2e2a8 76761928 KERNELBASE!WaitForMultipleObjectsEx+0xf0 -02 02b2e2c4 76de7062 KERNELBASE!WaitForMultipleObjects+0x18 -03 02b2e740 76de6aa6 kernel32!WerpReportFaultInternal+0x59d -04 02b2e75c 76dbe7a9 kernel32!WerpReportFault+0x9b -05 02b2e764 767ed90a kernel32!BasepReportFault+0x19 -06 02b2e7fc 7712dc00 KERNELBASE!UnhandledExceptionFilter+0x25a -07 02b2fb1c 770f05d4 ntdll!__RtlUserThreadStart+0x3d626 -08 02b2fb2c 00000000 ntdll!_RtlUserThreadStart+0x1b -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -02b2e114 76761a30 00000003 02b2e704 00000001 ntdll!NtWaitForMultipleObjects+0xc -02b2e2a8 76761928 00000003 02b2e704 00000000 KERNELBASE!WaitForMultipleObjectsEx+0xf0 -02b2e2c4 76de7062 00000003 02b2e704 00000000 KERNELBASE!WaitForMultipleObjects+0x18 -02b2e740 76de6aa6 00000000 00000000 00000001 kernel32!WerpReportFaultInternal+0x59d -02b2e75c 76dbe7a9 02b2e7fc 767ed90a 02b2e82c kernel32!WerpReportFault+0x9b -02b2e764 767ed90a 02b2e82c 00000001 b88633d1 kernel32!BasepReportFault+0x19 -02b2e7fc 7712dc00 02b2e82c 771020b0 02b2fb1c KERNELBASE!UnhandledExceptionFilter+0x25a -02b2fb1c 770f05d4 ffffffff 77112518 00000000 ntdll!__RtlUserThreadStart+0x3d626 -02b2fb2c 00000000 00e21f5a 02c1b000 00000000 ntdll!_RtlUserThreadStart+0x1b -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-2a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-2a-crashlog.txt deleted file mode 100644 index e9a61076d..000000000 --- a/FTB/Signatures/tests/resources/cdb-2a-crashlog.txt +++ /dev/null @@ -1,308 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-dbg-64-dm-windows-62f79d676e0e.exe.2076.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x64 -Product: WinNt, suite: SingleUserTS -Machine Name: -Debug session time: Fri Sep 23 15:40:34.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: 0 days 0:00:01.000 -......................................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -*** WARNING: Unable to verify checksum for js-dbg-64-dm-windows-62f79d676e0e.exe -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: -00000001`40144e62 cc int 3 -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -The current thread doesn't have an x86 context. -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -rax=0000000000000000 rbx=0000000006c139ac rcx=000007fef38241f0 -rdx=000007fef38255f0 rsi=0000000006c1399e rdi=0000000006cf2101 -rip=0000000140144e62 rsp=000000000027e500 rbp=0000000006cf2120 - r8=000000000027ce88 r9=00000000020cc069 r10=0000000000000000 -r11=000000000027e3f0 r12=0000000006c0d088 r13=0000000006c139ad -r14=0000000000000000 r15=0000000006c13991 -iopl=0 nv up ei pl nz na po nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000204 -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: -00000001`40144e62 cc int 3 -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604]: -00000001`40144e62 cc int 3 -00000001`40144e63 c70425000000005c020000 mov dword ptr [0],25Ch -00000001`40144e6e ff158c02eb00 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp_GetCurrentProcess (00000001`40ff5100)] -00000001`40144e74 488bc8 mov rcx,rax -00000001`40144e77 ba03000000 mov edx,3 -00000001`40144e7c ff157602eb00 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp_TerminateProcess (00000001`40ff50f8)] -00000001`40144e82 cc int 3 -00000001`40144e83 488d15168ab600 lea rdx,[js_dbg_64_dm_windows_62f79d676e0e!js::CodeSpec (00000001`40cad8a0)] -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00000000`40144e62 ?? ?? ?? ?? ???? -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -00000001`40144e62 cc c7 04 25 00 00 00 00 ...%.... -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: nt!IMAGE_NT_HEADERS32 *** -*** *** -************************************************************************* -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ucrtbase.dll - -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* - -FAULTING_IP: -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] -00000001`40144e62 cc int 3 - -EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 0000000140144e62 (js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x0000000000000052) - ExceptionCode: 80000003 (Break instruction exception) - ExceptionFlags: 00000000 -NumberParameters: 1 - Parameter[0]: 0000000000000000 - -DEFAULT_BUCKET_ID: WRONG_SYMBOLS - -PROCESS_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 0000000077c90000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e303d8 - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_PARAMETER1: 0000000000000000 - -MOD_LIST: - -FAULTING_THREAD: 0000000000000f2c - -PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS - -BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS - -LAST_CONTROL_TRANSFER: from 00000001401d8fdd to 0000000140144e62 - -STACK_TEXT: -00000000`0027e500 00000001`401d8fdd : 00000000`06c13900 00000000`00000046 00000000`0697f101 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] -00000000`0027e540 00000001`4015d3ca : 00000000`06c0d088 00000000`0697f1a8 00000000`00000002 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] -00000000`0027e610 00000001`401fb883 : 00000000`0697f1a8 00000000`0027e740 00000000`068031b0 00000000`06807000 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] -00000000`0027e640 00000001`401fd30d : 00000000`0027e5f0 00000000`00000000 00000000`06999c18 00000000`0027ed98 : js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] -00000000`0027e940 00000001`3fc08085 : 00000000`06853800 00000000`0027ed68 00000000`06807000 00000000`0000001d : js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] -00000000`0027e9b0 00000001`402c23c5 : 00000000`0027ebe8 00000000`0027ebe8 00000000`00000000 00000000`06999c18 : js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\mozillaadmin\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] -00000000`0027ea20 00000001`402d677a : 00000000`0027eb80 00000000`00000000 00000000`00000001 00000000`06853800 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -00000000`0027ea80 00000001`40756744 : 00000000`0000003a 00000000`00000000 00000000`00000000 00000000`06c1427d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -00000000`0027eb10 000000c1`814a777e : 00000000`0027ed01 00000000`0697f100 00000000`000006d0 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -00000000`0027ecd0 00000000`0027ed01 : 00000000`0697f100 00000000`000006d0 00000000`00000008 00000000`0027ed58 : 0xc1`814a777e -00000000`0027ecd8 00000000`0697f100 : 00000000`000006d0 00000000`00000008 00000000`0027ed58 00000000`0027ed10 : 0x27ed01 -00000000`0027ece0 00000000`000006d0 : 00000000`00000008 00000000`0027ed58 00000000`0027ed10 00000321`8aa30ceb : 0x697f100 -00000000`0027ece8 00000000`00000008 : 00000000`0027ed58 00000000`0027ed10 00000321`8aa30ceb 00000000`0027ed10 : 0x6d0 -00000000`0027ecf0 00000000`0027ed58 : 00000000`0027ed10 00000321`8aa30ceb 00000000`0027ed10 fff90000`00000000 : 0x8 -00000000`0027ecf8 00000000`0027ed10 : 00000321`8aa30ceb 00000000`0027ed10 fff90000`00000000 00000001`40f2f940 : 0x27ed58 -00000000`0027ed00 00000321`8aa30ceb : 00000000`0027ed10 fff90000`00000000 00000001`40f2f940 00000000`06969bb0 : 0x27ed10 -00000000`0027ed08 00000000`0027ed10 : fff90000`00000000 00000001`40f2f940 00000000`06969bb0 000000c1`814ae873 : 0x321`8aa30ceb -00000000`0027ed10 fff90000`00000000 : 00000001`40f2f940 00000000`06969bb0 000000c1`814ae873 00000000`00004022 : 0x27ed10 -00000000`0027ed18 00000001`40f2f940 : 00000000`06969bb0 000000c1`814ae873 00000000`00004022 00000000`0027ed98 : 0xfff90000`00000000 -00000000`0027ed20 00000000`06969bb0 : 000000c1`814ae873 00000000`00004022 00000000`0027ed98 00000000`06c0c188 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -00000000`0027ed28 000000c1`814ae873 : 00000000`00004022 00000000`0027ed98 00000000`06c0c188 00000000`00000000 : 0x6969bb0 -00000000`0027ed30 00000000`00004022 : 00000000`0027ed98 00000000`06c0c188 00000000`00000000 00000000`0027ed58 : 0xc1`814ae873 -00000000`0027ed38 00000000`0027ed98 : 00000000`06c0c188 00000000`00000000 00000000`0027ed58 fffe0000`069948c0 : 0x4022 -00000000`0027ed40 00000000`06c0c188 : 00000000`00000000 00000000`0027ed58 fffe0000`069948c0 fff90000`00000000 : 0x27ed98 -00000000`0027ed48 00000000`00000000 : 00000000`0027ed58 fffe0000`069948c0 fff90000`00000000 00000000`0027edc8 : 0x6c0c188 - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FOLLOWUP_IP: -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] -00000001`40144e62 cc int 3 - -FAULTING_SOURCE_CODE: - 600: static inline unsigned - 601: GetBytecodeLength(jsbytecode* pc) - 602: { - 603: JSOp op = (JSOp)*pc; -> 604: MOZ_ASSERT(op < JSOP_LIMIT); - 605: - 606: if (CodeSpec[op].length != -1) - 607: return CodeSpec[op].length; - 608: return GetVariableBytecodeLength(pc); - 609: } - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_dbg_64_dm_windows!js::GetBytecodeLength+52 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_dbg_64_dm_windows_62f79d676e0e - -IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-dbg-64-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # Child-SP RetAddr Call Site -00 00000000`0027e500 00000001`401d8fdd js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] -01 00000000`0027e540 00000001`4015d3ca js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] -02 00000000`0027e610 00000001`401fb883 js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] -03 00000000`0027e640 00000001`401fd30d js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] -04 00000000`0027e940 00000001`3fc08085 js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] -05 00000000`0027e9b0 00000001`402c23c5 js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\mozillaadmin\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] -06 00000000`0027ea20 00000001`402d677a js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -07 00000000`0027ea80 00000001`40756744 js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -08 00000000`0027eb10 000000c1`814a777e js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -09 00000000`0027ecd0 00000000`0027ed01 0xc1`814a777e -0a 00000000`0027ecd8 00000000`0697f100 0x27ed01 -0b 00000000`0027ece0 00000000`000006d0 0x697f100 -0c 00000000`0027ece8 00000000`00000008 0x6d0 -0d 00000000`0027ecf0 00000000`0027ed58 0x8 -0e 00000000`0027ecf8 00000000`0027ed10 0x27ed58 -0f 00000000`0027ed00 00000321`8aa30ceb 0x27ed10 -10 00000000`0027ed08 00000000`0027ed10 0x321`8aa30ceb -11 00000000`0027ed10 fff90000`00000000 0x27ed10 -12 00000000`0027ed18 00000001`40f2f940 0xfff90000`00000000 -13 00000000`0027ed20 00000000`06969bb0 js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -14 00000000`0027ed28 000000c1`814ae873 0x6969bb0 -15 00000000`0027ed30 00000000`00004022 0xc1`814ae873 -16 00000000`0027ed38 00000000`0027ed98 0x4022 -17 00000000`0027ed40 00000000`06c0c188 0x27ed98 -18 00000000`0027ed48 00000000`00000000 0x6c0c188 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -RetAddr : Args to Child : Call Site -00000001`401d8fdd : 00000000`06c13900 00000000`00000046 00000000`0697f101 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.h @ 604] -00000001`4015d3ca : 00000000`06c0d088 00000000`0697f1a8 00000000`00000002 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] -00000001`401fb883 : 00000000`0697f1a8 00000000`0027e740 00000000`068031b0 00000000`06807000 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] -00000001`401fd30d : 00000000`0027e5f0 00000000`00000000 00000000`06999c18 00000000`0027ed98 : js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] -00000001`3fc08085 : 00000000`06853800 00000000`0027ed68 00000000`06807000 00000000`0000001d : js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] -00000001`402c23c5 : 00000000`0027ebe8 00000000`0027ebe8 00000000`00000000 00000000`06999c18 : js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\mozillaadmin\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] -00000001`402d677a : 00000000`0027eb80 00000000`00000000 00000000`00000001 00000000`06853800 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -00000001`40756744 : 00000000`0000003a 00000000`00000000 00000000`00000000 00000000`06c1427d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -000000c1`814a777e : 00000000`0027ed01 00000000`0697f100 00000000`000006d0 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -00000000`0027ed01 : 00000000`0697f100 00000000`000006d0 00000000`00000008 00000000`0027ed58 : 0xc1`814a777e -00000000`0697f100 : 00000000`000006d0 00000000`00000008 00000000`0027ed58 00000000`0027ed10 : 0x27ed01 -00000000`000006d0 : 00000000`00000008 00000000`0027ed58 00000000`0027ed10 00000321`8aa30ceb : 0x697f100 -00000000`00000008 : 00000000`0027ed58 00000000`0027ed10 00000321`8aa30ceb 00000000`0027ed10 : 0x6d0 -00000000`0027ed58 : 00000000`0027ed10 00000321`8aa30ceb 00000000`0027ed10 fff90000`00000000 : 0x8 -00000000`0027ed10 : 00000321`8aa30ceb 00000000`0027ed10 fff90000`00000000 00000001`40f2f940 : 0x27ed58 -00000321`8aa30ceb : 00000000`0027ed10 fff90000`00000000 00000001`40f2f940 00000000`06969bb0 : 0x27ed10 -00000000`0027ed10 : fff90000`00000000 00000001`40f2f940 00000000`06969bb0 000000c1`814ae873 : 0x321`8aa30ceb -fff90000`00000000 : 00000001`40f2f940 00000000`06969bb0 000000c1`814ae873 00000000`00004022 : 0x27ed10 -00000001`40f2f940 : 00000000`06969bb0 000000c1`814ae873 00000000`00004022 00000000`0027ed98 : 0xfff90000`00000000 -00000000`06969bb0 : 000000c1`814ae873 00000000`00004022 00000000`0027ed98 00000000`06c0c188 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -000000c1`814ae873 : 00000000`00004022 00000000`0027ed98 00000000`06c0c188 00000000`00000000 : 0x6969bb0 -00000000`00004022 : 00000000`0027ed98 00000000`06c0c188 00000000`00000000 00000000`0027ed58 : 0xc1`814ae873 -00000000`0027ed98 : 00000000`06c0c188 00000000`00000000 00000000`0027ed58 fffe0000`069948c0 : 0x4022 -00000000`06c0c188 : 00000000`00000000 00000000`0027ed58 fffe0000`069948c0 fff90000`00000000 : 0x27ed98 -00000000`00000000 : 00000000`0027ed58 fffe0000`069948c0 fff90000`00000000 00000000`0027edc8 : 0x6c0c188 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-2b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-2b-crashlog.txt deleted file mode 100644 index bff38c233..000000000 --- a/FTB/Signatures/tests/resources/cdb-2b-crashlog.txt +++ /dev/null @@ -1,381 +0,0 @@ - -Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-dbg-64-dm-windows-62f79d676e0e.exe.1140.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: srv* -Executable search path is: -Windows 10 Version 14393 MP (8 procs) Free x64 -Product: WinNt, suite: SingleUserTS -Built by: 10.0.14393.0 (rs1_release.160715-1616) -Machine Name: -Debug session time: Tue Sep 20 17:58:35.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: not available -.................. -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -*** WARNING: Unable to verify checksum for js-dbg-64-dm-windows-62f79d676e0e.exe -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: -00007ff7`1e424e62 cc int 3 -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -The current thread doesn't have a guest (WoW) context. -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -rax=0000000000000000 rbx=0000024dbf40baac rcx=00000000ffffffff -rdx=0000000000000000 rsi=0000024dbf40ba9e rdi=0000024dbf4f2201 -rip=00007ff71e424e62 rsp=000000de223fe3d0 rbp=0000024dbf4f22e0 - r8=000000de223fcd78 r9=0000024dbebe0735 r10=0000000000000000 -r11=000000de223fe240 r12=0000024dbf414088 r13=0000024dbf40baad -r14=0000000000000000 r15=0000024dbf40ba91 -iopl=0 nv up ei pl nz na pe nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000200 -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: -00007ff7`1e424e62 cc int 3 -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604]: -00007ff7`1e424e62 cc int 3 -00007ff7`1e424e63 c70425000000005c020000 mov dword ptr [0],25Ch -00007ff7`1e424e6e ff158cf2ea00 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp_GetCurrentProcess (00007ff7`1f2d4100)] -00007ff7`1e424e74 488bc8 mov rcx,rax -00007ff7`1e424e77 ba03000000 mov edx,3 -00007ff7`1e424e7c ff1576f2ea00 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp_TerminateProcess (00007ff7`1f2d40f8)] -00007ff7`1e424e82 cc int 3 -00007ff7`1e424e83 488d159682b600 lea rdx,[js_dbg_64_dm_windows_62f79d676e0e!js::CodeSpec (00007ff7`1ef8d120)] -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00000000`1e424e62 ?? ?? ?? ?? ???? -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -00007ff7`1e424e62 cc c7 04 25 00 00 00 00 ...%.... -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - - -DUMP_CLASS: 2 - -DUMP_QUALIFIER: 400 - -CONTEXT: (.ecxr) -rax=0000000000000000 rbx=0000024dbf40baac rcx=00000000ffffffff -rdx=0000000000000000 rsi=0000024dbf40ba9e rdi=0000024dbf4f2201 -rip=00007ff71e424e62 rsp=000000de223fe3d0 rbp=0000024dbf4f22e0 - r8=000000de223fcd78 r9=0000024dbebe0735 r10=0000000000000000 -r11=000000de223fe240 r12=0000024dbf414088 r13=0000024dbf40baad -r14=0000000000000000 r15=0000024dbf40ba91 -iopl=0 nv up ei pl nz na pe nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000200 -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52: -00007ff7`1e424e62 cc int 3 -Resetting default scope - -FAULTING_IP: -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] -00007ff7`1e424e62 cc int 3 - -EXCEPTION_RECORD: (.exr -1) -ExceptionAddress: 00007ff71e424e62 (js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x0000000000000052) - ExceptionCode: 80000003 (Break instruction exception) - ExceptionFlags: 00000000 -NumberParameters: 1 - Parameter[0]: 0000000000000000 - -DEFAULT_BUCKET_ID: STATUS_BREAKPOINT - -PROCESS_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_CODE_STR: 80000003 - -EXCEPTION_PARAMETER1: 0000000000000000 - -WATSON_BKT_PROCSTAMP: 57e18eec - -WATSON_BKT_PROCVER: 0.0.0.0 - -WATSON_BKT_MODULE: js-dbg-64-dm-windows-62f79d676e0e.exe - -WATSON_BKT_MODSTAMP: 57e18eec - -WATSON_BKT_MODOFFSET: 7b4e62 - -WATSON_BKT_MODVER: 0.0.0.0 - -BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) - -MODLIST_WITH_TSCHKSUM_HASH: abe9d48025cf202213900541e7ac7be6e710bc74 - -MODLIST_SHA1_HASH: dcd2f6f5a658c3db2c10f42a36d472a2d0dd71fd - -NTGLOBALFLAG: 0 - -APPLICATION_VERIFIER_FLAGS: 0 - -DUMP_FLAGS: 94 - -DUMP_TYPE: 1 - -APP: js-dbg-64-dm-windows-62f79d676e0e.exe - -ANALYSIS_SESSION_HOST: F1BRIX - -ANALYSIS_SESSION_TIME: 09-20-2016 17:58:36.0426 - -ANALYSIS_VERSION: 10.0.10586.567 amd64fre - -THREAD_ATTRIBUTES: -OS_LOCALE: ENU - -PROBLEM_CLASSES: - - - - - Tid [0x0] - Frame [0x00] - String [STATUS_BREAKPOINT] - Data Bucketing - - -BUGCHECK_STR: STATUS_BREAKPOINT - -LAST_CONTROL_TRANSFER: from 00007ff71e4b8fdd to 00007ff71e424e62 - -STACK_TEXT: -000000de`223fe3d0 00007ff7`1e4b8fdd : 0000024d`bf40ba00 00000000`00000046 0000024d`bf17f101 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 -000000de`223fe410 00007ff7`1e43d3ca : 0000024d`bf414088 0000024d`bf17f1a8 00000000`00000002 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad -000000de`223fe4e0 00007ff7`1e4db883 : 0000024d`bf17f1a8 000000de`223fe610 0000024d`bef031b0 0000024d`bef07000 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a -000000de`223fe510 00007ff7`1e4dd30d : 000000de`223fe4c0 00000000`00000000 0000024d`bf199c18 000000de`223fec68 : js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 -000000de`223fe810 00007ff7`1dee8085 : 0000024d`bef53800 000000de`223fec38 0000024d`bef07000 0000024d`0000001d : js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d -000000de`223fe880 00007ff7`1e5a23c5 : 000000de`223feab8 000000de`223feab8 00000000`00000000 0000024d`bf199c18 : js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 -000000de`223fe8f0 00007ff7`1e5b677a : 000000de`223fea50 00000000`00000000 00000000`00000001 0000024d`bef53800 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 -000000de`223fe950 00007ff7`1ea36744 : 00000000`0000003a 00000000`00000000 00000000`00000000 0000024d`bf40c22d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa -000000de`223fe9e0 00000032`c8c27cc8 : 000000de`223fec01 0000024d`bf17f100 00000000`000006d0 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 -000000de`223feba0 000000de`223fec01 : 0000024d`bf17f100 00000000`000006d0 00000000`00000008 000000de`223fec28 : 0x00000032`c8c27cc8 -000000de`223feba8 0000024d`bf17f100 : 00000000`000006d0 00000000`00000008 000000de`223fec28 000000de`223febe0 : 0x000000de`223fec01 -000000de`223febb0 00000000`000006d0 : 00000000`00000008 000000de`223fec28 000000de`223febe0 00000039`f0831b56 : 0x0000024d`bf17f100 -000000de`223febb8 00000000`00000008 : 000000de`223fec28 000000de`223febe0 00000039`f0831b56 000000de`223febe0 : 0x6d0 -000000de`223febc0 000000de`223fec28 : 000000de`223febe0 00000039`f0831b56 000000de`223febe0 fff90000`00000000 : 0x8 -000000de`223febc8 000000de`223febe0 : 00000039`f0831b56 000000de`223febe0 fff90000`00000000 00007ff7`1f20e940 : 0x000000de`223fec28 -000000de`223febd0 00000039`f0831b56 : 000000de`223febe0 fff90000`00000000 00007ff7`1f20e940 0000024d`bf169bb0 : 0x000000de`223febe0 -000000de`223febd8 000000de`223febe0 : fff90000`00000000 00007ff7`1f20e940 0000024d`bf169bb0 00000032`c8c2e353 : 0x00000039`f0831b56 -000000de`223febe0 fff90000`00000000 : 00007ff7`1f20e940 0000024d`bf169bb0 00000032`c8c2e353 00000000`00004022 : 0x000000de`223febe0 -000000de`223febe8 00007ff7`1f20e940 : 0000024d`bf169bb0 00000032`c8c2e353 00000000`00004022 000000de`223fec68 : 0xfff90000`00000000 -000000de`223febf0 0000024d`bf169bb0 : 00000032`c8c2e353 00000000`00004022 000000de`223fec68 0000024d`bf413188 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -000000de`223febf8 00000032`c8c2e353 : 00000000`00004022 000000de`223fec68 0000024d`bf413188 00000000`00000000 : 0x0000024d`bf169bb0 -000000de`223fec00 00000000`00004022 : 000000de`223fec68 0000024d`bf413188 00000000`00000000 000000de`223fec28 : 0x00000032`c8c2e353 -000000de`223fec08 000000de`223fec68 : 0000024d`bf413188 00000000`00000000 000000de`223fec28 fffe024d`bf1948c0 : 0x4022 -000000de`223fec10 0000024d`bf413188 : 00000000`00000000 000000de`223fec28 fffe024d`bf1948c0 fff90000`00000000 : 0x000000de`223fec68 -000000de`223fec18 00000000`00000000 : 000000de`223fec28 fffe024d`bf1948c0 fff90000`00000000 000000de`223fec98 : 0x0000024d`bf413188 - - -THREAD_SHA1_HASH_MOD_FUNC: d3894c7048206c05171326cc132d8418fcc2541e - -THREAD_SHA1_HASH_MOD_FUNC_OFFSET: d0314c578160f0147d7ac71520f1d8de34149e27 - -THREAD_SHA1_HASH_MOD: d74ca7572f85c7b2a13b54456d3881548f31a2b6 - -FOLLOWUP_IP: -js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] -00007ff7`1e424e62 cc int 3 - -FAULT_INSTR_CODE: 2504c7cc - -FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h - -FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h - -FAULTING_SOURCE_LINE_NUMBER: 604 - -FAULTING_SOURCE_CODE: - 600: static inline unsigned - 601: GetBytecodeLength(jsbytecode* pc) - 602: { - 603: JSOp op = (JSOp)*pc; -> 604: MOZ_ASSERT(op < JSOP_LIMIT); - 605: - 606: if (CodeSpec[op].length != -1) - 607: return CodeSpec[op].length; - 608: return GetVariableBytecodeLength(pc); - 609: } - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_dbg_64_dm_windows_62f79d676e0e - -IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e18eec - -STACK_COMMAND: .ecxr ; kb - -BUCKET_ID: STATUS_BREAKPOINT_js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 - -PRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINT_js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+52 - -BUCKET_ID_OFFSET: 52 - -BUCKET_ID_MODULE_STR: js_dbg_64_dm_windows_62f79d676e0e - -BUCKET_ID_MODTIMEDATESTAMP: 57e18eec - -BUCKET_ID_MODCHECKSUM: 0 - -BUCKET_ID_MODVER_STR: 0.0.0.0 - -BUCKET_ID_PREFIX_STR: STATUS_BREAKPOINT_ - -FAILURE_PROBLEM_CLASS: STATUS_BREAKPOINT - -FAILURE_EXCEPTION_CODE: 80000003 - -FAILURE_IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -FAILURE_FUNCTION_NAME: js::GetBytecodeLength - -BUCKET_ID_FUNCTION_STR: js::GetBytecodeLength - -FAILURE_SYMBOL_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength - -FAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_js-dbg-64-dm-windows-62f79d676e0e.exe!js::GetBytecodeLength - -WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-dbg-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e18eec/js-dbg-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e18eec/80000003/007b4e62.htm?Retriage=1 - -TARGET_TIME: 2016-09-21T00:58:35.000Z - -OSBUILD: 14393 - -OSSERVICEPACK: 0 - -SERVICEPACK_NUMBER: 0 - -OS_REVISION: 0 - -SUITE_MASK: 256 - -PRODUCT_TYPE: 1 - -OSPLATFORM_TYPE: x64 - -OSNAME: Windows 10 - -OSEDITION: Windows 10 WinNt SingleUserTS - -USER_LCID: 0 - -OSBUILD_TIMESTAMP: 2016-07-15 19:21:29 - -BUILDDATESTAMP_STR: 160715-1616 - -BUILDLAB_STR: rs1_release - -BUILDOSVER_STR: 10.0.14393.0 - -ANALYSIS_SESSION_ELAPSED_TIME: 1a2 - -ANALYSIS_SOURCE: UM - -FAILURE_ID_HASH_STRING: um:status_breakpoint_80000003_js-dbg-64-dm-windows-62f79d676e0e.exe!js::getbytecodelength - -FAILURE_ID_HASH: {6684a19d-fe62-e5b1-14d4-33669a346a0f} - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # Child-SP RetAddr Call Site -00 000000de`223fe3d0 00007ff7`1e4b8fdd js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] -01 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::GetNextPc+0x8 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 843] -02 000000de`223fe410 00007ff7`1e43d3ca js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] -03 000000de`223fe4e0 00007ff7`1e4db883 js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] -04 000000de`223fe510 00007ff7`1e4dd30d js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] -05 000000de`223fe810 00007ff7`1dee8085 js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] -06 000000de`223fe880 00007ff7`1e5a23c5 js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\fuzz1win\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] -07 000000de`223fe8f0 00007ff7`1e5b677a js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -08 000000de`223fe950 00007ff7`1ea36744 js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -09 000000de`223fe9e0 00000032`c8c27cc8 js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -0a 000000de`223feba0 000000de`223fec01 0x00000032`c8c27cc8 -0b 000000de`223feba8 0000024d`bf17f100 0x000000de`223fec01 -0c 000000de`223febb0 00000000`000006d0 0x0000024d`bf17f100 -0d 000000de`223febb8 00000000`00000008 0x6d0 -0e 000000de`223febc0 000000de`223fec28 0x8 -0f 000000de`223febc8 000000de`223febe0 0x000000de`223fec28 -10 000000de`223febd0 00000039`f0831b56 0x000000de`223febe0 -11 000000de`223febd8 000000de`223febe0 0x00000039`f0831b56 -12 000000de`223febe0 fff90000`00000000 0x000000de`223febe0 -13 000000de`223febe8 00007ff7`1f20e940 0xfff90000`00000000 -14 000000de`223febf0 0000024d`bf169bb0 js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -15 000000de`223febf8 00000032`c8c2e353 0x0000024d`bf169bb0 -16 000000de`223fec00 00000000`00004022 0x00000032`c8c2e353 -17 000000de`223fec08 000000de`223fec68 0x4022 -18 000000de`223fec10 0000024d`bf413188 0x000000de`223fec68 -19 000000de`223fec18 00000000`00000000 0x0000024d`bf413188 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -RetAddr : Args to Child : Call Site -00007ff7`1e4b8fdd : 0000024d`bf40ba00 00000000`00000046 0000024d`bf17f101 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::GetBytecodeLength+0x52 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 604] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::GetNextPc+0x8 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.h @ 843] -00007ff7`1e43d3ca : 0000024d`bf414088 0000024d`bf17f1a8 00000000`00000002 00000000`00000002 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovSource::writeScript+0x8ad [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 346] -00007ff7`1e4db883 : 0000024d`bf17f1a8 000000de`223fe610 0000024d`bef031b0 0000024d`bef07000 : js_dbg_64_dm_windows_62f79d676e0e!js::coverage::LCovCompartment::collectCodeCoverageInfo+0x6a [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\codecoverage.cpp @ 420] -00007ff7`1e4dd30d : 000000de`223fe4c0 00000000`00000000 0000024d`bf199c18 000000de`223fec68 : js_dbg_64_dm_windows_62f79d676e0e!GenerateLcovInfo+0x913 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.cpp @ 2084] -00007ff7`1dee8085 : 0000024d`bef53800 000000de`223fec38 0000024d`bef07000 0000024d`0000001d : js_dbg_64_dm_windows_62f79d676e0e!js::GetCodeCoverageSummary+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jsopcode.cpp @ 2123] -00007ff7`1e5a23c5 : 000000de`223feab8 000000de`223feab8 00000000`00000000 0000024d`bf199c18 : js_dbg_64_dm_windows_62f79d676e0e!GetLcovInfo+0x265 [c:\users\fuzz1win\trees\mozilla-central\js\src\builtin\testingfunctions.cpp @ 3421] -00007ff7`1e5b677a : 000000de`223fea50 00000000`00000000 00000000`00000001 0000024d`bef53800 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -00007ff7`1ea36744 : 00000000`0000003a 00000000`00000000 00000000`00000000 0000024d`bf40c22d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -00000032`c8c27cc8 : 000000de`223fec01 0000024d`bf17f100 00000000`000006d0 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -000000de`223fec01 : 0000024d`bf17f100 00000000`000006d0 00000000`00000008 000000de`223fec28 : 0x00000032`c8c27cc8 -0000024d`bf17f100 : 00000000`000006d0 00000000`00000008 000000de`223fec28 000000de`223febe0 : 0x000000de`223fec01 -00000000`000006d0 : 00000000`00000008 000000de`223fec28 000000de`223febe0 00000039`f0831b56 : 0x0000024d`bf17f100 -00000000`00000008 : 000000de`223fec28 000000de`223febe0 00000039`f0831b56 000000de`223febe0 : 0x6d0 -000000de`223fec28 : 000000de`223febe0 00000039`f0831b56 000000de`223febe0 fff90000`00000000 : 0x8 -000000de`223febe0 : 00000039`f0831b56 000000de`223febe0 fff90000`00000000 00007ff7`1f20e940 : 0x000000de`223fec28 -00000039`f0831b56 : 000000de`223febe0 fff90000`00000000 00007ff7`1f20e940 0000024d`bf169bb0 : 0x000000de`223febe0 -000000de`223febe0 : fff90000`00000000 00007ff7`1f20e940 0000024d`bf169bb0 00000032`c8c2e353 : 0x00000039`f0831b56 -fff90000`00000000 : 00007ff7`1f20e940 0000024d`bf169bb0 00000032`c8c2e353 00000000`00004022 : 0x000000de`223febe0 -00007ff7`1f20e940 : 0000024d`bf169bb0 00000032`c8c2e353 00000000`00004022 000000de`223fec68 : 0xfff90000`00000000 -0000024d`bf169bb0 : 00000032`c8c2e353 00000000`00004022 000000de`223fec68 0000024d`bf413188 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -00000032`c8c2e353 : 00000000`00004022 000000de`223fec68 0000024d`bf413188 00000000`00000000 : 0x0000024d`bf169bb0 -00000000`00004022 : 000000de`223fec68 0000024d`bf413188 00000000`00000000 000000de`223fec28 : 0x00000032`c8c2e353 -000000de`223fec68 : 0000024d`bf413188 00000000`00000000 000000de`223fec28 fffe024d`bf1948c0 : 0x4022 -0000024d`bf413188 : 00000000`00000000 000000de`223fec28 fffe024d`bf1948c0 fff90000`00000000 : 0x000000de`223fec68 -00000000`00000000 : 000000de`223fec28 fffe024d`bf1948c0 fff90000`00000000 000000de`223fec98 : 0x0000024d`bf413188 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-3a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-3a-crashlog.txt deleted file mode 100644 index 6a71aa47f..000000000 --- a/FTB/Signatures/tests/resources/cdb-3a-crashlog.txt +++ /dev/null @@ -1,284 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-dbg-32-dm-windows-62f79d676e0e.exe.3684.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible -Product: WinNt, suite: SingleUserTS -Machine Name: -Debug session time: Fri Sep 23 15:55:20.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: 0 days 0:00:02.000 -.......................................... -This dump file has an exception of interest stored in it. -The stored exception information can be accessed via .ecxr. -(e64.c84): Access violation - code c0000005 (first/second chance not available) -eax=00000000 ebx=0041d454 ecx=2b2b2b2b edx=0a200310 esi=00000002 edi=00000000 -eip=77e9016d esp=0041d404 ebp=0041d4a0 iopl=0 nv up ei pl zr na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246 -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -ntdll!NtWaitForMultipleObjects+0x15: -77e9016d 83c404 add esp,4 -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=2b2ffff0 ebx=0041de08 ecx=2b2b2b2b edx=0a200310 esi=0041dc68 edi=0a200310 -eip=00f36a63 esp=0041dc04 ebp=0041dc2c iopl=0 nv up ei pl nz na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206 -*** WARNING: Unable to verify checksum for js-dbg-32-dm-windows-62f79d676e0e.exe -js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13: -00f36a63 8b00 mov eax,dword ptr [eax] ds:002b:2b2ffff0=???????? -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll!NtWaitForMultipleObjects+0x15: -77e9016d 83c404 add esp,4 -77e90170 c21400 ret 14h -77e90173 90 nop -ntdll!NtSetInformationObject: -77e90174 b859000000 mov eax,59h -77e90179 33c9 xor ecx,ecx -77e9017b 8d542404 lea edx,[esp+4] -77e9017f 64ff15c0000000 call dword ptr fs:[0C0h] -77e90186 83c404 add esp,4 -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00f36a63 8b 00 83 f8 .... -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -***** OS symbols are WRONG. Please fix symbols to do analysis. - -***** OS (WOW64 kernel32) symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: nt!IMAGE_NT_HEADERS32 *** -*** *** -************************************************************************* -Value unavailable error for addr -Value unavailable error for addr -Value unavailable error for addr -Value unavailable error for addr -Value unavailable error for addr -Value unavailable error for addr -Unable to load image C:\Windows\System32\ucrtbase.dll, Win32 error 0n2 -*** WARNING: Unable to verify timestamp for ucrtbase.dll -*** ERROR: Module load completed but symbols could not be loaded for ucrtbase.dll - -FAULTING_IP: -js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] -00f36a63 8b00 mov eax,dword ptr [eax] - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 00f36a63 (js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x00000013) - ExceptionCode: c0000005 (Access violation) - ExceptionFlags: 00000000 -NumberParameters: 2 - Parameter[0]: 00000000 - Parameter[1]: 2b2ffff0 -Attempt to read from address 2b2ffff0 - -PROCESS_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 76620000 kernel32 - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e2feea - -ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. - -EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. - -EXCEPTION_PARAMETER1: 00000000 - -EXCEPTION_PARAMETER2: 2b2ffff0 - -READ_ADDRESS: 2b2ffff0 - -FOLLOWUP_IP: -js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] -00f36a63 8b00 mov eax,dword ptr [eax] - -MOD_LIST: - -FAULTING_THREAD: 00000c84 - -BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_WRONG_SYMBOLS_FILL_PATTERN_2b2b2b2b - -PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -LAST_CONTROL_TRANSFER: from 015abad0 to 00f36a63 - -STACK_TEXT: -0041dc04 015abad0 0041de08 0041dc68 0041e650 js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] -0041dc2c 0159ab06 0a200310 0041e650 0041de08 js_dbg_32_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x90 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] -0041dc40 0157f054 0041dc68 0041e650 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0xa6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] -0041dc5c 0157d196 0041de08 0a200310 0041dc88 js_dbg_32_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * const>+0x44 [c:\users\mozillaadmin\shell-cache\js-dbg-32-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -0041dc80 01593309 0041de08 0041e650 01c511d8 js_dbg_32_dm_windows_62f79d676e0e!DispatchToTracer+0x36 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -0041dcb4 0199e4f9 0041de08 00000006 0041e638 js_dbg_32_dm_windows_62f79d676e0e!js::TraceRootRange+0x59 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 533] -0041dce0 014edb80 0041de08 0041dcfc 08c12508 js_dbg_32_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x219 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 73] -0041dd14 014edcff 0041de08 0041dd28 08c128a8 js_dbg_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x80 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -0041dd30 015b33af 08c12108 0041de08 08c12108 js_dbg_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x3f [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1456] -0041dda4 015a3ef2 0041de08 00000000 0041ddc4 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x8f [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -0041de6c 015a2d65 08c12108 00000007 0041deac js_dbg_32_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x362 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -0041df34 0110dd3d 08c12108 00000007 08c12000 js_dbg_32_dm_windows_62f79d676e0e!js::Nursery::collect+0x1a5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 587] -0041dfa0 011194bc 00000007 00000030 08c12508 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xed [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6519] -0041dfd8 0133679b 08c12000 00000000 0041e148 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::runDebugGC+0x2c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6766] -0041dff0 0132bc90 08c12000 00000010 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x3b [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -0041e004 01328849 08c12000 00000003 01b826ec js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x10 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] -0041e024 010541b3 08c12000 08c12000 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::Allocate+0x169 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -0041e04c 014207ee 08c12000 00000003 00000000 js_dbg_32_dm_windows_62f79d676e0e!JSObject::create+0x4b3 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -0041e08c 01420e13 08c12000 0041e0bc 00000003 js_dbg_32_dm_windows_62f79d676e0e!NewObject+0x18e [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] -0041e0d8 01478b98 00c12000 01b826ec 0041e130 js_dbg_32_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x133 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] -0041e1a0 0106888d 08c12000 01d09098 0041e1e8 js_dbg_32_dm_windows_62f79d676e0e!js::ProxyObject::New+0x368 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -0041e1bc 0104eb29 08c12000 01d09098 0041e1e8 js_dbg_32_dm_windows_62f79d676e0e!js::NewProxyObject+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 774] -0041e1f0 0104f507 08c12000 0a200360 01d09098 js_dbg_32_dm_windows_62f79d676e0e!js::Wrapper::New+0x69 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -0041e230 00fb9e99 08c12000 0041e2b0 0041e398 js_dbg_32_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xb7 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -0041e31c 00f13fa5 08c12000 0041e398 01b4da20 js_dbg_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x7b9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -0041e3b8 0106be4a 08c12000 0041e610 0041e460 js_dbg_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x245 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -0041e3e4 0106c0c2 08c3b000 0041e478 0041e620 js_dbg_32_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0xfa [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -0041e444 01071ca2 08c12000 0041e478 0041e460 js_dbg_32_dm_windows_62f79d676e0e!js::Proxy::call+0xb2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] -0041e47c 0149b2b6 08c12000 00000001 0041e610 js_dbg_32_dm_windows_62f79d676e0e!js::proxy_Call+0xd2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -0041e4a4 014a673c 08c3b000 00eb67a0 0041e58c js_dbg_32_dm_windows_62f79d676e0e!js::CallJSNative+0x86 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -0041e508 014a6429 08c12000 00000002 00000000 js_dbg_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x2bc [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] -0041e52c 0196cce4 08c12000 0041e610 0a575278 js_dbg_32_dm_windows_62f79d676e0e!InternalCall+0x119 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -0041e5c4 002f167c 0041e578 0041e668 0a55d189 js_dbg_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x364 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -WARNING: Frame IP not in any known module. Following frames may be wrong. -0041e6d0 01644acf 0eb114b0 00000004 0a55c4e0 0x2f167c -0041e5e8 ffffff82 01d16128 0a34e4e8 002f79f3 js_dbg_32_dm_windows_62f79d676e0e!EnterIon+0x2cf [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\ion.cpp @ 2837] -00000000 00000000 00000000 00000000 00000000 0xffffff82 - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FAULTING_SOURCE_CODE: - 1238: - 1239: inline Arena* - 1240: TenuredCell::arena() const - 1241: { -> 1242: MOZ_ASSERT(isTenured()); - 1243: uintptr_t addr = address(); - 1244: addr &= ~ArenaMask; - 1245: return reinterpret_cast(addr); - 1246: } - 1247: - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_dbg_32_dm_windows!js::gc::TenuredCell::arena+13 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_dbg_32_dm_windows_62f79d676e0e - -IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_c0000005_js-dbg-32-dm-windows-62f79d676e0e.exe!js::gc::TenuredCell::arena - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 0041d4a0 766319fc ntdll!NtWaitForMultipleObjects+0x15 -01 0041d4e8 766341d8 kernel32!WaitForMultipleObjectsEx+0x8e -02 0041d504 766580bc kernel32!WaitForMultipleObjects+0x18 -03 0041d570 76657f7b kernel32!GetApplicationRecoveryCallback+0x2a7 -04 0041d584 76657870 kernel32!GetApplicationRecoveryCallback+0x166 -05 0041d594 766577ef kernel32!UnhandledExceptionFilter+0x161 -06 0041d620 77ee5b67 kernel32!UnhandledExceptionFilter+0xe0 -07 0041f9c0 77ea98d5 ntdll!RtlKnownExceptionFilter+0xb7 -08 0041f9d8 00000000 ntdll!RtlInitializeExceptionChain+0x36 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -0041d4a0 766319fc 0041d454 0041d4c8 00000000 ntdll!NtWaitForMultipleObjects+0x15 -0041d4e8 766341d8 00000002 fffde000 00000000 kernel32!WaitForMultipleObjectsEx+0x8e -0041d504 766580bc 00000002 0041d538 00000000 kernel32!WaitForMultipleObjects+0x18 -0041d570 76657f7b 0041d650 00000001 00000001 kernel32!GetApplicationRecoveryCallback+0x2a7 -0041d584 76657870 0041d650 00000001 0041d620 kernel32!GetApplicationRecoveryCallback+0x166 -0041d594 766577ef 0041d650 00000001 259f5595 kernel32!UnhandledExceptionFilter+0x161 -0041d620 77ee5b67 00000000 77ee5a44 00000000 kernel32!UnhandledExceptionFilter+0xe0 -0041f9c0 77ea98d5 00e81f73 fffde000 00000000 ntdll!RtlKnownExceptionFilter+0xb7 -0041f9d8 00000000 00e81f73 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x36 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-3b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-3b-crashlog.txt deleted file mode 100644 index 815f392e0..000000000 --- a/FTB/Signatures/tests/resources/cdb-3b-crashlog.txt +++ /dev/null @@ -1,357 +0,0 @@ - -Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-dbg-32-dm-windows-62f79d676e0e.exe.5072.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: srv* -Executable search path is: -Windows 10 Version 14393 MP (8 procs) Free x86 compatible -Product: WinNt, suite: SingleUserTS -Built by: 10.0.14393.0 (rs1_release.160715-1616) -Machine Name: -Debug session time: Tue Sep 20 17:58:57.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: not available -.................... -This dump file has an exception of interest stored in it. -The stored exception information can be accessed via .ecxr. -(13d0.1e6c): Access violation - code c0000005 (first/second chance not available) -eax=00000000 ebx=00000000 ecx=2b2b2b2b edx=04200310 esi=00000003 edi=00000003 -eip=770fe1bc esp=02b2cfb0 ebp=02b2d140 iopl=0 nv up ei pl nz ac po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212 -ntdll!NtWaitForMultipleObjects+0xc: -770fe1bc c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw - *** !wow64exts is only useful targeting architectures that support WoW *** -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -*** WARNING: Unable to verify checksum for js-dbg-32-dm-windows-62f79d676e0e.exe -eax=2b2ffff0 ebx=02b2deb8 ecx=2b2b2b2b edx=04200310 esi=02b2dd18 edi=04200310 -eip=00ed6a63 esp=02b2dcb4 ebp=02b2dcdc iopl=0 nv up ei pl nz na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206 -js_dbg_32_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x12 [inlined in js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13]: -00ed6a63 8b00 mov eax,dword ptr [eax] ds:002b:2b2ffff0=???????? -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_dbg_32_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x12 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] [inlined in js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242]]: -00ed6a63 8b00 mov eax,dword ptr [eax] -00ed6a65 83f801 cmp eax,1 -00ed6a68 7457 je js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x71 (00ed6ac1) -00ed6a6a 83f802 cmp eax,2 -00ed6a6d 744f je js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x6e (00ed6abe) -00ed6a6f 8b356875cb01 mov esi,dword ptr [js_dbg_32_dm_windows_62f79d676e0e!_imp____acrt_iob_func (01cb7568)] -00ed6a75 6853010000 push 153h -00ed6a7a 6820ecae01 push offset js_dbg_32_dm_windows_62f79d676e0e!`string' (01aeec20) -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00ed6a63 8b 00 83 f8 .... -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - - -DUMP_CLASS: 2 - -DUMP_QUALIFIER: 400 - -CONTEXT: (.ecxr) -eax=2b2ffff0 ebx=02b2deb8 ecx=2b2b2b2b edx=04200310 esi=02b2dd18 edi=04200310 -eip=00ed6a63 esp=02b2dcb4 ebp=02b2dcdc iopl=0 nv up ei pl nz na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010206 -js_dbg_32_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x12 [inlined in js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13]: -00ed6a63 8b00 mov eax,dword ptr [eax] ds:002b:2b2ffff0=???????? -Resetting default scope - -FAULTING_IP: -js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] -00ed6a63 8b00 mov eax,dword ptr [eax] - -EXCEPTION_RECORD: (.exr -1) -ExceptionAddress: 00ed6a63 (js_dbg_32_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x00000012) - ExceptionCode: c0000005 (Access violation) - ExceptionFlags: 00000000 -NumberParameters: 2 - Parameter[0]: 00000000 - Parameter[1]: 2b2ffff0 -Attempt to read from address 2b2ffff0 - -DEFAULT_BUCKET_ID: INVALID_POINTER_READ - -PROCESS_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. - -EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. - -EXCEPTION_CODE_STR: c0000005 - -EXCEPTION_PARAMETER1: 00000000 - -EXCEPTION_PARAMETER2: 2b2ffff0 - -READ_ADDRESS: 2b2ffff0 - -FOLLOWUP_IP: -js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] -00ed6a63 8b00 mov eax,dword ptr [eax] - -BUGCHECK_STR: INVALID_POINTER_READ - -WATSON_BKT_PROCSTAMP: 57e1a04d - -WATSON_BKT_PROCVER: 0.0.0.0 - -WATSON_BKT_MODULE: js-dbg-32-dm-windows-62f79d676e0e.exe - -WATSON_BKT_MODSTAMP: 57e1a04d - -WATSON_BKT_MODOFFSET: b6a63 - -WATSON_BKT_MODVER: 0.0.0.0 - -BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) - -MODLIST_WITH_TSCHKSUM_HASH: de4429b5af575b8039a5f7787b9caed65d2bf3f4 - -MODLIST_SHA1_HASH: 321ac338a21bc4e5bbc909e35e09f64c6505c35a - -NTGLOBALFLAG: 0 - -APPLICATION_VERIFIER_FLAGS: 0 - -DUMP_FLAGS: 94 - -DUMP_TYPE: 1 - -APP: js-dbg-32-dm-windows-62f79d676e0e.exe - -ANALYSIS_SESSION_HOST: F1BRIX - -ANALYSIS_SESSION_TIME: 09-20-2016 17:58:58.0271 - -ANALYSIS_VERSION: 10.0.10586.567 amd64fre - -THREAD_ATTRIBUTES: -OS_LOCALE: ENU - -PROBLEM_CLASSES: - - - -INVALID_POINTER_READ - Tid [0x1e6c] - Frame [0x00]: js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena - - -LAST_CONTROL_TRANSFER: from 0154bad0 to 00ed6a63 - -STACK_TEXT: -02b2dcb4 0154bad0 02b2deb8 02b2dd18 02b2e700 js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0x13 -02b2dcdc 0153ab06 04200310 02b2e700 02b2deb8 js_dbg_32_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x90 -02b2dcf0 0151f054 02b2dd18 02b2e700 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0xa6 -02b2dd0c 0151d196 02b2deb8 04200310 02b2dd38 js_dbg_32_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * const>+0x44 -02b2dd30 01533309 02b2deb8 02b2e700 01bf0568 js_dbg_32_dm_windows_62f79d676e0e!DispatchToTracer+0x36 -02b2dd64 0193e4f9 02b2deb8 00000006 02b2e6e8 js_dbg_32_dm_windows_62f79d676e0e!js::TraceRootRange+0x59 -02b2dd90 0148db80 02b2deb8 02b2ddac 03212508 js_dbg_32_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x219 -02b2ddc4 0148dcff 02b2deb8 02b2ddd8 032128a8 js_dbg_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x80 -02b2dde0 015533af 03212108 02b2deb8 03212108 js_dbg_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x3f -02b2de54 01543ef2 02b2deb8 00000000 02b2de74 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x8f -02b2df1c 01542d65 03212108 00000007 02b2df5c js_dbg_32_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x362 -02b2dfe4 010add3d 03212108 00000007 03212000 js_dbg_32_dm_windows_62f79d676e0e!js::Nursery::collect+0x1a5 -02b2e050 010b94bc 00000007 00000030 03212508 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xed -02b2e088 012d679b 03212000 00000000 02b2e1f8 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::runDebugGC+0x2c -02b2e0a0 012cbc90 03212000 00000010 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x3b -02b2e0b4 012c8849 03212000 00000003 01b223a4 js_dbg_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x10 -02b2e0d4 00ff41b3 03212000 03212000 00000003 js_dbg_32_dm_windows_62f79d676e0e!js::Allocate+0x169 -02b2e0fc 013c07ee 03212000 00000003 00000000 js_dbg_32_dm_windows_62f79d676e0e!JSObject::create+0x4b3 -02b2e13c 013c0e13 03212000 02b2e16c 00000003 js_dbg_32_dm_windows_62f79d676e0e!NewObject+0x18e -02b2e188 01418b98 00212000 01b223a4 02b2e1e0 js_dbg_32_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x133 -02b2e250 0100888d 03212000 01ca8098 02b2e298 js_dbg_32_dm_windows_62f79d676e0e!js::ProxyObject::New+0x368 -02b2e26c 00feeb29 03212000 01ca8098 02b2e298 js_dbg_32_dm_windows_62f79d676e0e!js::NewProxyObject+0x7d -02b2e2a0 00fef507 03212000 04200360 01ca8098 js_dbg_32_dm_windows_62f79d676e0e!js::Wrapper::New+0x69 -02b2e2e0 00f59e99 03212000 02b2e360 02b2e448 js_dbg_32_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xb7 -02b2e3cc 00eb3fa5 03212000 02b2e448 01aeda18 js_dbg_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x7b9 -02b2e468 0100be4a 03212000 02b2e6c0 02b2e510 js_dbg_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x245 -02b2e494 0100c0c2 0323b000 02b2e528 02b2e6d0 js_dbg_32_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0xfa -02b2e4f4 01011ca2 03212000 02b2e528 02b2e510 js_dbg_32_dm_windows_62f79d676e0e!js::Proxy::call+0xb2 -02b2e52c 0143b2b6 03212000 00000001 02b2e6c0 js_dbg_32_dm_windows_62f79d676e0e!js::proxy_Call+0xd2 -02b2e554 0144673c 0323b000 00e567af 02b2e63c js_dbg_32_dm_windows_62f79d676e0e!js::CallJSNative+0x86 -02b2e5b8 01446429 03212000 00000002 00000000 js_dbg_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x2bc -02b2e5dc 0190cce4 03212000 02b2e6c0 0327c278 js_dbg_32_dm_windows_62f79d676e0e!InternalCall+0x119 -02b2e674 0dcd167c 02b2e628 02b2e718 0449cb69 js_dbg_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x364 -WARNING: Frame IP not in any known module. Following frames may be wrong. -02b2e780 015e4acf 1f0714b0 00000004 0455c4e0 0xdcd167c -02b2e698 ffffff82 01cb5128 0434e4e8 0dcd79f3 js_dbg_32_dm_windows_62f79d676e0e!EnterIon+0x2cf -00000000 00000000 00000000 00000000 00000000 0xffffff82 - - -THREAD_SHA1_HASH_MOD_FUNC: c0b5e0af2635ad4df87021f287e799c8cf04fe23 - -THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 9ff6c334b59646bf8e061669824a7cc9d5ab53c3 - -THREAD_SHA1_HASH_MOD: f8cdc7b4b7359e881a3edb72b3670b512279713d - -FAULT_INSTR_CODE: f883008b - -FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h - -FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h - -FAULTING_SOURCE_LINE_NUMBER: 1242 - -FAULTING_SOURCE_CODE: - 334: return false; - 335: uintptr_t addr = uintptr_t(cell); - 336: addr &= ~js::gc::ChunkMask; - 337: addr |= js::gc::ChunkLocationOffset; -> 338: auto location = *reinterpret_cast(addr); - 339: MOZ_ASSERT(location == ChunkLocation::Nursery || location == ChunkLocation::TenuredHeap); - 340: return location == ChunkLocation::Nursery; - 341: } - 342: - 343: } /* namespace gc */ - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_dbg_32_dm_windows_62f79d676e0e - -IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e1a04d - -STACK_COMMAND: .ecxr ; kb - -BUCKET_ID: INVALID_POINTER_READ_js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 - -PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_js_dbg_32_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+13 - -BUCKET_ID_OFFSET: 13 - -BUCKET_ID_MODULE_STR: js_dbg_32_dm_windows_62f79d676e0e - -BUCKET_ID_MODTIMEDATESTAMP: 57e1a04d - -BUCKET_ID_MODCHECKSUM: 0 - -BUCKET_ID_MODVER_STR: 0.0.0.0 - -BUCKET_ID_PREFIX_STR: INVALID_POINTER_READ_ - -FAILURE_PROBLEM_CLASS: INVALID_POINTER_READ - -FAILURE_EXCEPTION_CODE: c0000005 - -FAILURE_IMAGE_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe - -FAILURE_FUNCTION_NAME: js::gc::TenuredCell::arena - -BUCKET_ID_FUNCTION_STR: js::gc::TenuredCell::arena - -FAILURE_SYMBOL_NAME: js-dbg-32-dm-windows-62f79d676e0e.exe!js::gc::TenuredCell::arena - -FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_js-dbg-32-dm-windows-62f79d676e0e.exe!js::gc::TenuredCell::arena - -WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-dbg-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a04d/js-dbg-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a04d/c0000005/000b6a63.htm?Retriage=1 - -TARGET_TIME: 2016-09-21T00:58:57.000Z - -OSBUILD: 14393 - -OSSERVICEPACK: 0 - -SERVICEPACK_NUMBER: 0 - -OS_REVISION: 0 - -SUITE_MASK: 256 - -PRODUCT_TYPE: 1 - -OSPLATFORM_TYPE: x86 - -OSNAME: Windows 10 - -OSEDITION: Windows 10 WinNt SingleUserTS - -USER_LCID: 0 - -OSBUILD_TIMESTAMP: 2016-07-15 18:33:42 - -BUILDDATESTAMP_STR: 160715-1616 - -BUILDLAB_STR: rs1_release - -BUILDOSVER_STR: 10.0.14393.0 - -ANALYSIS_SESSION_ELAPSED_TIME: 1198 - -ANALYSIS_SOURCE: UM - -FAILURE_ID_HASH_STRING: um:invalid_pointer_read_c0000005_js-dbg-32-dm-windows-62f79d676e0e.exe!js::gc::tenuredcell::arena - -FAILURE_ID_HASH: {6aa09f1b-6e89-a735-594e-e2e3e2f9c267} - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # ChildEBP RetAddr -00 02b2cfac 76761a30 ntdll!NtWaitForMultipleObjects+0xc -01 02b2d140 76761928 KERNELBASE!WaitForMultipleObjectsEx+0xf0 -02 02b2d15c 76de7062 KERNELBASE!WaitForMultipleObjects+0x18 -03 02b2d5d8 76de6aa6 kernel32!WerpReportFaultInternal+0x59d -04 02b2d5f4 76dbe7a9 kernel32!WerpReportFault+0x9b -05 02b2d5fc 767ed90a kernel32!BasepReportFault+0x19 -06 02b2d694 7712dc00 KERNELBASE!UnhandledExceptionFilter+0x25a -07 02b2fa80 770f05d4 ntdll!__RtlUserThreadStart+0x3d626 -08 02b2fa90 00000000 ntdll!_RtlUserThreadStart+0x1b -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -02b2cfac 76761a30 00000003 02b2d59c 00000001 ntdll!NtWaitForMultipleObjects+0xc -02b2d140 76761928 00000003 02b2d59c 00000000 KERNELBASE!WaitForMultipleObjectsEx+0xf0 -02b2d15c 76de7062 00000003 02b2d59c 00000000 KERNELBASE!WaitForMultipleObjects+0x18 -02b2d5d8 76de6aa6 00000000 00000000 00000001 kernel32!WerpReportFaultInternal+0x59d -02b2d5f4 76dbe7a9 02b2d694 767ed90a 02b2d6c4 kernel32!WerpReportFault+0x9b -02b2d5fc 767ed90a 02b2d6c4 00000001 9aee06ee kernel32!BasepReportFault+0x19 -02b2d694 7712dc00 02b2d6c4 771020b0 02b2fa80 KERNELBASE!UnhandledExceptionFilter+0x25a -02b2fa80 770f05d4 ffffffff 77112531 00000000 ntdll!__RtlUserThreadStart+0x3d626 -02b2fa90 00000000 00e21f5a 00db3000 00000000 ntdll!_RtlUserThreadStart+0x1b -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-4a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-4a-crashlog.txt deleted file mode 100644 index c36ad7293..000000000 --- a/FTB/Signatures/tests/resources/cdb-4a-crashlog.txt +++ /dev/null @@ -1,318 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-32-dm-windows-62f79d676e0e.exe.2372.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible -Product: WinNt, suite: SingleUserTS -Machine Name: -Debug session time: Fri Sep 23 16:39:26.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: 0 days 0:00:01.000 -.......................................... -This dump file has an exception of interest stored in it. -The stored exception information can be accessed via .ecxr. -(944.bf0): Access violation - code c0000005 (first/second chance not available) -eax=00000000 ebx=002ad2dc ecx=2b2b2b2b edx=002ae2f0 esi=00000002 edi=00000000 -eip=77e9016d esp=002ad28c ebp=002ad328 iopl=0 nv up ei pl zr na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246 -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -ntdll!NtWaitForMultipleObjects+0x15: -77e9016d 83c404 add esp,4 -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=09bfff01 ebx=002adc18 ecx=2b2b2b2b edx=002ae2f0 esi=09b00310 edi=09b00310 -eip=00d44c59 esp=002ada8c ebp=002adc18 iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 -*** WARNING: Unable to verify checksum for js-32-dm-windows-62f79d676e0e.exe -js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9: -00d44c59 8b39 mov edi,dword ptr [ecx] ds:002b:2b2b2b2b=???????? -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll!NtWaitForMultipleObjects+0x15: -77e9016d 83c404 add esp,4 -77e90170 c21400 ret 14h -77e90173 90 nop -ntdll!NtSetInformationObject: -77e90174 b859000000 mov eax,59h -77e90179 33c9 xor ecx,ecx -77e9017b 8d542404 lea edx,[esp+4] -77e9017f 64ff15c0000000 call dword ptr fs:[0C0h] -77e90186 83c404 add esp,4 -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00d44c59 8b 39 81 ff .9.. -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** WARNING: Unable to verify checksum for mozglue.dll -***** OS symbols are WRONG. Please fix symbols to do analysis. - -***** OS (WOW64 kernel32) symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: nt!IMAGE_NT_HEADERS32 *** -*** *** -************************************************************************* -CvRegToMachine(x86) conversion failure for 0x7536 -CvRegToMachine(x86) conversion failure for 0x7536 -CvRegToMachine(x86) conversion failure for 0x7536 -CvRegToMachine(x86) conversion failure for 0x7536 -Value unavailable error for descr -Value unavailable error for kind -Value unavailable error for kind -Value unavailable error for nbytes -Value unavailable error for nbytes -Value unavailable error for nelements -Value unavailable error for descr -Value unavailable error for kind -Value unavailable error for kind -Value unavailable error for nbytes -Value unavailable error for nbytes -Value unavailable error for nelements -Value unavailable error for descr -Value unavailable error for kind -Value unavailable error for kind -Value unavailable error for nbytes -Value unavailable error for nbytes -Value unavailable error for nelements -*** WARNING: Unable to verify timestamp for ucrtbase.dll -*** ERROR: Module load completed but symbols could not be loaded for ucrtbase.dll - -FAULTING_IP: -js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00d44c59 8b39 mov edi,dword ptr [ecx] - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 00d44c59 (js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x00000009) - ExceptionCode: c0000005 (Access violation) - ExceptionFlags: 00000000 -NumberParameters: 2 - Parameter[0]: 00000000 - Parameter[1]: 2b2b2b2b -Attempt to read from address 2b2b2b2b - -PROCESS_NAME: js-32-dm-windows-62f79d676e0e.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 76620000 kernel32 - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e30071 - -ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. - -EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. - -EXCEPTION_PARAMETER1: 00000000 - -EXCEPTION_PARAMETER2: 2b2b2b2b - -READ_ADDRESS: 2b2b2b2b - -FOLLOWUP_IP: -js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00d44c59 8b39 mov edi,dword ptr [ecx] - -MOD_LIST: - -FAULTING_THREAD: 00000bf0 - -BUGCHECK_STR: APPLICATION_FAULT_STRING_DEREFERENCE_INVALID_POINTER_READ_WRONG_SYMBOLS_FILL_PATTERN_2b2b2b2b - -PRIMARY_PROBLEM_CLASS: STRING_DEREFERENCE_FILL_PATTERN_2b2b2b2b - -DEFAULT_BUCKET_ID: STRING_DEREFERENCE_FILL_PATTERN_2b2b2b2b - -LAST_CONTROL_TRANSFER: from 00df2387 to 00d44c59 - -STACK_TEXT: -002ada98 00df2387 082104e8 002ae2f0 002ae2f0 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -002adabc 00de7d13 09b00310 00de94fa 002adad8 js_32_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x17 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] -002adac4 00de94fa 002adad8 09b00310 002adc18 js_32_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x33 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] -002adadc 00de8710 002adc18 002ae2f0 002adb00 js_32_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * const>+0x3a [c:\users\mozillaadmin\shell-cache\js-32-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -002adaf8 00dec158 002adc18 002ae2f0 010fae40 js_32_dm_windows_62f79d676e0e!DispatchToTracer+0x30 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -002adb20 00f4fae1 002adc18 00000006 002ae2d8 js_32_dm_windows_62f79d676e0e!js::TraceRootRange+0x48 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 520] -002adb44 00d964b4 08266269 00000003 082104e8 js_32_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x211 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 83] -002adb74 00d965e2 002adc18 002adb88 082107a0 js_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xa4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -002adb8c 00df5439 08210108 002adc18 08210108 js_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1456] -002adbec 00defb70 002adc18 00000000 002adc4c js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x39 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -002adca0 00def45c 08210108 00000007 002adcec js_32_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x320 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -002add70 00b935c9 08210108 00000007 082104c0 js_32_dm_windows_62f79d676e0e!js::Nursery::collect+0x10c [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 587] -002addcc 00b97549 00000007 00000030 08210000 js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x89 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6521] -002ade00 00ce14c6 08210000 082104c0 00cde17d js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::runDebugGC+0x29 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6766] -002ade0c 00cde17d 08210000 08210000 0109f690 js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x36 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -002ade24 00b8de4d 082104c0 00000003 00000003 js_32_dm_windows_62f79d676e0e!js::Allocate+0x8d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -002ade58 00d3f92c 08210000 00000003 00000000 js_32_dm_windows_62f79d676e0e!JSObject::create+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -002ade94 00d3fe56 08210000 002aded8 00000003 js_32_dm_windows_62f79d676e0e!NewObject+0x11c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] -002aded8 00d66156 08210000 0109f690 002adf48 js_32_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x166 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] -002adf80 00bb5c95 08210000 01185648 002adfbc js_32_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1a6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -002adf98 00c5a923 08210000 01185648 002adfbc js_32_dm_windows_62f79d676e0e!js::NewProxyObject+0x25 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 774] -002adfc0 00c5acac 08210000 09b00360 01185648 js_32_dm_windows_62f79d676e0e!js::Wrapper::New+0x63 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -002adff8 00c8c792 08210000 002ae054 002ae0b8 js_32_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x3c [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -002ae090 00b727f4 08210000 002ae0b8 0109561c js_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x392 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -002ae0e4 00bb70ba 08210000 002ae2b0 08210000 js_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x1c4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -002ae110 00bb7244 08210000 002ae154 002ae158 js_32_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x12a [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -002ae138 00bba0b6 08210000 002ae154 002ae158 js_32_dm_windows_62f79d676e0e!js::Proxy::call+0xc4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] -002ae160 00d76bd6 08210000 00000001 002ae2b0 js_32_dm_windows_62f79d676e0e!js::proxy_Call+0x66 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -002ae1b0 00d76ad3 0821b000 00bba050 00000000 js_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0xf6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] -002ae1cc 00f318ad 08210000 002ae200 0827b278 js_32_dm_windows_62f79d676e0e!InternalCall+0x63 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -002ae360 70e264d5 09e00238 002ae498 2ed907a0 js_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x2cd [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -002ae450 00e451f1 08210000 002ae468 002ae628 mozglue!je_free+0x15 [c:\users\mozillaadmin\trees\mozilla-central\memory\mozjemalloc\jemalloc.c @ 6485] -002ae4f4 00d84a6f 08210000 002ae5bc 002ae5cc js_32_dm_windows_62f79d676e0e!js::jit::IonCannon+0x121 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\ion.cpp @ 2935] -002ae58c 00d76d2d 08210000 002ae5bc 0827a418 js_32_dm_windows_62f79d676e0e!js::RunScript+0x12f [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] -002ae5d8 00d76ad3 08210000 002ae628 00000000 js_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x24d [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] -002ae5f4 00f318ad 08210000 002ae628 0827a418 js_32_dm_windows_62f79d676e0e!InternalCall+0x63 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -002ae758 00f56dde 2ed97259 00000001 002ae85c js_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x2cd [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -002ae834 00f57228 08210000 002ae864 09eb7d76 js_32_dm_windows_62f79d676e0e!EnterBaseline+0x13e [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] -002ae914 00d7f5d9 08210000 09ee7018 09eb7d76 js_32_dm_windows_62f79d676e0e!js::jit::EnterBaselineAtBranch+0x388 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 261] -002af370 00d84ba1 08210000 002af418 002af428 js_32_dm_windows_62f79d676e0e!Interpret+0x85d9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 1916] -002af408 00d739fc 08210000 002af418 010e3004 js_32_dm_windows_62f79d676e0e!js::RunScript+0x261 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 404] -002af454 00d738a5 08210000 002af4fc 09c56020 js_32_dm_windows_62f79d676e0e!js::ExecuteKernel+0xac [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 688] -002af490 00c771ca 08210000 002af4fc 09c56020 js_32_dm_windows_62f79d676e0e!js::Execute+0xf5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 717] -002af4b0 00c7bfc1 08210000 002af4d4 002af4fc js_32_dm_windows_62f79d676e0e!ExecuteScript+0x2a [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsapi.cpp @ 4314] -002af4d4 00b6c895 08210000 002af4fc 00aa2ff1 js_32_dm_windows_62f79d676e0e!JS_ExecuteScript+0x51 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsapi.cpp @ 4347] -002af560 00b6b836 08210000 00aa2ff1 0838efc8 js_32_dm_windows_62f79d676e0e!RunFile+0x115 [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 641] -002af584 00b6bc4a 08210000 00aa2ff1 00000000 js_32_dm_windows_62f79d676e0e!Process+0xc6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 1039] -002af634 00b6e1f6 08210000 002af714 08210000 js_32_dm_windows_62f79d676e0e!ProcessArgs+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 6930] -002af6b4 00b73536 08210000 002af714 009f0e60 js_32_dm_windows_62f79d676e0e!Shell+0x1a6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 7288] -002af7b4 01091e0e 00000004 00aa2f50 009f0e60 js_32_dm_windows_62f79d676e0e!main+0xc16 [c:\users\mozillaadmin\trees\mozilla-central\js\src\shell\js.cpp @ 7670] -002af7fc 7663336a fffde000 002af848 77ea9902 js_32_dm_windows_62f79d676e0e!__scrt_common_main_seh+0xf9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253] -WARNING: Stack unwind information not available. Following frames may be wrong. -002af808 77ea9902 fffde000 77b082e2 00000000 kernel32!BaseThreadInitThunk+0x12 -002af848 77ea98d5 01091e84 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x63 -002af860 00000000 01091e84 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x36 - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FAULTING_SOURCE_CODE: - 3671: - 3672: js::gc::AllocKind - 3673: JSObject::allocKindForTenure(const js::Nursery& nursery) const - 3674: { -> 3675: if (is()) { - 3676: const ArrayObject& aobj = as(); - 3677: MOZ_ASSERT(aobj.numFixedSlots() == 0); - 3678: - 3679: /* Use minimal size object if we are just going to copy the pointer. */ - 3680: if (!nursery.isInside(aobj.getElementsHeader())) - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_32_dm_windows!JSObject::allocKindForTenure+9 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_32_dm_windows_62f79d676e0e - -IMAGE_NAME: js-32-dm-windows-62f79d676e0e.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: STRING_DEREFERENCE_FILL_PATTERN_2b2b2b2b_c0000005_js-32-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 002ad328 766319fc ntdll!NtWaitForMultipleObjects+0x15 -01 002ad370 766341d8 kernel32!WaitForMultipleObjectsEx+0x8e -02 002ad38c 766580bc kernel32!WaitForMultipleObjects+0x18 -03 002ad3f8 76657f7b kernel32!GetApplicationRecoveryCallback+0x2a7 -04 002ad40c 76657870 kernel32!GetApplicationRecoveryCallback+0x166 -05 002ad41c 766577ef kernel32!UnhandledExceptionFilter+0x161 -06 002ad4a8 77ee5b67 kernel32!UnhandledExceptionFilter+0xe0 -07 002af848 77ea98d5 ntdll!RtlKnownExceptionFilter+0xb7 -08 002af860 00000000 ntdll!RtlInitializeExceptionChain+0x36 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -002ad328 766319fc 002ad2dc 002ad350 00000000 ntdll!NtWaitForMultipleObjects+0x15 -002ad370 766341d8 00000002 fffde000 00000000 kernel32!WaitForMultipleObjectsEx+0x8e -002ad38c 766580bc 00000002 002ad3c0 00000000 kernel32!WaitForMultipleObjects+0x18 -002ad3f8 76657f7b 002ad4d8 00000001 00000001 kernel32!GetApplicationRecoveryCallback+0x2a7 -002ad40c 76657870 002ad4d8 00000001 002ad4a8 kernel32!GetApplicationRecoveryCallback+0x166 -002ad41c 766577ef 002ad4d8 00000001 83ae004e kernel32!UnhandledExceptionFilter+0x161 -002ad4a8 77ee5b67 00000000 77ee5a44 00000000 kernel32!UnhandledExceptionFilter+0xe0 -002af848 77ea98d5 01091e84 fffde000 00000000 ntdll!RtlKnownExceptionFilter+0xb7 -002af860 00000000 01091e84 fffde000 00000000 ntdll!RtlInitializeExceptionChain+0x36 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-4b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-4b-crashlog.txt deleted file mode 100644 index 0ed383596..000000000 --- a/FTB/Signatures/tests/resources/cdb-4b-crashlog.txt +++ /dev/null @@ -1,368 +0,0 @@ - -Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-32-dm-windows-62f79d676e0e.exe.6972.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: srv* -Executable search path is: -Windows 10 Version 14393 MP (8 procs) Free x86 compatible -Product: WinNt, suite: SingleUserTS -Built by: 10.0.14393.0 (rs1_release.160715-1616) -Machine Name: -Debug session time: Tue Sep 20 17:59:27.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: not available -.................... -This dump file has an exception of interest stored in it. -The stored exception information can be accessed via .ecxr. -(1b3c.135c): Access violation - code c0000005 (first/second chance not available) -eax=00000000 ebx=00000000 ecx=2b2b2b2b edx=016fe490 esi=00000003 edi=00000003 -eip=770fe1bc esp=016fcf28 ebp=016fd0b8 iopl=0 nv up ei pl nz na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206 -ntdll!NtWaitForMultipleObjects+0xc: -770fe1bc c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw - *** !wow64exts is only useful targeting architectures that support WoW *** -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -*** WARNING: Unable to verify checksum for js-32-dm-windows-62f79d676e0e.exe -eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 -eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 -js_32_dm_windows_62f79d676e0e!JSObject::is+0x2 [inlined in js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9]: -00404c59 8b39 mov edi,dword ptr [ecx] ds:002b:2b2b2b2b=???????? -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_32_dm_windows_62f79d676e0e!JSObject::is+0x2 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] [inlined in js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675]]: -00404c59 8b39 mov edi,dword ptr [ecx] -00404c5b 81ff708e7a00 cmp edi,offset js_32_dm_windows_62f79d676e0e!js::ArrayObject::class_ (007a8e70) -00404c61 7567 jne js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x7a (00404cca) -00404c63 8b442414 mov eax,dword ptr [esp+14h] -00404c67 8b4808 mov ecx,dword ptr [eax+8] -00404c6a 8b400c mov eax,dword ptr [eax+0Ch] -00404c6d 8d3c81 lea edi,[ecx+eax*4] -00404c70 3bcf cmp ecx,edi -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00404c59 8b 39 81 ff .9.. -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** WARNING: Unable to verify checksum for mozglue.dll - -DUMP_CLASS: 2 - -DUMP_QUALIFIER: 400 - -CONTEXT: (.ecxr) -eax=02efff01 ebx=016fddb8 ecx=2b2b2b2b edx=016fe490 esi=02e00310 edi=02e00310 -eip=00404c59 esp=016fdc2c ebp=016fddb8 iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202 -js_32_dm_windows_62f79d676e0e!JSObject::is+0x2 [inlined in js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9]: -00404c59 8b39 mov edi,dword ptr [ecx] ds:002b:2b2b2b2b=???????? -Resetting default scope - -FAULTING_IP: -js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00404c59 8b39 mov edi,dword ptr [ecx] - -EXCEPTION_RECORD: (.exr -1) -ExceptionAddress: 00404c59 (js_32_dm_windows_62f79d676e0e!JSObject::is+0x00000002) - ExceptionCode: c0000005 (Access violation) - ExceptionFlags: 00000000 -NumberParameters: 2 - Parameter[0]: 00000000 - Parameter[1]: 2b2b2b2b -Attempt to read from address 2b2b2b2b - -PROCESS_NAME: js-32-dm-windows-62f79d676e0e.exe - -ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. - -EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. - -EXCEPTION_CODE_STR: c0000005 - -EXCEPTION_PARAMETER1: 00000000 - -EXCEPTION_PARAMETER2: 2b2b2b2b - -READ_ADDRESS: 2b2b2b2b - -FOLLOWUP_IP: -js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00404c59 8b39 mov edi,dword ptr [ecx] - -WATSON_BKT_PROCSTAMP: 57e1a1c7 - -WATSON_BKT_PROCVER: 0.0.0.0 - -WATSON_BKT_MODULE: js-32-dm-windows-62f79d676e0e.exe - -WATSON_BKT_MODSTAMP: 57e1a1c7 - -WATSON_BKT_MODOFFSET: 1f4c59 - -WATSON_BKT_MODVER: 0.0.0.0 - -BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) - -MODLIST_WITH_TSCHKSUM_HASH: 73a35fd2f0627611ab79875a8836e6e4d52e327f - -MODLIST_SHA1_HASH: 558287c6466b4e03fd3bbf5c37f2840a8cd2b134 - -NTGLOBALFLAG: 0 - -APPLICATION_VERIFIER_FLAGS: 0 - -DUMP_FLAGS: 94 - -DUMP_TYPE: 1 - -APP: js-32-dm-windows-62f79d676e0e.exe - -ANALYSIS_SESSION_HOST: F1BRIX - -ANALYSIS_SESSION_TIME: 09-20-2016 17:59:28.0621 - -ANALYSIS_VERSION: 10.0.10586.567 amd64fre - -THREAD_ATTRIBUTES: -OS_LOCALE: ENU - -PROBLEM_CLASSES: - - - -INVALID_POINTER_READ - Tid [0x135c] - Frame [0x00]: js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure - - - -FILL_PATTERN - Tid [0x135c] - Frame [0x00]: js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure - String [2b2b2b2b] - Failure Bucketing - Data Bucketing - - -BUGCHECK_STR: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -LAST_CONTROL_TRANSFER: from 004b2387 to 00404c59 - -STACK_TEXT: -016fdc38 004b2387 01e104e8 016fe490 016fe490 js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x9 -016fdc5c 004a7d13 02e00310 004a94fa 016fdc78 js_32_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x17 -016fdc64 004a94fa 016fdc78 02e00310 016fddb8 js_32_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x33 -016fdc7c 004a8710 016fddb8 016fe490 016fdca0 js_32_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * const>+0x3a -016fdc98 004ac158 016fddb8 016fe490 007bad80 js_32_dm_windows_62f79d676e0e!DispatchToTracer+0x30 -016fdcc0 0060fae1 016fddb8 00000006 016fe478 js_32_dm_windows_62f79d676e0e!js::TraceRootRange+0x48 -016fdce4 004564b4 01e66269 00000003 01e104e8 js_32_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x211 -016fdd14 004565e2 016fddb8 016fdd28 01e107a0 js_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xa4 -016fdd2c 004b5439 01e10108 016fddb8 01e10108 js_32_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x42 -016fdd8c 004afb70 016fddb8 00000000 016fddec js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x39 -016fde40 004af45c 01e10108 00000007 016fde8c js_32_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x320 -016fdf10 002535c9 01e10108 00000007 01e104c0 js_32_dm_windows_62f79d676e0e!js::Nursery::collect+0x10c -016fdf6c 00257549 00000007 00000030 01e10000 js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x89 -016fdfa0 003a14c6 01e10000 01e104c0 0039e17d js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::runDebugGC+0x29 -016fdfac 0039e17d 01e10000 01e10000 0075f658 js_32_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x36 -016fdfc4 0024de4d 01e104c0 00000003 00000003 js_32_dm_windows_62f79d676e0e!js::Allocate+0x8d -016fdff8 003ff92c 01e10000 00000003 00000000 js_32_dm_windows_62f79d676e0e!JSObject::create+0x7d -016fe034 003ffe56 01e10000 016fe078 00000003 js_32_dm_windows_62f79d676e0e!NewObject+0x11c -016fe078 00426156 01e10000 0075f658 016fe0e8 js_32_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x166 -016fe120 00275c95 01e10000 00845648 016fe15c js_32_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1a6 -016fe138 0031a923 01e10000 00845648 016fe15c js_32_dm_windows_62f79d676e0e!js::NewProxyObject+0x25 -016fe160 0031acac 01e10000 02e00360 00845648 js_32_dm_windows_62f79d676e0e!js::Wrapper::New+0x63 -016fe198 0034c792 01e10000 016fe1f4 016fe258 js_32_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x3c -016fe230 002327f4 01e10000 016fe258 0075561c js_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x392 -016fe284 002770ba 01e10000 016fe450 01e10000 js_32_dm_windows_62f79d676e0e!JSCompartment::wrap+0x1c4 -016fe2b0 00277244 01e10000 016fe2f4 016fe2f8 js_32_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x12a -016fe2d8 0027a0b6 01e10000 016fe2f4 016fe2f8 js_32_dm_windows_62f79d676e0e!js::Proxy::call+0xc4 -016fe300 00436bd6 01e10000 00000001 016fe450 js_32_dm_windows_62f79d676e0e!js::proxy_Call+0x66 -016fe350 00436ad3 01e1b000 0027a050 00000000 js_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0xf6 -016fe36c 005f18ad 01e10000 016fe3a0 01e7b278 js_32_dm_windows_62f79d676e0e!InternalCall+0x63 -016fe500 667264d5 03100238 016fe638 05bc07a0 js_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x2cd -016fe5f0 005051f1 01e10000 016fe608 016fe7c8 mozglue!je_free+0x15 -016fe694 00444a6f 01e10000 016fe75c 016fe76c js_32_dm_windows_62f79d676e0e!js::jit::IonCannon+0x121 -016fe72c 00436d2d 01e10000 016fe75c 01e7a418 js_32_dm_windows_62f79d676e0e!js::RunScript+0x12f -016fe778 00436ad3 01e10000 016fe7c8 00000000 js_32_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x24d -016fe794 005f18ad 01e10000 016fe7c8 01e7a418 js_32_dm_windows_62f79d676e0e!InternalCall+0x63 -016fe900 00616dde 05bc7259 00000001 016fea04 js_32_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x2cd -00000000 00000000 00000000 00000000 00000000 js_32_dm_windows_62f79d676e0e!EnterBaseline+0x13e - - -THREAD_SHA1_HASH_MOD_FUNC: dadec48c6b3dc5c97ce17c572672a507b7d5f3ff - -THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 8debbd6bdb2e48af97b2e3ae2821e15d1265ac9a - -THREAD_SHA1_HASH_MOD: 5ce0af82a5736dbf77ca89eb64acd8f32b6d3b1a - -FAULT_INSTR_CODE: ff81398b - -FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp - -FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp - -FAULTING_SOURCE_LINE_NUMBER: 3675 - -FAULTING_SOURCE_CODE: - 559: * js::GetBuiltinClass). - 560: */ - 561: - 562: template -> 563: inline bool is() const { return getClass() == &T::class_; } - 564: - 565: template - 566: T& as() { - 567: MOZ_ASSERT(this->is()); - 568: return *static_cast(this); - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_32_dm_windows_62f79d676e0e - -IMAGE_NAME: js-32-dm-windows-62f79d676e0e.exe - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e1a1c7 - -STACK_COMMAND: .ecxr ; kb - -BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 - -PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_js_32_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+9 - -BUCKET_ID_OFFSET: 9 - -BUCKET_ID_MODULE_STR: js_32_dm_windows_62f79d676e0e - -BUCKET_ID_MODTIMEDATESTAMP: 57e1a1c7 - -BUCKET_ID_MODCHECKSUM: 0 - -BUCKET_ID_MODVER_STR: 0.0.0.0 - -BUCKET_ID_PREFIX_STR: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_ - -FAILURE_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -FAILURE_EXCEPTION_CODE: c0000005 - -FAILURE_IMAGE_NAME: js-32-dm-windows-62f79d676e0e.exe - -FAILURE_FUNCTION_NAME: JSObject::allocKindForTenure - -BUCKET_ID_FUNCTION_STR: JSObject::allocKindForTenure - -FAILURE_SYMBOL_NAME: js-32-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure - -FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_c0000005_js-32-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure - -WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a1c7/js-32-dm-windows-62f79d676e0e.exe/0.0.0.0/57e1a1c7/c0000005/001f4c59.htm?Retriage=1 - -TARGET_TIME: 2016-09-21T00:59:27.000Z - -OSBUILD: 14393 - -OSSERVICEPACK: 0 - -SERVICEPACK_NUMBER: 0 - -OS_REVISION: 0 - -SUITE_MASK: 256 - -PRODUCT_TYPE: 1 - -OSPLATFORM_TYPE: x86 - -OSNAME: Windows 10 - -OSEDITION: Windows 10 WinNt SingleUserTS - -USER_LCID: 0 - -OSBUILD_TIMESTAMP: 2016-07-15 18:33:42 - -BUILDDATESTAMP_STR: 160715-1616 - -BUILDLAB_STR: rs1_release - -BUILDOSVER_STR: 10.0.14393.0 - -ANALYSIS_SESSION_ELAPSED_TIME: f92 - -ANALYSIS_SOURCE: UM - -FAILURE_ID_HASH_STRING: um:invalid_pointer_read_fill_pattern_2b2b2b2b_c0000005_js-32-dm-windows-62f79d676e0e.exe!jsobject::allockindfortenure - -FAILURE_ID_HASH: {f1454121-9563-76f2-52d0-22e8be20d6fc} - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # ChildEBP RetAddr -00 016fcf24 76761a30 ntdll!NtWaitForMultipleObjects+0xc -01 016fd0b8 76761928 KERNELBASE!WaitForMultipleObjectsEx+0xf0 -02 016fd0d4 76de7062 KERNELBASE!WaitForMultipleObjects+0x18 -03 016fd550 76de6aa6 kernel32!WerpReportFaultInternal+0x59d -04 016fd56c 76dbe7a9 kernel32!WerpReportFault+0x9b -05 016fd574 767ed90a kernel32!BasepReportFault+0x19 -06 016fd60c 7712dc00 KERNELBASE!UnhandledExceptionFilter+0x25a -07 016ffa04 770f05d4 ntdll!__RtlUserThreadStart+0x3d626 -08 016ffa14 00000000 ntdll!_RtlUserThreadStart+0x1b -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -016fcf24 76761a30 00000003 016fd514 00000001 ntdll!NtWaitForMultipleObjects+0xc -016fd0b8 76761928 00000003 016fd514 00000000 KERNELBASE!WaitForMultipleObjectsEx+0xf0 -016fd0d4 76de7062 00000003 016fd514 00000000 KERNELBASE!WaitForMultipleObjects+0x18 -016fd550 76de6aa6 00000000 00000000 00000001 kernel32!WerpReportFaultInternal+0x59d -016fd56c 76dbe7a9 016fd60c 767ed90a 016fd63c kernel32!WerpReportFault+0x9b -016fd574 767ed90a 016fd63c 00000001 fdeab771 kernel32!BasepReportFault+0x19 -016fd60c 7712dc00 016fd63c 771020b0 016ffa04 KERNELBASE!UnhandledExceptionFilter+0x25a -016ffa04 770f05d4 ffffffff 77112535 00000000 ntdll!__RtlUserThreadStart+0x3d626 -016ffa14 00000000 00751e84 015a3000 00000000 ntdll!_RtlUserThreadStart+0x1b -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-5a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-5a-crashlog.txt deleted file mode 100644 index ff0256260..000000000 --- a/FTB/Signatures/tests/resources/cdb-5a-crashlog.txt +++ /dev/null @@ -1,335 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-dbg-64-dm-windows-62f79d676e0e.exe.772.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x64 -Product: WinNt, suite: SingleUserTS -Machine Name: -Debug session time: Fri Sep 23 17:46:06.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: 0 days 0:00:02.000 -......................................... -This dump file has an exception of interest stored in it. -The stored exception information can be accessed via .ecxr. -(304.cb0): Access violation - code c0000005 (first/second chance not available) -*** WARNING: Unable to verify checksum for js-dbg-64-dm-windows-62f79d676e0e.exe -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: -00000001`3f4975db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -The current thread doesn't have an x86 context. -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -rax=0000000000000001 rbx=fffe2b2b2b2b2b2b rcx=fffe2b2b2b2fffe8 -rdx=0000000000000001 rsi=000000000040c078 rdi=0000000006a00420 -rip=000000013f4975db rsp=000000000040bc40 rbp=0000000000000006 - r8=0000000006633200 r9=000000014079b1a0 r10=0000000000000031 -r11=0000000000000033 r12=fffa7fffffffffff r13=fffc000000000000 -r14=000000000040c078 r15=000000014079b1a0 -iopl=0 nv up ei ng nz na po nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010284 -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: -00000001`3f4975db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338]: -00000001`3f4975db 8b11 mov edx,dword ptr [rcx] -00000001`3f4975dd 8d42ff lea eax,[rdx-1] -00000001`3f4975e0 83f801 cmp eax,1 -00000001`3f4975e3 7665 jbe js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x8a (00000001`3f49764a) -00000001`3f4975e5 b902000000 mov ecx,2 -00000001`3f4975ea ff1528e55d01 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp___acrt_iob_func (00000001`40a75b18)] -00000001`3f4975f0 4c8d0da9951e01 lea r9,[js_dbg_64_dm_windows_62f79d676e0e!`string' (00000001`40680ba0)] -00000001`3f4975f7 c744242053010000 mov dword ptr [rsp+20h],153h -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00000000`3f4975db ?? ?? ?? ?? ???? -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -00000001`3f4975db 8b 11 8d 42 ff 83 f8 01 ...B.... -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: nt!IMAGE_NT_HEADERS32 *** -*** *** -************************************************************************* -*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ucrtbase.dll - - -FAULTING_IP: -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -00000001`3f4975db 8b11 mov edx,dword ptr [rcx] - -EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 000000013f4975db (js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x000000000000001b) - ExceptionCode: c0000005 (Access violation) - ExceptionFlags: 00000000 -NumberParameters: 2 - Parameter[0]: 0000000000000000 - Parameter[1]: ffffffffffffffff -Attempt to read from address ffffffffffffffff - -PROCESS_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 0000000077c90000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e303d8 - -ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. - -EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. - -EXCEPTION_PARAMETER1: 0000000000000000 - -EXCEPTION_PARAMETER2: ffffffffffffffff - -READ_ADDRESS: ffffffffffffffff - -FOLLOWUP_IP: -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -00000001`3f4975db 8b11 mov edx,dword ptr [rcx] - -MOD_LIST: - -FAULTING_THREAD: 0000000000000cb0 - -BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_WRONG_SYMBOLS_FILL_PATTERN_2b2b2b2b - -PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -LAST_CONTROL_TRANSFER: from 000000013f4fc95e to 000000013f4975db - -STACK_TEXT: -00000000`0040bc40 00000001`3f4fc95e : 00000000`0707b2a0 00000000`0040dbfa 00000000`0040bfa8 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -00000000`0040bc80 00000001`3fed123e : 00000001`4073c8e8 00000000`00000000 00000000`0667b040 00000000`0040bd90 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] -00000000`0040bcc0 00000001`3febae69 : 00000000`0040bd98 00000001`3f4fa268 00000000`0040bfa8 00000000`0040bdc0 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] -00000000`0040bd10 00000001`3fe90a4b : 00000000`0040c078 00000001`3f4fc9cf 00000000`0040c050 00000000`0040bde8 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] -00000000`0040bd50 00000001`3fe8e54d : 00000000`070a7178 00000000`06a00420 00000000`0040d170 00000000`0040d170 : js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -00000000`0040bd90 00000001`3feb0592 : 00000000`0040c078 00000000`00000000 00000000`0040be28 00000001`3fe8e54d : js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -00000000`0040bde0 00000001`402276a8 : 00000000`0040c210 00000000`00fffa00 00000000`00000006 00000000`07097380 : js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 534] -00000000`0040be50 00000001`3fdbc517 : 00000000`0908690d 00000000`0040c210 00000000`0040c078 00000001`3f8150aa : js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -00000000`0040beb0 00000001`3fdbc70d : 00000000`0040c078 00000000`0040bfd9 00000000`0040c078 00000001`3f4bb1a0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -00000000`0040bf20 00000001`3fedbbcc : 00000000`06607a68 00000000`0040c078 00000000`00000000 00000001`3fec3ee0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -00000000`0040bf60 00000001`3fec75f9 : 00000000`06607a68 00000000`06607208 00000000`06607208 00000000`06607208 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -00000000`0040c040 00000001`3fec6266 : 01d215fd`08206b33 00000006`962215d5 00000000`06607a68 00000001`00000c01 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -00000000`0040c1d0 00000001`3f5f89b5 : 00000000`06685040 00000000`00000012 00000000`06607990 00000000`06685040 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -00000000`0040c370 00000001`3fb17a12 : 00000000`00000003 00000000`06607990 00000000`00000003 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6519] -00000000`0040c440 00000001`3fb0848d : 00000000`0900b048 00000000`06607000 00000000`00000000 00000001`3fb0c729 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -00000000`0040c490 00000001`3fb03c86 : 00000000`06607000 00000000`06607000 00000001`406c4320 00000000`00000001 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] -00000000`0040c4d0 00000001`3f5d5cd8 : 00000000`0040c5d8 00000000`00000000 00000000`00000000 00000001`3f77d24c : js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -00000000`0040c530 00000001`3fc8d13c : 00000001`409a0918 00000000`0040c8f0 00000001`406c4320 00000000`0040c5d8 : js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -00000000`0040c590 00000001`3fc8df54 : 00000000`06607000 00000000`0040c688 00000000`00000003 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] -00000000`0040c620 00000001`3fd1475e : fff90000`00000000 00000001`409a0918 00000000`0040c738 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] -00000000`0040c6d0 00000001`3f8549e9 : 00000000`0040cbb8 00000000`0040c840 00000000`0040c8a0 00000001`3f4bc62c : js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -00000000`0040c820 00000001`3f73b4e1 : 00000000`0900b030 00000001`3f483881 00000000`070aa1c0 00000000`0900b068 : js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -00000000`0040c860 00000001`3f73c740 : 00000000`0040c8a0 00000000`06607000 00000001`4070b2d8 00000000`0040d120 : js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -00000000`0040c8c0 00000001`3fa9100c : 00000000`00000002 00000000`0040ca40 00000000`0040cb48 00000000`0040c990 : js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -00000000`0040c940 00000001`3f4bcefa : 00000000`00000002 00000000`0040cbc9 00000000`0040cb48 00000001`406767a8 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -00000000`0040cb00 00000001`3f859fa0 : 00000000`00000001 00000000`070757f0 00000000`0040d120 00000000`0667b068 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -00000000`0040cc30 00000001`3f85a460 : 00000000`06607000 00000000`0040d130 00000000`0040cdb0 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -00000000`0040cca0 00000001`3f86312d : 00000000`070fe5d0 00000000`0040cdb0 00400000`00000000 000007fe`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] -00000000`0040cd70 00000001`3fd423c5 : 00000000`0040cfa8 00000001`3f42b086 00000000`0040d120 00000000`0040cdb0 : js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -00000000`0040cde0 00000001`3fd5677a : 00000000`09039000 00000000`00000000 00000000`00000002 00000000`0664a000 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -00000000`0040ce40 00000001`401d6744 : 00000000`0000003a 00000000`00000001 00000000`00000000 00000000`0908690d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -00000000`0040ced0 000002d6`90ee777e : 00000000`06607900 00000000`00000000 0000f0cd`91d70458 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -00000000`0040d090 00000000`06607900 : 00000000`00000000 0000f0cd`91d70458 00000000`00000008 00000000`0040d120 : 0x2d6`90ee777e -00000000`0040d098 00000000`00000000 : 0000f0cd`91d70458 00000000`00000008 00000000`0040d120 00000000`0040d0d8 : 0x6607900 - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FAULTING_SOURCE_CODE: - 334: return false; - 335: uintptr_t addr = uintptr_t(cell); - 336: addr &= ~js::gc::ChunkMask; - 337: addr |= js::gc::ChunkLocationOffset; -> 338: auto location = *reinterpret_cast(addr); - 339: MOZ_ASSERT(location == ChunkLocation::Nursery || location == ChunkLocation::TenuredHeap); - 340: return location == ChunkLocation::Nursery; - 341: } - 342: - 343: } /* namespace gc */ - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_dbg_64_dm_windows!js::gc::IsInsideNursery+1b - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_dbg_64_dm_windows_62f79d676e0e - -IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_c0000005_js-dbg-64-dm-windows-62f79d676e0e.exe!js::gc::IsInsideNursery - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # Child-SP RetAddr Call Site -00 00000000`0040bc40 00000001`3f4fc95e js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -01 00000000`0040bc80 00000001`3fed123e js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] -02 00000000`0040bcc0 00000001`3febae69 js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] -03 00000000`0040bd10 00000001`3fe90a4b js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] -04 00000000`0040bd50 00000001`3fe8e54d js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -05 00000000`0040bd90 00000001`3feb0592 js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -06 00000000`0040bde0 00000001`402276a8 js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 534] -07 00000000`0040be50 00000001`3fdbc517 js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -08 00000000`0040beb0 00000001`3fdbc70d js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -09 00000000`0040bf20 00000001`3fedbbcc js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -0a 00000000`0040bf60 00000001`3fec75f9 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -0b 00000000`0040c040 00000001`3fec6266 js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -0c 00000000`0040c1d0 00000001`3f5f89b5 js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -0d 00000000`0040c370 00000001`3fb17a12 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6519] -0e 00000000`0040c440 00000001`3fb0848d js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -0f 00000000`0040c490 00000001`3fb03c86 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] -10 00000000`0040c4d0 00000001`3f5d5cd8 js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -11 00000000`0040c530 00000001`3fc8d13c js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -12 00000000`0040c590 00000001`3fc8df54 js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] -13 00000000`0040c620 00000001`3fd1475e js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] -14 00000000`0040c6d0 00000001`3f8549e9 js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -15 00000000`0040c820 00000001`3f73b4e1 js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -16 00000000`0040c860 00000001`3f73c740 js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -17 00000000`0040c8c0 00000001`3fa9100c js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -18 00000000`0040c940 00000001`3f4bcefa js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -19 00000000`0040cb00 00000001`3f859fa0 js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -1a 00000000`0040cc30 00000001`3f85a460 js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -1b 00000000`0040cca0 00000001`3f86312d js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] -1c 00000000`0040cd70 00000001`3fd423c5 js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -1d 00000000`0040cde0 00000001`3fd5677a js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -1e 00000000`0040ce40 00000001`401d6744 js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -1f 00000000`0040ced0 000002d6`90ee777e js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -20 00000000`0040d090 00000000`06607900 0x2d6`90ee777e -21 00000000`0040d098 00000000`00000000 0x6607900 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -RetAddr : Args to Child : Call Site -00000001`3f4fc95e : 00000000`0707b2a0 00000000`0040dbfa 00000000`0040bfa8 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -00000001`3fed123e : 00000001`4073c8e8 00000000`00000000 00000000`0667b040 00000000`0040bd90 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\heap.h @ 1242] -00000001`3febae69 : 00000000`0040bd98 00000001`3f4fa268 00000000`0040bfa8 00000000`0040bdc0 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] -00000001`3fe90a4b : 00000000`0040c078 00000001`3f4fc9cf 00000000`0040c050 00000000`0040bde8 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] -00000001`3fe8e54d : 00000000`070a7178 00000000`06a00420 00000000`0040d170 00000000`0040d170 : js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\mozillaadmin\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -00000001`3feb0592 : 00000000`0040c078 00000000`00000000 00000000`0040be28 00000001`3fe8e54d : js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -00000001`402276a8 : 00000000`0040c210 00000000`00fffa00 00000000`00000006 00000000`07097380 : js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 534] -00000001`3fdbc517 : 00000000`0908690d 00000000`0040c210 00000000`0040c078 00000001`3f8150aa : js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -00000001`3fdbc70d : 00000000`0040c078 00000000`0040bfd9 00000000`0040c078 00000001`3f4bb1a0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -00000001`3fedbbcc : 00000000`06607a68 00000000`0040c078 00000000`00000000 00000001`3fec3ee0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -00000001`3fec75f9 : 00000000`06607a68 00000000`06607208 00000000`06607208 00000000`06607208 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -00000001`3fec6266 : 01d215fd`08206b33 00000006`962215d5 00000000`06607a68 00000001`00000c01 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -00000001`3f5f89b5 : 00000000`06685040 00000000`00000012 00000000`06607990 00000000`06685040 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -00000001`3fb17a12 : 00000000`00000003 00000000`06607990 00000000`00000003 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6519] -00000001`3fb0848d : 00000000`0900b048 00000000`06607000 00000000`00000000 00000001`3fb0c729 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -00000001`3fb03c86 : 00000000`06607000 00000000`06607000 00000001`406c4320 00000000`00000001 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] -00000001`3f5d5cd8 : 00000000`0040c5d8 00000000`00000000 00000000`00000000 00000001`3f77d24c : js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -00000001`3fc8d13c : 00000001`409a0918 00000000`0040c8f0 00000001`406c4320 00000000`0040c5d8 : js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -00000001`3fc8df54 : 00000000`06607000 00000000`0040c688 00000000`00000003 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 667] -00000001`3fd1475e : fff90000`00000000 00000001`409a0918 00000000`0040c738 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] -00000001`3f8549e9 : 00000000`0040cbb8 00000000`0040c840 00000000`0040c8a0 00000001`3f4bc62c : js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -00000001`3f73b4e1 : 00000000`0900b030 00000001`3f483881 00000000`070aa1c0 00000000`0900b068 : js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -00000001`3f73c740 : 00000000`0040c8a0 00000000`06607000 00000001`4070b2d8 00000000`0040d120 : js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -00000001`3fa9100c : 00000000`00000002 00000000`0040ca40 00000000`0040cb48 00000000`0040c990 : js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -00000001`3f4bcefa : 00000000`00000002 00000000`0040cbc9 00000000`0040cb48 00000001`406767a8 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -00000001`3f859fa0 : 00000000`00000001 00000000`070757f0 00000000`0040d120 00000000`0667b068 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -00000001`3f85a460 : 00000000`06607000 00000000`0040d130 00000000`0040cdb0 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -00000001`3f86312d : 00000000`070fe5d0 00000000`0040cdb0 00400000`00000000 000007fe`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] -00000001`3fd423c5 : 00000000`0040cfa8 00000001`3f42b086 00000000`0040d120 00000000`0040cdb0 : js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -00000001`3fd5677a : 00000000`09039000 00000000`00000000 00000000`00000002 00000000`0664a000 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -00000001`401d6744 : 00000000`0000003a 00000000`00000001 00000000`00000000 00000000`0908690d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -000002d6`90ee777e : 00000000`06607900 00000000`00000000 0000f0cd`91d70458 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -00000000`06607900 : 00000000`00000000 0000f0cd`91d70458 00000000`00000008 00000000`0040d120 : 0x2d6`90ee777e -00000000`00000000 : 0000f0cd`91d70458 00000000`00000008 00000000`0040d120 00000000`0040d0d8 : 0x6607900 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-5b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-5b-crashlog.txt deleted file mode 100644 index 5891f1816..000000000 --- a/FTB/Signatures/tests/resources/cdb-5b-crashlog.txt +++ /dev/null @@ -1,425 +0,0 @@ - -Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-dbg-64-dm-windows-62f79d676e0e.exe.7448.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: srv* -Executable search path is: -Windows 10 Version 14393 MP (8 procs) Free x64 -Product: WinNt, suite: SingleUserTS -Built by: 10.0.14393.0 (rs1_release.160715-1616) -Machine Name: -Debug session time: Tue Sep 20 18:00:12.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: not available -................... -This dump file has an exception of interest stored in it. -The stored exception information can be accessed via .ecxr. -(1d18.19ec): Access violation - code c0000005 (first/second chance not available) -*** WARNING: Unable to verify checksum for js-dbg-64-dm-windows-62f79d676e0e.exe -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: -00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -The current thread doesn't have a guest (WoW) context. -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -rax=0000000000000001 rbx=fffe2b2b2b2b2b2b rcx=fffe2b2b2b2fffe8 -rdx=0000000000000001 rsi=000000c4a47fc528 rdi=0000021699700420 -rip=00007ff71dcf75db rsp=000000c4a47fc0f0 rbp=0000000000000006 - r8=0000021699633200 r9=00007ff71effa590 r10=0000000000000031 -r11=0000000000000033 r12=fffa7fffffffffff r13=fffc000000000000 -r14=000000c4a47fc528 r15=00007ff71effa590 -iopl=0 nv up ei ng nz na po nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010284 -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: -00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338]: -00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] -00007ff7`1dcf75dd 8d42ff lea eax,[rdx-1] -00007ff7`1dcf75e0 83f801 cmp eax,1 -00007ff7`1dcf75e3 7665 jbe js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x8a (00007ff7`1dcf764a) -00007ff7`1dcf75e5 b902000000 mov ecx,2 -00007ff7`1dcf75ea ff1528d55d01 call qword ptr [js_dbg_64_dm_windows_62f79d676e0e!_imp___acrt_iob_func (00007ff7`1f2d4b18)] -00007ff7`1dcf75f0 4c8d0df9941e01 lea r9,[js_dbg_64_dm_windows_62f79d676e0e!`string' (00007ff7`1eee0af0)] -00007ff7`1dcf75f7 c744242053010000 mov dword ptr [rsp+20h],153h -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00000000`1dcf75db ?? ?? ?? ?? ???? -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -00007ff7`1dcf75db 8b 11 8d 42 ff 83 f8 01 ...B.... -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - - -DUMP_CLASS: 2 - -DUMP_QUALIFIER: 400 - -CONTEXT: (.ecxr) -rax=0000000000000001 rbx=fffe2b2b2b2b2b2b rcx=fffe2b2b2b2fffe8 -rdx=0000000000000001 rsi=000000c4a47fc528 rdi=0000021699700420 -rip=00007ff71dcf75db rsp=000000c4a47fc0f0 rbp=0000000000000006 - r8=0000021699633200 r9=00007ff71effa590 r10=0000000000000031 -r11=0000000000000033 r12=fffa7fffffffffff r13=fffc000000000000 -r14=000000c4a47fc528 r15=00007ff71effa590 -iopl=0 nv up ei ng nz na po nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010284 -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b: -00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] ds:fffe2b2b`2b2fffe8=???????? -Resetting default scope - -FAULTING_IP: -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] - -EXCEPTION_RECORD: (.exr -1) -ExceptionAddress: 00007ff71dcf75db (js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x000000000000001b) - ExceptionCode: c0000005 (Access violation) - ExceptionFlags: 00000000 -NumberParameters: 2 - Parameter[0]: 0000000000000000 - Parameter[1]: ffffffffffffffff -Attempt to read from address ffffffffffffffff - -DEFAULT_BUCKET_ID: INVALID_POINTER_READ - -PROCESS_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. - -EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. - -EXCEPTION_CODE_STR: c0000005 - -EXCEPTION_PARAMETER1: 0000000000000000 - -EXCEPTION_PARAMETER2: ffffffffffffffff - -READ_ADDRESS: ffffffffffffffff - -FOLLOWUP_IP: -js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -00007ff7`1dcf75db 8b11 mov edx,dword ptr [rcx] - -BUGCHECK_STR: INVALID_POINTER_READ - -WATSON_BKT_PROCSTAMP: 57e18eec - -WATSON_BKT_PROCVER: 0.0.0.0 - -WATSON_BKT_MODULE: js-dbg-64-dm-windows-62f79d676e0e.exe - -WATSON_BKT_MODSTAMP: 57e18eec - -WATSON_BKT_MODOFFSET: 875db - -WATSON_BKT_MODVER: 0.0.0.0 - -BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) - -MODLIST_WITH_TSCHKSUM_HASH: c3ee048275799904ba4743295b065feeec8aa69b - -MODLIST_SHA1_HASH: 821636ff4f1bd5145f680b8840b1e121f5a2b869 - -NTGLOBALFLAG: 0 - -APPLICATION_VERIFIER_FLAGS: 0 - -DUMP_FLAGS: 94 - -DUMP_TYPE: 1 - -APP: js-dbg-64-dm-windows-62f79d676e0e.exe - -ANALYSIS_SESSION_HOST: F1BRIX - -ANALYSIS_SESSION_TIME: 09-20-2016 18:00:13.0679 - -ANALYSIS_VERSION: 10.0.10586.567 amd64fre - -THREAD_ATTRIBUTES: -OS_LOCALE: ENU - -PROBLEM_CLASSES: - - - -INVALID_POINTER_READ - Tid [0x19ec] - Frame [0x00]: js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery - - -LAST_CONTROL_TRANSFER: from 00007ff71dd5c95e to 00007ff71dcf75db - -STACK_TEXT: -000000c4`a47fc0f0 00007ff7`1dd5c95e : 00000216`9987b2a0 000000c4`a47fe0aa 000000c4`a47fc458 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b -000000c4`a47fc130 00007ff7`1e73123e : 00007ff7`1ef9c090 00000000`00000000 00000216`9967b040 000000c4`a47fc240 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe -000000c4`a47fc170 00007ff7`1e71ae69 : 000000c4`a47fc248 00007ff7`1dd5a268 000000c4`a47fc458 000000c4`a47fc270 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e -000000c4`a47fc1c0 00007ff7`1e6f0a4b : 000000c4`a47fc528 00007ff7`1dd5c9cf 000000c4`a47fc500 000000c4`a47fc298 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 -000000c4`a47fc200 00007ff7`1e6ee54d : 00000216`998a7128 00000216`99700420 000000c4`a47fd620 000000c4`a47fd620 : js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b -000000c4`a47fc240 00007ff7`1e710592 : 000000c4`a47fc528 00000000`00000000 000000c4`a47fc2d8 00007ff7`1e6ee54d : js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d -000000c4`a47fc290 00007ff7`1ea876a8 : 000000c4`a47fc6c0 00000000`00fffa00 00000000`00000006 00000216`99897380 : js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 -000000c4`a47fc300 00007ff7`1e61c517 : 00000216`99b8a72d 000000c4`a47fc6c0 000000c4`a47fc528 00007ff7`1e0750aa : js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 -000000c4`a47fc360 00007ff7`1e61c70d : 000000c4`a47fc528 000000c4`a47fc489 000000c4`a47fc528 000000c4`a47fc4b0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 -000000c4`a47fc3d0 00007ff7`1e73bbcc : 00000216`99607a68 000000c4`a47fc528 00000000`00000000 00007ff7`1e723ee0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d -000000c4`a47fc410 00007ff7`1e7275f9 : 00000216`99607a68 00000216`99607208 00000216`99607208 00000216`99607208 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc -000000c4`a47fc4f0 00007ff7`1e726266 : 01d213a3`8201cc20 00000216`99685040 00000216`99607a68 00007ff7`00001901 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 -000000c4`a47fc680 00007ff7`1de589b5 : 00000216`99685040 00000000`00000012 00000216`99607990 00000216`99685040 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 -000000c4`a47fc820 00007ff7`1e377a12 : 00000000`00000003 00000216`99607990 00000000`00000003 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 -000000c4`a47fc8f0 00007ff7`1e36848d : 00000216`99b0b048 00000216`99607000 00000000`00000000 00007ff7`1e36c729 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 -000000c4`a47fc940 00007ff7`1e363c86 : 00000216`99607000 00000216`99607000 00007ff7`1ef23e20 00000000`00000001 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d -000000c4`a47fc980 00007ff7`1de35cd8 : 000000c4`a47fca88 00000000`00000000 00000000`00000000 00007ff7`1dfdd24c : js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 -000000c4`a47fc9e0 00007ff7`1e4ed13c : 00007ff7`1f1ff918 000000c4`a47fcda0 00007ff7`1ef23e20 000000c4`a47fca88 : js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 -000000c4`a47fca40 00007ff7`1e4edf54 : 00000216`99607000 000000c4`a47fcb38 00000000`00000003 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc -000000c4`a47fcad0 00007ff7`1e57475e : fff90000`00000000 00007ff7`1f1ff918 000000c4`a47fcbe8 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 -000000c4`a47fcb80 00007ff7`1e0b49e9 : 000000c4`a47fd068 000000c4`a47fccf0 000000c4`a47fcd50 00007ff7`1dd1c62c : js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e -000000c4`a47fccd0 00007ff7`1df9b4e1 : 00000216`99b0b030 00007ff7`1dce3881 00000216`998aa1c0 00000216`99b0b068 : js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 -000000c4`a47fcd10 00007ff7`1df9c740 : 000000c4`a47fcd50 00000216`99607000 00007ff7`1ef6ac38 000000c4`a47fd5d0 : js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 -000000c4`a47fcd70 00007ff7`1e2f100c : 00000000`00000002 000000c4`a47fcef0 000000c4`a47fcff8 000000c4`a47fce40 : js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 -000000c4`a47fcdf0 00007ff7`1dd1cefa : 00000000`00000002 000000c4`a47fd079 000000c4`a47fcff8 00007ff7`1eed67a8 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c -000000c4`a47fcfb0 00007ff7`1e0b9fa0 : 00000000`00000001 00000216`998757f0 000000c4`a47fd5d0 00000216`9967b068 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a -000000c4`a47fd0e0 00007ff7`1e0ba460 : 00000216`99607000 000000c4`a47fd5e0 000000c4`a47fd260 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 -000000c4`a47fd150 00007ff7`1e0c312d : 00000216`998fe5d0 000000c4`a47fd260 00400000`00000000 00007ff8`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 -000000c4`a47fd220 00007ff7`1e5a23c5 : 000000c4`a47fd458 00007ff7`1dc8b0ae 000000c4`a47fd5d0 000000c4`a47fd260 : js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d -000000c4`a47fd290 00007ff7`1e5b677a : 00000216`99b39000 00000000`00000000 00000000`00000002 00000216`9964a000 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 -000000c4`a47fd2f0 00007ff7`1ea36744 : 00000000`0000003a 00000000`00000001 00000000`00000000 00000216`99b8a72d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa -000000c4`a47fd380 0000039b`922a7cc8 : 00000216`99607900 00000000`00000000 000055b5`62c38357 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 -000000c4`a47fd540 00000216`99607900 : 00000000`00000000 000055b5`62c38357 00000000`00000008 000000c4`a47fd5d0 : 0x0000039b`922a7cc8 -000000c4`a47fd548 00000000`00000000 : 000055b5`62c38357 00000000`00000008 000000c4`a47fd5d0 000000c4`a47fd588 : 0x00000216`99607900 - - -THREAD_SHA1_HASH_MOD_FUNC: 5056f69f618ba8c41a2b5a444c483e0375247881 - -THREAD_SHA1_HASH_MOD_FUNC_OFFSET: dcd40979492662defecc13af165b022c960612ad - -THREAD_SHA1_HASH_MOD: a40e3f321ec4083628359c103278f2e630eb749b - -FAULT_INSTR_CODE: 428d118b - -FAULTING_SOURCE_LINE: c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h - -FAULTING_SOURCE_FILE: c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h - -FAULTING_SOURCE_LINE_NUMBER: 338 - -FAULTING_SOURCE_CODE: - 334: return false; - 335: uintptr_t addr = uintptr_t(cell); - 336: addr &= ~js::gc::ChunkMask; - 337: addr |= js::gc::ChunkLocationOffset; -> 338: auto location = *reinterpret_cast(addr); - 339: MOZ_ASSERT(location == ChunkLocation::Nursery || location == ChunkLocation::TenuredHeap); - 340: return location == ChunkLocation::Nursery; - 341: } - 342: - 343: } /* namespace gc */ - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_dbg_64_dm_windows_62f79d676e0e - -IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e18eec - -STACK_COMMAND: .ecxr ; kb - -BUCKET_ID: INVALID_POINTER_READ_js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b - -PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+1b - -BUCKET_ID_OFFSET: 1b - -BUCKET_ID_MODULE_STR: js_dbg_64_dm_windows_62f79d676e0e - -BUCKET_ID_MODTIMEDATESTAMP: 57e18eec - -BUCKET_ID_MODCHECKSUM: 0 - -BUCKET_ID_MODVER_STR: 0.0.0.0 - -BUCKET_ID_PREFIX_STR: INVALID_POINTER_READ_ - -FAILURE_PROBLEM_CLASS: INVALID_POINTER_READ - -FAILURE_EXCEPTION_CODE: c0000005 - -FAILURE_IMAGE_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe - -FAILURE_FUNCTION_NAME: js::gc::IsInsideNursery - -BUCKET_ID_FUNCTION_STR: js::gc::IsInsideNursery - -FAILURE_SYMBOL_NAME: js-dbg-64-dm-windows-62f79d676e0e.exe!js::gc::IsInsideNursery - -FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_js-dbg-64-dm-windows-62f79d676e0e.exe!js::gc::IsInsideNursery - -WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-dbg-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e18eec/js-dbg-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e18eec/c0000005/000875db.htm?Retriage=1 - -TARGET_TIME: 2016-09-21T01:00:12.000Z - -OSBUILD: 14393 - -OSSERVICEPACK: 0 - -SERVICEPACK_NUMBER: 0 - -OS_REVISION: 0 - -SUITE_MASK: 256 - -PRODUCT_TYPE: 1 - -OSPLATFORM_TYPE: x64 - -OSNAME: Windows 10 - -OSEDITION: Windows 10 WinNt SingleUserTS - -USER_LCID: 0 - -OSBUILD_TIMESTAMP: 2016-07-15 19:21:29 - -BUILDDATESTAMP_STR: 160715-1616 - -BUILDLAB_STR: rs1_release - -BUILDOSVER_STR: 10.0.14393.0 - -ANALYSIS_SESSION_ELAPSED_TIME: 3ec - -ANALYSIS_SOURCE: UM - -FAILURE_ID_HASH_STRING: um:invalid_pointer_read_c0000005_js-dbg-64-dm-windows-62f79d676e0e.exe!js::gc::isinsidenursery - -FAILURE_ID_HASH: {de3fa82d-c01b-b80c-43d1-0ed172dbd9d3} - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # Child-SP RetAddr Call Site -00 000000c4`a47fc0f0 00007ff7`1dd5c95e js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -01 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::gc::Cell::isTenured+0x5 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 251] -02 000000c4`a47fc130 00007ff7`1e73123e js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] -03 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::zone+0xd [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1263] -04 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!JSObject::zone+0xd [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.h @ 312] -05 000000c4`a47fc170 00007ff7`1e71ae69 js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] -06 000000c4`a47fc1c0 00007ff7`1e6f0a4b js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] -07 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x12 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] -08 000000c4`a47fc200 00007ff7`1e6ee54d js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -09 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x14 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2241] -0a 000000c4`a47fc240 00007ff7`1e710592 js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -0b 000000c4`a47fc290 00007ff7`1ea876a8 js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 534] -0c (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!MarkLocals+0x23 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 26] -0d 000000c4`a47fc300 00007ff7`1e61c517 js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -0e 000000c4`a47fc360 00007ff7`1e61c70d js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -0f 000000c4`a47fc3d0 00007ff7`1e73bbcc js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -10 000000c4`a47fc410 00007ff7`1e7275f9 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -11 (Inline Function) --------`-------- js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeForMinorGC+0x2c [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 304] -12 000000c4`a47fc4f0 00007ff7`1e726266 js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -13 000000c4`a47fc680 00007ff7`1de589b5 js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -14 000000c4`a47fc820 00007ff7`1e377a12 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsgc.cpp @ 6519] -15 000000c4`a47fc8f0 00007ff7`1e36848d js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -16 000000c4`a47fc940 00007ff7`1e363c86 js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] -17 000000c4`a47fc980 00007ff7`1de35cd8 js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -18 000000c4`a47fc9e0 00007ff7`1e4ed13c js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -19 000000c4`a47fca40 00007ff7`1e4edf54 js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 667] -1a 000000c4`a47fcad0 00007ff7`1e57475e js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 727] -1b 000000c4`a47fcb80 00007ff7`1e0b49e9 js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -1c 000000c4`a47fccd0 00007ff7`1df9b4e1 js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -1d 000000c4`a47fcd10 00007ff7`1df9c740 js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -1e 000000c4`a47fcd70 00007ff7`1e2f100c js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -1f 000000c4`a47fcdf0 00007ff7`1dd1cefa js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -20 000000c4`a47fcfb0 00007ff7`1e0b9fa0 js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -21 000000c4`a47fd0e0 00007ff7`1e0ba460 js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -22 000000c4`a47fd150 00007ff7`1e0c312d js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] -23 000000c4`a47fd220 00007ff7`1e5a23c5 js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -24 000000c4`a47fd290 00007ff7`1e5b677a js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -25 000000c4`a47fd2f0 00007ff7`1ea36744 js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -26 000000c4`a47fd380 0000039b`922a7cc8 js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -27 000000c4`a47fd540 00000216`99607900 0x0000039b`922a7cc8 -28 000000c4`a47fd548 00000000`00000000 0x00000216`99607900 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -RetAddr : Args to Child : Call Site -00007ff7`1dd5c95e : 00000216`9987b2a0 000000c4`a47fe0aa 000000c4`a47fc458 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::IsInsideNursery+0x1b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\heapapi.h @ 338] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::gc::Cell::isTenured+0x5 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 251] -00007ff7`1e73123e : 00007ff7`1ef9c090 00000000`00000000 00000216`9967b040 000000c4`a47fc240 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::arena+0xe [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1242] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::gc::TenuredCell::zone+0xd [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\heap.h @ 1263] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!JSObject::zone+0xd [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.h @ 312] -00007ff7`1e71ae69 : 000000c4`a47fc248 00007ff7`1dd5a268 000000c4`a47fc458 000000c4`a47fc270 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x8e [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2393] -00007ff7`1e6f0a4b : 000000c4`a47fc528 00007ff7`1dd5c9cf 000000c4`a47fc500 000000c4`a47fc298 : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b9 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x12 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] -00007ff7`1e6ee54d : 00000216`998a7128 00000216`99700420 000000c4`a47fd620 000000c4`a47fd620 : js_dbg_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0x6b [c:\users\fuzz1win\shell-cache\js-dbg-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x14 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2241] -00007ff7`1e710592 : 000000c4`a47fc528 00000000`00000000 000000c4`a47fc2d8 00007ff7`1e6ee54d : js_dbg_64_dm_windows_62f79d676e0e!DispatchToTracer+0x5d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -00007ff7`1ea876a8 : 000000c4`a47fc6c0 00000000`00fffa00 00000000`00000006 00000216`99897380 : js_dbg_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xe2 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 534] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!MarkLocals+0x23 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 26] -00007ff7`1e61c517 : 00000216`99b8a72d 000000c4`a47fc6c0 000000c4`a47fc528 00007ff7`1e0750aa : js_dbg_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2b8 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -00007ff7`1e61c70d : 000000c4`a47fc528 000000c4`a47fc489 000000c4`a47fc528 000000c4`a47fc4b0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0x107 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -00007ff7`1e73bbcc : 00000216`99607a68 000000c4`a47fc528 00000000`00000000 00007ff7`1e723ee0 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -00007ff7`1e7275f9 : 00000216`99607a68 00000216`99607208 00000216`99607208 00000216`99607208 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0xcc [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeForMinorGC+0x2c [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 304] -00007ff7`1e726266 : 01d213a3`8201cc20 00000216`99685040 00000216`99607a68 00007ff7`00001901 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x2f9 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -00007ff7`1de589b5 : 00000216`99685040 00000000`00000012 00000216`99607990 00000216`99685040 : js_dbg_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x1e6 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -00007ff7`1e377a12 : 00000000`00000003 00000216`99607990 00000000`00000003 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0x125 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsgc.cpp @ 6519] -00007ff7`1e36848d : 00000216`99b0b048 00000216`99607000 00000000`00000000 00007ff7`1e36c729 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -00007ff7`1e363c86 : 00000216`99607000 00000216`99607000 00007ff7`1ef23e20 00000000`00000001 : js_dbg_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState<1>+0x1d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] -00007ff7`1de35cd8 : 000000c4`a47fca88 00000000`00000000 00000000`00000000 00007ff7`1dfdd24c : js_dbg_64_dm_windows_62f79d676e0e!js::Allocate+0x1d6 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -00007ff7`1e4ed13c : 00007ff7`1f1ff918 000000c4`a47fcda0 00007ff7`1ef23e20 000000c4`a47fca88 : js_dbg_64_dm_windows_62f79d676e0e!JSObject::create+0x828 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -00007ff7`1e4edf54 : 00000216`99607000 000000c4`a47fcb38 00000000`00000003 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!NewObject+0x2fc [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 667] -00007ff7`1e57475e : fff90000`00000000 00007ff7`1f1ff918 000000c4`a47fcbe8 00000000`00000003 : js_dbg_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1f4 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 727] -00007ff7`1e0b49e9 : 000000c4`a47fd068 000000c4`a47fccf0 000000c4`a47fcd50 00007ff7`1dd1c62c : js_dbg_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x52e [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -00007ff7`1df9b4e1 : 00000216`99b0b030 00007ff7`1dce3881 00000216`998aa1c0 00000216`99b0b068 : js_dbg_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x89 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -00007ff7`1df9c740 : 000000c4`a47fcd50 00000216`99607000 00007ff7`1ef6ac38 000000c4`a47fd5d0 : js_dbg_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x101 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -00007ff7`1e2f100c : 00000000`00000002 000000c4`a47fcef0 000000c4`a47fcff8 000000c4`a47fce40 : js_dbg_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0xf0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -00007ff7`1dd1cefa : 00000000`00000002 000000c4`a47fd079 000000c4`a47fcff8 00007ff7`1eed67a8 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x125c [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -00007ff7`1e0b9fa0 : 00000000`00000001 00000216`998757f0 000000c4`a47fd5d0 00000216`9967b068 : js_dbg_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x48a [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -00007ff7`1e0ba460 : 00000216`99607000 000000c4`a47fd5e0 000000c4`a47fd260 00000000`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x1b0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -00007ff7`1e0c312d : 00000216`998fe5d0 000000c4`a47fd260 00400000`00000000 00007ff8`00000000 : js_dbg_64_dm_windows_62f79d676e0e!js::Proxy::call+0x150 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 401] -00007ff7`1e5a23c5 : 000000c4`a47fd458 00007ff7`1dc8b0ae 000000c4`a47fd5d0 000000c4`a47fd260 : js_dbg_64_dm_windows_62f79d676e0e!js::proxy_Call+0x18d [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -00007ff7`1e5b677a : 00000216`99b39000 00000000`00000000 00000000`00000002 00000216`9964a000 : js_dbg_64_dm_windows_62f79d676e0e!js::CallJSNative+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -00007ff7`1ea36744 : 00000000`0000003a 00000000`00000001 00000000`00000000 00000216`99b8a72d : js_dbg_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x3aa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 458] -0000039b`922a7cc8 : 00000216`99607900 00000000`00000000 000055b5`62c38357 00000000`00000008 : js_dbg_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0xf24 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -00000216`99607900 : 00000000`00000000 000055b5`62c38357 00000000`00000008 000000c4`a47fd5d0 : 0x0000039b`922a7cc8 -00000000`00000000 : 000055b5`62c38357 00000000`00000008 000000c4`a47fd5d0 000000c4`a47fd588 : 0x00000216`99607900 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-6a-crashlog.txt b/FTB/Signatures/tests/resources/cdb-6a-crashlog.txt deleted file mode 100644 index 9435db190..000000000 --- a/FTB/Signatures/tests/resources/cdb-6a-crashlog.txt +++ /dev/null @@ -1,407 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\mozillaadmin\AppData\Local\CrashDumps\js-64-dm-windows-62f79d676e0e.exe.3256.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x64 -Product: WinNt, suite: SingleUserTS -Machine Name: -Debug session time: Fri Sep 23 17:52:12.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: 0 days 0:00:02.000 -......................................... -This dump file has an exception of interest stored in it. -The stored exception information can be accessed via .ecxr. -(cb8.7f8): Access violation - code c0000005 (first/second chance not available) -*** WARNING: Unable to verify checksum for js-64-dm-windows-62f79d676e0e.exe -js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13: -00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -The current thread doesn't have an x86 context. -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -rax=000000013fcfeef0 rbx=0000000008d00420 rcx=2b2b2b2b2b2b2b2b -rdx=000000000681b940 rsi=000000000034c7b0 rdi=0000000008d00420 -rip=000000013f869ff3 rsp=000000000034c4b0 rbp=fffe000000000000 - r8=000000000034c5b0 r9=000000000001fffc r10=000000000000061d -r11=000000000685a000 r12=000000013fd23a98 r13=fffa7fffffffffff -r14=000000000034d550 r15=0000000000000003 -iopl=0 nv up ei pl nz na pe nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 -js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13: -00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675]: -00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] -00000001`3f869ff6 4c3bc0 cmp r8,rax -00000001`3f869ff9 7575 jne js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x90 (00000001`3f86a070) -00000001`3f869ffb 4c8b4208 mov r8,qword ptr [rdx+8] -00000001`3f869fff 488b4210 mov rax,qword ptr [rdx+10h] -00000001`3f86a003 498d14c0 lea rdx,[r8+rax*8] -00000001`3f86a007 4c3bc2 cmp r8,rdx -00000001`3f86a00a 741f je js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x4b (00000001`3f86a02b) -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00000000`3f869ff3 ?? ?? ?? ?? ???? -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -00000001`3f869ff3 4c 8b 01 4c 3b c0 75 75 L..L;.uu -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: nt!IMAGE_NT_HEADERS32 *** -*** *** -************************************************************************* -*** ERROR: Symbol file could not be found. Defaulted to export symbols for kernel32.dll - -*** ERROR: Symbol file could not be found. Defaulted to export symbols for ucrtbase.dll - - -FAULTING_IP: -js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] - -EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 000000013f869ff3 (js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x0000000000000013) - ExceptionCode: c0000005 (Access violation) - ExceptionFlags: 00000000 -NumberParameters: 2 - Parameter[0]: 0000000000000000 - Parameter[1]: ffffffffffffffff -Attempt to read from address ffffffffffffffff - -PROCESS_NAME: js-64-dm-windows-62f79d676e0e.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 0000000077c90000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e305a4 - -ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. - -EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s. - -EXCEPTION_PARAMETER1: 0000000000000000 - -EXCEPTION_PARAMETER2: ffffffffffffffff - -READ_ADDRESS: ffffffffffffffff - -FOLLOWUP_IP: -js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00000001`3f869ff3 4c8b01 mov r8,qword ptr [rcx] - -MOD_LIST: - -FAULTING_THREAD: 00000000000007f8 - -BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_WRONG_SYMBOLS_FILL_PATTERN_2b2b2b2b - -PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -DEFAULT_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b - -LAST_CONTROL_TRANSFER: from 000000013f93a984 to 000000013f869ff3 - -STACK_TEXT: -00000000`0034c4b0 00000001`3f93a984 : 00000000`0034c730 00000000`090bb400 00000000`0681b000 00000001`3f8254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00000000`0034c4e0 00000001`3f92fe3c : 00000000`0034dd0a 00007fff`ffffffff fffe0000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] -00000000`0034c520 00000001`3f93348f : 00000000`08e73103 00000000`0034c7b0 00000000`00000000 00000000`00000003 : js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\mozillaadmin\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -00000000`0034c550 00000001`3fb90421 : 00000000`0034c7b0 00000000`08e771a8 00000000`00000003 00000000`091ff448 : js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 520] -00000000`0034c5b0 00000001`3f8c9da7 : 00000000`0917a2cd 00000000`0034c7b0 00000001`3f600000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -00000000`0034c5f0 00000001`3f8c9f0d : 00000000`0034c7b0 00000000`0681b940 00000000`06824b00 00000000`0681b200 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -00000000`0034c650 00000001`3f93f20e : 00000000`06824b00 00000000`06824b00 00000000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -00000000`0034c690 00000001`3f9376c4 : 00000000`06824b00 00000000`0681b940 00000000`06824b00 00000000`06824b00 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -00000000`0034c760 00000001`3f936e7d : 00000000`0034cc18 01d215fd`e1c035f9 00000000`06882080 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -00000000`0034c900 00000001`3f6762d6 : 00000000`0681b8f8 00000000`0034cae9 00000000`00000007 00000000`06882080 : js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -00000000`0034caa0 00000001`3f7ed102 : 00000000`0681b000 00000000`0681b8f8 00000000`0681b000 00000000`0681b8f8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6521] -00000000`0034cb50 00000001`3f7e9447 : 00000000`0681b000 00000000`00000001 00000000`0684bb78 00000000`3a9da8e8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -00000000`0034cb80 00000001`3f64c0c6 : 00000000`00000000 00000001`3fcb4058 00000000`00000000 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -00000000`0034cbd0 00000001`3f86378f : 00000000`06884000 00000000`00000000 00000000`00000001 00000000`0034cca0 : js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -00000000`0034cc60 00000001`3f863e75 : 00000000`0681b000 00000000`0034cd38 00000001`3fcb4058 00000000`00000000 : js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 668] -00000000`0034cce0 00000001`3f891a5b : 00000000`0681b000 00000000`00000000 00000000`0034cdf0 00000000`0034cde8 : js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] -00000000`0034cd70 00000001`3f6e26b4 : fff90000`00000000 00000000`00000000 00000000`0034cf20 00000001`3fe0de70 : js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -00000000`0034cea0 00000001`3f649d65 : 00000000`08e8d688 00000000`0034cf18 00000000`0034d501 00000000`0681b000 : js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -00000000`0034cee0 00000001`3f713807 : 00000000`0034d030 00000000`0034d070 00000000`0681b000 fffe0000`00000000 : js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -00000000`0034cf70 00000001`3f6265f4 : 00000000`0034d0f8 00000000`0034d120 00000000`0034d0d8 00000001`3fc8d4f0 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -00000000`0034d0a0 00000001`3f6e41c2 : 00000000`0681b000 00000001`3fa6c5ca 00000000`0034d500 00000000`0681b000 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -00000000`0034d150 00000001`3f6e43a0 : 00000000`0681b000 00000001`3fe0de50 00000000`0034d250 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -00000000`0034d1b0 00000001`3f6e7dfd : 00000000`0681b000 00000000`0034d250 00000000`0034d370 00000000`00000002 : js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] -00000000`0034d210 00000001`3f8a5a1f : 00000000`0034ed50 00000000`08e90a88 00000000`0034d568 00000000`06884040 : js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -00000000`0034d270 00000001`3fb69cc0 : 00000000`00000001 00000000`00000001 00000000`0034d410 00000000`0917a2cd : js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] -00000000`0034d310 00000249`c09e1b33 : 00000000`091ff410 00000000`00003800 00002c77`00000055 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -00000000`0034d470 00000000`091ff410 : 00000000`00003800 00002c77`00000055 00000000`00000001 00000000`0034d500 : 0x249`c09e1b33 -00000000`0034d478 00000000`00003800 : 00002c77`00000055 00000000`00000001 00000000`0034d500 00000000`0034d4b8 : 0x91ff410 -00000000`0034d480 00002c77`00000055 : 00000000`00000001 00000000`0034d500 00000000`0034d4b8 00000000`091f9300 : 0x3800 -00000000`0034d488 00000000`00000001 : 00000000`0034d500 00000000`0034d4b8 00000000`091f9300 00000000`0034d4b8 : 0x2c77`00000055 -00000000`0034d490 00000000`0034d500 : 00000000`0034d4b8 00000000`091f9300 00000000`0034d4b8 00000000`091ff398 : 0x1 -00000000`0034d498 00000000`0034d4b8 : 00000000`091f9300 00000000`0034d4b8 00000000`091ff398 fff90000`00000000 : 0x34d500 -00000000`0034d4a0 00000000`091f9300 : 00000000`0034d4b8 00000000`091ff398 fff90000`00000000 00000001`3fe1c5b0 : 0x34d4b8 -00000000`0034d4a8 00000000`0034d4b8 : 00000000`091ff398 fff90000`00000000 00000001`3fe1c5b0 00000000`08e61520 : 0x91f9300 -00000000`0034d4b0 00000000`091ff398 : fff90000`00000000 00000001`3fe1c5b0 00000000`08e61520 00000249`c09ea773 : 0x34d4b8 -00000000`0034d4b8 fff90000`00000000 : 00000001`3fe1c5b0 00000000`08e61520 00000249`c09ea773 00000000`00004822 : 0x91ff398 -00000000`0034d4c0 00000001`3fe1c5b0 : 00000000`08e61520 00000249`c09ea773 00000000`00004822 00000000`0034d568 : 0xfff90000`00000000 -00000000`0034d4c8 00000000`08e61520 : 00000249`c09ea773 00000000`00004822 00000000`0034d568 00000000`091ff410 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -00000000`0034d4d0 00000249`c09ea773 : 00000000`00004822 00000000`0034d568 00000000`091ff410 00000000`00000001 : 0x8e61520 -00000000`0034d4d8 00000000`00004822 : 00000000`0034d568 00000000`091ff410 00000000`00000001 00000000`0034d500 : 0x249`c09ea773 -00000000`0034d4e0 00000000`0034d568 : 00000000`091ff410 00000000`00000001 00000000`0034d500 fffe0000`08d00480 : 0x4822 -00000000`0034d4e8 00000000`091ff410 : 00000000`00000001 00000000`0034d500 fffe0000`08d00480 fffe0000`08ea21c0 : 0x34d568 -00000000`0034d4f0 00000000`00000001 : 00000000`0034d500 fffe0000`08d00480 fffe0000`08ea21c0 fffa8000`08e8d688 : 0x91ff410 -00000000`0034d4f8 00000000`0034d500 : fffe0000`08d00480 fffe0000`08ea21c0 fffa8000`08e8d688 00000000`0034d598 : 0x1 -00000000`0034d500 fffe0000`08d00480 : fffe0000`08ea21c0 fffa8000`08e8d688 00000000`0034d598 00000000`091ff410 : 0x34d500 -00000000`0034d508 fffe0000`08ea21c0 : fffa8000`08e8d688 00000000`0034d598 00000000`091ff410 00000249`c09edf7d : 0xfffe0000`08d00480 -00000000`0034d510 fffa8000`08e8d688 : 00000000`0034d598 00000000`091ff410 00000249`c09edf7d 00000000`00006821 : 0xfffe0000`08ea21c0 -00000000`0034d518 00000000`0034d598 : 00000000`091ff410 00000249`c09edf7d 00000000`00006821 fffa8000`08e8d688 : 0xfffa8000`08e8d688 -00000000`0034d520 00000000`091ff410 : 00000249`c09edf7d 00000000`00006821 fffa8000`08e8d688 fffe0000`08e74260 : 0x34d598 -00000000`0034d528 00000249`c09edf7d : 00000000`00006821 fffa8000`08e8d688 fffe0000`08e74260 fffe0000`08e74280 : 0x91ff410 -00000000`0034d530 00000000`00006821 : fffa8000`08e8d688 fffe0000`08e74260 fffe0000`08e74280 fffe0000`08d00420 : 0x249`c09edf7d -00000000`0034d538 fffa8000`08e8d688 : fffe0000`08e74260 fffe0000`08e74280 fffe0000`08d00420 fffa0000`0000000e : 0x6821 -00000000`0034d540 fffe0000`08e74260 : fffe0000`08e74280 fffe0000`08d00420 fffa0000`0000000e fff90000`00000000 : 0xfffa8000`08e8d688 -00000000`0034d548 fffe0000`08e74280 : fffe0000`08d00420 fffa0000`0000000e fff90000`00000000 00000000`00000000 : 0xfffe0000`08e74260 -00000000`0034d550 fffe0000`08d00420 : fffa0000`0000000e fff90000`00000000 00000000`00000000 fff90000`00000000 : 0xfffe0000`08e74280 -00000000`0034d558 fffa0000`0000000e : fff90000`00000000 00000000`00000000 fff90000`00000000 00000000`00000068 : 0xfffe0000`08d00420 -00000000`0034d560 fff90000`00000000 : 00000000`00000000 fff90000`00000000 00000000`00000068 00000000`08e72040 : 0xfffa0000`0000000e -00000000`0034d568 00000000`00000000 : fff90000`00000000 00000000`00000068 00000000`08e72040 00000000`00000000 : 0xfff90000`00000000 - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FAULTING_SOURCE_CODE: - 3671: - 3672: js::gc::AllocKind - 3673: JSObject::allocKindForTenure(const js::Nursery& nursery) const - 3674: { -> 3675: if (is()) { - 3676: const ArrayObject& aobj = as(); - 3677: MOZ_ASSERT(aobj.numFixedSlots() == 0); - 3678: - 3679: /* Use minimal size object if we are just going to copy the pointer. */ - 3680: if (!nursery.isInside(aobj.getElementsHeader())) - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_64_dm_windows!JSObject::allocKindForTenure+13 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_64_dm_windows_62f79d676e0e - -IMAGE_NAME: js-64-dm-windows-62f79d676e0e.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: INVALID_POINTER_READ_FILL_PATTERN_2b2b2b2b_c0000005_js-64-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # Child-SP RetAddr Call Site -00 00000000`0034c4b0 00000001`3f93a984 js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -01 00000000`0034c4e0 00000001`3f92fe3c js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] -02 00000000`0034c520 00000001`3f93348f js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\mozillaadmin\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -03 00000000`0034c550 00000001`3fb90421 js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 520] -04 00000000`0034c5b0 00000001`3f8c9da7 js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -05 00000000`0034c5f0 00000001`3f8c9f0d js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -06 00000000`0034c650 00000001`3f93f20e js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -07 00000000`0034c690 00000001`3f9376c4 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -08 00000000`0034c760 00000001`3f936e7d js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -09 00000000`0034c900 00000001`3f6762d6 js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -0a 00000000`0034caa0 00000001`3f7ed102 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6521] -0b 00000000`0034cb50 00000001`3f7e9447 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -0c 00000000`0034cb80 00000001`3f64c0c6 js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -0d 00000000`0034cbd0 00000001`3f86378f js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -0e 00000000`0034cc60 00000001`3f863e75 js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 668] -0f 00000000`0034cce0 00000001`3f891a5b js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] -10 00000000`0034cd70 00000001`3f6e26b4 js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -11 00000000`0034cea0 00000001`3f649d65 js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -12 00000000`0034cee0 00000001`3f713807 js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -13 00000000`0034cf70 00000001`3f6265f4 js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -14 00000000`0034d0a0 00000001`3f6e41c2 js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -15 00000000`0034d150 00000001`3f6e43a0 js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -16 00000000`0034d1b0 00000001`3f6e7dfd js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] -17 00000000`0034d210 00000001`3f8a5a1f js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -18 00000000`0034d270 00000001`3fb69cc0 js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] -19 00000000`0034d310 00000249`c09e1b33 js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -1a 00000000`0034d470 00000000`091ff410 0x249`c09e1b33 -1b 00000000`0034d478 00000000`00003800 0x91ff410 -1c 00000000`0034d480 00002c77`00000055 0x3800 -1d 00000000`0034d488 00000000`00000001 0x2c77`00000055 -1e 00000000`0034d490 00000000`0034d500 0x1 -1f 00000000`0034d498 00000000`0034d4b8 0x34d500 -20 00000000`0034d4a0 00000000`091f9300 0x34d4b8 -21 00000000`0034d4a8 00000000`0034d4b8 0x91f9300 -22 00000000`0034d4b0 00000000`091ff398 0x34d4b8 -23 00000000`0034d4b8 fff90000`00000000 0x91ff398 -24 00000000`0034d4c0 00000001`3fe1c5b0 0xfff90000`00000000 -25 00000000`0034d4c8 00000000`08e61520 js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -26 00000000`0034d4d0 00000249`c09ea773 0x8e61520 -27 00000000`0034d4d8 00000000`00004822 0x249`c09ea773 -28 00000000`0034d4e0 00000000`0034d568 0x4822 -29 00000000`0034d4e8 00000000`091ff410 0x34d568 -2a 00000000`0034d4f0 00000000`00000001 0x91ff410 -2b 00000000`0034d4f8 00000000`0034d500 0x1 -2c 00000000`0034d500 fffe0000`08d00480 0x34d500 -2d 00000000`0034d508 fffe0000`08ea21c0 0xfffe0000`08d00480 -2e 00000000`0034d510 fffa8000`08e8d688 0xfffe0000`08ea21c0 -2f 00000000`0034d518 00000000`0034d598 0xfffa8000`08e8d688 -30 00000000`0034d520 00000000`091ff410 0x34d598 -31 00000000`0034d528 00000249`c09edf7d 0x91ff410 -32 00000000`0034d530 00000000`00006821 0x249`c09edf7d -33 00000000`0034d538 fffa8000`08e8d688 0x6821 -34 00000000`0034d540 fffe0000`08e74260 0xfffa8000`08e8d688 -35 00000000`0034d548 fffe0000`08e74280 0xfffe0000`08e74260 -36 00000000`0034d550 fffe0000`08d00420 0xfffe0000`08e74280 -37 00000000`0034d558 fffa0000`0000000e 0xfffe0000`08d00420 -38 00000000`0034d560 fff90000`00000000 0xfffa0000`0000000e -39 00000000`0034d568 00000000`00000000 0xfff90000`00000000 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -RetAddr : Args to Child : Call Site -00000001`3f93a984 : 00000000`0034c730 00000000`090bb400 00000000`0681b000 00000001`3f8254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00000001`3f92fe3c : 00000000`0034dd0a 00007fff`ffffffff fffe0000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] -00000001`3f93348f : 00000000`08e73103 00000000`0034c7b0 00000000`00000000 00000000`00000003 : js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\mozillaadmin\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -00000001`3fb90421 : 00000000`0034c7b0 00000000`08e771a8 00000000`00000003 00000000`091ff448 : js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\marking.cpp @ 520] -00000001`3f8c9da7 : 00000000`0917a2cd 00000000`0034c7b0 00000001`3f600000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -00000001`3f8c9f0d : 00000000`0034c7b0 00000000`0681b940 00000000`06824b00 00000000`0681b200 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -00000001`3f93f20e : 00000000`06824b00 00000000`06824b00 00000000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -00000001`3f9376c4 : 00000000`06824b00 00000000`0681b940 00000000`06824b00 00000000`06824b00 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -00000001`3f936e7d : 00000000`0034cc18 01d215fd`e1c035f9 00000000`06882080 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -00000001`3f6762d6 : 00000000`0681b8f8 00000000`0034cae9 00000000`00000007 00000000`06882080 : js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -00000001`3f7ed102 : 00000000`0681b000 00000000`0681b8f8 00000000`0681b000 00000000`0681b8f8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsgc.cpp @ 6521] -00000001`3f7e9447 : 00000000`0681b000 00000000`00000001 00000000`0684bb78 00000000`3a9da8e8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -00000001`3f64c0c6 : 00000000`00000000 00000001`3fcb4058 00000000`00000000 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\mozillaadmin\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -00000001`3f86378f : 00000000`06884000 00000000`00000000 00000000`00000001 00000000`0034cca0 : js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -00000001`3f863e75 : 00000000`0681b000 00000000`0034cd38 00000001`3fcb4058 00000000`00000000 : js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 668] -00000001`3f891a5b : 00000000`0681b000 00000000`00000000 00000000`0034cdf0 00000000`0034cde8 : js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jsobj.cpp @ 727] -00000001`3f6e26b4 : fff90000`00000000 00000000`00000000 00000000`0034cf20 00000001`3fe0de70 : js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -00000001`3f649d65 : 00000000`08e8d688 00000000`0034cf18 00000000`0034d501 00000000`0681b000 : js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -00000001`3f713807 : 00000000`0034d030 00000000`0034d070 00000000`0681b000 fffe0000`00000000 : js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -00000001`3f6265f4 : 00000000`0034d0f8 00000000`0034d120 00000000`0034d0d8 00000001`3fc8d4f0 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -00000001`3f6e41c2 : 00000000`0681b000 00000001`3fa6c5ca 00000000`0034d500 00000000`0681b000 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -00000001`3f6e43a0 : 00000000`0681b000 00000001`3fe0de50 00000000`0034d250 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -00000001`3f6e7dfd : 00000000`0681b000 00000000`0034d250 00000000`0034d370 00000000`00000002 : js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] -00000001`3f8a5a1f : 00000000`0034ed50 00000000`08e90a88 00000000`0034d568 00000000`06884040 : js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\mozillaadmin\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -00000001`3fb69cc0 : 00000000`00000001 00000000`00000001 00000000`0034d410 00000000`0917a2cd : js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\mozillaadmin\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] -00000249`c09e1b33 : 00000000`091ff410 00000000`00003800 00002c77`00000055 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\mozillaadmin\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -00000000`091ff410 : 00000000`00003800 00002c77`00000055 00000000`00000001 00000000`0034d500 : 0x249`c09e1b33 -00000000`00003800 : 00002c77`00000055 00000000`00000001 00000000`0034d500 00000000`0034d4b8 : 0x91ff410 -00002c77`00000055 : 00000000`00000001 00000000`0034d500 00000000`0034d4b8 00000000`091f9300 : 0x3800 -00000000`00000001 : 00000000`0034d500 00000000`0034d4b8 00000000`091f9300 00000000`0034d4b8 : 0x2c77`00000055 -00000000`0034d500 : 00000000`0034d4b8 00000000`091f9300 00000000`0034d4b8 00000000`091ff398 : 0x1 -00000000`0034d4b8 : 00000000`091f9300 00000000`0034d4b8 00000000`091ff398 fff90000`00000000 : 0x34d500 -00000000`091f9300 : 00000000`0034d4b8 00000000`091ff398 fff90000`00000000 00000001`3fe1c5b0 : 0x34d4b8 -00000000`0034d4b8 : 00000000`091ff398 fff90000`00000000 00000001`3fe1c5b0 00000000`08e61520 : 0x91f9300 -00000000`091ff398 : fff90000`00000000 00000001`3fe1c5b0 00000000`08e61520 00000249`c09ea773 : 0x34d4b8 -fff90000`00000000 : 00000001`3fe1c5b0 00000000`08e61520 00000249`c09ea773 00000000`00004822 : 0x91ff398 -00000001`3fe1c5b0 : 00000000`08e61520 00000249`c09ea773 00000000`00004822 00000000`0034d568 : 0xfff90000`00000000 -00000000`08e61520 : 00000249`c09ea773 00000000`00004822 00000000`0034d568 00000000`091ff410 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -00000249`c09ea773 : 00000000`00004822 00000000`0034d568 00000000`091ff410 00000000`00000001 : 0x8e61520 -00000000`00004822 : 00000000`0034d568 00000000`091ff410 00000000`00000001 00000000`0034d500 : 0x249`c09ea773 -00000000`0034d568 : 00000000`091ff410 00000000`00000001 00000000`0034d500 fffe0000`08d00480 : 0x4822 -00000000`091ff410 : 00000000`00000001 00000000`0034d500 fffe0000`08d00480 fffe0000`08ea21c0 : 0x34d568 -00000000`00000001 : 00000000`0034d500 fffe0000`08d00480 fffe0000`08ea21c0 fffa8000`08e8d688 : 0x91ff410 -00000000`0034d500 : fffe0000`08d00480 fffe0000`08ea21c0 fffa8000`08e8d688 00000000`0034d598 : 0x1 -fffe0000`08d00480 : fffe0000`08ea21c0 fffa8000`08e8d688 00000000`0034d598 00000000`091ff410 : 0x34d500 -fffe0000`08ea21c0 : fffa8000`08e8d688 00000000`0034d598 00000000`091ff410 00000249`c09edf7d : 0xfffe0000`08d00480 -fffa8000`08e8d688 : 00000000`0034d598 00000000`091ff410 00000249`c09edf7d 00000000`00006821 : 0xfffe0000`08ea21c0 -00000000`0034d598 : 00000000`091ff410 00000249`c09edf7d 00000000`00006821 fffa8000`08e8d688 : 0xfffa8000`08e8d688 -00000000`091ff410 : 00000249`c09edf7d 00000000`00006821 fffa8000`08e8d688 fffe0000`08e74260 : 0x34d598 -00000249`c09edf7d : 00000000`00006821 fffa8000`08e8d688 fffe0000`08e74260 fffe0000`08e74280 : 0x91ff410 -00000000`00006821 : fffa8000`08e8d688 fffe0000`08e74260 fffe0000`08e74280 fffe0000`08d00420 : 0x249`c09edf7d -fffa8000`08e8d688 : fffe0000`08e74260 fffe0000`08e74280 fffe0000`08d00420 fffa0000`0000000e : 0x6821 -fffe0000`08e74260 : fffe0000`08e74280 fffe0000`08d00420 fffa0000`0000000e fff90000`00000000 : 0xfffa8000`08e8d688 -fffe0000`08e74280 : fffe0000`08d00420 fffa0000`0000000e fff90000`00000000 00000000`00000000 : 0xfffe0000`08e74260 -fffe0000`08d00420 : fffa0000`0000000e fff90000`00000000 00000000`00000000 fff90000`00000000 : 0xfffe0000`08e74280 -fffa0000`0000000e : fff90000`00000000 00000000`00000000 fff90000`00000000 00000000`00000068 : 0xfffe0000`08d00420 -fff90000`00000000 : 00000000`00000000 fff90000`00000000 00000000`00000068 00000000`08e72040 : 0xfffa0000`0000000e -00000000`00000000 : fff90000`00000000 00000000`00000068 00000000`08e72040 00000000`00000000 : 0xfff90000`00000000 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-6b-crashlog.txt b/FTB/Signatures/tests/resources/cdb-6b-crashlog.txt deleted file mode 100644 index be1208be1..000000000 --- a/FTB/Signatures/tests/resources/cdb-6b-crashlog.txt +++ /dev/null @@ -1,503 +0,0 @@ - -Microsoft (R) Windows Debugger Version 10.0.10586.567 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\fuzz1win\AppData\Local\CrashDumps\js-64-dm-windows-62f79d676e0e.exe.6768.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: srv* -Executable search path is: -Windows 10 Version 14393 MP (8 procs) Free x64 -Product: WinNt, suite: SingleUserTS -Built by: 10.0.14393.0 (rs1_release.160715-1616) -Machine Name: -Debug session time: Tue Sep 20 18:00:30.000 2016 (UTC - 7:00) -System Uptime: not available -Process Uptime: not available -................... -This dump file has an exception of interest stored in it. -The stored exception information can be accessed via .ecxr. -(1a70.fb0): Access violation - code c0000005 (first/second chance not available) -*** WARNING: Unable to verify checksum for js-64-dm-windows-62f79d676e0e.exe -js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [inlined in js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13]: -00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -The current thread doesn't have a guest (WoW) context. -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b -rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 -rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 - r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 -r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff -r14=000000e87fbfd0e0 r15=0000000000000003 -iopl=0 nv up ei pl nz na pe nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 -js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [inlined in js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13]: -00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] [inlined in js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675]]: -00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] -00007ff7`4d469ff6 4c3bc0 cmp r8,rax -00007ff7`4d469ff9 7575 jne js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x90 (00007ff7`4d46a070) -00007ff7`4d469ffb 4c8b4208 mov r8,qword ptr [rdx+8] -00007ff7`4d469fff 488b4210 mov rax,qword ptr [rdx+10h] -00007ff7`4d46a003 498d14c0 lea rdx,[r8+rax*8] -00007ff7`4d46a007 4c3bc2 cmp r8,rdx -00007ff7`4d46a00a 741f je js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x4b (00007ff7`4d46a02b) -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -00000000`4d469ff3 ?? ?? ?? ?? ???? -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -00007ff7`4d469ff3 4c 8b 01 4c 3b c0 75 75 L..L;.uu -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - - -DUMP_CLASS: 2 - -DUMP_QUALIFIER: 400 - -CONTEXT: (.ecxr) -rax=00007ff74d8fee30 rbx=00000285ef400420 rcx=2b2b2b2b2b2b2b2b -rdx=00000285ef21b940 rsi=000000e87fbfc340 rdi=00000285ef400420 -rip=00007ff74d469ff3 rsp=000000e87fbfc040 rbp=fffe000000000000 - r8=000000e87fbfc140 r9=000000000001fffc r10=0000000000000649 -r11=00000285ef25a000 r12=00007ff74d9239a0 r13=fffa7fffffffffff -r14=000000e87fbfd0e0 r15=0000000000000003 -iopl=0 nv up ei pl nz na pe nc -cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010200 -js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [inlined in js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13]: -00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] ds:2b2b2b2b`2b2b2b2b=???????????????? -Resetting default scope - -FAULTING_IP: -js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] - -EXCEPTION_RECORD: (.exr -1) -ExceptionAddress: 00007ff74d469ff3 (js_64_dm_windows_62f79d676e0e!JSObject::is+0x000000000000000a) - ExceptionCode: c0000005 (Access violation) - ExceptionFlags: 00000000 -NumberParameters: 2 - Parameter[0]: 0000000000000000 - Parameter[1]: ffffffffffffffff -Attempt to read from address ffffffffffffffff - -DEFAULT_BUCKET_ID: INVALID_POINTER_READ - -PROCESS_NAME: js-64-dm-windows-62f79d676e0e.exe - -ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. - -EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s. - -EXCEPTION_CODE_STR: c0000005 - -EXCEPTION_PARAMETER1: 0000000000000000 - -EXCEPTION_PARAMETER2: ffffffffffffffff - -READ_ADDRESS: ffffffffffffffff - -FOLLOWUP_IP: -js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00007ff7`4d469ff3 4c8b01 mov r8,qword ptr [rcx] - -BUGCHECK_STR: INVALID_POINTER_READ - -WATSON_BKT_PROCSTAMP: 57e190a5 - -WATSON_BKT_PROCVER: 0.0.0.0 - -WATSON_BKT_MODULE: js-64-dm-windows-62f79d676e0e.exe - -WATSON_BKT_MODSTAMP: 57e190a5 - -WATSON_BKT_MODOFFSET: 269ff3 - -WATSON_BKT_MODVER: 0.0.0.0 - -BUILD_VERSION_STRING: 10.0.14393.0 (rs1_release.160715-1616) - -MODLIST_WITH_TSCHKSUM_HASH: 457e1f2f1cc45eb2070f5117d6ffe3c804e96e7f - -MODLIST_SHA1_HASH: b28e2d2d138839537b07d015219b4414560841f3 - -NTGLOBALFLAG: 0 - -APPLICATION_VERIFIER_FLAGS: 0 - -DUMP_FLAGS: 94 - -DUMP_TYPE: 1 - -APP: js-64-dm-windows-62f79d676e0e.exe - -ANALYSIS_SESSION_HOST: F1BRIX - -ANALYSIS_SESSION_TIME: 09-20-2016 18:00:31.0708 - -ANALYSIS_VERSION: 10.0.10586.567 amd64fre - -THREAD_ATTRIBUTES: -OS_LOCALE: ENU - -PROBLEM_CLASSES: - - - -INVALID_POINTER_READ - Tid [0xfb0] - Frame [0x00]: js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure - - -LAST_CONTROL_TRANSFER: from 00007ff74d53a984 to 00007ff74d469ff3 - -STACK_TEXT: -000000e8`7fbfc040 00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 -000000e8`7fbfc070 00007ff7`4d52fe3c : 000000e8`7fbfd89a 00007fff`ffffffff fffe0000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 -000000e8`7fbfc0b0 00007ff7`4d53348f : 00000285`ef21b803 000000e8`7fbfc340 00000000`00000000 00000000`00000003 : js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac -000000e8`7fbfc0e0 00007ff7`4d790421 : 000000e8`7fbfc340 00000285`ef5771a8 00000000`00000003 00000285`ef8ff448 : js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf -000000e8`7fbfc140 00007ff7`4d4c9da7 : 00000285`ef87a2cd 000000e8`7fbfc340 00007ff7`4d200000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 -000000e8`7fbfc180 00007ff7`4d4c9f0d : 000000e8`7fbfc340 00000285`ef21b940 00000285`ef224b00 00000285`ef21b200 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 -000000e8`7fbfc1e0 00007ff7`4d53f20e : 00000285`ef224b00 00000285`ef224b00 00000285`ef21b200 000000e8`7fbfc2c0 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d -000000e8`7fbfc220 00007ff7`4d5376c4 : 00000285`ef224b00 00000285`ef21b940 00000285`ef224b00 00000285`ef224b00 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e -000000e8`7fbfc2f0 00007ff7`4d536e7d : 01d213a3`8cbecbd1 000000e8`7fbfc978 00000285`ef282080 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 -000000e8`7fbfc490 00007ff7`4d2762d6 : 00000285`ef21b8f8 000000e8`7fbfc679 00000000`00000007 00000285`ef282080 : js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d -000000e8`7fbfc630 00007ff7`4d3ed102 : 00000285`ef21b000 00000285`ef21b8f8 00000285`ef21b000 00000285`ef21b8f8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 -000000e8`7fbfc6e0 00007ff7`4d3e9447 : 00000285`ef21b000 000000e8`00000001 00000285`ef24bae8 00000000`7e60cc68 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 -000000e8`7fbfc710 00007ff7`4d24c0c6 : 00000000`00000000 00007ff7`4d8b4018 00000000`00000000 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 -000000e8`7fbfc760 00007ff7`4d46378f : 00000285`ef284000 00000000`00000000 00000000`00000001 000000e8`7fbfc830 : js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 -000000e8`7fbfc7f0 00007ff7`4d463e75 : 00000285`ef21b000 000000e8`7fbfc8c8 00007ff7`4d8b4018 00000000`00000000 : js_64_dm_windows_62f79d676e0e!NewObject+0x16f -000000e8`7fbfc870 00007ff7`4d491a5b : 00000285`ef21b000 00000000`00000000 000000e8`7fbfc980 000000e8`7fbfc978 : js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 -000000e8`7fbfc900 00007ff7`4d2e26b4 : fff90000`00000000 00000000`00000000 000000e8`7fbfcab0 00007ff7`4da0de70 : js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db -000000e8`7fbfca30 00007ff7`4d249d65 : 00000285`ef58d688 000000e8`7fbfcaa8 000000e8`7fbfd001 00000285`ef21b000 : js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 -000000e8`7fbfca70 00007ff7`4d313807 : 000000e8`7fbfcbc0 000000e8`7fbfcc00 00000285`ef21b000 fffe0000`00000000 : js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 -000000e8`7fbfcb00 00007ff7`4d2265f4 : 000000e8`7fbfcc88 000000e8`7fbfccb0 000000e8`7fbfcc68 00007ff7`4d88d4f0 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 -000000e8`7fbfcc30 00007ff7`4d2e41c2 : 00000285`ef21b000 00007ff7`4d66c5ca 000000e8`7fbfd090 00000285`ef21b000 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 -000000e8`7fbfcce0 00007ff7`4d2e43a0 : 00000285`ef21b000 00007ff7`4da0de50 000000e8`7fbfcde0 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 -000000e8`7fbfcd40 00007ff7`4d2e7dfd : 00000285`ef21b000 000000e8`7fbfcde0 000000e8`7fbfcf00 00000000`00000002 : js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 -000000e8`7fbfcda0 00007ff7`4d4a5a1f : 000000e8`7fbfe8e0 00000285`ef590a88 000000e8`7fbfd0f8 00000285`ef284040 : js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d -000000e8`7fbfce00 00007ff7`4d769cc0 : 00000000`00000001 00000000`00000001 000000e8`7fbfcfa0 00000285`ef87a2cd : js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f -000000e8`7fbfcea0 00000372`d2ed1c0d : 00000285`ef8ff410 00000000`00003800 0000ee80`00000055 00000285`00000001 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 -000000e8`7fbfd000 00000285`ef8ff410 : 00000000`00003800 0000ee80`00000055 00000285`00000001 000000e8`7fbfd090 : 0x00000372`d2ed1c0d -000000e8`7fbfd008 00000000`00003800 : 0000ee80`00000055 00000285`00000001 000000e8`7fbfd090 000000e8`7fbfd048 : 0x00000285`ef8ff410 -000000e8`7fbfd010 0000ee80`00000055 : 00000285`00000001 000000e8`7fbfd090 000000e8`7fbfd048 00000285`ef8f9300 : 0x3800 -000000e8`7fbfd018 00000285`00000001 : 000000e8`7fbfd090 000000e8`7fbfd048 00000285`ef8f9300 000000e8`7fbfd048 : 0x0000ee80`00000055 -000000e8`7fbfd020 000000e8`7fbfd090 : 000000e8`7fbfd048 00000285`ef8f9300 000000e8`7fbfd048 00000285`ef8ff398 : 0x00000285`00000001 -000000e8`7fbfd028 000000e8`7fbfd048 : 00000285`ef8f9300 000000e8`7fbfd048 00000285`ef8ff398 fff90000`00000000 : 0x000000e8`7fbfd090 -000000e8`7fbfd030 00000285`ef8f9300 : 000000e8`7fbfd048 00000285`ef8ff398 fff90000`00000000 00007ff7`4da1c5b0 : 0x000000e8`7fbfd048 -000000e8`7fbfd038 000000e8`7fbfd048 : 00000285`ef8ff398 fff90000`00000000 00007ff7`4da1c5b0 00000285`ef561520 : 0x00000285`ef8f9300 -000000e8`7fbfd040 00000285`ef8ff398 : fff90000`00000000 00007ff7`4da1c5b0 00000285`ef561520 00000372`d2edb443 : 0x000000e8`7fbfd048 -000000e8`7fbfd048 fff90000`00000000 : 00007ff7`4da1c5b0 00000285`ef561520 00000372`d2edb443 00000000`00004822 : 0x00000285`ef8ff398 -000000e8`7fbfd050 00007ff7`4da1c5b0 : 00000285`ef561520 00000372`d2edb443 00000000`00004822 000000e8`7fbfd0f8 : 0xfff90000`00000000 -000000e8`7fbfd058 00000285`ef561520 : 00000372`d2edb443 00000000`00004822 000000e8`7fbfd0f8 00000285`ef8ff410 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -000000e8`7fbfd060 00000372`d2edb443 : 00000000`00004822 000000e8`7fbfd0f8 00000285`ef8ff410 00000000`00000001 : 0x00000285`ef561520 -000000e8`7fbfd068 00000000`00004822 : 000000e8`7fbfd0f8 00000285`ef8ff410 00000000`00000001 000000e8`7fbfd090 : 0x00000372`d2edb443 -000000e8`7fbfd070 000000e8`7fbfd0f8 : 00000285`ef8ff410 00000000`00000001 000000e8`7fbfd090 fffe0285`ef400480 : 0x4822 -000000e8`7fbfd078 00000285`ef8ff410 : 00000000`00000001 000000e8`7fbfd090 fffe0285`ef400480 fffe0285`ef5a21c0 : 0x000000e8`7fbfd0f8 -000000e8`7fbfd080 00000000`00000001 : 000000e8`7fbfd090 fffe0285`ef400480 fffe0285`ef5a21c0 fffa8285`ef58d688 : 0x00000285`ef8ff410 -000000e8`7fbfd088 000000e8`7fbfd090 : fffe0285`ef400480 fffe0285`ef5a21c0 fffa8285`ef58d688 000000e8`7fbfd128 : 0x1 -000000e8`7fbfd090 fffe0285`ef400480 : fffe0285`ef5a21c0 fffa8285`ef58d688 000000e8`7fbfd128 00000285`ef8ff410 : 0x000000e8`7fbfd090 -000000e8`7fbfd098 fffe0285`ef5a21c0 : fffa8285`ef58d688 000000e8`7fbfd128 00000285`ef8ff410 000001e3`e8e60659 : 0xfffe0285`ef400480 -000000e8`7fbfd0a0 fffa8285`ef58d688 : 000000e8`7fbfd128 00000285`ef8ff410 000001e3`e8e60659 00000000`00006821 : 0xfffe0285`ef5a21c0 -000000e8`7fbfd0a8 000000e8`7fbfd128 : 00000285`ef8ff410 000001e3`e8e60659 00000000`00006821 fffa8285`ef58d688 : 0xfffa8285`ef58d688 -000000e8`7fbfd0b0 00000285`ef8ff410 : 000001e3`e8e60659 00000000`00006821 fffa8285`ef58d688 fffe0285`ef574260 : 0x000000e8`7fbfd128 -000000e8`7fbfd0b8 000001e3`e8e60659 : 00000000`00006821 fffa8285`ef58d688 fffe0285`ef574260 fffe0285`ef574280 : 0x00000285`ef8ff410 -000000e8`7fbfd0c0 00000000`00006821 : fffa8285`ef58d688 fffe0285`ef574260 fffe0285`ef574280 fffe0285`ef400420 : 0x000001e3`e8e60659 -000000e8`7fbfd0c8 fffa8285`ef58d688 : fffe0285`ef574260 fffe0285`ef574280 fffe0285`ef400420 fffa0000`0000000e : 0x6821 -000000e8`7fbfd0d0 fffe0285`ef574260 : fffe0285`ef574280 fffe0285`ef400420 fffa0000`0000000e fff90000`00000000 : 0xfffa8285`ef58d688 -000000e8`7fbfd0d8 fffe0285`ef574280 : fffe0285`ef400420 fffa0000`0000000e fff90000`00000000 00000000`00000000 : 0xfffe0285`ef574260 -000000e8`7fbfd0e0 fffe0285`ef400420 : fffa0000`0000000e fff90000`00000000 00000000`00000000 fff90000`00000000 : 0xfffe0285`ef574280 -000000e8`7fbfd0e8 fffa0000`0000000e : fff90000`00000000 00000000`00000000 fff90000`00000000 00000000`00000068 : 0xfffe0285`ef400420 -000000e8`7fbfd0f0 fff90000`00000000 : 00000000`00000000 fff90000`00000000 00000000`00000068 00000285`ef572040 : 0xfffa0000`0000000e -000000e8`7fbfd0f8 00000000`00000000 : fff90000`00000000 00000000`00000068 00000285`ef572040 00000000`00000000 : 0xfff90000`00000000 - - -THREAD_SHA1_HASH_MOD_FUNC: 88d9aafc54237ff5b6e38cf2545e813bbce86d66 - -THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 57f40accb145976916a7e2344c183e855eda1750 - -THREAD_SHA1_HASH_MOD: bd5e9ec3202cd697484202e24bb53788e16c3016 - -FAULT_INSTR_CODE: 4c018b4c - -FAULTING_SOURCE_LINE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp - -FAULTING_SOURCE_FILE: c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp - -FAULTING_SOURCE_LINE_NUMBER: 3675 - -FAULTING_SOURCE_CODE: - 31: template<> - 32: inline bool - 33: JSObject::is() const - 34: { -> 35: return js::IsWrapper(const_cast(this)); - 36: } - 37: - 38: template<> - 39: inline bool - 40: JSObject::is() const - - -SYMBOL_STACK_INDEX: 0 - -SYMBOL_NAME: js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_64_dm_windows_62f79d676e0e - -IMAGE_NAME: js-64-dm-windows-62f79d676e0e.exe - -DEBUG_FLR_IMAGE_TIMESTAMP: 57e190a5 - -STACK_COMMAND: .ecxr ; kb - -BUCKET_ID: INVALID_POINTER_READ_js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 - -PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ_js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+13 - -BUCKET_ID_OFFSET: 13 - -BUCKET_ID_MODULE_STR: js_64_dm_windows_62f79d676e0e - -BUCKET_ID_MODTIMEDATESTAMP: 57e190a5 - -BUCKET_ID_MODCHECKSUM: 0 - -BUCKET_ID_MODVER_STR: 0.0.0.0 - -BUCKET_ID_PREFIX_STR: INVALID_POINTER_READ_ - -FAILURE_PROBLEM_CLASS: INVALID_POINTER_READ - -FAILURE_EXCEPTION_CODE: c0000005 - -FAILURE_IMAGE_NAME: js-64-dm-windows-62f79d676e0e.exe - -FAILURE_FUNCTION_NAME: JSObject::allocKindForTenure - -BUCKET_ID_FUNCTION_STR: JSObject::allocKindForTenure - -FAILURE_SYMBOL_NAME: js-64-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure - -FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_js-64-dm-windows-62f79d676e0e.exe!JSObject::allocKindForTenure - -WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/js-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e190a5/js-64-dm-windows-62f79d676e0e.exe/0.0.0.0/57e190a5/c0000005/00269ff3.htm?Retriage=1 - -TARGET_TIME: 2016-09-21T01:00:30.000Z - -OSBUILD: 14393 - -OSSERVICEPACK: 0 - -SERVICEPACK_NUMBER: 0 - -OS_REVISION: 0 - -SUITE_MASK: 256 - -PRODUCT_TYPE: 1 - -OSPLATFORM_TYPE: x64 - -OSNAME: Windows 10 - -OSEDITION: Windows 10 WinNt SingleUserTS - -USER_LCID: 0 - -OSBUILD_TIMESTAMP: 2016-07-15 19:21:29 - -BUILDDATESTAMP_STR: 160715-1616 - -BUILDLAB_STR: rs1_release - -BUILDOSVER_STR: 10.0.14393.0 - -ANALYSIS_SESSION_ELAPSED_TIME: 378 - -ANALYSIS_SOURCE: UM - -FAILURE_ID_HASH_STRING: um:invalid_pointer_read_c0000005_js-64-dm-windows-62f79d676e0e.exe!jsobject::allockindfortenure - -FAILURE_ID_HASH: {24fae786-bacf-09c0-8a42-5b9e11dae900} - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 - # Child-SP RetAddr Call Site -00 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\wrapperobject.h @ 35] -01 000000e8`7fbfc040 00007ff7`4d53a984 js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -02 000000e8`7fbfc070 00007ff7`4d52fe3c js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] -03 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x35 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] -04 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x35 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] -05 000000e8`7fbfc0b0 00007ff7`4d53348f js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\fuzz1win\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -06 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2241] -07 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!DispatchToTracer+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -08 000000e8`7fbfc0e0 00007ff7`4d790421 js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 520] -09 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!MarkLocals+0x26 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 26] -0a 000000e8`7fbfc140 00007ff7`4d4c9da7 js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -0b 000000e8`7fbfc180 00007ff7`4d4c9f0d js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -0c 000000e8`7fbfc1e0 00007ff7`4d53f20e js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -0d 000000e8`7fbfc220 00007ff7`4d5376c4 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -0e (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeForMinorGC+0x2c [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 304] -0f 000000e8`7fbfc2f0 00007ff7`4d536e7d js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -10 000000e8`7fbfc490 00007ff7`4d2762d6 js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -11 000000e8`7fbfc630 00007ff7`4d3ed102 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsgc.cpp @ 6521] -12 000000e8`7fbfc6e0 00007ff7`4d3e9447 js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -13 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] -14 000000e8`7fbfc710 00007ff7`4d24c0c6 js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -15 000000e8`7fbfc760 00007ff7`4d46378f js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -16 000000e8`7fbfc7f0 00007ff7`4d463e75 js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 668] -17 000000e8`7fbfc870 00007ff7`4d491a5b js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 727] -18 000000e8`7fbfc900 00007ff7`4d2e26b4 js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -19 000000e8`7fbfca30 00007ff7`4d249d65 js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -1a (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x75 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -1b 000000e8`7fbfca70 00007ff7`4d313807 js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -1c 000000e8`7fbfcb00 00007ff7`4d2265f4 js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -1d 000000e8`7fbfcc30 00007ff7`4d2e41c2 js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -1e 000000e8`7fbfcce0 00007ff7`4d2e43a0 js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -1f 000000e8`7fbfcd40 00007ff7`4d2e7dfd js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] -20 000000e8`7fbfcda0 00007ff7`4d4a5a1f js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -21 (Inline Function) --------`-------- js_64_dm_windows_62f79d676e0e!js::CallJSNative+0x38 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -22 000000e8`7fbfce00 00007ff7`4d769cc0 js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] -23 000000e8`7fbfcea0 00000372`d2ed1c0d js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -24 000000e8`7fbfd000 00000285`ef8ff410 0x00000372`d2ed1c0d -25 000000e8`7fbfd008 00000000`00003800 0x00000285`ef8ff410 -26 000000e8`7fbfd010 0000ee80`00000055 0x3800 -27 000000e8`7fbfd018 00000285`00000001 0x0000ee80`00000055 -28 000000e8`7fbfd020 000000e8`7fbfd090 0x00000285`00000001 -29 000000e8`7fbfd028 000000e8`7fbfd048 0x000000e8`7fbfd090 -2a 000000e8`7fbfd030 00000285`ef8f9300 0x000000e8`7fbfd048 -2b 000000e8`7fbfd038 000000e8`7fbfd048 0x00000285`ef8f9300 -2c 000000e8`7fbfd040 00000285`ef8ff398 0x000000e8`7fbfd048 -2d 000000e8`7fbfd048 fff90000`00000000 0x00000285`ef8ff398 -2e 000000e8`7fbfd050 00007ff7`4da1c5b0 0xfff90000`00000000 -2f 000000e8`7fbfd058 00000285`ef561520 js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -30 000000e8`7fbfd060 00000372`d2edb443 0x00000285`ef561520 -31 000000e8`7fbfd068 00000000`00004822 0x00000372`d2edb443 -32 000000e8`7fbfd070 000000e8`7fbfd0f8 0x4822 -33 000000e8`7fbfd078 00000285`ef8ff410 0x000000e8`7fbfd0f8 -34 000000e8`7fbfd080 00000000`00000001 0x00000285`ef8ff410 -35 000000e8`7fbfd088 000000e8`7fbfd090 0x1 -36 000000e8`7fbfd090 fffe0285`ef400480 0x000000e8`7fbfd090 -37 000000e8`7fbfd098 fffe0285`ef5a21c0 0xfffe0285`ef400480 -38 000000e8`7fbfd0a0 fffa8285`ef58d688 0xfffe0285`ef5a21c0 -39 000000e8`7fbfd0a8 000000e8`7fbfd128 0xfffa8285`ef58d688 -3a 000000e8`7fbfd0b0 00000285`ef8ff410 0x000000e8`7fbfd128 -3b 000000e8`7fbfd0b8 000001e3`e8e60659 0x00000285`ef8ff410 -3c 000000e8`7fbfd0c0 00000000`00006821 0x000001e3`e8e60659 -3d 000000e8`7fbfd0c8 fffa8285`ef58d688 0x6821 -3e 000000e8`7fbfd0d0 fffe0285`ef574260 0xfffa8285`ef58d688 -3f 000000e8`7fbfd0d8 fffe0285`ef574280 0xfffe0285`ef574260 -40 000000e8`7fbfd0e0 fffe0285`ef400420 0xfffe0285`ef574280 -41 000000e8`7fbfd0e8 fffa0000`0000000e 0xfffe0285`ef400420 -42 000000e8`7fbfd0f0 fff90000`00000000 0xfffa0000`0000000e -43 000000e8`7fbfd0f8 00000000`00000000 0xfff90000`00000000 -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -RetAddr : Args to Child : Call Site -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!JSObject::is+0xa [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\wrapperobject.h @ 35] -00007ff7`4d53a984 : 000000e8`7fbfc2c0 00000285`ef7bb400 00000285`ef21b000 00007ff7`4d4254b9 : js_64_dm_windows_62f79d676e0e!JSObject::allocKindForTenure+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 3675] -00007ff7`4d52fe3c : 000000e8`7fbfd89a 00007fff`ffffffff fffe0000`00000000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::moveToTenured+0x24 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2396] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x35 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2226] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::TenuringTraversalFunctor::operator()+0x35 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2232] -00007ff7`4d53348f : 00000285`ef21b803 000000e8`7fbfc340 00000000`00000000 00000000`00000003 : js_64_dm_windows_62f79d676e0e!js::DispatchTyped,js::TenuringTracer * __ptr64 const>+0xac [c:\users\fuzz1win\shell-cache\js-64-dm-windows-62f79d676e0e\objdir-js\dist\include\js\value.h @ 1916] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::TenuringTracer::traverse+0x1b [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 2241] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!DispatchToTracer+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 663] -00007ff7`4d790421 : 000000e8`7fbfc340 00000285`ef5771a8 00000000`00000003 00000285`ef8ff448 : js_64_dm_windows_62f79d676e0e!js::TraceRootRange+0xbf [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\marking.cpp @ 520] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!MarkLocals+0x26 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 26] -00007ff7`4d4c9da7 : 00000285`ef87a2cd 000000e8`7fbfc340 00007ff7`4d200000 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::jit::BaselineFrame::trace+0x2a1 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineframe.cpp @ 86] -00007ff7`4d4c9f0d : 000000e8`7fbfc340 00000285`ef21b940 00000285`ef224b00 00000285`ef21b200 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivation+0xd7 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1429] -00007ff7`4d53f20e : 00000285`ef224b00 00000285`ef224b00 00000285`ef21b200 000000e8`7fbfc2c0 : js_64_dm_windows_62f79d676e0e!js::jit::MarkJitActivations+0x4d [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\jitframes.cpp @ 1455] -00007ff7`4d5376c4 : 00000285`ef224b00 00000285`ef21b940 00000285`ef224b00 00000285`ef224b00 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeCommon+0x5e [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 353] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::traceRuntimeForMinorGC+0x2c [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\rootmarking.cpp @ 304] -00007ff7`4d536e7d : 01d213a3`8cbecbd1 000000e8`7fbfc978 00000285`ef282080 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::Nursery::doCollection+0x454 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 693] -00007ff7`4d2762d6 : 00000285`ef21b8f8 000000e8`7fbfc679 00000000`00000007 00000285`ef282080 : js_64_dm_windows_62f79d676e0e!js::Nursery::collect+0x13d [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\nursery.cpp @ 581] -00007ff7`4d3ed102 : 00000285`ef21b000 00000285`ef21b8f8 00000285`ef21b000 00000285`ef21b8f8 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::minorGC+0xa6 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsgc.cpp @ 6521] -00007ff7`4d3e9447 : 00000285`ef21b000 000000e8`00000001 00000285`ef24bae8 00000000`7e60cc68 : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::gcIfNeededPerAllocation+0x42 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 230] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::gc::GCRuntime::checkAllocatorState+0x13 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 189] -00007ff7`4d24c0c6 : 00000000`00000000 00007ff7`4d8b4018 00000000`00000000 00000000`00000001 : js_64_dm_windows_62f79d676e0e!js::Allocate+0x67 [c:\users\fuzz1win\trees\mozilla-central\js\src\gc\allocator.cpp @ 47] -00007ff7`4d46378f : 00000285`ef284000 00000000`00000000 00000000`00000001 000000e8`7fbfc830 : js_64_dm_windows_62f79d676e0e!JSObject::create+0x96 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobjinlines.h @ 378] -00007ff7`4d463e75 : 00000285`ef21b000 000000e8`7fbfc8c8 00007ff7`4d8b4018 00000000`00000000 : js_64_dm_windows_62f79d676e0e!NewObject+0x16f [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 668] -00007ff7`4d491a5b : 00000285`ef21b000 00000000`00000000 000000e8`7fbfc980 000000e8`7fbfc978 : js_64_dm_windows_62f79d676e0e!js::NewObjectWithGivenTaggedProto+0x1a5 [c:\users\fuzz1win\trees\mozilla-central\js\src\jsobj.cpp @ 727] -00007ff7`4d2e26b4 : fff90000`00000000 00000000`00000000 000000e8`7fbfcab0 00007ff7`4da0de70 : js_64_dm_windows_62f79d676e0e!js::ProxyObject::New+0x1db [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\proxyobject.cpp @ 60] -00007ff7`4d249d65 : 00000285`ef58d688 000000e8`7fbfcaa8 000000e8`7fbfd001 00000285`ef21b000 : js_64_dm_windows_62f79d676e0e!js::NewProxyObject+0x24 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 775] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::Wrapper::New+0x75 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 311] -00007ff7`4d313807 : 000000e8`7fbfcbc0 000000e8`7fbfcc00 00000285`ef21b000 fffe0000`00000000 : js_64_dm_windows_62f79d676e0e!js::TransparentObjectWrapper+0x95 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\wrapper.cpp @ 394] -00007ff7`4d2265f4 : 000000e8`7fbfcc88 000000e8`7fbfccb0 000000e8`7fbfcc68 00007ff7`4d88d4f0 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x457 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartment.cpp @ 445] -00007ff7`4d2e41c2 : 00000285`ef21b000 00007ff7`4d66c5ca 000000e8`7fbfd090 00000285`ef21b000 : js_64_dm_windows_62f79d676e0e!JSCompartment::wrap+0x214 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscompartmentinlines.h @ 119] -00007ff7`4d2e43a0 : 00000285`ef21b000 00007ff7`4da0de50 000000e8`7fbfcde0 00000000`00000000 : js_64_dm_windows_62f79d676e0e!js::CrossCompartmentWrapper::call+0x182 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\crosscompartmentwrapper.cpp @ 337] -00007ff7`4d2e7dfd : 00000285`ef21b000 000000e8`7fbfcde0 000000e8`7fbfcf00 00000000`00000002 : js_64_dm_windows_62f79d676e0e!js::Proxy::call+0xf0 [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 402] -00007ff7`4d4a5a1f : 000000e8`7fbfe8e0 00000285`ef590a88 000000e8`7fbfd0f8 00000285`ef284040 : js_64_dm_windows_62f79d676e0e!js::proxy_Call+0x7d [c:\users\fuzz1win\trees\mozilla-central\js\src\proxy\proxy.cpp @ 690] -(Inline Function) : --------`-------- --------`-------- --------`-------- --------`-------- : js_64_dm_windows_62f79d676e0e!js::CallJSNative+0x38 [c:\users\fuzz1win\trees\mozilla-central\js\src\jscntxtinlines.h @ 235] -00007ff7`4d769cc0 : 00000000`00000001 00000000`00000001 000000e8`7fbfcfa0 00000285`ef87a2cd : js_64_dm_windows_62f79d676e0e!js::InternalCallOrConstruct+0x10f [c:\users\fuzz1win\trees\mozilla-central\js\src\vm\interpreter.cpp @ 446] -00000372`d2ed1c0d : 00000285`ef8ff410 00000000`00003800 0000ee80`00000055 00000285`00000001 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallback+0x360 [c:\users\fuzz1win\trees\mozilla-central\js\src\jit\baselineic.cpp @ 5998] -00000285`ef8ff410 : 00000000`00003800 0000ee80`00000055 00000285`00000001 000000e8`7fbfd090 : 0x00000372`d2ed1c0d -00000000`00003800 : 0000ee80`00000055 00000285`00000001 000000e8`7fbfd090 000000e8`7fbfd048 : 0x00000285`ef8ff410 -0000ee80`00000055 : 00000285`00000001 000000e8`7fbfd090 000000e8`7fbfd048 00000285`ef8f9300 : 0x3800 -00000285`00000001 : 000000e8`7fbfd090 000000e8`7fbfd048 00000285`ef8f9300 000000e8`7fbfd048 : 0x0000ee80`00000055 -000000e8`7fbfd090 : 000000e8`7fbfd048 00000285`ef8f9300 000000e8`7fbfd048 00000285`ef8ff398 : 0x00000285`00000001 -000000e8`7fbfd048 : 00000285`ef8f9300 000000e8`7fbfd048 00000285`ef8ff398 fff90000`00000000 : 0x000000e8`7fbfd090 -00000285`ef8f9300 : 000000e8`7fbfd048 00000285`ef8ff398 fff90000`00000000 00007ff7`4da1c5b0 : 0x000000e8`7fbfd048 -000000e8`7fbfd048 : 00000285`ef8ff398 fff90000`00000000 00007ff7`4da1c5b0 00000285`ef561520 : 0x00000285`ef8f9300 -00000285`ef8ff398 : fff90000`00000000 00007ff7`4da1c5b0 00000285`ef561520 00000372`d2edb443 : 0x000000e8`7fbfd048 -fff90000`00000000 : 00007ff7`4da1c5b0 00000285`ef561520 00000372`d2edb443 00000000`00004822 : 0x00000285`ef8ff398 -00007ff7`4da1c5b0 : 00000285`ef561520 00000372`d2edb443 00000000`00004822 000000e8`7fbfd0f8 : 0xfff90000`00000000 -00000285`ef561520 : 00000372`d2edb443 00000000`00004822 000000e8`7fbfd0f8 00000285`ef8ff410 : js_64_dm_windows_62f79d676e0e!js::jit::DoCallFallbackInfo -00000372`d2edb443 : 00000000`00004822 000000e8`7fbfd0f8 00000285`ef8ff410 00000000`00000001 : 0x00000285`ef561520 -00000000`00004822 : 000000e8`7fbfd0f8 00000285`ef8ff410 00000000`00000001 000000e8`7fbfd090 : 0x00000372`d2edb443 -000000e8`7fbfd0f8 : 00000285`ef8ff410 00000000`00000001 000000e8`7fbfd090 fffe0285`ef400480 : 0x4822 -00000285`ef8ff410 : 00000000`00000001 000000e8`7fbfd090 fffe0285`ef400480 fffe0285`ef5a21c0 : 0x000000e8`7fbfd0f8 -00000000`00000001 : 000000e8`7fbfd090 fffe0285`ef400480 fffe0285`ef5a21c0 fffa8285`ef58d688 : 0x00000285`ef8ff410 -000000e8`7fbfd090 : fffe0285`ef400480 fffe0285`ef5a21c0 fffa8285`ef58d688 000000e8`7fbfd128 : 0x1 -fffe0285`ef400480 : fffe0285`ef5a21c0 fffa8285`ef58d688 000000e8`7fbfd128 00000285`ef8ff410 : 0x000000e8`7fbfd090 -fffe0285`ef5a21c0 : fffa8285`ef58d688 000000e8`7fbfd128 00000285`ef8ff410 000001e3`e8e60659 : 0xfffe0285`ef400480 -fffa8285`ef58d688 : 000000e8`7fbfd128 00000285`ef8ff410 000001e3`e8e60659 00000000`00006821 : 0xfffe0285`ef5a21c0 -000000e8`7fbfd128 : 00000285`ef8ff410 000001e3`e8e60659 00000000`00006821 fffa8285`ef58d688 : 0xfffa8285`ef58d688 -00000285`ef8ff410 : 000001e3`e8e60659 00000000`00006821 fffa8285`ef58d688 fffe0285`ef574260 : 0x000000e8`7fbfd128 -000001e3`e8e60659 : 00000000`00006821 fffa8285`ef58d688 fffe0285`ef574260 fffe0285`ef574280 : 0x00000285`ef8ff410 -00000000`00006821 : fffa8285`ef58d688 fffe0285`ef574260 fffe0285`ef574280 fffe0285`ef400420 : 0x000001e3`e8e60659 -fffa8285`ef58d688 : fffe0285`ef574260 fffe0285`ef574280 fffe0285`ef400420 fffa0000`0000000e : 0x6821 -fffe0285`ef574260 : fffe0285`ef574280 fffe0285`ef400420 fffa0000`0000000e fff90000`00000000 : 0xfffa8285`ef58d688 -fffe0285`ef574280 : fffe0285`ef400420 fffa0000`0000000e fff90000`00000000 00000000`00000000 : 0xfffe0285`ef574260 -fffe0285`ef400420 : fffa0000`0000000e fff90000`00000000 00000000`00000000 fff90000`00000000 : 0xfffe0285`ef574280 -fffa0000`0000000e : fff90000`00000000 00000000`00000000 fff90000`00000000 00000000`00000068 : 0xfffe0285`ef400420 -fff90000`00000000 : 00000000`00000000 fff90000`00000000 00000000`00000068 00000285`ef572040 : 0xfffa0000`0000000e -00000000`00000000 : fff90000`00000000 00000000`00000068 00000285`ef572040 00000000`00000000 : 0xfff90000`00000000 -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-7c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-7c-crashlog.txt deleted file mode 100644 index df65f35d8..000000000 --- a/FTB/Signatures/tests/resources/cdb-7c-crashlog.txt +++ /dev/null @@ -1,269 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-32-windows-42c95d88aaaa.exe.2396.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 9600 MP (16 procs) Free x86 compatible -Product: Server, suite: TerminalServer SingleUserTS -Machine Name: -Debug session time: Tue Oct 4 11:31:24.000 2016 (UTC + 0:00) -System Uptime: not available -Process Uptime: 0 days 0:00:01.000 -...................................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -eax=00000000 ebx=00000000 ecx=6802052b edx=00000000 esi=00000003 edi=00000003 -eip=77a5c7ec esp=0053d6c4 ebp=0053d84c iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 -Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -ntdll+0x3c7ec: -77a5c7ec c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=00c8a948 ebx=0053e32c ecx=6802052b edx=00000000 esi=25d8094b edi=0053e370 -eip=25d80b01 esp=0053e370 ebp=ffe00000 iopl=0 nv up ei pl zr na pe cy -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000247 -25d80b01 cc int 3 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -*** WARNING: Unable to verify timestamp for kernel32.dll -*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll -*** WARNING: Unable to verify checksum for mozglue.dll -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll+0x3c7ec: -77a5c7ec c21400 ret 14h -77a5c7ef 90 nop -77a5c7f0 b85b000000 mov eax,5Bh -77a5c7f5 64ff15c0000000 call dword ptr fs:[0C0h] -77a5c7fc c21000 ret 10h -77a5c7ff 90 nop -77a5c800 b85c000000 mov eax,5Ch -77a5c805 64ff15c0000000 call dword ptr fs:[0C0h] -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -25d80b01 cc f2 0f 10 .... -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** WARNING: Unable to verify checksum for js-32-windows-42c95d88aaaa.exe -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -*** WARNING: Unable to verify timestamp for KERNELBASE.dll -*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll - -FAULTING_IP: -+205 -25d80b01 cc int 3 - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 25d80b01 -ExceptionCode: 80000003 (Break instruction exception) -ExceptionFlags: 00000000 -NumberParameters: 1 -Parameter[0]: 00000000 - -DEFAULT_BUCKET_ID: WRONG_SYMBOLS - -PROCESS_NAME: js-32-windows-42c95d88aaaa.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -MODULE_NAME: mozglue - -FAULTING_MODULE: 77a20000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 57f38bd2 - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_PARAMETER1: 00000000 - -MOD_LIST: - -FAULTING_THREAD: 00000f68 - -PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS - -BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS - -LAST_CONTROL_TRANSFER: from 746c37f5 to 25d80b01 - -STACK_TEXT: -WARNING: Frame IP not in any known module. Following frames may be wrong. -0053e39c 746c37f5 010000f0 08900850 01000044 0x25d80b01 -0053e430 014f5ac7 25d80010 00000003 0053e780 mozglue!arena_run_dalloc+0x205 [c:\users\administrator\trees\mozilla-central\memory\mozjemalloc\jemalloc.c @ 3916] -0053e508 014f78b1 08410000 0053e520 0053e6c8 js_32_windows_42c95d88aaaa!EnterIon+0xc7 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2823] -0053e5a8 0136d44f 08410000 0053e668 0053e678 js_32_windows_42c95d88aaaa!js::jit::IonCannon+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2921] -0053e640 0135f77e 08410000 0053e668 087121a8 js_32_windows_42c95d88aaaa!js::RunScript+0x12f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] -0053e684 0135f51e 08410000 0053e6c8 00000000 js_32_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x24e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] -0053e698 015eacd3 08410000 0053e6c8 087121a8 js_32_windows_42c95d88aaaa!InternalCall+0x5e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -0053e72c 0066129f 08410000 0053e7f8 087121a8 js_32_windows_42c95d88aaaa!js::jit::DoCallFallback+0x2c3 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] -0053e844 746c64d5 08700910 000c03a0 08410000 0x66129f -0053e860 014f5ac7 14e2a1d0 00000003 0053ebb0 mozglue!je_free+0x15 [c:\users\administrator\trees\mozilla-central\memory\mozjemalloc\jemalloc.c @ 6485] -0053e938 014f78b1 08410000 0053e950 0053eaf8 js_32_windows_42c95d88aaaa!EnterIon+0xc7 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2823] -0053e9d8 0136d44f 08410000 0053ea98 0053eaa8 js_32_windows_42c95d88aaaa!js::jit::IonCannon+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2921] -0053ea70 0135f77e 08410000 0053ea98 08706700 js_32_windows_42c95d88aaaa!js::RunScript+0x12f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] -0053eab4 0135f51e 08410000 0053eaf8 00000000 js_32_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x24e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] -0053eac8 015eacd3 08410000 0053eaf8 08706700 js_32_windows_42c95d88aaaa!InternalCall+0x5e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -0053ec48 014f5ac7 14e294e0 00000001 0053ef98 js_32_windows_42c95d88aaaa!js::jit::DoCallFallback+0x2c3 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] -0053ed20 014f78b1 08410000 0053ed38 0053eee0 js_32_windows_42c95d88aaaa!EnterIon+0xc7 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2823] -0053edc0 0136d44f 08410000 0053ee80 0053ee90 js_32_windows_42c95d88aaaa!js::jit::IonCannon+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2921] -0053ee58 0135f77e 08410000 0053ee80 084f30b0 js_32_windows_42c95d88aaaa!js::RunScript+0x12f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] -0053ee9c 0135f51e 08410000 0053eee0 00000000 js_32_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x24e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] -0053eeb0 015eacd3 08410000 0053eee0 084f30b0 js_32_windows_42c95d88aaaa!InternalCall+0x5e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -0053ef44 0066129f 08410000 0053efd8 084f30b0 js_32_windows_42c95d88aaaa!js::jit::DoCallFallback+0x2c3 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] -0053efa0 084f30b0 3c8c63c4 00005021 00000000 0x66129f -0053f0d0 014f5ac7 14e24e90 00000002 0053f420 0x84f30b0 -0053f1a8 014f78b1 08410000 0053f1c0 0053f368 js_32_windows_42c95d88aaaa!EnterIon+0xc7 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2823] -0053f248 0136d44f 08410000 0053f308 0053f318 js_32_windows_42c95d88aaaa!js::jit::IonCannon+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\ion.cpp @ 2921] -0053f2e0 0135f77e 08410000 0053f308 08930010 js_32_windows_42c95d88aaaa!js::RunScript+0x12f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 384] -0053f324 0135f51e 08410000 0053f368 00000000 js_32_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x24e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] -0053f338 015eacd3 08410000 0053f368 08930010 js_32_windows_42c95d88aaaa!InternalCall+0x5e [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -0053f4a8 015ee5ae 3de10540 00000000 00000000 js_32_windows_42c95d88aaaa!js::jit::DoCallFallback+0x2c3 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] -0053f580 015eebe1 08410000 0053f598 0866a0a0 js_32_windows_42c95d88aaaa!EnterBaseline+0x13e [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] -0053f620 0136d4f5 08410000 0053f6c8 0053f6d8 js_32_windows_42c95d88aaaa!js::jit::EnterBaselineMethod+0x121 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 193] -0053f6b8 0135c26c 08410000 0053f6c8 0176a914 js_32_windows_42c95d88aaaa!js::RunScript+0x1d5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 394] -0053f704 0135c115 08410000 0053f7ac 086b80c0 js_32_windows_42c95d88aaaa!js::ExecuteKernel+0xac [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 688] -0053f740 012ee21a 08410000 0053f7ac 086b80c0 js_32_windows_42c95d88aaaa!js::Execute+0xf5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 717] -0053f760 012f2d21 08410000 0053f784 0053f7ac js_32_windows_42c95d88aaaa!ExecuteScript+0x2a [c:\users\administrator\trees\mozilla-central\js\src\jsapi.cpp @ 4307] -0053f784 0120cab5 08410000 0053f7ac 00739fbd js_32_windows_42c95d88aaaa!JS_ExecuteScript+0x51 [c:\users\administrator\trees\mozilla-central\js\src\jsapi.cpp @ 4340] -0053f810 0120ba3f 08410000 00739fbd 06c9efc8 js_32_windows_42c95d88aaaa!RunFile+0x115 [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 644] -0053f834 0120bcf2 08410000 00739fbd 00000000 js_32_windows_42c95d88aaaa!Process+0xaf [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 1062] -0053f8e4 0120e416 08410000 0053f9ac 08410000 js_32_windows_42c95d88aaaa!ProcessArgs+0x242 [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7082] -0053f964 0121396e 08410000 0053f9ac 00d1ee70 js_32_windows_42c95d88aaaa!Shell+0x1a6 [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7467] -0053fa4c 01735cce 00000012 00739e18 00d1ee70 js_32_windows_42c95d88aaaa!main+0xc4e [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7852] -0053fa94 75b17c04 fef3e000 75b17be0 69dbe9d8 js_32_windows_42c95d88aaaa!__scrt_common_main_seh+0xf9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253] -0053faa8 77a7ab8f fef3e000 6bb63335 00000000 kernel32+0x17c04 -0053faf0 77a7ab5a ffffffff 77a60008 00000000 ntdll+0x5ab8f -0053fb00 00000000 01735d44 fef3e000 00000000 ntdll+0x5ab5a - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FOLLOWUP_IP: -mozglue!arena_run_dalloc+205 [c:\users\administrator\trees\mozilla-central\memory\mozjemalloc\jemalloc.c @ 3916] -746c37f5 8b4624 mov eax,dword ptr [esi+24h] - -FAULTING_SOURCE_CODE: -3912: arena_avail_tree_insert(&arena->runs_avail, &chunk->map[run_ind]); -3913: -3914: /* Deallocate chunk if it is now completely unused. */ -3915: if ((chunk->map[arena_chunk_header_npages].bits & (~pagesize_mask | -> 3916: CHUNK_MAP_ALLOCATED)) == arena_maxclass) -3917: arena_chunk_dealloc(arena, chunk); -3918: -3919: /* Enforce opt_dirty_max. */ -3920: if (arena->ndirty > opt_dirty_max) -3921: arena_purge(arena, false); - - -SYMBOL_STACK_INDEX: 1 - -SYMBOL_NAME: mozglue!arena_run_dalloc+205 - -FOLLOWUP_NAME: MachineOwner - -IMAGE_NAME: mozglue.dll - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_mozglue.dll!arena_run_dalloc - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 -# ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 0053d84c 75b17b89 ntdll+0x3c7ec -01 0053d868 75b707bf kernel32+0x17b89 -02 0053dca8 75b70295 kernel32+0x707bf -03 0053dcc0 75f6f605 kernel32+0x70295 -04 0053dd4c 77acf154 KERNELBASE+0xbf605 -05 0053faf0 77a7ab5a ntdll+0xaf154 -06 0053fb00 00000000 ntdll+0x5ab5a -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -0053d84c 75b17b89 00000003 0053d890 00000000 ntdll+0x3c7ec -0053d868 75b707bf 00000003 0053d890 00000000 kernel32+0x17b89 -0053dca8 75b70295 00000000 00000001 00000000 kernel32+0x707bf -0053dcc0 75f6f605 0053dd7c 00000001 69ecfe8a kernel32+0x70295 -0053dd4c 77acf154 0053dd7c 77a60830 0053faf0 KERNELBASE+0xbf605 -0053faf0 77a7ab5a ffffffff 77a60008 00000000 ntdll+0xaf154 -0053fb00 00000000 01735d44 fef3e000 00000000 ntdll+0x5ab5a -0:000> q -quit: diff --git a/FTB/Signatures/tests/resources/cdb-8c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-8c-crashlog.txt deleted file mode 100644 index 75fa84360..000000000 --- a/FTB/Signatures/tests/resources/cdb-8c-crashlog.txt +++ /dev/null @@ -1,207 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-dbg-32-prof-dm-windows-42c95d88aaaa.exe.4052.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 9600 MP (16 procs) Free x86 compatible -Product: Server, suite: TerminalServer SingleUserTS -Machine Name: -Debug session time: Tue Oct 4 12:50:31.000 2016 (UTC + 0:00) -System Uptime: not available -Process Uptime: 0 days 0:00:04.000 -...................................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -eax=00000000 ebx=00000000 ecx=73f1705d edx=00ea9210 esi=00000003 edi=00000003 -eip=7752c7ec esp=00ea9ad4 ebp=00ea9c5c iopl=0 nv up ei pl nz na pe nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206 -Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -ntdll+0x3c7ec: -7752c7ec c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=00000000 ebx=00000000 ecx=73f1705d edx=00ea9210 esi=00000383 edi=0a03d110 -eip=0142865d esp=00eaa780 ebp=00eaa7ec iopl=0 nv up ei pl nz ac po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000212 -*** WARNING: Unable to verify checksum for js-dbg-32-prof-dm-windows-42c95d88aaaa.exe -js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+0x3d: -0142865d cc int 3 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -*** WARNING: Unable to verify timestamp for kernel32.dll -*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll+0x3c7ec: -7752c7ec c21400 ret 14h -7752c7ef 90 nop -7752c7f0 b85b000000 mov eax,5Bh -7752c7f5 64ff15c0000000 call dword ptr fs:[0C0h] -7752c7fc c21000 ret 10h -7752c7ff 90 nop -7752c800 b85c000000 mov eax,5Ch -7752c805 64ff15c0000000 call dword ptr fs:[0C0h] -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -0142865d cc 6a 03 c7 .j.. -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** WARNING: Unable to verify checksum for mozglue.dll -*** WARNING: Unable to verify timestamp for ucrtbase.dll -*** ERROR: Module load completed but symbols could not be loaded for ucrtbase.dll -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -*** WARNING: Unable to verify timestamp for KERNELBASE.dll -*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll - -FAULTING_IP: -js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+3d [c:\users\administrator\trees\mozilla-central\js\src\jit\rangeanalysis.h @ 578] -0142865d cc int 3 - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 0142865d (js_dbg_32_prof_dm_windows_42c95d88aaaa!js::jit::Range::upper+0x0000003d) -ExceptionCode: 80000003 (Break instruction exception) -ExceptionFlags: 00000000 -NumberParameters: 1 -Parameter[0]: 00000000 - -PROCESS_NAME: js-dbg-32-prof-dm-windows-42c95d88aaaa.exe - -MODULE_NAME: unknown - -FAULTING_MODULE: 774f0000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 0 - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_PARAMETER1: 00000000 - -MOD_LIST: - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD] - -LAST_CONTROL_TRANSFER: from 01406a04 to 0142865d - -FAULTING_THREAD: ffffffff - -BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS_STACKIMMUNE - -PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS_STACKIMMUNE - -DEFAULT_BUCKET_ID: WRONG_SYMBOLS_STACKIMMUNE - -STACK_TEXT: -00000000 00000000 unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe+0x0 - - -SYMBOL_NAME: unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe - -FOLLOWUP_NAME: MachineOwner - -IMAGE_NAME: unknown - -STACK_COMMAND: ** Pseudo Context ** ; kb - -FAILURE_BUCKET_ID: WRONG_SYMBOLS_STACKIMMUNE_80000003_unknown!Unloaded - -BUCKET_ID: APPLICATION_FAULT_WRONG_SYMBOLS_STACKIMMUNE_unknown!js-dbg-32-prof-dm-windows-42c95d88aaaa.exe - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 -# ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 00ea9c5c 761e7b89 ntdll+0x3c7ec -01 00ea9c78 762407bf kernel32+0x17b89 -02 00eaa0b8 76240295 kernel32+0x707bf -03 00eaa0d0 76eef605 kernel32+0x70295 -04 00eaa15c 7759f154 KERNELBASE+0xbf605 -05 00eafaf0 7754ab5a ntdll+0xaf154 -06 00eafb00 00000000 ntdll+0x5ab5a -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -00ea9c5c 761e7b89 00000003 00ea9ca0 00000000 ntdll+0x3c7ec -00ea9c78 762407bf 00000003 00ea9ca0 00000000 kernel32+0x17b89 -00eaa0b8 76240295 00000000 00000001 00000000 kernel32+0x707bf -00eaa0d0 76eef605 00eaa18c 00000001 6ead305c kernel32+0x70295 -00eaa15c 7759f154 00eaa18c 77530830 00eafaf0 KERNELBASE+0xbf605 -00eafaf0 7754ab5a ffffffff 7752fffc 00000000 ntdll+0xaf154 -00eafb00 00000000 01051f50 fef0e000 00000000 ntdll+0x5ab5a -0:000> q -quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/cdb-9c-crashlog.txt b/FTB/Signatures/tests/resources/cdb-9c-crashlog.txt deleted file mode 100644 index 7ea13d561..000000000 --- a/FTB/Signatures/tests/resources/cdb-9c-crashlog.txt +++ /dev/null @@ -1,260 +0,0 @@ - -Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 -Copyright (c) Microsoft Corporation. All rights reserved. - - -Loading Dump File [c:\Users\Administrator\AppData\Local\CrashDumps\js-32-prof-windows-42c95d88aaaa.exe.5948.dmp] -User Mini Dump File: Only registers, stack and portions of memory are available - -Symbol search path is: *** Invalid *** -**************************************************************************** -* Symbol loading may be unreliable without a symbol search path. * -* Use .symfix to have the debugger choose a symbol path. * -* After setting your symbol path, use .reload to refresh symbol locations. * -**************************************************************************** -Executable search path is: -Windows 7 Version 9600 MP (16 procs) Free x86 compatible -Product: Server, suite: TerminalServer SingleUserTS -Machine Name: -Debug session time: Tue Oct 4 12:45:24.000 2016 (UTC + 0:00) -System Uptime: not available -Process Uptime: 0 days 0:00:01.000 -...................................... -This dump file has a breakpoint exception stored in it. -The stored exception information can be accessed via .ecxr. -eax=00000000 ebx=00000000 ecx=00000400 edx=73e74f80 esi=00000003 edi=00000003 -eip=774ec7ec esp=00b0dd54 ebp=00b0dedc iopl=0 nv up ei pl nz na po nc -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 -Unable to load image C:\Windows\System32\ntdll.dll, Win32 error 0n2 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -ntdll+0x3c7ec: -774ec7ec c21400 ret 14h -0:000> cdb: Reading initial command '$ .echo Toggle for 32-bit/64-bit modes -Toggle for 32-bit/64-bit modes -0:000> .echo See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -See http://people.mozilla.org/~aklotz/windbgcheatsheet.html -0:000> !wow64exts.sw -!wow64exts.sw : command invalid on non-64bit target -0:000> .echo Display lines in stack trace -Display lines in stack trace -0:000> .lines -Line number information will be loaded -0:000> .echo .ecxr switches to the exception context frame -.ecxr switches to the exception context frame -0:000> .ecxr -eax=00000020 ebx=00b0ea18 ecx=00000400 edx=73e74f80 esi=ffffff8c edi=00b0ea00 -eip=0f2bb4f3 esp=00b0ea00 ebp=00b0eab0 iopl=0 nv up ei pl zr na pe cy -cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000247 -0f2bb4f3 cc int 3 -*** WARNING: Unable to verify timestamp for ntdll.dll -*** ERROR: Module load completed but symbols could not be loaded for ntdll.dll -*** WARNING: Unable to verify timestamp for kernel32.dll -*** ERROR: Module load completed but symbols could not be loaded for kernel32.dll -0:000> .echo Inspect program counter, equivalent of gdb's "x/i $pc" -Inspect program counter, equivalent of gdb's "x/i $pc" -0:000> u -ntdll+0x3c7ec: -774ec7ec c21400 ret 14h -774ec7ef 90 nop -774ec7f0 b85b000000 mov eax,5Bh -774ec7f5 64ff15c0000000 call dword ptr fs:[0C0h] -774ec7fc c21000 ret 10h -774ec7ff 90 nop -774ec800 b85c000000 mov eax,5Ch -774ec805 64ff15c0000000 call dword ptr fs:[0C0h] -0:000> .echo Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -Inspect eip (32-bit) register, equivalent of gdb's "x/b $eax" -0:000> db @@c++(@eip) L4 -0f2bb4f3 cc f2 0f 10 .... -0:000> .echo Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -Inspect rip (64-bit) register, equivalent of gdb's "x/b $rax" -0:000> db @@c++(@rip) L8 -Bad register error at '@rip) ' -0:000> .echo To switch frames: .frame /r /c -To switch frames: .frame /r /c -0:000> .echo Then inspect locals using: dv -Then inspect locals using: dv -0:000> .echo Running !analyze -Running !analyze -0:000> !analyze -v -******************************************************************************* -* * -* Exception Analysis * -* * -******************************************************************************* - -*** WARNING: Unable to verify checksum for js-32-prof-windows-42c95d88aaaa.exe -***** OS symbols are WRONG. Please fix symbols to do analysis. - -************************************************************************* -*** *** -*** *** -*** Your debugger is not using the correct symbols *** -*** *** -*** In order for this command to work properly, your symbol path *** -*** must point to .pdb files that have full type information. *** -*** *** -*** Certain .pdb files (such as the public OS symbols) do not *** -*** contain the required information. Contact the group that *** -*** provided you with these symbols if you need this command to *** -*** work. *** -*** *** -*** Type referenced: ntdll!_PEB *** -*** *** -************************************************************************* -********************************************************************* -* Symbols can not be loaded because symbol path is not initialized. * -* * -* The Symbol Path can be set by: * -* using the _NT_SYMBOL_PATH environment variable. * -* using the -y argument when starting the debugger. * -* using .sympath and .sympath+ * -********************************************************************* -*** WARNING: Unable to verify timestamp for KERNELBASE.dll -*** ERROR: Module load completed but symbols could not be loaded for KERNELBASE.dll - -FAULTING_IP: -+1d8 -0f2bb4f3 cc int 3 - -EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff) -ExceptionAddress: 0f2bb4f3 -ExceptionCode: 80000003 (Break instruction exception) -ExceptionFlags: 00000000 -NumberParameters: 1 -Parameter[0]: 00000000 - -DEFAULT_BUCKET_ID: WRONG_SYMBOLS - -PROCESS_NAME: js-32-prof-windows-42c95d88aaaa.exe - -ADDITIONAL_DEBUG_TEXT: -Use '!findthebuild' command to search for the target build information. -If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols. - -FAULTING_MODULE: 774b0000 ntdll - -DEBUG_FLR_IMAGE_TIMESTAMP: 57f38c83 - -ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached. - -EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid - -EXCEPTION_PARAMETER1: 00000000 - -MOD_LIST: - -FAULTING_THREAD: 00001640 - -PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS - -BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS - -IP_ON_HEAP: 08dbf970 -The fault address in not in any loaded module, please check your build's rebase -log at \bin\build_logs\timebuild\ntrebase.log for module which may -contain the address if it were loaded. - -FRAME_ONE_INVALID: 1 - -LAST_CONTROL_TRANSFER: from 08dbf970 to 0f2bb4f3 - -STACK_TEXT: -WARNING: Frame IP not in any known module. Following frames may be wrong. -00b0eab0 08dbf970 0f2baaf4 00006021 00000001 0xf2bb4f3 -00b0ebf8 00e9a9a8 00fd1326 08a10000 00b0ed08 0x8dbf970 -00b0ece8 0125dd0c 00b0ed98 0125dd0c 08a10000 js_32_prof_windows_42c95d88aaaa!js::AddTypePropertyId+0x1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] -00b0ea18 ffffff81 08c59110 ffffff8c 00000000 js_32_prof_windows_42c95d88aaaa!js::jit::EnterBaselineMethod+0x11c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 193] -00b0ee30 00fd9793 08a10000 00b0ee4c 08db2740 0xffffff81 -00b0ee74 00fd953f 08a10000 00b0ef04 00000000 js_32_prof_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x243 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] -00b0ee8c 0125a0d6 08a10000 00b0ef04 08db2740 js_32_prof_windows_42c95d88aaaa!InternalCall+0x5f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -00b0ef1c 1e71129f 08a10000 00b0efb8 0100003a js_32_prof_windows_42c95d88aaaa!js::jit::DoCallFallback+0x266 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] -00b0eff4 00fd1326 08a10000 00b0f100 00b0f0e8 0x1e71129f -00b0f008 0125d6bc 0f2b9970 00000001 00b0f368 js_32_prof_windows_42c95d88aaaa!js::Activation::Activation+0x36 [c:\users\administrator\trees\mozilla-central\js\src\vm\stack-inl.h @ 854] -00b0ef40 ffffff82 014a7730 08c494e8 1e7176c3 js_32_prof_windows_42c95d88aaaa!EnterBaseline+0x15c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] -00b0f188 00fe6375 00000000 00fe6375 08a10000 0xffffff82 -00b0f228 00fd9793 08a10000 00b0f244 08dd90b0 js_32_prof_windows_42c95d88aaaa!js::RunScript+0x1d5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 394] -00b0f26c 00fd953f 08a10000 00b0f2fc 00000000 js_32_prof_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x243 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] -00b0f284 0125a0d6 08a10000 00b0f2fc 08dd90b0 js_32_prof_windows_42c95d88aaaa!InternalCall+0x5f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -00b0f314 1e71129f 08a10000 00b0f3a8 0100003a js_32_prof_windows_42c95d88aaaa!js::jit::DoCallFallback+0x266 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] -00b0f370 08dd90b0 0f2b3fa5 00005021 00000000 0x1e71129f -00b0f48c 00fd1326 08a10000 00b0f598 00b0f580 0x8dd90b0 -00b0f4a0 0125d6bc 1d97e790 00000002 00b0f800 js_32_prof_windows_42c95d88aaaa!js::Activation::Activation+0x36 [c:\users\administrator\trees\mozilla-central\js\src\vm\stack-inl.h @ 854] -00b0f338 ffffff82 014a7730 08c494e8 1e7176c3 js_32_prof_windows_42c95d88aaaa!EnterBaseline+0x15c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] -00b0f620 00fe6375 00000000 00fe6375 08a10000 0xffffff82 -00b0f6c0 00fd9793 08a10000 00b0f6dc 08fd2010 js_32_prof_windows_42c95d88aaaa!js::RunScript+0x1d5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 394] -00b0f704 00fd953f 08a10000 00b0f794 00000000 js_32_prof_windows_42c95d88aaaa!js::InternalCallOrConstruct+0x243 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 479] -00b0f71c 0125a0d6 08a10000 00b0f794 08fd2010 js_32_prof_windows_42c95d88aaaa!InternalCall+0x5f [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 503] -00b0f7ac 1e71129f 08a10000 00b0f838 0100003a js_32_prof_windows_42c95d88aaaa!js::jit::DoCallFallback+0x266 [c:\users\administrator\trees\mozilla-central\js\src\jit\baselineic.cpp @ 6012] -00b0f880 0125d6bc 35630010 00000000 00000000 0x1e71129f -00b0f7d0 ffffff82 014a7730 08c494e8 1e7176c3 js_32_prof_windows_42c95d88aaaa!EnterBaseline+0x15c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] -00b0f880 0125d6bc 35630010 00000000 00000000 0xffffff82 -00b0f958 0125dd0c 00b0fa08 0125dd0c 08a10000 js_32_prof_windows_42c95d88aaaa!EnterBaseline+0x15c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 157] -00b0fa00 00fe6375 08a10000 00fe6375 08a10000 js_32_prof_windows_42c95d88aaaa!js::jit::EnterBaselineMethod+0x11c [c:\users\administrator\trees\mozilla-central\js\src\jit\baselinejit.cpp @ 193] -00b0faa0 00fd68f4 08a10000 00b0fab0 013dc8d4 js_32_prof_windows_42c95d88aaaa!js::RunScript+0x1d5 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 394] -00b0faf0 00fd67ab 08a10000 00b0fc04 08c57020 js_32_prof_windows_42c95d88aaaa!js::ExecuteKernel+0xa4 [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 688] -00b0fb30 00f69dc6 08a10000 00b0fc04 08c57020 js_32_prof_windows_42c95d88aaaa!js::Execute+0xeb [c:\users\administrator\trees\mozilla-central\js\src\vm\interpreter.cpp @ 717] -00b0fb54 00f6e54d 08a10000 00b0fb78 00b0fc04 js_32_prof_windows_42c95d88aaaa!ExecuteScript+0x26 [c:\users\administrator\trees\mozilla-central\js\src\jsapi.cpp @ 4307] -00b0fb7c 00e8c434 08a10000 00b0fc04 00d29fb7 js_32_prof_windows_42c95d88aaaa!JS_ExecuteScript+0x4d [c:\users\administrator\trees\mozilla-central\js\src\jsapi.cpp @ 4340] -00b0fc0c 00e8b4cf 08a10000 00d29fb7 071befc8 js_32_prof_windows_42c95d88aaaa!RunFile+0xf4 [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 644] -00b0fc30 00e8b74e 08a10000 00d29fb7 00000000 js_32_prof_windows_42c95d88aaaa!Process+0xaf [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 1062] -00b0fce0 00e8dd0e 08a10000 00b0fdc4 08a10000 js_32_prof_windows_42c95d88aaaa!ProcessArgs+0x20e [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7082] -00b0fd64 00e9332f 08a10000 00b0fdc4 06ccee70 js_32_prof_windows_42c95d88aaaa!Shell+0x18e [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7467] -00b0fe50 013a7bbe 00000010 00d29e30 06ccee70 js_32_prof_windows_42c95d88aaaa!main+0xcdf [c:\users\administrator\trees\mozilla-central\js\src\shell\js.cpp @ 7852] -00b0fe98 75027c04 fe77d000 75027be0 843a73d1 js_32_prof_windows_42c95d88aaaa!__scrt_common_main_seh+0xf9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 253] -00b0feac 7750ab8f fe77d000 86701c6a 00000000 kernel32+0x17c04 -00b0fef4 7750ab5a ffffffff 774f000d 00000000 ntdll+0x5ab8f -00b0ff04 00000000 013a7c34 fe77d000 00000000 ntdll+0x5ab5a - - -STACK_COMMAND: ~0s; .ecxr ; kb - -FOLLOWUP_IP: -js_32_prof_windows_42c95d88aaaa!js::AddTypePropertyId+1d8 [c:\users\administrator\trees\mozilla-central\js\src\vm\typeinference.cpp @ 2811] -00e9a9a8 8b4dfc mov ecx,dword ptr [ebp-4] - -SYMBOL_STACK_INDEX: 2 - -SYMBOL_NAME: js_32_prof_windows!js::AddTypePropertyId+1d8 - -FOLLOWUP_NAME: MachineOwner - -MODULE_NAME: js_32_prof_windows_42c95d88aaaa - -IMAGE_NAME: js-32-prof-windows-42c95d88aaaa.exe - -BUCKET_ID: WRONG_SYMBOLS - -FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_js-32-prof-windows-42c95d88aaaa.exe!js::AddTypePropertyId - -Followup: MachineOwner ---------- - -0:000> .echo Backtrace of faulting thread, limited to 50 frames -Backtrace of faulting thread, limited to 50 frames -0:000> ~#kn 50 -# ChildEBP RetAddr -WARNING: Stack unwind information not available. Following frames may be wrong. -00 00b0dedc 75027b89 ntdll+0x3c7ec -01 00b0def8 750807bf kernel32+0x17b89 -02 00b0e338 75080295 kernel32+0x707bf -03 00b0e350 74eef605 kernel32+0x70295 -04 00b0e3dc 7755f154 KERNELBASE+0xbf605 -05 00b0fef4 7750ab5a ntdll+0xaf154 -06 00b0ff04 00000000 ntdll+0x5ab5a -0:000> .echo Backtrace, limited to 50 frames (should execute after .ecxr) -Backtrace, limited to 50 frames (should execute after .ecxr) -0:000> kb 50 -ChildEBP RetAddr Args to Child -WARNING: Stack unwind information not available. Following frames may be wrong. -00b0dedc 75027b89 00000003 00b0df20 00000000 ntdll+0x3c7ec -00b0def8 750807bf 00000003 00b0df20 00000000 kernel32+0x17b89 -00b0e338 75080295 00000000 00000001 00000000 kernel32+0x707bf -00b0e350 74eef605 00b0e40c 00000001 85c44d68 kernel32+0x70295 -00b0e3dc 7755f154 00b0e40c 774f0830 00b0fef4 KERNELBASE+0xbf605 -00b0fef4 7750ab5a ffffffff 774f000d 00000000 ntdll+0xaf154 -00b0ff04 00000000 013a7c34 fe77d000 00000000 ntdll+0x5ab5a -0:000> q -quit: \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/minidump-example.txt b/FTB/Signatures/tests/resources/minidump-example.txt deleted file mode 100644 index dc2b2a68b..000000000 --- a/FTB/Signatures/tests/resources/minidump-example.txt +++ /dev/null @@ -1,811 +0,0 @@ -OS|Linux|0.0.0 Linux 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 -CPU|amd64|family 6 model 30 stepping 5|8 -Crash|SIGSEGV|0x3e800006acb|0 -Module|firefox-bin||firefox-bin|0D19D899740636ED3DFD7E676772A1D80|0x00400000|0x00428fff|1 -Module|libXss.so.1.0.0||libXss.so.1.0.0|1C6D41787DF49947006B88449F69AA540|0x7fafe19fc000|0x7fafe1bfffff|0 -Module|libcroco-0.6.so.3.0.1||libcroco-0.6.so.3.0.1|22664AB68E5BEB3A7EFE5FB23DA9CE8C0|0x7fafe4c8e000|0x7fafe4ec7fff|0 -Module|librsvg-2.so.2.36.1||librsvg-2.so.2.36.1|5E7887C693FFC7801F9F2D0AE68F20CB0|0x7fafe4ec8000|0x7fafe50fcfff|0 -Module|libpixbufloader-svg.so||libpixbufloader-svg.so|7D5337AA457155C701380177FB8482920|0x7fafe50fd000|0x7fafe52fffff|0 -Module|Ubuntu-L.ttf||Ubuntu-L.ttf|000000000000000000000000000000000|0x7fafe9733000|0x7fafe97fefff|0 -Module|DejaVuSans.ttf||DejaVuSans.ttf|000000000000000000000000000000000|0x7fafebe3d000|0x7fafebeecfff|0 -Module|Ubuntu-R.ttf||Ubuntu-R.ttf|000000000000000000000000000000000|0x7fafed951000|0x7fafed9fefff|0 -Module|libpixbufloader-png.so||libpixbufloader-png.so|C44D4C71D3F787F134AFB3044425AED00|0x7fafee5d5000|0x7fafee7dafff|0 -Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7fafee7db000|0x7fafefe9afff|0 -Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7fafefe9b000|0x7faff40fffff|0 -Module|DroidSerif-Regular.ttf||DroidSerif-Regular.ttf|000000000000000000000000000000000|0x7faff44a4000|0x7faff44cefff|0 -Module|libnssckbi.so||libnssckbi.so|E70DC15381A536C15F890A72C96628BA0|0x7faff672a000|0x7faff69d6fff|0 -Module|libfreebl3.so||libfreebl3.so|0ACA871B0359A52F8948419A28D020A30|0x7faff69d7000|0x7faff6c84fff|0 -Module|libnssdbm3.so||libnssdbm3.so|7D772AB0DE05613945E1C0CC633164980|0x7faff6c89000|0x7faff6eb4fff|0 -Module|libsoftokn3.so||libsoftokn3.so|E70A781902D609967FFBAD8C9513A8180|0x7faff6eb5000|0x7faff70fffff|0 -Module|webappsstore.sqlite-shm||webappsstore.sqlite-shm|000000000000000000000000000000000|0x7faff7406000|0x7faff740dfff|0 -Module|places.sqlite-shm||places.sqlite-shm|000000000000000000000000000000000|0x7faff740e000|0x7faff7415fff|0 -Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7faff7416000|0x7faff74fefff|0 -Module|SYSV00000000 (deleted)||SYSV00000000 (deleted)|000000000000000000000000000000000|0x7faff8201000|0x7faff8260fff|0 -Module|mime.cache||mime.cache|000000000000000000000000000000000|0x7faff8261000|0x7faff827ffff|0 -Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7faff8280000|0x7faff828afff|0 -Module|icon-theme.cache||icon-theme.cache|000000000000000000000000000000000|0x7faff828b000|0x7faff82adfff|0 -Module|libibus-1.0.so.0.401.0||libibus-1.0.so.0.401.0|E702D690AE6BED7B45E625E55308CA630|0x7faff82ae000|0x7faff84f3fff|0 -Module|im-ibus.so||im-ibus.so|2D54EC404DE29598D386B63CA6BF12F90|0x7faff84f5000|0x7faff86fbfff|0 -Module|pango-basic-fc.so||pango-basic-fc.so|B7268AAC58CEE3550C7DFA5D9D85113F0|0x7faff86fc000|0x7faff88fefff|0 -Module|Ubuntu-R.ttf||Ubuntu-R.ttf|000000000000000000000000000000000|0x7faff94a8000|0x7faff94fefff|0 -Module|mime.cache||mime.cache|000000000000000000000000000000000|0x7faffad07000|0x7faffad08fff|0 -Module|DroidSansMono.ttf||DroidSansMono.ttf|000000000000000000000000000000000|0x7faffad1a000|0x7faffad36fff|0 -Module|c05880de57d1f5e948fdfacc138775d9-le64.cache-3||c05880de57d1f5e948fdfacc138775d9-le64.cache-3|000000000000000000000000000000000|0x7faffad37000|0x7faffad37fff|0 -Module|945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-3||945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-3|000000000000000000000000000000000|0x7faffad38000|0x7faffad40fff|0 -Module|99e8ed0e538f840c565b6ed5dad60d56-le64.cache-3||99e8ed0e538f840c565b6ed5dad60d56-le64.cache-3|000000000000000000000000000000000|0x7faffad41000|0x7faffad42fff|0 -Module|a6d8cf8e4ec09cdbc8633c31745a07dd-le64.cache-3||a6d8cf8e4ec09cdbc8633c31745a07dd-le64.cache-3|000000000000000000000000000000000|0x7faffad43000|0x7faffad4afff|0 -Module|2cd17615ca594fa2959ae173292e504c-le64.cache-3||2cd17615ca594fa2959ae173292e504c-le64.cache-3|000000000000000000000000000000000|0x7faffad4b000|0x7faffad4efff|0 -Module|fd9505950c048a77dc4b710eb6a628ed-le64.cache-3||fd9505950c048a77dc4b710eb6a628ed-le64.cache-3|000000000000000000000000000000000|0x7faffad4f000|0x7faffad4ffff|0 -Module|ddc79d3ea06a7c6ffa86ede85f3bb5df-le64.cache-3||ddc79d3ea06a7c6ffa86ede85f3bb5df-le64.cache-3|000000000000000000000000000000000|0x7faffad50000|0x7faffad52fff|0 -Module|e7071f4a29fa870f4323321c154eba04-le64.cache-3||e7071f4a29fa870f4323321c154eba04-le64.cache-3|000000000000000000000000000000000|0x7faffad53000|0x7faffad53fff|0 -Module|a2ab74764b07279e7c36ddb1d302cf26-le64.cache-3||a2ab74764b07279e7c36ddb1d302cf26-le64.cache-3|000000000000000000000000000000000|0x7faffad54000|0x7faffad54fff|0 -Module|c69f04ab05004e31a6d5e715764f16d8-le64.cache-3||c69f04ab05004e31a6d5e715764f16d8-le64.cache-3|000000000000000000000000000000000|0x7faffad55000|0x7faffad56fff|0 -Module|b5ea634b0fb353b8ea17632d1f9ef766-le64.cache-3||b5ea634b0fb353b8ea17632d1f9ef766-le64.cache-3|000000000000000000000000000000000|0x7faffad57000|0x7faffad59fff|0 -Module|646addb8444faa74ee138aa00ab0b6a0-le64.cache-3||646addb8444faa74ee138aa00ab0b6a0-le64.cache-3|000000000000000000000000000000000|0x7faffad5a000|0x7faffad5bfff|0 -Module|a755afe4a08bf5b97852ceb7400b47bc-le64.cache-3||a755afe4a08bf5b97852ceb7400b47bc-le64.cache-3|000000000000000000000000000000000|0x7faffad5c000|0x7faffad61fff|0 -Module|20bd79ad97094406f7d1b9654bfbd926-le64.cache-3||20bd79ad97094406f7d1b9654bfbd926-le64.cache-3|000000000000000000000000000000000|0x7faffad62000|0x7faffad63fff|0 -Module|libbrowsercomps.so||libbrowsercomps.so|3CC53D32E284DB3BD998919704B6DEB30|0x7faffb0eb000|0x7faffb2fffff|0 -Module|9c0624108b9a2ae8552f664125be8356-le64.cache-3||9c0624108b9a2ae8552f664125be8356-le64.cache-3|000000000000000000000000000000000|0x7faffb400000|0x7faffb404fff|0 -Module|6d41288fd70b0be22e8c3a91e032eec0-le64.cache-3||6d41288fd70b0be22e8c3a91e032eec0-le64.cache-3|000000000000000000000000000000000|0x7faffb405000|0x7faffb40dfff|0 -Module|da1bd5ca8443ffe22927a23ce431d198-le64.cache-3||da1bd5ca8443ffe22927a23ce431d198-le64.cache-3|000000000000000000000000000000000|0x7faffb40e000|0x7faffb40ffff|0 -Module|04aabc0a78ac019cf9454389977116d2-le64.cache-3||04aabc0a78ac019cf9454389977116d2-le64.cache-3|000000000000000000000000000000000|0x7faffb410000|0x7faffb41ffff|0 -Module|385c0604a188198f04d133e54aba7fe7-le64.cache-3||385c0604a188198f04d133e54aba7fe7-le64.cache-3|000000000000000000000000000000000|0x7faffb420000|0x7faffb422fff|0 -Module|ddd4086aec35a5275babba44bb759c3c-le64.cache-3||ddd4086aec35a5275babba44bb759c3c-le64.cache-3|000000000000000000000000000000000|0x7faffb423000|0x7faffb424fff|0 -Module|4794a0821666d79190d59a36cb4f44b5-le64.cache-3||4794a0821666d79190d59a36cb4f44b5-le64.cache-3|000000000000000000000000000000000|0x7faffb425000|0x7faffb425fff|0 -Module|8801497958630a81b71ace7c5f9b32a8-le64.cache-3||8801497958630a81b71ace7c5f9b32a8-le64.cache-3|000000000000000000000000000000000|0x7faffb426000|0x7faffb428fff|0 -Module|365b55f210c0a22e9a19e35191240f32-le64.cache-3||365b55f210c0a22e9a19e35191240f32-le64.cache-3|000000000000000000000000000000000|0x7faffb429000|0x7faffb456fff|0 -Module|52f7bdb7ce746bfd7eaa1985bd9cfa93-le64.cache-3||52f7bdb7ce746bfd7eaa1985bd9cfa93-le64.cache-3|000000000000000000000000000000000|0x7faffb457000|0x7faffb45efff|0 -Module|libmozgnome.so||libmozgnome.so|2A849C7077320B1D5BDB9D9A16AE841C0|0x7faffc4e2000|0x7faffc6f6fff|0 -Module|libdbusservice.so||libdbusservice.so|0EC37D3542DD394C6F96153A4E474B610|0x7faffc6f7000|0x7faffc8fffff|0 -Module|0d8c3b2ac0904cb8a57a757ad11a4a08-le64.cache-3||0d8c3b2ac0904cb8a57a757ad11a4a08-le64.cache-3|000000000000000000000000000000000|0x7faffca00000|0x7faffca00fff|0 -Module|3047814df9a2f067bd2d96a2b9c36e5a-le64.cache-3||3047814df9a2f067bd2d96a2b9c36e5a-le64.cache-3|000000000000000000000000000000000|0x7faffca01000|0x7faffca05fff|0 -Module|omni.ja||omni.ja|000000000000000000000000000000000|0x7faffca06000|0x7faffd51afff|0 -Module|omni.ja||omni.ja|000000000000000000000000000000000|0x7faffd51b000|0x7faffe039fff|0 -Module|libgpg-error.so.0.8.0||libgpg-error.so.0.8.0|5AD2FB740865668A171A37912C5FD4CF0|0x7faffe83b000|0x7faffea3efff|0 -Module|libp11-kit.so.0.0.0||libp11-kit.so.0.0.0|1B58E7771DC59DBA0D1D9D72AE9F8DE40|0x7faffea3f000|0x7faffec50fff|0 -Module|libtasn1.so.3.1.12||libtasn1.so.3.1.12|425E8D1B35A9CACAD55D4B9E208AAE2A0|0x7faffec51000|0x7faffee61fff|0 -Module|libORBitCosNaming-2.so.0.1.0||libORBitCosNaming-2.so.0.1.0|952A0448200ABF9A3F8FFCEB3D0F77F90|0x7faffee62000|0x7fafff068fff|0 -Module|libgcrypt.so.11.7.0||libgcrypt.so.11.7.0|C0BB9281FA6D4AAE0D58199D5E9BFFEB0|0x7fafff069000|0x7fafff2e6fff|0 -Module|libutil-2.15.so||libutil-2.15.so|6FF8867791C7874100B82302B5ED2F9F0|0x7fafff2e7000|0x7fafff4e9fff|0 -Module|libavahi-client.so.3.2.9||libavahi-client.so.3.2.9|81AF3A2B95968204957317231F995E020|0x7fafff4ea000|0x7fafff6fafff|0 -Module|libavahi-common.so.3.5.3||libavahi-common.so.3.5.3|45F54D483C5EB3C56D1BCCB1CDF1170F0|0x7fafff6fb000|0x7fafff906fff|0 -Module|libavahi-glib.so.1.0.2||libavahi-glib.so.1.0.2|531736E78B3E3E7103694008A0FE28F90|0x7fafff907000|0x7fafffb0afff|0 -Module|libgnutls.so.26.21.8||libgnutls.so.26.21.8|D0797B18564E20075594A5BCAED9C0C60|0x7fafffb0b000|0x7fafffdc5fff|0 -Module|libgailutil.so.18.0.1||libgailutil.so.18.0.1|72ACC6E9E767156C75BA9658D91015D50|0x7fafffdc7000|0x7faffffcefff|0 -Module|libpopt.so.0.0.0||libpopt.so.0.0.0|53CF6E63E2963051093E39CDC63B59EB0|0x7faffffcf000|0x7fb0001dafff|0 -Module|libxml2.so.2.7.8||libxml2.so.2.7.8|17BDD9D9537B18BAD637B288144345B20|0x7fb0001db000|0x7fb000534fff|0 -Module|libORBit-2.so.0.1.0||libORBit-2.so.0.1.0|721699122CCECE63A6E2A74492E71DCD0|0x7fb000536000|0x7fb0007a3fff|0 -Module|libbonobo-activation.so.4.0.0||libbonobo-activation.so.4.0.0|6B32741B5548A425AA5EE68457F19DF40|0x7fb0007a4000|0x7fb0009bdfff|0 -Module|libbonobo-2.so.0.0.0||libbonobo-2.so.0.0.0|D897FF610210D8618CFE5907022D24950|0x7fb0009be000|0x7fb000c32fff|0 -Module|libgnome-keyring.so.0.2.0||libgnome-keyring.so.0.2.0|50934FF6988C62EF2485132784971F060|0x7fb000c33000|0x7fb000e54fff|0 -Module|libgconf-2.so.4.1.5||libgconf-2.so.4.1.5|78D27F8280A740A8D28DA95341D922E50|0x7fb000e55000|0x7fb001082fff|0 -Module|libgnomevfs-2.so.0.2400.4||libgnomevfs-2.so.0.2400.4|A1072EFFBB949558CFB122C96358B7FE0|0x7fb001083000|0x7fb0012edfff|0 -Module|libart_lgpl_2.so.2.3.21||libart_lgpl_2.so.2.3.21|921CD218C8F7A9DC14191D2419D37C340|0x7fb0012ef000|0x7fb001507fff|0 -Module|libgnome-2.so.0.3200.1||libgnome-2.so.0.3200.1|F7B54C36941CEC98656804CB5DEBA2A50|0x7fb001508000|0x7fb00171efff|0 -Module|libgnomecanvas-2.so.0.3000.3||libgnomecanvas-2.so.0.3000.3|A4B011436BAFDE331FD59A11B38274DE0|0x7fb00171f000|0x7fb001953fff|0 -Module|libbonoboui-2.so.0.0.0||libbonoboui-2.so.0.0.0|849E31076BC867928491E763B01722210|0x7fb001954000|0x7fb001bc0fff|0 -Module|libgnomeui-2.so.0.2400.5||libgnomeui-2.so.0.2400.5|AC622823C087F1E741F8E24D44622F5B0|0x7fb001bc2000|0x7fb001e5bfff|0 -Module|libogg.so.0.7.1||libogg.so.0.7.1|7CE65CFFE1B17992BD92FE37057278080|0x7fb001e5d000|0x7fb002063fff|0 -Module|libvorbis.so.0.4.5||libvorbis.so.0.4.5|27C649ED8648B8DE0C0D1C927A80D0D10|0x7fb002064000|0x7fb00228ffff|0 -Module|libltdl.so.7.3.0||libltdl.so.7.3.0|7BE3533A4405F6BBB1B845FD45BB6BE30|0x7fb002290000|0x7fb002499fff|0 -Module|libtdb.so.1.2.9||libtdb.so.1.2.9|97146C5E103A9352B4A804F435255AB70|0x7fb00249a000|0x7fb0026aafff|0 -Module|libvorbisfile.so.3.3.4||libvorbisfile.so.3.3.4|4E3CC52B1F33A13045018DA670EDC8660|0x7fb0026ab000|0x7fb0028b2fff|0 -Module|libcanberra.so.0.2.5||libcanberra.so.0.2.5|FDE735E04FD3D9D0B5044A096A13AEA20|0x7fb0028b3000|0x7fb002ac2fff|0 -Module|libcanberra-gtk.so.0.1.8||libcanberra-gtk.so.0.1.8|1D8BEEADE64BADDEC610E1576DEE6B990|0x7fb002ac3000|0x7fb002cc7fff|0 -Module|libcanberra-gtk-module.so||libcanberra-gtk-module.so|464DC0156A5FA84FAC9FCE1E8325E28B0|0x7fb002cc8000|0x7fb002ecdfff|0 -Module|libmurrine.so||libmurrine.so|56A56852CAE0D5FEB3447AF00A58DF620|0x7fb002ece000|0x7fb0030fefff|0 -Module|56cf4f4769d0f4abc89a4895d7bd3ae1-le64.cache-3||56cf4f4769d0f4abc89a4895d7bd3ae1-le64.cache-3|000000000000000000000000000000000|0x7fb003a00000|0x7fb003a00fff|0 -Module|libdconfsettings.so||libdconfsettings.so|AAA0B3FAC1F9932AE94C47E1E4FDDCDD0|0x7fb003a82000|0x7fb003c89fff|0 -Module|liboverlay-scrollbar-0.2.so.0.0.16||liboverlay-scrollbar-0.2.so.0.0.16|343EDF37DE058829301797C8495160AC0|0x7fb003c8a000|0x7fb003e9afff|0 -Module|libnss_files-2.15.so||libnss_files-2.15.so|1C734D5F2B5C3610309A92B6E8A30B360|0x7fb003e9b000|0x7fb0040a7fff|0 -Module|libnss_nis-2.15.so||libnss_nis-2.15.so|8233136DF7FFA42BBDFF65766B57ECE10|0x7fb0040a8000|0x7fb0042b3fff|0 -Module|libnsl-2.15.so||libnsl-2.15.so|7F6EA508230A652EDF2D8A5E011C06610|0x7fb0042b4000|0x7fb0044cbfff|0 -Module|libnss_compat-2.15.so||libnss_compat-2.15.so|6D33FE1C9B7112BC70B118A6580DC3710|0x7fb0044ce000|0x7fb0046d6fff|0 -Module|UTF-16.so||UTF-16.so|F483538C59760F4799491B9373FB8B460|0x7fb0046d7000|0x7fb0048dafff|0 -Module|locale-archive||locale-archive|000000000000000000000000000000000|0x7fb0048db000|0x7fb004d1dfff|0 -Module|libuuid.so.1.3.0||libuuid.so.1.3.0|037E18FB575A87D9023DD035D91A4BAA0|0x7fb00551f000|0x7fb005723fff|0 -Module|libXdmcp.so.6.0.0||libXdmcp.so.6.0.0|D347AE60E4BF77744E66850C9808F9740|0x7fb005724000|0x7fb005929fff|0 -Module|libXau.so.6.0.0||libXau.so.6.0.0|D7A73167BC2EEF9029813AE5658A46F80|0x7fb00592a000|0x7fb005b2cfff|0 -Module|libICE.so.6.3.0||libICE.so.6.3.0|FFF38C3C84584E4FF36B7A774838500F0|0x7fb005b2d000|0x7fb005d43fff|0 -Module|libSM.so.6.0.1||libSM.so.6.0.1|76EE351B24B6C4C90EA61295C8418F470|0x7fb005d47000|0x7fb005f4efff|0 -Module|libxcb.so.1.1.0||libxcb.so.1.1.0|C95AB2CAC726A1E597FDE920942A9D370|0x7fb005f4f000|0x7fb00616cfff|0 -Module|libxcb-render.so.0.0.0||libxcb-render.so.0.0.0|12379286A5FC1108AEE4EFB17E618C840|0x7fb00616d000|0x7fb006376fff|0 -Module|libxcb-shm.so.0.0.0||libxcb-shm.so.0.0.0|77C14B0F157DE886CEE2761A5A43E7AA0|0x7fb006377000|0x7fb006579fff|0 -Module|libpng12.so.0.46.0||libpng12.so.0.46.0|4A2127A3BE4729BFBC602AE1F64BB2110|0x7fb00657a000|0x7fb0067a1fff|0 -Module|libpixman-1.so.0.24.4||libpixman-1.so.0.24.4|B9997FF15D5DB7DDD6E300FABE6F319B0|0x7fb0067a2000|0x7fb006a28fff|0 -Module|libXcursor.so.1.0.2||libXcursor.so.1.0.2|8BE2FFC59D6737AB92BE5CC674AE56A40|0x7fb006a29000|0x7fb006c32fff|0 -Module|libXrandr.so.2.2.0||libXrandr.so.2.2.0|802E879DE6FC03D3E30A388D1A7048B00|0x7fb006c33000|0x7fb006e3bfff|0 -Module|libXi.so.6.1.0||libXi.so.6.1.0|99C16AC55063CCAE3BA5D3804569EBFE0|0x7fb006e3c000|0x7fb00704afff|0 -Module|libXinerama.so.1.0.0||libXinerama.so.1.0.0|264CDEE62F23276313EDA6A67DB77A4C0|0x7fb00704b000|0x7fb00724dfff|0 -Module|libresolv-2.15.so||libresolv-2.15.so|E0E46E8814494E526A28601CB19B39160|0x7fb00724e000|0x7fb007467fff|0 -Module|libselinux.so.1||libselinux.so.1|D6AB0928E3C1FF183F3531FAA90ECF6C0|0x7fb00746a000|0x7fb007687fff|0 -Module|libpcre.so.3.12.1||libpcre.so.3.12.1|AE2C57A4C060656D726044F50CB6157C0|0x7fb007689000|0x7fb0078c5fff|0 -Module|libffi.so.6.0.0||libffi.so.6.0.0|42A1B026EC977965C9307A512B0CAF360|0x7fb0078c6000|0x7fb007acdfff|0 -Module|libexpat.so.1.5.2||libexpat.so.1.5.2|3B42437F3CB4CF8D6D2A684BF416A07F0|0x7fb007ace000|0x7fb007cf7fff|0 -Module|libz.so.1.2.3.4||libz.so.1.2.3.4|FCEC95F691F35D8D34989398A14B7ECD0|0x7fb007cf8000|0x7fb007f0efff|0 -Module|libgthread-2.0.so.0.3200.1||libgthread-2.0.so.0.3200.1|C1226354620C103F73EEA1B5FB7893010|0x7fb007f0f000|0x7fb008110fff|0 -Module|libXt.so.6.0.0||libXt.so.6.0.0|8135EEBF46BB9BD5E86CFAE6212742A00|0x7fb008111000|0x7fb008375fff|0 -Module|libX11.so.6.3.0||libX11.so.6.3.0|8C39D4DF4B38C9E4F96A4BFA63E4D8BE0|0x7fb008377000|0x7fb0086aafff|0 -Module|libgmodule-2.0.so.0.3200.1||libgmodule-2.0.so.0.3200.1|C66A8AB87D16694CF937DAC0F6B664FE0|0x7fb0086ab000|0x7fb0088aefff|0 -Module|libcairo.so.2.11000.2||libcairo.so.2.11000.2|004D8C7F57D6CB9C78B06248BF6F693C0|0x7fb0088af000|0x7fb008b69fff|0 -Module|libpango-1.0.so.0.3000.0||libpango-1.0.so.0.3000.0|0B6484B366839F9BF893C4DB919339F10|0x7fb008b6d000|0x7fb008db5fff|0 -Module|libpangocairo-1.0.so.0.3000.0||libpangocairo-1.0.so.0.3000.0|7399CB0203754BE8423998526C341E330|0x7fb008db6000|0x7fb008fc1fff|0 -Module|libgdk_pixbuf-2.0.so.0.2600.1||libgdk_pixbuf-2.0.so.0.2600.1|DD9021B2B36B59B6A7BADEE89691AACC0|0x7fb008fc2000|0x7fb0091e1fff|0 -Module|libgdk-x11-2.0.so.0.2400.10||libgdk-x11-2.0.so.0.2400.10|1960A8873DF41407FD59D74CBF7D82630|0x7fb0091e2000|0x7fb009493fff|0 -Module|libpangoft2-1.0.so.0.3000.0||libpangoft2-1.0.so.0.3000.0|D8A3307209551AF5DEE20873B11FA7F30|0x7fb009494000|0x7fb0096bdfff|0 -Module|libgio-2.0.so.0.3200.1||libgio-2.0.so.0.3200.1|3254E51FD3C9E24591957B11F0AFCC8F0|0x7fb0096be000|0x7fb009a0afff|0 -Module|libatk-1.0.so.0.20409.1||libatk-1.0.so.0.20409.1|2DF4A21F3F393CFE003DACC1115DE6500|0x7fb009a0d000|0x7fb009c2efff|0 -Module|libgtk-x11-2.0.so.0.2400.10||libgtk-x11-2.0.so.0.2400.10|FE0171FDF49D945524BB3F5A55FE7D8C0|0x7fb009c2f000|0x7fb00a266fff|0 -Module|libglib-2.0.so.0.3200.1||libglib-2.0.so.0.3200.1|591CE068AF1ED2994F588DAAB7DBF8D50|0x7fb00a269000|0x7fb00a55cfff|0 -Module|libgobject-2.0.so.0.3200.1||libgobject-2.0.so.0.3200.1|DDB5411470C81C34A74AF761A403BABB0|0x7fb00a55e000|0x7fb00a7acfff|0 -Module|libdbus-1.so.3.5.8||libdbus-1.so.3.5.8|14DF88D8296067351AA73723270CEFF00|0x7fb00a7ad000|0x7fb00a9f0fff|0 -Module|libdbus-glib-1.so.2.2.2||libdbus-glib-1.so.2.2.2|43DADC5BB1EB2202A20A4EFA5428AAB10|0x7fb00a9f1000|0x7fb00ac17fff|0 -Module|libasound.so.2.0.0||libasound.so.2.0.0|896C3492FAD29202B4C06B6350B60B2B0|0x7fb00ac18000|0x7fb00af04fff|0 -Module|libXcomposite.so.1.0.0||libXcomposite.so.1.0.0|97F3C5EFD90926A6E10C735BECB8DF5F0|0x7fb00af05000|0x7fb00b107fff|0 -Module|libXfixes.so.3.1.0||libXfixes.so.3.1.0|7A77FFC53CFBA7CE9A005472E748108E0|0x7fb00b108000|0x7fb00b30dfff|0 -Module|libXdamage.so.1.1.0||libXdamage.so.1.1.0|3A428B268049BDD9441ADBDA982CC0960|0x7fb00b30e000|0x7fb00b510fff|0 -Module|libXext.so.6.4.0||libXext.so.6.4.0|C0A8D6FF2E55C2A80ADB6344E5A1D5C80|0x7fb00b511000|0x7fb00b721fff|0 -Module|libXrender.so.1.3.0||libXrender.so.1.3.0|223BF9CD7303011C68BBAA246F9207720|0x7fb00b722000|0x7fb00b92bfff|0 -Module|libfontconfig.so.1.4.4||libfontconfig.so.1.4.4|75729F923954F8363FBC14AD02152B4E0|0x7fb00b92c000|0x7fb00bb61fff|0 -Module|libfreetype.so.6.8.0||libfreetype.so.6.8.0|1414E18E6804ACCEEBB283FC33EE0F780|0x7fb00bb62000|0x7fb00bdfdfff|0 -Module|libxul.so||libxul.so|2E110ACEEBDD217E61ECFE13D97D63B20|0x7fb00bdfe000|0x7fb0113bbfff|0 -Module|libmozsqlite3.so||libmozsqlite3.so|1634A084C336B51601918912331BF2360|0x7fb0114ad000|0x7fb01178afff|0 -Module|libssl3.so||libssl3.so|DF3D6916CE7D7116A5B29211FC893B2C0|0x7fb01178b000|0x7fb0119e8fff|0 -Module|libsmime3.so||libsmime3.so|AD809EB2480CDA697A07EBDD21F0C67C0|0x7fb0119e9000|0x7fb011c18fff|0 -Module|libnss3.so||libnss3.so|C05FEE6A1D99B3157111A2A65F038F490|0x7fb011c19000|0x7fb011f7afff|0 -Module|libnssutil3.so||libnssutil3.so|5EC5EE9D732F04C3657305593046F3790|0x7fb011f7c000|0x7fb0121affff|0 -Module|libplds4.so||libplds4.so|AE047F3EB887A6F907FDD9A4F546D6310|0x7fb0121b1000|0x7fb0123b3fff|0 -Module|libplc4.so||libplc4.so|4BA74C15641F4585EFC08180AAEED5D50|0x7fb0123b4000|0x7fb0125b7fff|0 -Module|libnspr4.so||libnspr4.so|87988E2199DC9895B24BBA7B959FFB660|0x7fb0125b8000|0x7fb0127fcfff|0 -Module|de9486f0b47a4d768a594cb4198cb1c6-le64.cache-3||de9486f0b47a4d768a594cb4198cb1c6-le64.cache-3|000000000000000000000000000000000|0x7fb012a00000|0x7fb012a02fff|0 -Module|libc-2.15.so||libc-2.15.so|45AF61A258D312D4EBECFC54D3317BDF0|0x7fb012a03000|0x7fb012dbafff|0 -Module|libgcc_s.so.1||libgcc_s.so.1|ADD74D5C94FA5A3E18AD415D91D5E5090|0x7fb012dc0000|0x7fb012fd5fff|0 -Module|libm-2.15.so||libm-2.15.so|5C4748B68510CE72C8605CFF06F62AE50|0x7fb012fd6000|0x7fb0132cffff|0 -Module|libstdc++.so.6.0.18||libstdc++.so.6.0.18|C8C3FB885A6714123E0C6EE228D355F60|0x7fb0132d0000|0x7fb0135befff|0 -Module|librt-2.15.so||librt-2.15.so|375B2C35503AC4E6AB881A5DB6F5766F0|0x7fb0135d4000|0x7fb0137dbfff|0 -Module|libdl-2.15.so||libdl-2.15.so|55AF81D1BB1D3EC49D55913D532635FD0|0x7fb0137dc000|0x7fb0139dffff|0 -Module|libpthread-2.15.so||libpthread-2.15.so|9DAF40C397EE7CC1730F7D03693286C50|0x7fb0139e0000|0x7fb013bf8fff|0 -Module|ld-2.15.so||ld-2.15.so|3719FB5302A0741ADF25B3DBDA629B630|0x7fb013bfd000|0x7fb013c1efff|0 -Module|b9d506c9ac06c20b433354fa67a72993-le64.cache-3||b9d506c9ac06c20b433354fa67a72993-le64.cache-3|000000000000000000000000000000000|0x7fb013c1f000|0x7fb013c1ffff|0 -Module|d52a8644073d54c13679302ca1180695-le64.cache-3||d52a8644073d54c13679302ca1180695-le64.cache-3|000000000000000000000000000000000|0x7fb013c20000|0x7fb013c2ffff|0 -Module|e13b20fdb08344e0e664864cc2ede53d-le64.cache-3||e13b20fdb08344e0e664864cc2ede53d-le64.cache-3|000000000000000000000000000000000|0x7fb013c30000|0x7fb013c42fff|0 -Module|gschemas.compiled||gschemas.compiled|000000000000000000000000000000000|0x7fb013dc6000|0x7fb013debfff|0 -Module|b47c4e1ecd0709278f4910c18777a504-le64.cache-3||b47c4e1ecd0709278f4910c18777a504-le64.cache-3|000000000000000000000000000000000|0x7fb013df2000|0x7fb013df6fff|0 -Module|3f7329c5293ffd510edef78f73874cfd-le64.cache-3||3f7329c5293ffd510edef78f73874cfd-le64.cache-3|000000000000000000000000000000000|0x7fb013df7000|0x7fb013dfcfff|0 -Module|7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-3||7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-3|000000000000000000000000000000000|0x7fb013dfd000|0x7fb013e01fff|0 -Module|user||user|000000000000000000000000000000000|0x7fb013e12000|0x7fb013e14fff|0 -Module|gconv-modules.cache||gconv-modules.cache|000000000000000000000000000000000|0x7fb013e15000|0x7fb013e1bfff|0 -Module|user||user|000000000000000000000000000000000|0x7fb013e1c000|0x7fb013e1cfff|0 -Module|linux-gate.so||linux-gate.so|75C70C0C697CFC3335A55C90475D300A0|0x7fff353ff000|0x7fff353fffff|0 - -0|0|libc-2.15.so||||0xe6b03 -0|1|libxul.so|PollWrapper|hg:hg.mozilla.org/mozilla-central:widget/gtk/nsAppShell.cpp:944fb6e682b8|44|0xf -0|2|libpopt.so.0.0.0||||0x30ffe -0|3|libpopt.so.0.0.0||||0x31006 -0|4|libglib-2.0.so.0.3200.1||||0x47ff5 -0|5|libglib-2.0.so.0.3200.1||||0x48123 -0|6|libxul.so|nsAppShell::ProcessNextNativeEvent(bool)|hg:hg.mozilla.org/mozilla-central:widget/gtk/nsAppShell.cpp:944fb6e682b8|156|0x4 -0|7|libxul.so|nsBaseAppShell::DoProcessNextNativeEvent(bool, unsigned int)|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:944fb6e682b8|140|0xf -0|8|libpopt.so.0.0.0||||0x30fff -0|9|libxul.so|nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal*, bool, unsigned int)|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:944fb6e682b8|298|0xa -0|10|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|812|0x1f -0|11|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -0|12|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -0|13|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -0|14|libxul.so|mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|140|0xd -0|15|libxul.so|_fini|||0x1fb8de7 -0|16|libxul.so|_fini|||0x2384f07 -0|17|libxul.so||||0x9ea75d -0|18|libxul.so|nsLocalFile::AppendRelativePath(nsAString_internal const&)|hg:hg.mozilla.org/mozilla-central:xpcom/io/nsLocalFileUnix.cpp:944fb6e682b8|2121|0xb -0|19|||||0x7fff3534a7cf -0|20|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -0|21|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -0|22|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -0|23|libxul.so|nsBaseAppShell::Run()|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:944fb6e682b8|164|0xc -0|24|libxul.so|nsAppStartup::Run()|hg:hg.mozilla.org/mozilla-central:toolkit/components/startup/nsAppStartup.cpp:944fb6e682b8|281|0x5 -0|25|libc-2.15.so||||0x8a3ff -0|26|libxul.so|XREMain::XRE_mainRun()|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:944fb6e682b8|4173|0x14 -0|27|libxul.so|NS_LogAddRef|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsTraceRefcnt.cpp:944fb6e682b8|983|0x4 -0|28|libxul.so|NS_LogRelease|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsTraceRefcnt.cpp:944fb6e682b8|1038|0x4 -0|29|libxul.so|_fini|||0x518e49 -0|30|libxul.so|nsLocalFile::AppendRelativePath(nsAString_internal const&)|hg:hg.mozilla.org/mozilla-central:xpcom/io/nsLocalFileUnix.cpp:944fb6e682b8|2121|0xb -0|31|||||0x7fff3534a93f -0|32|libxul.so|nsComponentManagerImpl::Release()|hg:hg.mozilla.org/mozilla-central:xpcom/components/nsComponentManager.cpp:944fb6e682b8|934|0xa -0|33|libxul.so|nsLocalFile::AppendRelativePath(nsAString_internal const&)|hg:hg.mozilla.org/mozilla-central:xpcom/io/nsLocalFileUnix.cpp:944fb6e682b8|2121|0xb -0|34|||||0x7fff3534a9af -0|35|libxul.so|XREMain::XRE_main(int, char**, nsXREAppData const*)|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:944fb6e682b8|4249|0x4 -0|36|libxul.so|XRE_main|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsAppRunner.cpp:944fb6e682b8|4469|0x4 -0|37|libxul.so|_fini|||0x23090e7 -0|38|libxul.so|_fini|||0x230912f -0|39|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -0|40|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 -0|41|libpopt.so.0.0.0||||0x3103e -0|42|firefox-bin|do_main|hg:hg.mozilla.org/mozilla-central:browser/app/nsBrowserApp.cpp:944fb6e682b8|294|0x5 -0|43|firefox-bin|_fini|||0x375 -1|0|libc-2.15.so||||0xe6b03 -1|1|libglib-2.0.so.0.3200.1||||0x47ff5 -1|2|libglib-2.0.so.0.3200.1||||0x48459 -1|3|libdconfsettings.so||||0x498a -1|4|libglib-2.0.so.0.3200.1||||0x699a4 -1|5|libpthread-2.15.so||||0x7e99 -2|0|libc-2.15.so||||0xe6b03 -2|1|libglib-2.0.so.0.3200.1||||0x47ff5 -2|2|libglib-2.0.so.0.3200.1||||0x48459 -2|3|libgio-2.0.so.0.3200.1||||0xc92c5 -2|4|libglib-2.0.so.0.3200.1||||0x699a4 -2|5|libpthread-2.15.so||||0x7e99 -3|0|libc-2.15.so||||0xee6d9 -3|1|libxul.so|epoll_wait|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/third_party/libevent/epoll_sub.c:944fb6e682b8|63|0x9 -3|2|libxul.so|epoll_dispatch|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/third_party/libevent/epoll.c:944fb6e682b8|407|0x14 -3|3|libxul.so|event_base_loop|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/third_party/libevent/event.c:944fb6e682b8|1607|0x8 -3|4|libxul.so|_fini|||0x1f031c7 -3|5|libxul.so|MessageLoop::DoWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|442|0x7 -3|6|libxul.so|base::MessagePumpLibevent::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_pump_libevent.cc:944fb6e682b8|357|0xd -3|7|libstdc++.so.6.0.18||||0x10487 -3|8|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -3|9|libxul.so|LockImpl::Unlock()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/lock_impl_posix.cc:944fb6e682b8|46|0x4 -3|10|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -3|11|libxul.so|base::Thread::ThreadMain()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/thread.cc:944fb6e682b8|170|0x7 -3|12|libxul.so|_fini|||0x1fded17 -4|0|libpthread-2.15.so||||0xbd84 -4|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -4|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -4|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -4|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -4|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -4|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -4|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -4|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -4|9|libxul.so|_fini|||0x1fb8de7 -4|10|libxul.so|_fini|||0x2384f07 -4|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -4|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -4|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -4|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -4|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -4|16|libpthread-2.15.so||||0x7e99 -5|0|libc-2.15.so||||0xe6b03 -5|1|libnspr4.so|_pr_poll_with_poll|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptio.c:944fb6e682b8|3922|0x11 -5|2|libpopt.so.0.0.0||||0x31000 -5|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -5|4|libxul.so|PLDHashEntryHdr* PLDHashTable::SearchTable<(PLDHashTable::SearchReason)0>(void const*, unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/pldhash.cpp:944fb6e682b8|388|0xc -5|5|libxul.so|mozilla::net::nsHttpConnectionMgr::GetSpdyPreferredConn(mozilla::net::nsHttpConnectionMgr::nsConnectionEntry*)|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/http/nsHttpConnectionMgr.cpp:944fb6e682b8|2329|0x7 -5|6|libxul.so|mozilla::net::nsHttpConnectionMgr::ProcessSpdyPendingQ(mozilla::net::nsHttpConnectionMgr::nsConnectionEntry*)|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/http/nsHttpConnectionMgr.cpp:944fb6e682b8|2261|0x4 -5|7|libxul.so|mozilla::DeadlockDetector::CheckAcquisition(mozilla::BlockingResourceBase const*, mozilla::BlockingResourceBase const*)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/DeadlockDetector.h:944fb6e682b8|114|0x7 -5|8|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -5|9|libxul.so|mozilla::net::nsHttpConnectionMgr::ProcessPendingQForEntry(mozilla::net::nsHttpConnectionMgr::nsConnectionEntry*, bool)|hg:hg.mozilla.org/mozilla-central:netwerk/protocol/http/nsHttpConnectionMgr.cpp:944fb6e682b8|1184|0x4 -5|10|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -5|11|libplds4.so|PL_CompareStrings|hg:hg.mozilla.org/mozilla-central:nsprpub/lib/ds/plhash.c:944fb6e682b8|476|0x4 -5|12|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 -5|13|firefox-bin|arena_dalloc|hg:hg.mozilla.org/mozilla-central:memory/mozjemalloc/jemalloc.c:944fb6e682b8|1685|0xb -5|14|libxul.so|_fini|||0x39793e -5|15|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -5|16|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 -5|17|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -5|18|linux-gate.so||||0x958 -5|19|libxul.so|nsSocketTransportService::Poll(bool, unsigned int*, mozilla::BaseTimeDuration*)|hg:hg.mozilla.org/mozilla-central:netwerk/base/nsSocketTransportService2.cpp:944fb6e682b8|427|0xd -5|20|libxul.so|nsSocketTransportService::DoPollIteration(bool, mozilla::BaseTimeDuration*)|hg:hg.mozilla.org/mozilla-central:netwerk/base/nsSocketTransportService2.cpp:944fb6e682b8|1000|0x13 -5|21|libxul.so|nsSocketTransportService::Run()|hg:hg.mozilla.org/mozilla-central:netwerk/base/nsSocketTransportService2.cpp:944fb6e682b8|793|0x16 -5|22|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 -5|23|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -5|24|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -5|25|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa -5|26|libxul.so|_fini|||0x1fb8de7 -5|27|libxul.so|_fini|||0x2384f07 -5|28|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -5|29|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -5|30|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -5|31|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -5|32|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -5|33|libpthread-2.15.so||||0x7e99 -6|0|libpthread-2.15.so||||0xbd84 -6|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -6|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -6|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -6|4|libpthread-2.15.so||||0x7e99 -7|0|libpthread-2.15.so||||0xbd84 -7|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -7|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -7|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -7|4|libpthread-2.15.so||||0x7e99 -8|0|libpthread-2.15.so||||0xbd84 -8|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -8|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -8|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -8|4|libpthread-2.15.so||||0x7e99 -9|0|libpthread-2.15.so||||0xbd84 -9|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -9|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -9|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -9|4|libpthread-2.15.so||||0x7e99 -10|0|libpthread-2.15.so||||0xbd84 -10|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -10|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -10|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -10|4|libpthread-2.15.so||||0x7e99 -11|0|libpthread-2.15.so||||0xbd84 -11|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -11|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -11|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -11|4|libpthread-2.15.so||||0x7e99 -12|0|libpthread-2.15.so||||0xbd84 -12|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -12|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -12|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -12|4|libpthread-2.15.so||||0x7e99 -13|0|libpthread-2.15.so||||0xbd84 -13|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -13|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -13|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -13|4|libpthread-2.15.so||||0x7e99 -14|0|libpthread-2.15.so||||0xbd84 -14|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -14|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -14|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -14|4|libpthread-2.15.so||||0x7e99 -15|0|libpthread-2.15.so||||0xbd84 -15|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -15|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -15|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -15|4|libpthread-2.15.so||||0x7e99 -16|0|libpthread-2.15.so||||0xbd84 -16|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -16|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -16|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -16|4|libpthread-2.15.so||||0x7e99 -17|0|libpthread-2.15.so||||0xbd84 -17|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -17|2|libxul.so|js::HelperThread::threadLoop()|hg:hg.mozilla.org/mozilla-central:js/src/vm/HelperThreads.cpp:944fb6e682b8|550|0x9 -17|3|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -17|4|libpthread-2.15.so||||0x7e99 -18|0|libpthread-2.15.so||||0xbd84 -18|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -18|2|libxul.so|Watchdog::Sleep(unsigned int)|hg:hg.mozilla.org/mozilla-central:js/xpconnect/src/XPCJSRuntime.cpp:944fb6e682b8|1096|0x7 -18|3|libxul.so|WatchdogMain|hg:hg.mozilla.org/mozilla-central:js/xpconnect/src/XPCJSRuntime.cpp:944fb6e682b8|1091|0x4 -18|4|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -18|5|libpthread-2.15.so||||0x7e99 -19|0|libpthread-2.15.so||||0xbd84 -19|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -19|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb -19|3|libxul.so|mozilla::HangMonitor::ThreadMain(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/Monitor.h:944fb6e682b8|88|0xa -19|4|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -19|5|libpthread-2.15.so||||0x7e99 -20|0|libpthread-2.15.so||||0xc0fe -20|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 -20|2|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|387|0xa -20|3|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb -20|4|libxul.so|TimerThread::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|363|0xa -20|5|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 -20|6|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -20|7|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -20|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa -20|9|libxul.so|_fini|||0x1fb8de7 -20|10|libxul.so|_fini|||0x2384f07 -20|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -20|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -20|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -20|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -20|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -20|16|libpthread-2.15.so||||0x7e99 -21|0|libpthread-2.15.so||||0xbd84 -21|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -21|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb -21|3|libpopt.so.0.0.0||||0x30ffe -21|4|libxul.so|mozilla::net::CacheIOThread::ThreadFunc()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/Monitor.h:944fb6e682b8|40|0xf -21|5|libxul.so|_fini|||0x115528 -21|6|libxul.so|mozilla::net::CacheIOThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:netwerk/cache2/CacheIOThread.cpp:944fb6e682b8|167|0x7 -21|7|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -21|8|libpthread-2.15.so||||0x7e99 -22|0|libpthread-2.15.so||||0xbd84 -22|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -22|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -22|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -22|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -22|5|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -22|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -22|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -22|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -22|9|libxul.so|_fini|||0x1fb8de7 -22|10|libxul.so|_fini|||0x2384f07 -22|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -22|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -22|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -22|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -22|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -22|16|libpthread-2.15.so||||0x7e99 -23|0|libpthread-2.15.so||||0xbd84 -23|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -23|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb -23|3|libpopt.so.0.0.0||||0x30ffe -23|4|libxul.so|nsCertVerificationThread::Run()|hg:hg.mozilla.org/mozilla-central:security/manager/ssl/src/nsCertVerificationThread.cpp:944fb6e682b8|115|0xa -23|5|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -23|6|libpthread-2.15.so||||0x7e99 -24|0|libpthread-2.15.so||||0xbd84 -24|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -24|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -24|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -24|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -24|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -24|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -24|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -24|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -24|9|libxul.so|_fini|||0x1fb8de7 -24|10|libxul.so|_fini|||0x2384f07 -24|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -24|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -24|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -24|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -24|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -24|16|libpthread-2.15.so||||0x7e99 -25|0|libpthread-2.15.so||||0xbd84 -25|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -25|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -25|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -25|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -25|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -25|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -25|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -25|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -25|9|libxul.so|_fini|||0x1fb8de7 -25|10|libxul.so|_fini|||0x2384f07 -25|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -25|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -25|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -25|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -25|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -25|16|libpthread-2.15.so||||0x7e99 -26|0|libpthread-2.15.so||||0xbd84 -26|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -26|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -26|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -26|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -26|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -26|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -26|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -26|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -26|9|libxul.so|_fini|||0x1fb8de7 -26|10|libxul.so|_fini|||0x2384f07 -26|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -26|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -26|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -26|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -26|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -26|16|libpthread-2.15.so||||0x7e99 -27|0|libpthread-2.15.so||||0xbd84 -27|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -27|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb -27|3|libxul.so|mozilla::dom::workers::WorkerPrivate::WaitForWorkerEvents(unsigned int)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5649|0x4 -27|4|libxul.so|mozilla::dom::workers::WorkerPrivate::DoRunLoop(JSContext*)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5110|0xa -27|5|libpopt.so.0.0.0||||0x31000 -27|6|libxul.so|js::CurrentThreadCanAccessRuntime(JSRuntime*)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Runtime.cpp:944fb6e682b8|804|0xb -27|7|libxul.so|WorkerThreadPrimaryRunnable::Run|hg:hg.mozilla.org/mozilla-central:dom/workers/RuntimeService.cpp:944fb6e682b8|2725|0x4 -27|8|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 -27|9|libxul.so|_fini|||0x225e047 -27|10|libxul.so|_fini|||0x1fb05f7 -27|11|libxul.so|_fini|||0x1fb0657 -27|12|libxul.so|_fini|||0x1fb0f17 -27|13|libxul.so|_fini|||0x1fb0f47 -28|0|libpthread-2.15.so||||0xbd84 -28|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -28|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -28|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -28|4|libxul.so|nsTimerImpl::Release()|hg:hg.mozilla.org/mozilla-central:memory/mozalloc/mozalloc.h:944fb6e682b8|205|0x7 -28|5|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -28|6|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -28|7|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -28|8|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -28|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -28|10|libxul.so|_fini|||0x1fb8de7 -28|11|libxul.so|_fini|||0x2384f07 -28|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -28|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -28|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -28|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -28|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -28|17|libpthread-2.15.so||||0x7e99 -29|0|libpthread-2.15.so||||0xbd84 -29|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -29|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb -29|3|libxul.so|mozilla::dom::workers::WorkerPrivate::WaitForWorkerEvents(unsigned int)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5649|0x4 -29|4|libxul.so|mozilla::dom::workers::WorkerPrivate::DoRunLoop(JSContext*)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5110|0xa -29|5|libpopt.so.0.0.0||||0x31000 -29|6|libxul.so|js::CurrentThreadCanAccessRuntime(JSRuntime*)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Runtime.cpp:944fb6e682b8|804|0xb -29|7|libxul.so|WorkerThreadPrimaryRunnable::Run|hg:hg.mozilla.org/mozilla-central:dom/workers/RuntimeService.cpp:944fb6e682b8|2725|0x4 -29|8|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -29|9|libnspr4.so|PR_GetThreadPrivate|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/threads/prtpd.c:944fb6e682b8|204|0x4 -29|10|libxul.so|_fini|||0x225e047 -29|11|libxul.so|_fini|||0x1fb05f7 -29|12|libxul.so|_fini|||0x1fb0657 -29|13|libxul.so|_fini|||0x1fb0f17 -29|14|libxul.so|_fini|||0x1fb0f47 -30|0|libpthread-2.15.so||||0xbd84 -30|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -30|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -30|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -30|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -30|5|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -30|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -30|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -30|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -30|9|libxul.so|_fini|||0x1fb8de7 -30|10|libxul.so|_fini|||0x2384f07 -30|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -30|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -30|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -30|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -30|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -30|16|libpthread-2.15.so||||0x7e99 -31|0|libpthread-2.15.so||||0xc0fe -31|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 -31|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe -31|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -31|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -31|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 -31|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 -31|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -31|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -31|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -31|10|libxul.so|_fini|||0x1fb8de7 -31|11|libxul.so|_fini|||0x2384f07 -31|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -31|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -31|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -31|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -31|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -31|17|libc-2.15.so||||0x3b2827 -31|18|libpthread-2.15.so||||0x7e99 -32|0|libpthread-2.15.so||||0xbd84 -32|1|libxul.so|ConditionVariable::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/condition_variable_posix.cc:944fb6e682b8|40|0x8 -32|2|libxul.so|base::WaitableEvent::Enqueue(base::WaitableEvent::Waiter*)|hg:hg.mozilla.org/mozilla-central:memory/mozalloc/mozalloc.h:944fb6e682b8|181|0x4 -32|3|libxul.so|base::WaitableEvent::TimedWait(base::TimeDelta const&)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|195|0x7 -32|4|libxul.so|_fini|||0x1fdf227 -32|5|libxul.so|base::WaitableEvent::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|201|0x10 -32|6|libxul.so|base::MessagePumpDefault::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_pump_default.cc:944fb6e682b8|60|0x8 -32|7|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -32|8|libxul.so|LockImpl::Unlock()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/lock_impl_posix.cc:944fb6e682b8|46|0x4 -32|9|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -32|10|libxul.so|base::Thread::ThreadMain()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/thread.cc:944fb6e682b8|170|0x7 -32|11|libxul.so|_fini|||0x1fded17 -33|0|libpthread-2.15.so||||0xbd84 -33|1|libxul.so|ConditionVariable::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/condition_variable_posix.cc:944fb6e682b8|40|0x8 -33|2|libxul.so|base::WaitableEvent::Enqueue(base::WaitableEvent::Waiter*)|hg:hg.mozilla.org/mozilla-central:memory/mozalloc/mozalloc.h:944fb6e682b8|181|0x4 -33|3|libxul.so|base::WaitableEvent::TimedWait(base::TimeDelta const&)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|195|0x7 -33|4|libxul.so|_fini|||0x1fdf227 -33|5|libxul.so|base::WaitableEvent::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|201|0x10 -33|6|libxul.so|base::MessagePumpDefault::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_pump_default.cc:944fb6e682b8|60|0x8 -33|7|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -33|8|libxul.so|LockImpl::Unlock()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/lock_impl_posix.cc:944fb6e682b8|46|0x4 -33|9|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -33|10|libxul.so|base::Thread::ThreadMain()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/thread.cc:944fb6e682b8|170|0x7 -33|11|libxul.so|_fini|||0x1fded17 -34|0|libpthread-2.15.so||||0xbd84 -34|1|libxul.so|ConditionVariable::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/condition_variable_posix.cc:944fb6e682b8|40|0x8 -34|2|libxul.so|base::WaitableEvent::Enqueue(base::WaitableEvent::Waiter*)|hg:hg.mozilla.org/mozilla-central:memory/mozalloc/mozalloc.h:944fb6e682b8|181|0x4 -34|3|libxul.so|base::WaitableEvent::TimedWait(base::TimeDelta const&)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|195|0x7 -34|4|libxul.so|_fini|||0x1fdf227 -34|5|libxul.so|_fini|||0x14c997 -34|6|libxul.so|base::WaitableEvent::Wait()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/waitable_event_posix.cc:944fb6e682b8|201|0x10 -34|7|libxul.so|base::MessagePumpDefault::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_pump_default.cc:944fb6e682b8|60|0x8 -34|8|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -34|9|libxul.so|LockImpl::Unlock()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/lock_impl_posix.cc:944fb6e682b8|46|0x4 -34|10|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -34|11|libxul.so|base::Thread::ThreadMain()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/thread.cc:944fb6e682b8|170|0x7 -34|12|libxul.so|_fini|||0x1fded17 -35|0|libpthread-2.15.so||||0xbd84 -35|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -35|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb -35|3|libxul.so|mozilla::dom::workers::WorkerPrivate::WaitForWorkerEvents(unsigned int)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5649|0x4 -35|4|libxul.so|mozilla::dom::workers::WorkerPrivate::DoRunLoop(JSContext*)|hg:hg.mozilla.org/mozilla-central:dom/workers/WorkerPrivate.cpp:944fb6e682b8|5110|0xa -35|5|libpopt.so.0.0.0||||0x31000 -35|6|libxul.so|js::CurrentThreadCanAccessRuntime(JSRuntime*)|hg:hg.mozilla.org/mozilla-central:js/src/vm/Runtime.cpp:944fb6e682b8|804|0xb -35|7|libxul.so|WorkerThreadPrimaryRunnable::Run|hg:hg.mozilla.org/mozilla-central:dom/workers/RuntimeService.cpp:944fb6e682b8|2725|0x4 -35|8|libxul.so|_fini|||0x225e047 -35|9|libxul.so|_fini|||0x1fb05f7 -35|10|libxul.so|_fini|||0x1fb0657 -35|11|libxul.so|_fini|||0x1fb0f17 -35|12|libxul.so|_fini|||0x1fb0f47 -36|0|libpthread-2.15.so||||0xc0fe -36|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 -36|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe -36|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -36|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -36|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 -36|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 -36|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -36|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -36|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa -36|10|libxul.so|_fini|||0x1fb8de7 -36|11|libxul.so|_fini|||0x2384f07 -36|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -36|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -36|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -36|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -36|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -36|17|libc-2.15.so||||0x3b2827 -36|18|libpthread-2.15.so||||0x7e99 -37|0|libpthread-2.15.so||||0xbd84 -37|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -37|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -37|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -37|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -37|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -37|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -37|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -37|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -37|9|libxul.so|_fini|||0x1fb8de7 -37|10|libxul.so|_fini|||0x2384f07 -37|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -37|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -37|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -37|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -37|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -37|16|libc-2.15.so||||0x3b2827 -37|17|libpthread-2.15.so||||0x7e99 -38|0|libpthread-2.15.so||||0xc0fe -38|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 -38|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe -38|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -38|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -38|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 -38|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 -38|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -38|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -38|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa -38|10|libxul.so|_fini|||0x1fb8de7 -38|11|libxul.so|_fini|||0x2384f07 -38|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -38|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -38|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -38|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -38|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -38|17|libc-2.15.so||||0x3b2827 -38|18|libpthread-2.15.so||||0x7e99 -39|0|libpthread-2.15.so||||0xc0fe -39|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 -39|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe -39|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -39|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -39|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 -39|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 -39|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -39|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -39|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|339|0xa -39|10|libxul.so|_fini|||0x1fb8de7 -39|11|libxul.so|_fini|||0x2384f07 -39|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -39|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -39|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -39|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -39|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -39|17|libc-2.15.so||||0x3b2827 -39|18|libpthread-2.15.so||||0x7e99 -40|0|libpthread-2.15.so||||0xbd84 -40|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -40|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -40|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -40|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -40|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -40|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -40|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -40|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -40|9|libxul.so|_fini|||0x1fb8de7 -40|10|libxul.so|_fini|||0x2384f07 -40|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -40|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -40|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -40|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -40|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -40|16|libpthread-2.15.so||||0x7e99 -41|0|libpthread-2.15.so||||0xc0fe -41|1|libnspr4.so|pt_TimedWait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|264|0x4 -41|2|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|693|0xe -41|3|libnspr4.so|PR_GetCurrentThread|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|651|0xa -41|4|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -41|5|libxul.so|nsThreadPool::Run()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0x11 -41|6|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|841|0x11 -41|7|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -41|8|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -41|9|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -41|10|libxul.so|_fini|||0x1fb8de7 -41|11|libxul.so|_fini|||0x2384f07 -41|12|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -41|13|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -41|14|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -41|15|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -41|16|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -41|17|libpthread-2.15.so||||0x7e99 -42|0|libpthread-2.15.so||||0xbd84 -42|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -42|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -42|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -42|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -42|5|libxul.so|MessageLoop::ReloadWorkQueue()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|405|0xd -42|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -42|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -42|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -42|9|libxul.so|_fini|||0x1fb8de7 -42|10|libxul.so|_fini|||0x2384f07 -42|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -42|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -42|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -42|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -42|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -42|16|libpthread-2.15.so||||0x7e99 -43|0|libpthread-2.15.so||||0xbd84 -43|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -43|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -43|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -43|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -43|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -43|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -43|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -43|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -43|9|libxul.so|_fini|||0x1fb8de7 -43|10|libxul.so|_fini|||0x2384f07 -43|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -43|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -43|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -43|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -43|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -43|16|libpthread-2.15.so||||0x7e99 -44|0|libpthread-2.15.so||||0xbd84 -44|1|libnspr4.so|PR_WaitCondVar|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|385|0x7 -44|2|libxul.so|mozilla::CondVar::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|501|0xb -44|3|libpopt.so.0.0.0||||0x30ffe -44|4|libxul.so|mozilla::dom::DOMStorageDBThread::ThreadFunc()|hg:hg.mozilla.org/mozilla-central:xpcom/glue/Monitor.h:944fb6e682b8|40|0xe -44|5|libnspr4.so|PR_SetCurrentThreadName|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|1766|0xd -44|6|libpthread-2.15.so||||0x10daf -44|7|libxul.so|mozilla::dom::DOMStorageDBThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:dom/storage/DOMStorageDBThread.cpp:944fb6e682b8|286|0x7 -44|8|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -44|9|libpthread-2.15.so||||0x7e99 -45|0|libpthread-2.15.so||||0xbd84 -45|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -45|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -45|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -45|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -45|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -45|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -45|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -45|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -45|9|libxul.so|_fini|||0x1fb8de7 -45|10|libxul.so|_fini|||0x2384f07 -45|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -45|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -45|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -45|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -45|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -45|16|libpthread-2.15.so||||0x7e99 -46|0|libpthread-2.15.so||||0xbd84 -46|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -46|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -46|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -46|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -46|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -46|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -46|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -46|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -46|9|libxul.so|_fini|||0x1fb8de7 -46|10|libxul.so|_fini|||0x2384f07 -46|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -46|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -46|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -46|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -46|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -46|16|libpthread-2.15.so||||0x7e99 -47|0|libpthread-2.15.so||||0xbd84 -47|1|libnspr4.so|PR_Wait|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptsynch.c:944fb6e682b8|691|0xb -47|2|libxul.so|mozilla::ReentrantMonitor::Wait(unsigned int)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/BlockingResourceBase.cpp:944fb6e682b8|470|0xb -47|3|libxul.so|nsEventQueue::GetEvent(bool, nsIRunnable**)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/ReentrantMonitor.h:944fb6e682b8|190|0xb -47|4|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.h:944fb6e682b8|125|0x14 -47|5|libxul.so|TimerThread::RemoveTimer(nsTimerImpl*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/TimerThread.cpp:944fb6e682b8|438|0x8 -47|6|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|hg:hg.mozilla.org/mozilla-central:xpcom/glue/nsThreadUtils.cpp:944fb6e682b8|265|0xc -47|7|libxul.so|MessageLoop::DoIdleWork()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|487|0x4 -47|8|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:944fb6e682b8|368|0xd -47|9|libxul.so|_fini|||0x1fb8de7 -47|10|libxul.so|_fini|||0x2384f07 -47|11|libxul.so|MessageLoop::RunInternal()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|233|0x16 -47|12|libxul.so|MessageLoop::MessageLoop(MessageLoop::Type)|hg:hg.mozilla.org/mozilla-central:xpcom/base/nsRefPtr.h:944fb6e682b8|134|0x7 -47|13|libxul.so|MessageLoop::Run()|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:944fb6e682b8|226|0x7 -47|14|libxul.so|nsThread::ThreadFunc(void*)|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:944fb6e682b8|348|0x7 -47|15|libnspr4.so|_pt_root|hg:hg.mozilla.org/mozilla-central:nsprpub/pr/src/pthreads/ptthread.c:944fb6e682b8|212|0x6 -47|16|libpthread-2.15.so||||0x7e99 diff --git a/FTB/Signatures/tests/resources/tsan-lock-report.txt b/FTB/Signatures/tests/resources/tsan-lock-report.txt deleted file mode 100644 index 412e63393..000000000 --- a/FTB/Signatures/tests/resources/tsan-lock-report.txt +++ /dev/null @@ -1,18 +0,0 @@ -WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=16628) - Cycle in lock order graph: M1924 (0x7b2c00038ad0) => M1864 (0x7b2c00038130) => M1903 (0x7b2c000386b0) => M1924 - Mutex M1864 acquired here while holding mutex M1924 in main thread: - #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4139:3 (SanctionsTestServer+0x7abe6) - #1 PR_Lock nsprpub/pr/src/pthreads/ptsynch.c:176:10 (libnspr4.so+0x2bf48) - #2 sftk_hasAttribute security/nss/lib/softoken/pkcs11u.c:327:5 (libsoftokn3.so+0x38453) - #3 sftk_CopyObject security/nss/lib/softoken/pkcs11u.c:1607:22 (libsoftokn3.so+0x3b124) - Mutex M1903 acquired here while holding mutex M1864 in main thread: - #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4139:3 (SanctionsTestServer+0x7abe6) - #1 PR_Lock nsprpub/pr/src/pthreads/ptsynch.c:176:10 (libnspr4.so+0x2bf48) - #2 sftk_hasAttribute security/nss/lib/softoken/pkcs11u.c:327:5 (libsoftokn3.so+0x38453) - #3 sftk_CopyObject security/nss/lib/softoken/pkcs11u.c:1607:22 (libsoftokn3.so+0x3b124) - Mutex M1924 acquired here while holding mutex M1930 in main thread: - #0 pthread_mutex_lock compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4139:3 (SanctionsTestServer+0x7abe6) - #1 PR_Lock nsprpub/pr/src/pthreads/ptsynch.c:176:10 (libnspr4.so+0x2bf48) - #2 sftk_hasAttribute security/nss/lib/softoken/pkcs11u.c:327:5 (libsoftokn3.so+0x38453) - #3 sftk_CopyObject security/nss/lib/softoken/pkcs11u.c:1607:22 (libsoftokn3.so+0x3b124) -SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) nsprpub/pr/src/pthreads/ptsynch.c:176:10 in PR_Lock diff --git a/FTB/Signatures/tests/resources/tsan-report-atomic-swapped.txt b/FTB/Signatures/tests/resources/tsan-report-atomic-swapped.txt deleted file mode 100644 index 431700367..000000000 --- a/FTB/Signatures/tests/resources/tsan-report-atomic-swapped.txt +++ /dev/null @@ -1,170 +0,0 @@ -WARNING: ThreadSanitizer: data race (pid=1185) - Atomic read of size 1 at 0x7b340005d160 by thread T28 (mutexes: write M169301924272001376): - #0 pthread_mutex_unlock /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4153:3 (firefox+0x755a6) - #1 mozilla::detail::MutexImpl::unlock() /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:185:3 (firefox+0x1231e8) - #2 Unlock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:76:25 (libxul.so+0x3a872a1) - #3 Unlock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:34:26 (libxul.so+0x3a872a1) - #4 ~MonitorAutoLock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:70:34 (libxul.so+0x3a872a1) - #5 operator() /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:762:7 (libxul.so+0x3a872a1) - #6 mozilla::detail::RunnableFunction::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:559:5 (libxul.so+0x3a872a1) - #7 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #8 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #9 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:332:5 (libxul.so+0x12af068) - #10 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #11 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #12 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #13 nsThread::ThreadFunc(void*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:464:10 (libxul.so+0xa6adb5) - #14 _pt_root /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x46a4f) - Previous write of size 1 at 0x7b340005d160 by main thread: - #0 pthread_mutex_destroy /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1242:3 (firefox+0x58976) - #1 mozilla::detail::MutexImpl::~MutexImpl() /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:119:3 (firefox+0x122fc8) - #2 ~OffTheBooksMutex /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:60:3 (libxul.so+0x3a822d5) - #3 ~Mutex /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:133:37 (libxul.so+0x3a822d5) - #4 ~Monitor /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:30:22 (libxul.so+0x3a822d5) - #5 mozilla::MediaCache::~MediaCache() /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:317:3 (libxul.so+0x3a822d5) - #6 Release /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:150:3 (libxul.so+0x3a81b25) - #7 detail::ProxyReleaseEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsProxyRelease.h:36:5 (libxul.so+0x3a81b25) - #8 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) - #9 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #10 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #11 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) - #12 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) - #13 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) - #14 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) - #15 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) - #16 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) - #17 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #18 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #19 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) - #20 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) - #21 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) - #22 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) - #23 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) - #24 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) - #25 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #26 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #27 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) - #28 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) - #29 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) - #30 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) - #31 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) - #32 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) - #33 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #34 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #35 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) - #36 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) - #37 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) - #38 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) - #39 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) - #40 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) - #41 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #42 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #43 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) - #44 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) - #45 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #46 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #47 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #48 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) - #49 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) - #50 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) - #51 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #52 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #53 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #54 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) - #55 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) - #56 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) - #57 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) - Location is heap block of size 200 at 0x7b340005d150 allocated by main thread: - #0 malloc /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:650:5 (firefox+0x558c4) - #1 moz_xmalloc /builds/worker/workspace/build/src/memory/mozalloc/mozalloc.cpp:52:15 (firefox+0xc9e48) - #2 operator new /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/cxxalloc.h:33:10 (libxul.so+0x3a61ca0) - #3 mozilla::MediaCache::GetMediaCache(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:801:31 (libxul.so+0x3a61ca0) - #4 mozilla::MediaCacheStream::Init(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:2661:17 (libxul.so+0x3a6b530) - #5 mozilla::ChannelMediaResource::Open(nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:520:30 (libxul.so+0x3a3f7bc) - #6 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaDecoder.cpp:264:19 (libxul.so+0x3a3bc09) - #7 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5046:27 (libxul.so+0x3949095) - #8 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5129:10 (libxul.so+0x392864a) - #9 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1244:7 (libxul.so+0x3927906) - #10 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:707:20 (libxul.so+0xfdf0de) - #11 mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:557:3 (libxul.so+0xfe58c0) - #12 operator() /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:411:15 (libxul.so+0x102a422) - #13 std::_Function_handler const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&)::$_5>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2 (libxul.so+0x102a422) - #14 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xf59143) - #15 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:80:25 (libxul.so+0xf59143) - #16 mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:261:10 (libxul.so+0xf41d95) - #17 mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:401:12 (libxul.so+0xfe4c65) - #18 mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PHttpChannelChild.cpp:862:28 (libxul.so+0x14b5303) - #19 mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:8355:32 (libxul.so+0x13af7d0) - #20 mozilla::dom::ContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/dom/ipc/ContentChild.cpp:3877:25 (libxul.so+0x427d540) - #21 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2215:25 (libxul.so+0x12aaaf6) - #22 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2137:9 (libxul.so+0x12a916a) - #23 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1976:3 (libxul.so+0x12a9d51) - #24 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2007:13 (libxul.so+0x12aa289) - #25 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) - #26 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #27 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #28 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) - #29 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) - #30 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #31 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #32 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #33 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) - #34 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) - #35 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) - #36 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #37 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #38 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #39 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) - #40 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) - #41 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) - #42 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) - Mutex M169301924272001376 is already destroyed. - Thread T28 'MediaCache' (tid=1299, running) created by main thread at: - #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:967:3 (firefox+0x571ab) - #1 _PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x3dc53) - #2 PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x32152) - #3 nsThread::Init(nsTSubstring const&) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:670:8 (libxul.so+0xa6c24a) - #4 nsThreadManager::NewNamedThread(nsTSubstring const&, unsigned int, nsIThread**) /builds/worker/workspace/build/src/xpcom/threads/nsThreadManager.cpp:621:12 (libxul.so+0xa72975) - #5 NS_NewNamedThread(nsTSubstring const&, nsIThread**, nsIRunnable*, unsigned int) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:139:57 (libxul.so+0xa74a68) - #6 NS_NewNamedThread<11> /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:65:10 (libxul.so+0x3a61a76) - #7 mozilla::MediaCache::GetMediaCache(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:772:19 (libxul.so+0x3a61a76) - #8 mozilla::MediaCacheStream::Init(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:2661:17 (libxul.so+0x3a6b530) - #9 mozilla::ChannelMediaResource::Open(nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:520:30 (libxul.so+0x3a3f7bc) - #10 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaDecoder.cpp:264:19 (libxul.so+0x3a3bc09) - #11 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5046:27 (libxul.so+0x3949095) - #12 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5129:10 (libxul.so+0x392864a) - #13 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1244:7 (libxul.so+0x3927906) - #14 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:707:20 (libxul.so+0xfdf0de) - #15 mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:557:3 (libxul.so+0xfe58c0) - #16 operator() /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:411:15 (libxul.so+0x102a422) - #17 std::_Function_handler const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&)::$_5>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2 (libxul.so+0x102a422) - #18 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xf59143) - #19 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:80:25 (libxul.so+0xf59143) - #20 mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:261:10 (libxul.so+0xf41d95) - #21 mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:401:12 (libxul.so+0xfe4c65) - #22 mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PHttpChannelChild.cpp:862:28 (libxul.so+0x14b5303) - #23 mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:8355:32 (libxul.so+0x13af7d0) - #24 mozilla::dom::ContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/dom/ipc/ContentChild.cpp:3877:25 (libxul.so+0x427d540) - #25 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2215:25 (libxul.so+0x12aaaf6) - #26 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2137:9 (libxul.so+0x12a916a) - #27 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1976:3 (libxul.so+0x12a9d51) - #28 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2007:13 (libxul.so+0x12aa289) - #29 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) - #30 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #31 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #32 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) - #33 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) - #34 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #35 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #36 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #37 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) - #38 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) - #39 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) - #40 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #41 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #42 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #43 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) - #44 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) - #45 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) - #46 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) -SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:119:3 in mozilla::detail::MutexImpl::~MutexImpl() diff --git a/FTB/Signatures/tests/resources/tsan-report-atomic.txt b/FTB/Signatures/tests/resources/tsan-report-atomic.txt deleted file mode 100644 index 007a76a15..000000000 --- a/FTB/Signatures/tests/resources/tsan-report-atomic.txt +++ /dev/null @@ -1,170 +0,0 @@ -WARNING: ThreadSanitizer: data race (pid=1185) - Write of size 1 at 0x7b340005d160 by main thread: - #0 pthread_mutex_destroy /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1242:3 (firefox+0x58976) - #1 mozilla::detail::MutexImpl::~MutexImpl() /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:119:3 (firefox+0x122fc8) - #2 ~OffTheBooksMutex /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:60:3 (libxul.so+0x3a822d5) - #3 ~Mutex /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:133:37 (libxul.so+0x3a822d5) - #4 ~Monitor /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:30:22 (libxul.so+0x3a822d5) - #5 mozilla::MediaCache::~MediaCache() /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:317:3 (libxul.so+0x3a822d5) - #6 Release /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:150:3 (libxul.so+0x3a81b25) - #7 detail::ProxyReleaseEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsProxyRelease.h:36:5 (libxul.so+0x3a81b25) - #8 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) - #9 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #10 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #11 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) - #12 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) - #13 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) - #14 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) - #15 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) - #16 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) - #17 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #18 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #19 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) - #20 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) - #21 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) - #22 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) - #23 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) - #24 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) - #25 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #26 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #27 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) - #28 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) - #29 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) - #30 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) - #31 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) - #32 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) - #33 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #34 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #35 SpinEventLoopUntil /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:342:25 (libxul.so+0xa6d629) - #36 nsThread::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:909:3 (libxul.so+0xa6d629) - #37 nsThreadPool::Shutdown() /builds/worker/workspace/build/src/xpcom/threads/nsThreadPool.cpp:396:17 (libxul.so+0xa761d4) - #38 applyImpl /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1160:12 (libxul.so+0xa5d406) - #39 apply /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1166:12 (libxul.so+0xa5d406) - #40 mozilla::detail::RunnableMethodImpl, nsresult (nsIThreadPool::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:1212:13 (libxul.so+0xa5d406) - #41 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #42 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #43 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) - #44 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) - #45 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #46 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #47 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #48 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) - #49 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) - #50 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) - #51 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #52 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #53 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #54 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) - #55 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) - #56 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) - #57 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) - Previous atomic read of size 1 at 0x7b340005d160 by thread T28 (mutexes: write M169301924272001376): - #0 pthread_mutex_unlock /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4153:3 (firefox+0x755a6) - #1 mozilla::detail::MutexImpl::unlock() /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:185:3 (firefox+0x1231e8) - #2 Unlock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Mutex.h:76:25 (libxul.so+0x3a872a1) - #3 Unlock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:34:26 (libxul.so+0x3a872a1) - #4 ~MonitorAutoLock /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/Monitor.h:70:34 (libxul.so+0x3a872a1) - #5 operator() /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:762:7 (libxul.so+0x3a872a1) - #6 mozilla::detail::RunnableFunction::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:559:5 (libxul.so+0x3a872a1) - #7 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #8 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #9 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:332:5 (libxul.so+0x12af068) - #10 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #11 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #12 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #13 nsThread::ThreadFunc(void*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:464:10 (libxul.so+0xa6adb5) - #14 _pt_root /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x46a4f) - Location is heap block of size 200 at 0x7b340005d150 allocated by main thread: - #0 malloc /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:650:5 (firefox+0x558c4) - #1 moz_xmalloc /builds/worker/workspace/build/src/memory/mozalloc/mozalloc.cpp:52:15 (firefox+0xc9e48) - #2 operator new /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/cxxalloc.h:33:10 (libxul.so+0x3a61ca0) - #3 mozilla::MediaCache::GetMediaCache(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:801:31 (libxul.so+0x3a61ca0) - #4 mozilla::MediaCacheStream::Init(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:2661:17 (libxul.so+0x3a6b530) - #5 mozilla::ChannelMediaResource::Open(nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:520:30 (libxul.so+0x3a3f7bc) - #6 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaDecoder.cpp:264:19 (libxul.so+0x3a3bc09) - #7 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5046:27 (libxul.so+0x3949095) - #8 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5129:10 (libxul.so+0x392864a) - #9 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1244:7 (libxul.so+0x3927906) - #10 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:707:20 (libxul.so+0xfdf0de) - #11 mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:557:3 (libxul.so+0xfe58c0) - #12 operator() /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:411:15 (libxul.so+0x102a422) - #13 std::_Function_handler const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&)::$_5>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2 (libxul.so+0x102a422) - #14 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xf59143) - #15 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:80:25 (libxul.so+0xf59143) - #16 mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:261:10 (libxul.so+0xf41d95) - #17 mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:401:12 (libxul.so+0xfe4c65) - #18 mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PHttpChannelChild.cpp:862:28 (libxul.so+0x14b5303) - #19 mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:8355:32 (libxul.so+0x13af7d0) - #20 mozilla::dom::ContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/dom/ipc/ContentChild.cpp:3877:25 (libxul.so+0x427d540) - #21 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2215:25 (libxul.so+0x12aaaf6) - #22 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2137:9 (libxul.so+0x12a916a) - #23 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1976:3 (libxul.so+0x12a9d51) - #24 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2007:13 (libxul.so+0x12aa289) - #25 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) - #26 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #27 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #28 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) - #29 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) - #30 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #31 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #32 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #33 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) - #34 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) - #35 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) - #36 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #37 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #38 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #39 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) - #40 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) - #41 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) - #42 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) - Mutex M169301924272001376 is already destroyed. - Thread T28 'MediaCache' (tid=1299, running) created by main thread at: - #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:967:3 (firefox+0x571ab) - #1 _PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x3dc53) - #2 PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x32152) - #3 nsThread::Init(nsTSubstring const&) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:670:8 (libxul.so+0xa6c24a) - #4 nsThreadManager::NewNamedThread(nsTSubstring const&, unsigned int, nsIThread**) /builds/worker/workspace/build/src/xpcom/threads/nsThreadManager.cpp:621:12 (libxul.so+0xa72975) - #5 NS_NewNamedThread(nsTSubstring const&, nsIThread**, nsIRunnable*, unsigned int) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:139:57 (libxul.so+0xa74a68) - #6 NS_NewNamedThread<11> /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:65:10 (libxul.so+0x3a61a76) - #7 mozilla::MediaCache::GetMediaCache(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:772:19 (libxul.so+0x3a61a76) - #8 mozilla::MediaCacheStream::Init(long) /builds/worker/workspace/build/src/dom/media/MediaCache.cpp:2661:17 (libxul.so+0x3a6b530) - #9 mozilla::ChannelMediaResource::Open(nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaResource.cpp:520:30 (libxul.so+0x3a3f7bc) - #10 mozilla::ChannelMediaDecoder::Load(nsIChannel*, bool, nsIStreamListener**) /builds/worker/workspace/build/src/dom/media/ChannelMediaDecoder.cpp:264:19 (libxul.so+0x3a3bc09) - #11 nsresult mozilla::dom::HTMLMediaElement::SetupDecoder(mozilla::ChannelMediaDecoder*, nsIChannel*&, bool&, nsIStreamListener**&) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5046:27 (libxul.so+0x3949095) - #12 mozilla::dom::HTMLMediaElement::InitializeDecoderForChannel(nsIChannel*, nsIStreamListener**) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:5129:10 (libxul.so+0x392864a) - #13 mozilla::dom::HTMLMediaElement::MediaLoadListener::OnStartRequest(nsIRequest*) /builds/worker/workspace/build/src/dom/html/HTMLMediaElement.cpp:1244:7 (libxul.so+0x3927906) - #14 mozilla::net::HttpChannelChild::DoOnStartRequest(nsIRequest*, nsISupports*) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:707:20 (libxul.so+0xfdf0de) - #15 mozilla::net::HttpChannelChild::OnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:557:3 (libxul.so+0xfe58c0) - #16 operator() /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:411:15 (libxul.so+0x102a422) - #17 std::_Function_handler const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&)::$_5>::_M_invoke(std::_Any_data const&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:316:2 (libxul.so+0x102a422) - #18 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xf59143) - #19 mozilla::net::ChannelFunctionEvent::Run() /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:80:25 (libxul.so+0xf59143) - #20 mozilla::net::ChannelEventQueue::RunOrEnqueue(mozilla::net::ChannelEvent*, bool) /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/net/ChannelEventQueue.h:261:10 (libxul.so+0xf41d95) - #21 mozilla::net::HttpChannelChild::RecvOnStartRequest(nsresult const&, mozilla::net::nsHttpResponseHead const&, bool const&, mozilla::net::nsHttpHeaderArray const&, mozilla::net::ParentLoadInfoForwarderArgs const&, bool const&, bool const&, bool const&, unsigned long const&, int const&, unsigned int const&, nsTString const&, nsTString const&, mozilla::net::NetAddr const&, mozilla::net::NetAddr const&, short const&, unsigned int const&, nsTString const&, long const&, bool const&, bool const&, bool const&, mozilla::net::ResourceTimingStructArgs const&, bool const&, mozilla::Maybe const&, bool const&, nsILoadInfo::CrossOriginOpenerPolicy const&) /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelChild.cpp:401:12 (libxul.so+0xfe4c65) - #22 mozilla::net::PHttpChannelChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PHttpChannelChild.cpp:862:28 (libxul.so+0x14b5303) - #23 mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/PContentChild.cpp:8355:32 (libxul.so+0x13af7d0) - #24 mozilla::dom::ContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/build/src/dom/ipc/ContentChild.cpp:3877:25 (libxul.so+0x427d540) - #25 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2215:25 (libxul.so+0x12aaaf6) - #26 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2137:9 (libxul.so+0x12a916a) - #27 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:1976:3 (libxul.so+0x12a9d51) - #28 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/workspace/build/src/ipc/glue/MessageChannel.cpp:2007:13 (libxul.so+0x12aa289) - #29 mozilla::SchedulerGroup::Runnable::Run() /builds/worker/workspace/build/src/xpcom/threads/SchedulerGroup.cpp:282:20 (libxul.so+0xa5603a) - #30 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6e673) - #31 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xa73272) - #32 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12ae4f9) - #33 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:270:30 (libxul.so+0x12aef0b) - #34 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #35 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #36 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #37 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46ff3e3) - #38 XRE_RunAppShell() /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:943:20 (libxul.so+0x6329ad9) - #39 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:237:9 (libxul.so+0x12aeeba) - #40 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x12422cc) - #41 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x12422cc) - #42 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x12422cc) - #43 XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/nsEmbedFunctions.cpp:778:34 (libxul.so+0x6329850) - #44 mozilla::BootstrapImpl::XRE_InitChildProcess(int, char**, XREChildData const*) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:67:12 (libxul.so+0x6331542) - #45 content_process_main /builds/worker/workspace/build/src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28 (firefox+0xc87c7) - #46 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:303:18 (firefox+0xc87c7) -SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:119:3 in mozilla::detail::MutexImpl::~MutexImpl() diff --git a/FTB/Signatures/tests/resources/tsan-report.txt b/FTB/Signatures/tests/resources/tsan-report.txt deleted file mode 100644 index bd553497f..000000000 --- a/FTB/Signatures/tests/resources/tsan-report.txt +++ /dev/null @@ -1,160 +0,0 @@ -================== -WARNING: ThreadSanitizer: data race (pid=7233) - Write of size 8 at 0x7ba400001260 by main thread: - #0 js::ProtectedData, unsigned long>::operator++() /srv/repos/mozilla-central/js/src/threading/ProtectedData.h:95:31 (js+0x116d9d3) - #1 js::gc::GCRuntime::incMajorGcNumber() /srv/repos/mozilla-central/js/src/gc/GCRuntime.h:411 (js+0x116d9d3) - #2 js::gc::GCRuntime::gcCycle(bool, js::SliceBudget&, JS::gcreason::Reason) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7443 (js+0x116d9d3) - #3 js::gc::GCRuntime::collect(bool, js::SliceBudget, JS::gcreason::Reason) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7626:25 (js+0x116f262) - #4 js::gc::GCRuntime::runDebugGC() /srv/repos/mozilla-central/js/src/gc/GC.cpp (js+0x1144fc0) - #5 js::gc::GCRuntime::gcIfNeededAtAllocation(JSContext*) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:312:9 (js+0x1144b7d) - #6 bool js::gc::GCRuntime::checkAllocatorState<(js::AllowGC)1>(JSContext*, js::gc::AllocKind) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:273:14 (js+0x1198856) - #7 JSString* js::AllocateString(JSContext*, js::gc::InitialHeap) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:179 (js+0x1198856) - #8 JSThinInlineString* js::Allocate(JSContext*, js::gc::InitialHeap) /srv/repos/mozilla-central/js/src/gc/Allocator.h:47:34 (js+0xea965d) - #9 JSThinInlineString* JSThinInlineString::new_<(js::AllowGC)1>(JSContext*) /srv/repos/mozilla-central/js/src/vm/StringType-inl.h:279 (js+0xea965d) - #10 JSInlineString* js::AllocateInlineString<(js::AllowGC)1, unsigned char>(JSContext*, unsigned long, unsigned char**) /srv/repos/mozilla-central/js/src/vm/StringType-inl.h:34 (js+0xea965d) - #11 JSInlineString* js::NewInlineString<(js::AllowGC)1, unsigned char>(JSContext*, mozilla::Range) /srv/repos/mozilla-central/js/src/vm/StringType-inl.h:60 (js+0xea965d) - #12 JSFlatString* js::NewStringCopyNDontDeflate<(js::AllowGC)1, unsigned char>(JSContext*, unsigned char const*, unsigned long) /srv/repos/mozilla-central/js/src/vm/StringType.cpp:1605 (js+0xea965d) - #13 JSFlatString* js::NewStringCopyN<(js::AllowGC)1, unsigned char>(JSContext*, unsigned char const*, unsigned long) /srv/repos/mozilla-central/js/src/vm/StringType.cpp:1655:12 (js+0xeaa919) - #14 JSFlatString* js::NewStringCopyN<(js::AllowGC)1>(JSContext*, char const*, unsigned long) /srv/repos/mozilla-central/js/src/vm/StringType.h:1473:12 (js+0xc17f7d) - #15 JSFlatString* js::NewStringCopyZ<(js::AllowGC)1>(JSContext*, char const*) /srv/repos/mozilla-central/js/src/vm/StringType.h:1493 (js+0xc17f7d) - #16 JS_NewStringCopyZ(JSContext*, char const*) /srv/repos/mozilla-central/js/src/jsapi.cpp:5826 (js+0xc17f7d) - #17 js::ErrorToException(JSContext*, JSErrorReport*, JSErrorFormatString const* (*)(void*, unsigned int), void*) /srv/repos/mozilla-central/js/src/jsexn.cpp:678 (js+0xc17f7d) - #18 ReportError(JSContext*, JSErrorReport*, JSErrorFormatString const* (*)(void*, unsigned int), void*) /srv/repos/mozilla-central/js/src/vm/JSContext.cpp:249:5 (js+0xd816ec) - #19 js::ReportErrorNumberVA(JSContext*, unsigned int, JSErrorFormatString const* (*)(void*, unsigned int), void*, unsigned int, js::ErrorArgumentsType, __va_list_tag*) /srv/repos/mozilla-central/js/src/vm/JSContext.cpp:836 (js+0xd816ec) - #20 JS_ReportErrorFlagsAndNumberLatin1(JSContext*, unsigned int, JSErrorFormatString const* (*)(void*, unsigned int), void*, unsigned int, ...) /srv/repos/mozilla-central/js/src/jsapi.cpp:6620:10 (js+0xc0d975) - #21 js::ReportValueErrorFlags(JSContext*, unsigned int, unsigned int, int, JS::Handle, JS::Handle, char const*, char const*) /srv/repos/mozilla-central/js/src/vm/JSContext.cpp:961:10 (js+0xd81e35) - #22 js::ReportIsNotFunction(JSContext*, JS::Handle, int, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:321:5 (js+0x66e8ef) - #23 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:445 (js+0x66e8ef) - #24 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) - #25 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x665658) - #26 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3093 (js+0x665658) - #27 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) - #28 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) - #29 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) - #30 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) - #31 ExecuteScript(JSContext*, JS::AutoVector&, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4771:12 (js+0xc04b13) - #32 JS_ExecuteScript(JSContext*, JS::AutoVector&, JS::Handle, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4792:12 (js+0xc048d0) - #33 Evaluate(JSContext*, unsigned int, JS::Value*) /srv/repos/mozilla-central/js/src/shell/js.cpp:2016:14 (js+0x4f3c71) - #34 js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/JSContext-inl.h:280:15 (js+0x66ec4a) - #35 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:471 (js+0x66ec4a) - #36 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) - #37 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x665658) - #38 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3093 (js+0x665658) - #39 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) - #40 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:493:15 (js+0x66ef86) - #41 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) - #42 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x66f2e0) - #43 js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jit/BaselineIC.cpp:2372:14 (js+0x7524ae) - #44 (0x7fb689344e31) - #45 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:2044:28 (js+0x659034) - #46 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) - #47 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) - #48 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) - #49 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) - #50 JS_ExecuteScript(JSContext*, JS::Handle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4785:12 (js+0xc0486c) - #51 RunFile(JSContext*, char const*, _IO_FILE*, bool) /srv/repos/mozilla-central/js/src/shell/js.cpp:837:14 (js+0x507bfe) - #52 Process(JSContext*, char const*, bool, FileKind) /srv/repos/mozilla-central/js/src/shell/js.cpp:1307 (js+0x507bfe) - #53 ProcessArgs(JSContext*, js::cli::OptionParser*) /srv/repos/mozilla-central/js/src/shell/js.cpp:8475:14 (js+0x4eafda) - #54 Shell(JSContext*, js::cli::OptionParser*, char**) /srv/repos/mozilla-central/js/src/shell/js.cpp:8866 (js+0x4eafda) - #55 main /srv/repos/mozilla-central/js/src/shell/js.cpp:9339 (js+0x4eafda) - - Previous read of size 8 at 0x7ba400001260 by thread T10 (mutexes: write M35): - #0 js::gc::GCRuntime::majorGCCount() const /srv/repos/mozilla-central/js/src/gc/GCRuntime.h:410:44 (js+0xd5f5e5) - #1 js::SourceCompressionTask::shouldStart() const /srv/repos/mozilla-central/js/src/vm/HelperThreads.h:825 (js+0xd5f5e5) - #2 js::GlobalHelperThreadState::scheduleCompressionTasks(js::AutoLockHelperThreadState const&) /srv/repos/mozilla-central/js/src/vm/HelperThreads.cpp:1472 (js+0xd5f5e5) - #3 js::GlobalHelperThreadState::startHandlingCompressionTasks(js::AutoLockHelperThreadState const&) /srv/repos/mozilla-central/js/src/vm/HelperThreads.cpp:1460 (js+0xd5f5e5) - #4 js::gc::GCRuntime::beginMarkPhase(JS::gcreason::Reason, js::gc::AutoTraceSession&) /srv/repos/mozilla-central/js/src/gc/GC.cpp:4431:29 (js+0x115ed43) - #5 js::gc::GCRuntime::incrementalCollectSlice(js::SliceBudget&, JS::gcreason::Reason, js::gc::AutoTraceSession&) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7096:14 (js+0x116c05d) - #6 js::gc::GCRuntime::gcCycle(bool, js::SliceBudget&, JS::gcreason::Reason) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7483:5 (js+0x116da9f) - #7 js::gc::GCRuntime::collect(bool, js::SliceBudget, JS::gcreason::Reason) /srv/repos/mozilla-central/js/src/gc/GC.cpp:7626:25 (js+0x116f262) - #8 js::gc::GCRuntime::runDebugGC() /srv/repos/mozilla-central/js/src/gc/GC.cpp (js+0x1144fc0) - #9 js::gc::GCRuntime::gcIfNeededAtAllocation(JSContext*) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:312:9 (js+0x1144b7d) - #10 bool js::gc::GCRuntime::checkAllocatorState<(js::AllowGC)1>(JSContext*, js::gc::AllocKind) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:273:14 (js+0x119a489) - #11 js::AccessorShape* js::Allocate(JSContext*) /srv/repos/mozilla-central/js/src/gc/Allocator.cpp:222 (js+0x119a489) - #12 js::Shape::new_(JSContext*, JS::Handle, unsigned int) /srv/repos/mozilla-central/js/src/vm/Shape-inl.h:111:22 (js+0xe6eeb7) - #13 js::PropertyTree::inlinedGetChild(JSContext*, js::Shape*, JS::Handle) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:1736:20 (js+0xe44255) - #14 js::PropertyTree::getChild(JSContext*, js::Shape*, JS::Handle) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:1749 (js+0xe44255) - #15 js::Shape::replaceLastProperty(JSContext*, js::StackBaseShape&, js::TaggedProto, JS::Handle) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:284:39 (js+0xe43527) - #16 js::Shape::setObjectFlags(JSContext*, js::BaseShape::Flag, js::TaggedProto, js::Shape*) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:1387:12 (js+0xe50009) - #17 JSObject::setFlags(JSContext*, JS::Handle, js::BaseShape::Flag, JSObject::GenerateShape) /srv/repos/mozilla-central/js/src/vm/Shape.cpp:1346 (js+0xe50009) - #18 JSObject::setNewGroupUnknown(JSContext*, js::Class const*, JS::Handle) /srv/repos/mozilla-central/js/src/vm/ObjectGroup.cpp:346:12 (js+0xdf077b) - #19 CreateArrayPrototype(JSContext*, JSProtoKey) /srv/repos/mozilla-central/js/src/builtin/Array.cpp:3705:10 (js+0x5728df) - #20 js::GlobalObject::resolveConstructor(JSContext*, JS::Handle, JSProtoKey) /srv/repos/mozilla-central/js/src/vm/GlobalObject.cpp:202:17 (js+0xd52fef) - #21 js::GlobalObject::ensureConstructor(JSContext*, JS::Handle, JSProtoKey) /srv/repos/mozilla-central/js/src/vm/GlobalObject.h:155:16 (js+0xdf69ee) - #22 js::GlobalObject::getOrCreatePrototype(JSContext*, JSProtoKey) /srv/repos/mozilla-central/js/src/vm/GlobalObject.h:169 (js+0xdf69ee) - #23 js::ObjectGroup::allocationSiteGroup(JSContext*, JSScript*, unsigned char*, JSProtoKey, JS::Handle) /srv/repos/mozilla-central/js/src/vm/ObjectGroup.cpp:1440 (js+0xdf69ee) - #24 js::NewArrayOperation(JSContext*, JS::Handle, unsigned char*, unsigned int, js::NewObjectKind) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:5061:17 (js+0x67a7b8) - #25 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3753:21 (js+0x66a31c) - #26 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) - #27 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) - #28 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) - #29 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) - #30 ExecuteScript(JSContext*, JS::AutoVector&, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4771:12 (js+0xc04b13) - #31 JS_ExecuteScript(JSContext*, JS::AutoVector&, JS::Handle, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4792:12 (js+0xc048d0) - #32 Evaluate(JSContext*, unsigned int, JS::Value*) /srv/repos/mozilla-central/js/src/shell/js.cpp:2016:14 (js+0x4f3c71) - #33 js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/JSContext-inl.h:280:15 (js+0x66ec4a) - #34 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:471 (js+0x66ec4a) - #35 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) - #36 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x665658) - #37 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3093 (js+0x665658) - #38 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) - #39 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) - #40 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) - #41 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) - #42 JS_ExecuteScript(JSContext*, JS::Handle, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4778:12 (js+0xc0461e) - #43 WorkerMain(void*) /srv/repos/mozilla-central/js/src/shell/js.cpp:3623:9 (js+0x502477) - #44 void js::detail::ThreadTrampoline::callMain<0ul>(std::integer_sequence) /srv/repos/mozilla-central/js/src/threading/Thread.h:242:5 (js+0x50cffd) - #45 js::detail::ThreadTrampoline::Start(void*) /srv/repos/mozilla-central/js/src/threading/Thread.h:235 (js+0x50cffd) - - Location is heap block of size 19224 at 0x7ba400000000 allocated by main thread: - #0 malloc (js+0x465e0c) - #1 SystemMalloc::malloc(unsigned long) /srv/repos/mozilla-central/memory/build/malloc_decls.h:37:1 (js+0x512769) - #2 DummyArenaAllocator::moz_arena_malloc(unsigned long, unsigned long) /srv/repos/mozilla-central/memory/build/malloc_decls.h:37 (js+0x512769) - #3 moz_arena_malloc /srv/repos/mozilla-central/memory/build/malloc_decls.h:115 (js+0x512769) - #4 js_malloc(unsigned long) /srv/repos/mozilla-central/js/src/opt64tsan/dist/include/js/Utility.h:388:12 (js+0xd803a4) - #5 JSRuntime* js_new(JSRuntime*&&&) /srv/repos/mozilla-central/js/src/opt64tsan/dist/include/js/Utility.h:504 (js+0xd803a4) - #6 js::NewContext(unsigned int, unsigned int, JSRuntime*) /srv/repos/mozilla-central/js/src/vm/JSContext.cpp:139 (js+0xd803a4) - #7 JS_NewContext(unsigned int, unsigned int, JSRuntime*) /srv/repos/mozilla-central/js/src/jsapi.cpp:472:12 (js+0xbe8476) - #8 main /srv/repos/mozilla-central/js/src/shell/js.cpp:9259:21 (js+0x4e7bf2) - - Mutex M35 (0x7b54000001b8) created at: - #0 pthread_mutex_init (js+0x448d2a) - #1 mozilla::detail::MutexImpl::MutexImpl() /srv/repos/mozilla-central/mozglue/misc/Mutex_posix.cpp:95:3 (js+0x5133b9) - #2 js::Mutex::Mutex(js::MutexId const&) /srv/repos/mozilla-central/js/src/threading/Mutex.h:37:12 (js+0xd57f66) - #3 js::GlobalHelperThreadState::GlobalHelperThreadState() /srv/repos/mozilla-central/js/src/vm/HelperThreads.cpp:999 (js+0xd57f66) - #4 js::GlobalHelperThreadState* js_new() /srv/repos/mozilla-central/js/src/opt64tsan/dist/include/js/Utility.h:504 (js+0xd57f66) - #5 js::CreateHelperThreadsState() /srv/repos/mozilla-central/js/src/vm/HelperThreads.cpp:52 (js+0xd57f66) - #6 JS::detail::InitWithFailureDiagnostic(bool) /srv/repos/mozilla-central/js/src/vm/Initialization.cpp:132:5 (js+0xd644f3) - #7 JS_Init() /srv/repos/mozilla-central/js/src/opt64tsan/dist/include/js/Initialization.h:95:13 (js+0x4e1503) - #8 main /srv/repos/mozilla-central/js/src/shell/js.cpp:8995 (js+0x4e1503) - - Thread T10 (tid=9289, running) created by main thread at: - #0 pthread_create (js+0x448946) - #1 js::Thread::create(void* (*)(void*), void*) /srv/repos/mozilla-central/js/src/threading/posix/Thread.cpp:115:7 (js+0xc687d5) - #2 bool js::Thread::init(void (&&&)(void*), WorkerInput*&&&) /srv/repos/mozilla-central/js/src/threading/Thread.h:124:12 (js+0x50cf75) - #3 EvalInWorker(JSContext*, unsigned int, JS::Value*) /srv/repos/mozilla-central/js/src/shell/js.cpp:3697:33 (js+0x4f6e0b) - #4 js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/JSContext-inl.h:280:15 (js+0x66ec4a) - #5 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:471 (js+0x66ec4a) - #6 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) - #7 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x665658) - #8 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:3093 (js+0x665658) - #9 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) - #10 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:493:15 (js+0x66ef86) - #11 InternalCall(JSContext*, js::AnyInvokeArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:520:12 (js+0x66f3c9) - #12 js::CallFromStack(JSContext*, JS::CallArgs const&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:526:12 (js+0x66f2e0) - #13 js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle) /srv/repos/mozilla-central/js/src/jit/BaselineIC.cpp:2372:14 (js+0x7524ae) - #14 (0x7fb689344e31) - #15 Interpret(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:2044:28 (js+0x659034) - #16 js::RunScript(JSContext*, js::RunState&) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:421:12 (js+0x6576f5) - #17 js::ExecuteKernel(JSContext*, JS::Handle, JSObject&, JS::Value const&, js::AbstractFramePtr, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:704:15 (js+0x6703a7) - #18 js::Execute(JSContext*, JS::Handle, JSObject&, JS::Value*) /srv/repos/mozilla-central/js/src/vm/Interpreter.cpp:736:12 (js+0x6705b4) - #19 ExecuteScript(JSContext*, JS::Handle, JS::Handle, JS::Value*) /srv/repos/mozilla-central/js/src/jsapi.cpp:4752:12 (js+0xc046a9) - #20 JS_ExecuteScript(JSContext*, JS::Handle) /srv/repos/mozilla-central/js/src/jsapi.cpp:4785:12 (js+0xc0486c) - #21 RunFile(JSContext*, char const*, _IO_FILE*, bool) /srv/repos/mozilla-central/js/src/shell/js.cpp:837:14 (js+0x507bfe) - #22 Process(JSContext*, char const*, bool, FileKind) /srv/repos/mozilla-central/js/src/shell/js.cpp:1307 (js+0x507bfe) - #23 ProcessArgs(JSContext*, js::cli::OptionParser*) /srv/repos/mozilla-central/js/src/shell/js.cpp:8475:14 (js+0x4eafda) - #24 Shell(JSContext*, js::cli::OptionParser*, char**) /srv/repos/mozilla-central/js/src/shell/js.cpp:8866 (js+0x4eafda) - #25 main /srv/repos/mozilla-central/js/src/shell/js.cpp:9339 (js+0x4eafda) - -SUMMARY: ThreadSanitizer: data race /srv/repos/mozilla-central/js/src/threading/ProtectedData.h:95:31 in js::ProtectedData, unsigned long>::operator++() -================== diff --git a/FTB/Signatures/tests/resources/tsan-report2.txt b/FTB/Signatures/tests/resources/tsan-report2.txt deleted file mode 100644 index 3f809693c..000000000 --- a/FTB/Signatures/tests/resources/tsan-report2.txt +++ /dev/null @@ -1,70 +0,0 @@ -WARNING: ThreadSanitizer: data race (pid=1126) - Write of size 8 at 0x7b7c001d0d08 by thread T43: - #0 free /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:706:3 (firefox+0x55f18) - #1 _dl_deallocate_tls (ld-linux-x86-64.so.2+0x139a7) - Previous write of size 8 at 0x7b7c001d0d08 by thread T5 (mutexes: write M176): - #0 set /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/ThreadLocal.h:161:12 (libxul.so+0x5ebeca6) - #1 set /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/ThreadLocal.h:209:32 (libxul.so+0x5ebeca6) - #2 ResetAutoProfilerLabelProfilingStack /builds/worker/workspace/build/src/tools/profiler/core/platform.cpp:1308:48 (libxul.so+0x5ebeca6) - #3 profiler_unregister_thread() /builds/worker/workspace/build/src/tools/profiler/core/platform.cpp:4555:5 (libxul.so+0x5ebeca6) - #4 nsThread::ThreadFunc(void*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:493:3 (libxul.so+0xa67142) - #5 _pt_root /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:209:5 (libnspr4.so+0x46756) - Mutex M176 (0x7f0d76677d90) created at: - #0 pthread_mutex_init /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1225:3 (firefox+0x587ed) - #1 mozilla::detail::MutexImpl::MutexImpl(mozilla::recordreplay::Behavior) /builds/worker/workspace/build/src/mozglue/misc/Mutex_posix.cpp:103:3 (firefox+0x122e72) - #2 PSMutex /builds/worker/workspace/build/src/tools/profiler/core/platform.cpp:258:9 (libxul.so+0x90553e) - #3 __cxx_global_var_init /builds/worker/workspace/build/src/tools/profiler/core/platform.cpp:1243:16 (libxul.so+0x90553e) - #4 _GLOBAL__sub_I_Unified_cpp_tools_profiler0.cpp /builds/worker/workspace/build/src/obj-firefox/tools/profiler/Unified_cpp_tools_profiler0.cpp (libxul.so+0x90553e) - #5 (ld-linux-x86-64.so.2+0x106c9) - #6 GetLibHandle /builds/worker/workspace/build/src/xpcom/glue/standalone/nsXPCOMGlue.cpp:85:29 (firefox+0xc989f) - #7 ReadDependentCB /builds/worker/workspace/build/src/xpcom/glue/standalone/nsXPCOMGlue.cpp:135:29 (firefox+0xc989f) - #8 XPCOMGlueLoad /builds/worker/workspace/build/src/xpcom/glue/standalone/nsXPCOMGlue.cpp:309:10 (firefox+0xc989f) - #9 mozilla::GetBootstrap(char const*, mozilla::LibLoadingStrategy) /builds/worker/workspace/build/src/xpcom/glue/standalone/nsXPCOMGlue.cpp:377:7 (firefox+0xc989f) - #10 InitXPCOMGlue(mozilla::LibLoadingStrategy) /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:231:16 (firefox+0xc8bc1) - #11 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:324:17 (firefox+0xc8506) - Thread T5 'SaveScripts' (tid=1310, finished) created by main thread at: - #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:967:3 (firefox+0x571ab) - #1 _PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:466:14 (libnspr4.so+0x3dc53) - #2 PR_CreateThread /builds/worker/workspace/build/src/nsprpub/pr/src/pthreads/ptthread.c:541:12 (libnspr4.so+0x32152) - #3 nsThread::Init(nsTSubstring const&) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:670:8 (libxul.so+0xa6847a) - #4 nsThreadManager::NewNamedThread(nsTSubstring const&, unsigned int, nsIThread**) /builds/worker/workspace/build/src/xpcom/threads/nsThreadManager.cpp:621:12 (libxul.so+0xa6eba5) - #5 NS_NewNamedThread(nsTSubstring const&, nsIThread**, nsIRunnable*, unsigned int) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:139:57 (libxul.so+0xa70c98) - #6 NS_NewNamedThread<12> /builds/worker/workspace/build/src/obj-firefox/dist/include/nsThreadUtils.h:69:10 (libxul.so+0x181772d) - #7 mozilla::ScriptPreloader::StartCacheWrite() /builds/worker/workspace/build/src/js/xpconnect/loader/ScriptPreloader.cpp:261:13 (libxul.so+0x181772d) - #8 mozilla::ScriptPreloader::Observe(nsISupports*, char const*, char16_t const*) /builds/worker/workspace/build/src/js/xpconnect/loader/ScriptPreloader.cpp:317:7 (libxul.so+0x1817e5d) - #9 nsObserverList::NotifyObservers(nsISupports*, char const*, char16_t const*) /builds/worker/workspace/build/src/xpcom/ds/nsObserverList.cpp:65:19 (libxul.so+0x9d59f3) - #10 nsObserverService::NotifyObservers(nsISupports*, char const*, char16_t const*) /builds/worker/workspace/build/src/xpcom/ds/nsObserverService.cpp:291:19 (libxul.so+0x9d88a0) - #11 NS_InvokeByIndex /builds/worker/workspace/build/src/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:106 (libxul.so+0xa8b195) - #12 XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) /builds/worker/workspace/build/src/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:947:10 (libxul.so+0x187e1d1) - #13 CallJSNative /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:469:13 (libxul.so+0x64020b8) - #14 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:561:12 (libxul.so+0x64020b8) - #15 InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:624:10 (libxul.so+0x64030cb) - #16 CallFromStack /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:628:10 (libxul.so+0x63f4a48) - #17 Interpret(JSContext*, js::RunState&) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:3036:16 (libxul.so+0x63f4a48) - #18 js::RunScript(JSContext*, js::RunState&) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:441:10 (libxul.so+0x63e4381) - #19 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:596:13 (libxul.so+0x640251e) - #20 InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:624:10 (libxul.so+0x64030cb) - #21 js::Call(JSContext*, JS::Handle, JS::Handle, js::AnyInvokeArgs const&, JS::MutableHandle, js::CallReason) /builds/worker/workspace/build/src/js/src/vm/Interpreter.cpp:641:8 (libxul.so+0x640317a) - #22 JS::Call(JSContext*, JS::Handle, JS::Handle, JS::HandleValueArray const&, JS::MutableHandle) /builds/worker/workspace/build/src/js/src/jsapi.cpp:2797:10 (libxul.so+0x64b6ece) - #23 mozilla::dom::IdleRequestCallback::Call(JSContext*, JS::Handle, mozilla::dom::IdleDeadline&, mozilla::ErrorResult&) /builds/worker/workspace/build/src/obj-firefox/dom/bindings/WindowBinding.cpp:803:8 (libxul.so+0x2e5dbd2) - #24 Call /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/WindowBinding.h:766:12 (libxul.so+0x24d3480) - #25 Call /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/WindowBinding.h:779:12 (libxul.so+0x24d3480) - #26 mozilla::dom::IdleRequest::IdleRun(nsPIDOMWindowInner*, double, bool) /builds/worker/workspace/build/src/dom/base/IdleRequest.cpp:62:13 (libxul.so+0x24d3480) - #27 nsGlobalWindowInner::RunIdleRequest(mozilla::dom::IdleRequest*, double, bool) /builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:664:12 (libxul.so+0x2360bd3) - #28 nsGlobalWindowInner::ExecuteIdleRequest(mozilla::TimeStamp) /builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:692:3 (libxul.so+0x235ff91) - #29 IdleRequestExecutor::Run() /builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:533:13 (libxul.so+0x235fc96) - #30 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/workspace/build/src/xpcom/threads/nsThread.cpp:1220:14 (libxul.so+0xa6a8a3) - #31 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/workspace/build/src/xpcom/threads/nsThreadUtils.cpp:486:10 (libxul.so+0xa6f4a2) - #32 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/workspace/build/src/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x12a3e99) - #33 RunInternal /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x123c0ec) - #34 RunHandler /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x123c0ec) - #35 MessageLoop::Run() /builds/worker/workspace/build/src/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x123c0ec) - #36 nsBaseAppShell::Run() /builds/worker/workspace/build/src/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x46b7883) - #37 nsAppStartup::Run() /builds/worker/workspace/build/src/toolkit/components/startup/nsAppStartup.cpp:272:30 (libxul.so+0x61bd075) - #38 XREMain::XRE_mainRun() /builds/worker/workspace/build/src/toolkit/xre/nsAppRunner.cpp:4560:22 (libxul.so+0x62d02ae) - #39 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/workspace/build/src/toolkit/xre/nsAppRunner.cpp:4695:8 (libxul.so+0x62d0f2f) - #40 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/workspace/build/src/toolkit/xre/nsAppRunner.cpp:4746:21 (libxul.so+0x62d12f4) - #41 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/workspace/build/src/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x62da002) - #42 do_main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xc8a47) - #43 main /builds/worker/workspace/build/src/browser/app/nsBrowserApp.cpp:339:16 (firefox+0xc8a47) -SUMMARY: ThreadSanitizer: data race (/lib64/ld-linux-x86-64.so.2+0x139a7) in _dl_deallocate_tls diff --git a/FTB/Signatures/tests/resources/tsan-simple-leak-report.txt b/FTB/Signatures/tests/resources/tsan-simple-leak-report.txt deleted file mode 100644 index 76dd4357c..000000000 --- a/FTB/Signatures/tests/resources/tsan-simple-leak-report.txt +++ /dev/null @@ -1,4 +0,0 @@ -WARNING: ThreadSanitizer: thread leak (pid=9509) - Thread T1 (tid=0, finished) created at: - #0 pthread_create tsan_interceptors.cc:683 (exe+0x00000001fb33) - #1 main thread_leak3.c:10 (exe+0x000000003c7e) diff --git a/FTB/Signatures/tests/resources/tsan-simple-race-report-swapped.txt b/FTB/Signatures/tests/resources/tsan-simple-race-report-swapped.txt deleted file mode 100644 index c2e190130..000000000 --- a/FTB/Signatures/tests/resources/tsan-simple-race-report-swapped.txt +++ /dev/null @@ -1,14 +0,0 @@ -WARNING: ThreadSanitizer: data race (pid=9337) - Write of size 4 at 0x7fe3c3075190 by thread T1: - #0 foo2() simple_stack2.cc:20 (exe+0x000000003d0c) - #1 bar2() simple_stack2.cc:29 (exe+0x000000003d74) - #2 main simple_stack2.cc:41 (exe+0x000000003ddb) - - Previous read of size 4 at 0x7fe3c3075190 by main thread: - #0 foo1() simple_stack2.cc:9 (exe+0x000000003c9a) - #1 bar1() simple_stack2.cc:16 (exe+0x000000003ce4) - #2 Thread1(void*) simple_stack2.cc:34 (exe+0x000000003d99) - - Thread T1 (tid=9338, running) created at: - #0 pthread_create tsan_interceptors.cc:683 (exe+0x00000000de83) - #1 main simple_stack2.cc:40 (exe+0x000000003dd6) diff --git a/FTB/Signatures/tests/resources/tsan-simple-race-report.txt b/FTB/Signatures/tests/resources/tsan-simple-race-report.txt deleted file mode 100644 index e1782d52c..000000000 --- a/FTB/Signatures/tests/resources/tsan-simple-race-report.txt +++ /dev/null @@ -1,14 +0,0 @@ -WARNING: ThreadSanitizer: data race (pid=9337) - Write of size 4 at 0x7fe3c3075190 by thread T1: - #0 foo1() simple_stack2.cc:9 (exe+0x000000003c9a) - #1 bar1() simple_stack2.cc:16 (exe+0x000000003ce4) - #2 Thread1(void*) simple_stack2.cc:34 (exe+0x000000003d99) - - Previous read of size 4 at 0x7fe3c3075190 by main thread: - #0 foo2() simple_stack2.cc:20 (exe+0x000000003d0c) - #1 bar2() simple_stack2.cc:29 (exe+0x000000003d74) - #2 main simple_stack2.cc:41 (exe+0x000000003ddb) - - Thread T1 (tid=9338, running) created at: - #0 pthread_create tsan_interceptors.cc:683 (exe+0x00000000de83) - #1 main simple_stack2.cc:40 (exe+0x000000003dd6) diff --git a/FTB/Signatures/tests/resources/valgrind-cjm-01.txt b/FTB/Signatures/tests/resources/valgrind-cjm-01.txt deleted file mode 100644 index 1051dac88..000000000 --- a/FTB/Signatures/tests/resources/valgrind-cjm-01.txt +++ /dev/null @@ -1,11 +0,0 @@ -==123== Thread 11 blah #1: -==123== Conditional jump or move depends on uninitialised value(s) -==123== at 0x5A7C18: PyObject_Free (blah.c:123) -==123== by 0x56D9E8: ??? (in /usr/bin/python3.6) -==123== by 0x574D35: PyDict_SetDefault (in /usr/bin/python3.6) -==123== by 0x4A6F0F: main (in /usr/bin/python3.6) -==123== Uninitialised value was created by a heap allocation -==123== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) -==123== by 0x637823: ??? (in /usr/bin/python3.6) -==123== by 0x4A6F0F: main (in /usr/bin/python3.6) -==123== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-cjm-02.txt b/FTB/Signatures/tests/resources/valgrind-cjm-02.txt deleted file mode 100755 index 56afb008c..000000000 --- a/FTB/Signatures/tests/resources/valgrind-cjm-02.txt +++ /dev/null @@ -1,89 +0,0 @@ -==23845== Memcheck, a memory error detector -==23845== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. -==23845== Using Valgrind-3.15.0.GIT-2cfe32ab11-20190318 and LibVEX; rerun with -h for copyright info -==23845== Command: ./a.out -==23845== Parent PID: 4587 -==23845== ---23845-- ---23845-- Valgrind options: ---23845-- -v ---23845-- --track-origins=yes ---23845-- --log-file=out.log.txt ---23845-- Contents of /proc/version: ---23845-- Linux version 4.15.0-46-generic (buildd@lgw01-amd64-038) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 ---23845-- ---23845-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand ---23845-- Page sizes: currently 4096, max supported 4096 ---23845-- Valgrind library directory: /usr/local/lib/valgrind ---23845-- Reading syms from /home/user/a.out ---23845-- object doesn't have a symbol table ---23845-- Reading syms from /lib/x86_64-linux-gnu/ld-2.27.so ---23845-- Considering /lib/x86_64-linux-gnu/ld-2.27.so .. ---23845-- .. CRC mismatch (computed 1b7c895e wanted 2943108a) ---23845-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.27.so .. ---23845-- .. CRC is valid ---23845-- Reading syms from /usr/local/lib/valgrind/memcheck-amd64-linux ---23845-- object doesn't have a dynamic symbol table ---23845-- Scheduler: using generic scheduler lock implementation. ---23845-- Reading suppressions file: /usr/local/lib/valgrind/default.supp -==23845== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-23845-by-user-on-??? -==23845== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-23845-by-user-on-??? -==23845== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-23845-by-user-on-??? -==23845== -==23845== TO CONTROL THIS PROCESS USING vgdb (which you probably -==23845== don't want to do, unless you know exactly what you're doing, -==23845== or are doing some strange experiment): -==23845== /usr/local/lib/valgrind/../../bin/vgdb --pid=23845 ...command... -==23845== -==23845== TO DEBUG THIS PROCESS USING GDB: start GDB like this -==23845== /path/to/gdb ./a.out -==23845== and then give GDB the following command -==23845== target remote | /usr/local/lib/valgrind/../../bin/vgdb --pid=23845 -==23845== --pid is optional if only one valgrind process is running -==23845== ---23845-- REDIR: 0x401f2f0 (ld-linux-x86-64.so.2:strlen) redirected to 0x580dcbc2 (vgPlain_amd64_linux_REDIR_FOR_strlen) ---23845-- REDIR: 0x401f0d0 (ld-linux-x86-64.so.2:index) redirected to 0x580dcbdc (vgPlain_amd64_linux_REDIR_FOR_index) ---23845-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-amd64-linux.so ---23845-- Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck-amd64-linux.so -==23845== WARNING: new redirection conflicts with existing -- ignoring it ---23845-- old: 0x0401f2f0 (strlen ) R-> (0000.0) 0x580dcbc2 vgPlain_amd64_linux_REDIR_FOR_strlen ---23845-- new: 0x0401f2f0 (strlen ) R-> (2007.0) 0x04c33280 strlen ---23845-- REDIR: 0x401d360 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c343b0 (strcmp) ---23845-- REDIR: 0x401f830 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c380e0 (mempcpy) ---23845-- Reading syms from /lib/x86_64-linux-gnu/libc-2.27.so ---23845-- Considering /lib/x86_64-linux-gnu/libc-2.27.so .. ---23845-- .. CRC mismatch (computed b1c74187 wanted 042cc048) ---23845-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so .. ---23845-- .. CRC is valid ---23845-- REDIR: 0x4edbc70 (libc.so.6:memmove) redirected to 0x4a2a6de (_vgnU_ifunc_wrapper) ---23845-- REDIR: 0x4fcb590 (libc.so.6:__strlen_avx2) redirected to 0x4c331c0 (strlen) -==23845== Conditional jump or move depends on uninitialised value(s) -==23845== at 0x4C331D8: strlen (vg_replace_strmem.c:461) -==23845== by 0x4EBD9D1: puts (ioputs.c:35) -==23845== by 0x1085D1: ??? (in /home/user/a.out) -==23845== by 0x4E5EB96: (below main) (libc-start.c:310) -==23845== Uninitialised value was created by a stack allocation -==23845== at 0x1085A0: ??? (in /home/user/a.out) -==23845== ---23845-- REDIR: 0x4ed4070 (libc.so.6:malloc) redirected to 0x4c2fd8d (malloc) ---23845-- REDIR: 0x4fcbab0 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x4c37d20 (mempcpy) ---23845-- REDIR: 0x4ed4950 (libc.so.6:free) redirected to 0x4c30f3a (free) -==23845== -==23845== HEAP SUMMARY: -==23845== in use at exit: 0 bytes in 0 blocks -==23845== total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated -==23845== -==23845== All heap blocks were freed -- no leaks are possible -==23845== -==23845== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) -==23845== -==23845== 1 errors in context 1 of 1: -==23845== Conditional jump or move depends on uninitialised value(s) -==23845== at 0x4C331D8: strlen (vg_replace_strmem.c:461) -==23845== by 0x4EBD9D1: puts (ioputs.c:35) -==23845== by 0x1085D1: ??? (in /home/user/a.out) -==23845== by 0x4E5EB96: (below main) (libc-start.c:310) -==23845== Uninitialised value was created by a stack allocation -==23845== at 0x1085A0: ??? (in /home/user/a.out) -==23845== -==23845== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/FTB/Signatures/tests/resources/valgrind-if-01.txt b/FTB/Signatures/tests/resources/valgrind-if-01.txt deleted file mode 100644 index f7f390bdd..000000000 --- a/FTB/Signatures/tests/resources/valgrind-if-01.txt +++ /dev/null @@ -1,7 +0,0 @@ -==333== Invalid free() / delete / delete[] / realloc() -==333== at 0x124455: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) -==333== by 0xAD3452: main (main.c:123) -==333== Address 0x43f2931 is 9 bytes inside a block of size 18 free'd -==333== at 0x4C2B326: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) -==333== by 0xAD3452: main (main.c:123) -==333== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-if-02.txt b/FTB/Signatures/tests/resources/valgrind-if-02.txt deleted file mode 100644 index f34546bdd..000000000 --- a/FTB/Signatures/tests/resources/valgrind-if-02.txt +++ /dev/null @@ -1,24 +0,0 @@ -==123== Memcheck, a memory error detector -==123== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. -==123== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info -==123== Command: ./a.out -==123== -==123== Invalid free() / delete / delete[] / realloc() -==123== at 0x4C2ECF0: free (vg_replace_malloc.c:530) -==123== by 0x400593: main (test.c:6) -==123== Address 0x5204040 is 0 bytes inside a block of size 100 free'd -==123== at 0x4C2ECF0: free (vg_replace_malloc.c:530) -==123== by 0x400587: main (test.c:5) -==123== Block was alloc'd at -==123== at 0x4C2DBF6: malloc (vg_replace_malloc.c:299) -==123== by 0x400577: main (test.c:4) -==123== -==123== -==123== HEAP SUMMARY: -==123== in use at exit: 0 bytes in 0 blocks -==123== total heap usage: 1 allocs, 2 frees, 100 bytes allocated -==123== -==123== All heap blocks were freed -- no leaks are possible -==123== -==123== For counts of detected and suppressed errors, rerun with: -v -==123== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/FTB/Signatures/tests/resources/valgrind-if-03.txt b/FTB/Signatures/tests/resources/valgrind-if-03.txt deleted file mode 100644 index 442f4c91f..000000000 --- a/FTB/Signatures/tests/resources/valgrind-if-03.txt +++ /dev/null @@ -1,26 +0,0 @@ -==321== by 0x4C2ECF0: test (test.c:530) -==321== by 0x4C2ECF0: test (test.c:530) -==321== by 0x4C2ECF0: test (test.c:530) -==321== by 0x4C2ECF0: test (test.c:530) -==321== by 0x4C2ECF0: test (test.c:530) -==321== by 0x4C2ECF0: test (test.c:530) - -== not valgrind log stuff -... -==321== This line looks interesting but should be ignored... -... -==321== Invalid free() / delete / delete[] / realloc() -...other junk... -==321== at 0x4C2ECF0: free (vg_replace_malloc.c:530) - -==321== by 0x400541: main (test.c:5) -.. -==321== Address 0xbadf00d is not stack'd, malloc'd or (recently) free'd -==321== -==321== ... -... - -==321== Invalid read of size 4 -==321== at 0x4C2ECF0: test (test.c:530) -==321== by 0x4C2ECF0: test (test.c:530) -==321== diff --git a/FTB/Signatures/tests/resources/valgrind-ir-01.txt b/FTB/Signatures/tests/resources/valgrind-ir-01.txt deleted file mode 100644 index 8703a7406..000000000 --- a/FTB/Signatures/tests/resources/valgrind-ir-01.txt +++ /dev/null @@ -1,6 +0,0 @@ -==111== Invalid read of size 4 -==111== at 0x33296345CA: blah_func (in /foo/bar/test.so) -==111== by 0x52ADD7B: main (test.cpp:123) -==111== Address 0xbadf00d is 24 bytes inside a block of size 28 free'd -==111== at 0x4A05743: operator delete(void*) (vg_replace_malloc.c:346) -==111== by 0x52D590B: asdf() (foo.cpp:325) \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-ir-02.txt b/FTB/Signatures/tests/resources/valgrind-ir-02.txt deleted file mode 100644 index c8458a590..000000000 --- a/FTB/Signatures/tests/resources/valgrind-ir-02.txt +++ /dev/null @@ -1,22 +0,0 @@ -==109727== Memcheck, a memory error detector -==109727== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. -==109727== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info -==109727== Command: ./a.out -==109727== -==109727== Invalid read of size 4 -==109727== at 0x400580: main (test.c:6) -==109727== Address 0x5204068 is 24 bytes after a block of size 16 in arena "client" -==109727== -==109727== Invalid read of size 4 -==109727== at 0x40058A: main (test.c:7) -==109727== Address 0x520406c is 28 bytes after a block of size 16 in arena "client" -==109727== -==109727== -==109727== HEAP SUMMARY: -==109727== in use at exit: 0 bytes in 0 blocks -==109727== total heap usage: 1 allocs, 1 frees, 10 bytes allocated -==109727== -==109727== All heap blocks were freed -- no leaks are possible -==109727== -==109727== For counts of detected and suppressed errors, rerun with: -v -==109727== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-iw-01.txt b/FTB/Signatures/tests/resources/valgrind-iw-01.txt deleted file mode 100644 index e4e5a060b..000000000 --- a/FTB/Signatures/tests/resources/valgrind-iw-01.txt +++ /dev/null @@ -1,5 +0,0 @@ -==123== Invalid write of size 8 -==123== at 0x4027D44: memcpy (main.c:123) -==123== by 0x804AEE8: main (main.c:321) -==123== Address 0x41414141 is not stack'd, malloc'd or (recently) free'd -==123== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-leak-01.txt b/FTB/Signatures/tests/resources/valgrind-leak-01.txt deleted file mode 100644 index 98b69a7bb..000000000 --- a/FTB/Signatures/tests/resources/valgrind-leak-01.txt +++ /dev/null @@ -1,5 +0,0 @@ -==24674== 102,400 bytes in 1,024 blocks are definitely lost in loss record 1 of 1 -==24674== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) -==24674== by 0x1086F4: test (free.c:9) -==24674== by 0x108761: main (free.c:23) -==24674== diff --git a/FTB/Signatures/tests/resources/valgrind-leak-02.txt b/FTB/Signatures/tests/resources/valgrind-leak-02.txt deleted file mode 100644 index 323ee9d69..000000000 --- a/FTB/Signatures/tests/resources/valgrind-leak-02.txt +++ /dev/null @@ -1,4 +0,0 @@ -==444== 16 bytes in 1 blocks are possibly lost in loss record 30 of 844 -==444== at 0x4A05E1C: malloc (vg_replace_malloc.c:195) -==444== by 0x6525BE: test (in main) -==444== by 0x63C579: main (in main) diff --git a/FTB/Signatures/tests/resources/valgrind-nm-01.txt b/FTB/Signatures/tests/resources/valgrind-nm-01.txt deleted file mode 100755 index 1b66c3137..000000000 --- a/FTB/Signatures/tests/resources/valgrind-nm-01.txt +++ /dev/null @@ -1,4 +0,0 @@ -==333== Argument 'size' of function malloc has a fishy (possibly negative) value: -1 -==333== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) -==333== by 0x10869D: main (free.c:6) -==333== diff --git a/FTB/Signatures/tests/resources/valgrind-pt-01.txt b/FTB/Signatures/tests/resources/valgrind-pt-01.txt deleted file mode 100644 index 3e0b7c0aa..000000000 --- a/FTB/Signatures/tests/resources/valgrind-pt-01.txt +++ /dev/null @@ -1,11 +0,0 @@ -==20956== -==20956== Process terminating with default action of signal 11 (SIGSEGV) -==20956== Access not within mapped region at address 0x0 -==20956== at 0x4C331C2: strlen (vg_replace_strmem.c:461) -==20956== by 0x4EBD9D1: puts (ioputs.c:35) -==20956== by 0x1086FF: main (free.c:9) -==20956== If you believe this happened as a result of a stack -==20956== overflow in your program's main thread (unlikely but -==20956== possible), you can try to increase the size of the -==20956== main thread stack using the --main-stacksize= flag. -==20956== The main thread stack size used in this run was 8388608. \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-sc-01.txt b/FTB/Signatures/tests/resources/valgrind-sc-01.txt deleted file mode 100755 index b66e6ac85..000000000 --- a/FTB/Signatures/tests/resources/valgrind-sc-01.txt +++ /dev/null @@ -1,10 +0,0 @@ -==111== Syscall param write(buf) points to uninitialised byte(s) -==111== at 0x4F4D154: write (write.c:27) -==111== by 0x1086B5: main (in a.out) -==111== Address 0x522e040 is 0 bytes inside a block of size 10 alloc'd -==111== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) -==111== by 0x10869B: main (in a.out) -==111== Uninitialised value was created by a heap allocation -==111== at 0x4C2FDFB: malloc (vg_replace_malloc.c:309) -==111== by 0x10869B: main (in a.out) -==111== diff --git a/FTB/Signatures/tests/resources/valgrind-sc-02.txt b/FTB/Signatures/tests/resources/valgrind-sc-02.txt deleted file mode 100644 index 5659d9110..000000000 --- a/FTB/Signatures/tests/resources/valgrind-sc-02.txt +++ /dev/null @@ -1,8 +0,0 @@ -==222== Syscall param socketcall.sendto(msg) points to uninitialised byte(s) -==222== at 0x57835DC: send (send.c:33) -==222== by 0x405244: test (test.c:154) -==222== by 0x5A54E99: start_thread (pthread_create.c:308) -==222== Address 0x5e7b6b4 is 20 bytes inside a block of size 24 alloc'd -==222== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) -==222== by 0x5A54E99: start_thread (pthread_create.c:308) -==222== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-sdo-01.txt b/FTB/Signatures/tests/resources/valgrind-sdo-01.txt deleted file mode 100644 index a4c04916c..000000000 --- a/FTB/Signatures/tests/resources/valgrind-sdo-01.txt +++ /dev/null @@ -1,4 +0,0 @@ -==1111== Source and destination overlap in memcpy(0x41bb2b0, 0x41bb070, 123) -==1111== at 0x4027BD6: memcpy (file.c:635) -==1111== by 0x804AEE8: main (file.c:1512) -==1111== \ No newline at end of file diff --git a/FTB/Signatures/tests/resources/valgrind-uuv-01.txt b/FTB/Signatures/tests/resources/valgrind-uuv-01.txt deleted file mode 100644 index 9d480af87..000000000 --- a/FTB/Signatures/tests/resources/valgrind-uuv-01.txt +++ /dev/null @@ -1,7 +0,0 @@ -==222== Use of uninitialised value of size 8 -==222== by 0x11C92A94: foo<123>::Init() (bar.cpp:929) -==222== by 0x11C63345: bar::func >::Run() (file.cpp:432) -==222== by 0xFD534FC: non-virtual thunk to Run() (file.cpp:0) -==222== Uninitialised value was created by a heap allocation -==222== at 0x4C32373: memalign (vg_replace_malloc.c:908) -==222== by 0x4C32476: posix_memalign (vg_replace_malloc.c:1072) \ No newline at end of file diff --git a/FTB/Signatures/tests/test_CrashSignature.py b/FTB/Signatures/tests/test_CrashSignature.py index 2b226f67f..badf1cc05 100644 --- a/FTB/Signatures/tests/test_CrashSignature.py +++ b/FTB/Signatures/tests/test_CrashSignature.py @@ -27,6 +27,7 @@ def test_SignatureCreateTest() -> None: config, auxCrashData=(FIXTURE_PATH / "trace_1.txt").read_text().splitlines(), ) + crashSig1 = crashInfo.createCrashSignature( forceCrashAddress=True, maxFrames=4, minimumSupportedVersion=10 ) diff --git a/Reporter/Reporter.py b/Reporter/Reporter.py index 49ac56ca1..f42495412 100644 --- a/Reporter/Reporter.py +++ b/Reporter/Reporter.py @@ -196,6 +196,7 @@ def get(self, *args: Any, **kwds: Any) -> Any: """requests.get, with added support for FuzzManager authentication and retry on 5xx errors. + @type expected: int @param expected: HTTP status code for successful response (default: requests.codes["ok"]) """ @@ -209,6 +210,7 @@ def post(self, *args: Any, **kwds: Any) -> Any: """requests.post, with added support for FuzzManager authentication and retry on 5xx errors. + @type expected: int @param expected: HTTP status code for successful response (default: requests.codes["created"]) """ @@ -222,6 +224,7 @@ def patch(self, *args: Any, **kwds: Any) -> Any: """requests.patch, with added support for FuzzManager authentication and retry on 5xx errors. + @type expected: int @param expected: HTTP status code for successful response (default: requests.codes["created"]) """ diff --git a/TaskStatusReporter/__main__.py b/TaskStatusReporter/__main__.py index b5233046a..f4931274e 100644 --- a/TaskStatusReporter/__main__.py +++ b/TaskStatusReporter/__main__.py @@ -14,9 +14,6 @@ @contact: jschwartzentruber@mozilla.com """ - -from __future__ import annotations - import sys from .TaskStatusReporter import main diff --git a/misc/afl_libfuzzer/S3Manager.py b/misc/afl_libfuzzer/S3Manager.py index 72ec9e9c3..683d299e6 100644 --- a/misc/afl_libfuzzer/S3Manager.py +++ b/misc/afl_libfuzzer/S3Manager.py @@ -99,6 +99,7 @@ def download_libfuzzer_queues(self, corpus_dir: str) -> None: """ Synchronize files from open libFuzzer queues directly back into the local corpus directory. + @param corpus_dir: libFuzzer corpus directory """ remote_keys = list(self.bucket.list(self.remote_path_queues)) @@ -329,6 +330,8 @@ def download_build(self, build_dir: str) -> None: into the specified build directory. @param base_dir: Build directory + @param bucket_name: Name of the S3 bucket to use + @param project_name: Name of the project folder inside the S3 bucket """ # Clear any previous builds if os.path.exists(build_dir): diff --git a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py index 831f742d6..92aea6f3d 100755 --- a/misc/afl_libfuzzer/afl-libfuzzer-daemon.py +++ b/misc/afl_libfuzzer/afl-libfuzzer-daemon.py @@ -203,7 +203,7 @@ def command_file_to_list(cmd_file: str) -> tuple[int | None, list[str]]: @param cmd_file: Command line file containing list of commands @return: Test index in list and the command as a list of strings """ - cmdline = [] + cmdline = list() idx = 0 test_idx = None with open(cmd_file) as cmd_fp: @@ -289,7 +289,7 @@ def write_aggregated_stats_afl( fields.extend(wanted_fields_max) # Warnings to include - warnings: list[str] = [] + warnings: list[str] = list() aggregated_stats = {} @@ -1217,8 +1217,8 @@ def warn_local() -> None: s3m.clean_queue_dirs() print( - "Downloading queues from s3://%s/%s/queues/ to %s" - % (opts.s3_bucket, opts.project, queues_dir) + f"Downloading queues from s3://{opts.s3_bucket}/{opts.project}/queues/ to " + f"{queues_dir}" ) s3m.download_queue_dirs(opts.s3_corpus_refresh) @@ -1281,8 +1281,8 @@ def warn_local() -> None: # Download our current corpus into the queues directory as well print( - "Downloading corpus from s3://%s/%s/corpus/ to %s" - % (opts.s3_bucket, opts.project, queues_dir) + f"Downloading corpus from s3://{opts.s3_bucket}/{opts.project}/corpus/ to " + f"{queues_dir}" ) s3m.download_corpus(queues_dir) diff --git a/misc/ec2prices/simulator.py b/misc/ec2prices/simulator.py index 9d980a83b..61d973a81 100644 --- a/misc/ec2prices/simulator.py +++ b/misc/ec2prices/simulator.py @@ -46,8 +46,9 @@ def get_spot_price_per_region( """Gets spot prices of the specified region and instance type""" print( - "Region %s Instance Type %s Start %s End %s" - % (region_name, instance_type, start_time.isoformat(), end_time.isoformat()) + "Region {} Instance Type {} Start {} End {}".format( + region_name, instance_type, start_time.isoformat(), end_time.isoformat() + ) ) r = None @@ -189,8 +190,8 @@ def __init__(self, configFile: str) -> None: else: if "handler" not in sectionMap: print( - "Warning: Simulation '%s' has no handler set, ignoring..." - % section + f"Warning: Simulation '{section}' has no handler set, " + "ignoring..." ) continue @@ -247,7 +248,7 @@ def main() -> int: priceData = {} if os.path.isfile(cacheFile): - with open(cacheFile, mode="r") as cacheFd: + with open(cacheFile) as cacheFd: priceData = json.load(cacheFd, object_pairs_hook=OrderedDict) else: for hour in range(interval - 1, -1, -1): diff --git a/pyproject.toml b/pyproject.toml index bfb40658f..e1d7a2816 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,9 @@ omit = [ "*/.eggs/*", ] +[tool.django-stubs] +django_settings_module = "server.settings_test" + [tool.isort] known_first_party = [ "Collector", @@ -32,6 +35,10 @@ profile = "black" [tool.mypy] strict = true show_error_codes = true +plugins = [ +# "mypy_django_plugin.main", +# "mypy_drf_plugin.main", +] # Add Python modules to be ignored by mypy here [[tool.mypy.overrides]] diff --git a/repack_wheel.sh b/repack_wheel.sh deleted file mode 100755 index 429830ef3..000000000 --- a/repack_wheel.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -set -e -x - -# -# Remove 'extra_requires' from the wheel -# -# The 'extras' are only useful with the full source distribution. -# - -WORK="$(mktemp -d -t fm-twine-repack-XXXXXX)" -wheel unpack -d "$WORK" dist/FuzzManager-*.whl -grep -Ev "^(Provides-Extra: .*|Requires-Dist: .* ; extra == '.*')$" "$WORK"/FuzzManager-*/FuzzManager-*.dist-info/METADATA > "$WORK"/METADATA.new -mv "$WORK"/METADATA.new "$WORK"/FuzzManager-*/FuzzManager-*.dist-info/METADATA -wheel pack -d dist "$WORK"/FuzzManager-* -rm -rf "$WORK" diff --git a/requirements.txt b/requirements.txt index ca6a7f0d4..692b04ac6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -180,7 +180,6 @@ secretstorage==3.3.1 # via keyring six==1.16.0 # via - # FuzzManager (setup.py) # django-chartjs # isodate # python-dateutil @@ -193,7 +192,9 @@ toml==0.10.2 tomli==2.0.1 # via coverage typing-extensions==4.1.1 - # via importlib-metadata + # via + # FuzzManager (setup.py) + # importlib-metadata urllib3==1.26.8 # via # botocore diff --git a/server/celeryconf.py b/server/celeryconf.py index e3a1e7be1..e538917c8 100644 --- a/server/celeryconf.py +++ b/server/celeryconf.py @@ -1,5 +1,3 @@ -from __future__ import annotations - import os from celery import Celery diff --git a/server/covmanager/management/commands/setup_repository.py b/server/covmanager/management/commands/setup_repository.py index 97f64a9be..e5848d408 100644 --- a/server/covmanager/management/commands/setup_repository.py +++ b/server/covmanager/management/commands/setup_repository.py @@ -56,6 +56,6 @@ def handle(self, name, provider, location, **opts: Any) -> None: repository.save() print( - "Successfully created repository '%s' with provider '%s' located at %s" - % (name, provider, location) + f"Successfully created repository '{name}' with provider '{provider}' " + f"located at {location}" ) diff --git a/server/covmanager/migrations/0001_initial.py b/server/covmanager/migrations/0001_initial.py index 0ed034f26..ae6be9335 100644 --- a/server/covmanager/migrations/0001_initial.py +++ b/server/covmanager/migrations/0001_initial.py @@ -1,5 +1,3 @@ -from __future__ import annotations - import django.core.files.storage import django.utils.timezone from django.db import migrations, models diff --git a/server/covmanager/migrations/0002_increase_collection_filename_length.py b/server/covmanager/migrations/0002_increase_collection_filename_length.py index d9bbf7996..586254ef3 100644 --- a/server/covmanager/migrations/0002_increase_collection_filename_length.py +++ b/server/covmanager/migrations/0002_increase_collection_filename_length.py @@ -1,5 +1,3 @@ -from __future__ import annotations - import django.core.files.storage from django.db import migrations, models diff --git a/server/covmanager/migrations/0003_collection_file_optional.py b/server/covmanager/migrations/0003_collection_file_optional.py index 75f256068..16983e43a 100644 --- a/server/covmanager/migrations/0003_collection_file_optional.py +++ b/server/covmanager/migrations/0003_collection_file_optional.py @@ -1,7 +1,5 @@ # Generated by Django 1.11.13 on 2018-07-20 14:20 -from __future__ import annotations - import django.db.models.deletion from django.db import migrations, models diff --git a/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py b/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py index c0d505d6b..68f67d9ff 100644 --- a/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py +++ b/server/covmanager/migrations/0004_reportconfiguration_reportsummary.py @@ -1,7 +1,5 @@ # Generated by Django 1.11.13 on 2018-09-03 15:00 -from __future__ import annotations - import django.db.models.deletion from django.db import migrations, models diff --git a/server/covmanager/migrations/0005_report.py b/server/covmanager/migrations/0005_report.py index 19bde07d1..04becf8c7 100644 --- a/server/covmanager/migrations/0005_report.py +++ b/server/covmanager/migrations/0005_report.py @@ -1,7 +1,5 @@ # Generated by Django 1.11.16 on 2019-05-22 20:01 -from __future__ import annotations - import django.db.models.deletion import django.utils.timezone from django.db import migrations, models diff --git a/server/covmanager/models.py b/server/covmanager/models.py index 3755732d9..2884d7658 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -29,8 +29,7 @@ class Repository(models.Model): def getInstance(self): # Dynamically instantiate the provider as requested providerModule = __import__( - f"covmanager.SourceCodeProvider.{self.classname}", - fromlist=[self.classname], + f"covmanager.SourceCodeProvider.{self.classname}", fromlist=[self.classname] ) providerClass = getattr(providerModule, self.classname) return providerClass(self.location) diff --git a/server/covmanager/tests/test_collections.py b/server/covmanager/tests/test_collections.py index 034571be3..ffa412efd 100644 --- a/server/covmanager/tests/test_collections.py +++ b/server/covmanager/tests/test_collections.py @@ -21,7 +21,7 @@ from django.test.client import Client from django.urls import reverse -from covmanager.tests.conftest import _result +from .conftest import _result LOG = logging.getLogger("fm.covmanager.tests.collections") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name diff --git a/server/covmanager/tests/test_collections_rest.py b/server/covmanager/tests/test_collections_rest.py index 8532921ca..2c512ab47 100644 --- a/server/covmanager/tests/test_collections_rest.py +++ b/server/covmanager/tests/test_collections_rest.py @@ -22,7 +22,8 @@ from rest_framework.test import APIClient from covmanager.models import Collection -from covmanager.tests.conftest import _result, covType + +from .conftest import _result, covType LOG = logging.getLogger("fm.covmanager.tests.collections.rest") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name diff --git a/server/covmanager/tests/test_repositories.py b/server/covmanager/tests/test_repositories.py index 2abfaed1a..cf46bfc75 100644 --- a/server/covmanager/tests/test_repositories.py +++ b/server/covmanager/tests/test_repositories.py @@ -19,7 +19,7 @@ from django.test.client import Client from django.urls import reverse -from covmanager.tests.conftest import _result +from .conftest import _result LOG = logging.getLogger("fm.covmanager.tests.repos") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name diff --git a/server/covmanager/tests/test_repositories_rest.py b/server/covmanager/tests/test_repositories_rest.py index da38e5bad..64c8db8e5 100644 --- a/server/covmanager/tests/test_repositories_rest.py +++ b/server/covmanager/tests/test_repositories_rest.py @@ -19,11 +19,9 @@ from django.contrib.auth.models import User from rest_framework.test import APIClient -from covmanager.tests.conftest import _result +from .conftest import _result -LOG = logging.getLogger( - "fm.covmanager.tests.repos.rest" -) # pylint: disable=invalid-name +LOG = logging.getLogger("fm.covmanager.tests.repos.rest") pytestmark = pytest.mark.usefixtures("covmanager_test") # pylint: disable=invalid-name diff --git a/server/covmanager/views.py b/server/covmanager/views.py index 4fcf26d88..ffbd26985 100644 --- a/server/covmanager/views.py +++ b/server/covmanager/views.py @@ -2,7 +2,7 @@ import json import os -from typing import Any, TypeVar +from typing import Any, TypeVar, cast from wsgiref.util import FileWrapper from django.conf import settings @@ -238,12 +238,12 @@ def collections_browse_api( def collections_diff_api(request: HttpRequest, path: str) -> HttpResponse: - collections: QuerySet[Collection] + collections: list[Collection] coverages = [] if "ids" in request.GET: ids = request.GET["ids"].split(",") - collections = Collection.objects.filter(pk__in=ids) + collections = cast(list[Collection], Collection.objects.filter(pk__in=ids)) if collections and len(collections) < 2: raise Http404("Need at least two collections") @@ -535,7 +535,7 @@ def repositories_search_api(request: HttpRequest) -> HttpResponse: ) return HttpResponse( - json.dumps({"results": list(results)}), content_type="application/json" + json.dumps({"results": results}), content_type="application/json" ) @@ -549,7 +549,7 @@ def tools_search_api(request: HttpRequest) -> HttpResponse: ) return HttpResponse( - json.dumps({"results": list(results)}), content_type="application/json" + json.dumps({"results": results}), content_type="application/json" ) diff --git a/server/crashmanager/Bugtracker/BugzillaREST.py b/server/crashmanager/Bugtracker/BugzillaREST.py index d9efebed5..9256fc17e 100644 --- a/server/crashmanager/Bugtracker/BugzillaREST.py +++ b/server/crashmanager/Bugtracker/BugzillaREST.py @@ -62,10 +62,8 @@ def login(self, loginRequired: bool = True, forceLogin: bool = False) -> bool: if self.authToken is not None: return True - loginUrl = "{}/login?login={}&password={}".format( - self.baseUrl, - self.username, - self.password, + loginUrl = ( + f"{self.baseUrl}/login?login={self.username}&password={self.password}" ) response = requests.get(loginUrl) json = response.json() diff --git a/server/crashmanager/admin.py b/server/crashmanager/admin.py index b2fc02038..25a9cdb9b 100644 --- a/server/crashmanager/admin.py +++ b/server/crashmanager/admin.py @@ -2,8 +2,14 @@ from django.contrib import admin -from crashmanager.models import Bug # @UnresolvedImport -from crashmanager.models import OS, Bucket, CrashEntry, Platform, Product +from crashmanager.models import ( # @UnresolvedImport + OS, + Bucket, + Bug, + CrashEntry, + Platform, + Product, +) admin.site.register(CrashEntry) admin.site.register(Bucket) diff --git a/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py b/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py index 438f1236d..fae4ca6cb 100644 --- a/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py +++ b/server/crashmanager/migrations/0001_squashed_0020_add_app_permissions.py @@ -1,7 +1,5 @@ # Generated by Django 1.11.20 on 2019-12-09 00:06 -from __future__ import annotations - import django.core.files.storage import django.db.migrations.operations.special import django.db.models.deletion diff --git a/server/crashmanager/migrations/0002_add_taskmanager.py b/server/crashmanager/migrations/0002_add_taskmanager.py index 99d3b541c..9891757c6 100644 --- a/server/crashmanager/migrations/0002_add_taskmanager.py +++ b/server/crashmanager/migrations/0002_add_taskmanager.py @@ -1,7 +1,5 @@ # Generated by Django 1.11.29 on 2020-04-03 04:18 -from __future__ import annotations - from django.db import migrations diff --git a/server/crashmanager/tests/fixtures/gdb_crash_data.txt b/server/crashmanager/tests/fixtures/gdb_crash_data.txt new file mode 100644 index 000000000..693c56606 --- /dev/null +++ b/server/crashmanager/tests/fixtures/gdb_crash_data.txt @@ -0,0 +1,39 @@ +GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 +(gdb) backtrace 0 +No stack. +(gdb) r +Starting program: /home/ubuntu/shell-cache/js-32-linux-dc70d241f90d/js-32-linux-dc70d241f90d --fuzzing-safe --no-threads --ion-eager bb2608227.js +Thread 1 "js-32-linux-dc7" received signal SIGSEGV, Segmentation fault. +0x33674039 in ?? () +(gdb) backtrace +#0 0x33674039 in ?? () +#1 0xf6b52820 in ?? () +#2 0xf6b52820 in ?? () +(gdb) info registers +eax 0xf7047000 -150704128 +ecx 0xffef 65519 +edx 0xffff8000 -32768 +ebx 0x9837ff4 159612916 +esp 0xffffba74 0xffffba74 +ebp 0xffffba74 0xffffba74 +esi 0xf6b52820 -155899872 +edi 0xf6f896c0 -151480640 +eip 0x33674039 0x33674039 +eflags 0x10283 [ CF SF IF RF ] +cs 0x23 35 +ss 0x2b 43 +ds 0x2b 43 +es 0x2b 43 +fs 0x0 0 +gs 0x63 99 +(gdb) print $_siginfo +$1 = {si_signo = 11, si_errno = 0, si_code = 2, _sigfault = {si_addr = 0xf7057000, _addr_lsb = 0, _addr_bnd = {_lower = 0x0, _upper = 0x0}}} +(gdb) x/8i $pc +=> 0x33674039: mov %dx,0x10(%eax,%ecx,1) + 0x3367403e: pop %ebp + 0x3367403f: pop %esi + 0x33674040: ret + 0x33674041: jmp 0x33674200 + 0x33674046: sub $0x4,%esp + 0x33674049: call 0x336743f0 + 0x3367404e: sub $0x4,%esp diff --git a/server/crashmanager/tests/test_bugproviders_rest.py b/server/crashmanager/tests/test_bugproviders_rest.py index 11c2b3b27..a3597acbe 100644 --- a/server/crashmanager/tests/test_bugproviders_rest.py +++ b/server/crashmanager/tests/test_bugproviders_rest.py @@ -8,7 +8,8 @@ from rest_framework.test import APIClient from crashmanager.models import BugProvider -from crashmanager.tests.conftest import _cm_result + +from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.bugproviders.rest") diff --git a/server/crashmanager/tests/test_bugs.py b/server/crashmanager/tests/test_bugs.py index c14e85480..2d25883a5 100644 --- a/server/crashmanager/tests/test_bugs.py +++ b/server/crashmanager/tests/test_bugs.py @@ -19,7 +19,8 @@ from django.urls import reverse from crashmanager.models import BugzillaTemplate -from crashmanager.tests.conftest import _cm_result + +from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.bugs") pytestmark = pytest.mark.usefixtures("crashmanager_test") diff --git a/server/crashmanager/tests/test_crashes.py b/server/crashmanager/tests/test_crashes.py index 2d6731542..2f6f0d699 100644 --- a/server/crashmanager/tests/test_crashes.py +++ b/server/crashmanager/tests/test_crashes.py @@ -18,9 +18,8 @@ from django.test.client import Client from django.urls import reverse -from crashmanager.tests.conftest import _cm_result - from . import assert_contains +from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.crashes") pytestmark = pytest.mark.usefixtures( diff --git a/server/crashmanager/tests/test_crashes_rest.py b/server/crashmanager/tests/test_crashes_rest.py index e7bc26474..581089475 100644 --- a/server/crashmanager/tests/test_crashes_rest.py +++ b/server/crashmanager/tests/test_crashes_rest.py @@ -26,7 +26,8 @@ from Collector.Collector import DataType from crashmanager.models import CrashEntry from crashmanager.models import TestCase as cmTestCase -from crashmanager.tests.conftest import _cm_result + +from .conftest import _cm_result # What should be allowed: # @@ -515,7 +516,7 @@ def test_rest_crashes_report_crash_long_sig( ) -> None: """test that crash reporting works with an assertion message too long for shortSignature""" - data: DataType = { + data = { "rawStdout": "data on\nstdout", "rawStderr": "data on\nstderr", "rawCrashData": "Assertion failure: " + ("A" * 4096), diff --git a/server/crashmanager/tests/test_inbox_rest.py b/server/crashmanager/tests/test_inbox_rest.py index 6e5442b90..dfa56ed13 100644 --- a/server/crashmanager/tests/test_inbox_rest.py +++ b/server/crashmanager/tests/test_inbox_rest.py @@ -33,7 +33,8 @@ Product, Tool, ) -from crashmanager.tests.conftest import _cm_result + +from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.inbox.rest") diff --git a/server/crashmanager/tests/test_rest_live.py b/server/crashmanager/tests/test_rest_live.py index fd89ac71b..ac218ef0a 100644 --- a/server/crashmanager/tests/test_rest_live.py +++ b/server/crashmanager/tests/test_rest_live.py @@ -28,10 +28,9 @@ @pytest.mark.skip def test_RESTCrashEntryInterface(live_server: LiveServer, fm_user: User) -> None: url_split = urlsplit(live_server.url) - url = "{}://{}:{}/crashmanager/rest/crashes/".format( - url_split.scheme, - url_split.hostname, - url_split.port, + url = ( + f"{url_split.scheme}://{url_split.hostname}:{url_split.port}" + "/crashmanager/rest/crashes/" ) # Must yield forbidden without authentication @@ -78,10 +77,9 @@ def test_RESTCrashEntryInterface(live_server: LiveServer, fm_user: User) -> None def test_RESTSignatureInterface(live_server: LiveServer) -> None: url_split = urlsplit(live_server.url) - url = "{}://{}:{}/crashmanager/rest/signatures/".format( - url_split.scheme, - url_split.hostname, - url_split.port, + url = ( + f"{url_split.scheme}://{url_split.hostname}:{url_split.port}" + "/crashmanager/rest/signatures/" ) # Must yield forbidden without authentication diff --git a/server/crashmanager/tests/test_signatures.py b/server/crashmanager/tests/test_signatures.py index 928732545..cdfb3c851 100644 --- a/server/crashmanager/tests/test_signatures.py +++ b/server/crashmanager/tests/test_signatures.py @@ -21,9 +21,9 @@ from django.urls import reverse from crashmanager.models import Bucket, BucketWatch, CrashEntry -from crashmanager.tests.conftest import _cm_result from . import assert_contains +from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.signatures") pytestmark = pytest.mark.usefixtures( diff --git a/server/crashmanager/tests/test_signatures_rest.py b/server/crashmanager/tests/test_signatures_rest.py index 31bc5855e..756be2aeb 100644 --- a/server/crashmanager/tests/test_signatures_rest.py +++ b/server/crashmanager/tests/test_signatures_rest.py @@ -22,7 +22,8 @@ from rest_framework.test import APIClient from crashmanager.models import Bucket, Bug, CrashEntry, User -from crashmanager.tests.conftest import _cm_result, _create_user + +from .conftest import _cm_result, _create_user # What should be allowed: # diff --git a/server/crashmanager/tests/test_stats.py b/server/crashmanager/tests/test_stats.py index 2dbc62cdc..8d5426c22 100644 --- a/server/crashmanager/tests/test_stats.py +++ b/server/crashmanager/tests/test_stats.py @@ -19,9 +19,8 @@ from django.test.client import Client from django.urls import reverse -from crashmanager.tests.conftest import _cm_result - from . import assert_contains +from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.stats") VIEW_NAME = "crashmanager:stats" diff --git a/server/crashmanager/tests/test_templates_rest.py b/server/crashmanager/tests/test_templates_rest.py index 305ac28af..c3f7ee8cb 100644 --- a/server/crashmanager/tests/test_templates_rest.py +++ b/server/crashmanager/tests/test_templates_rest.py @@ -8,7 +8,8 @@ from rest_framework.test import APIClient from crashmanager.models import BugzillaTemplate -from crashmanager.tests.conftest import _cm_result + +from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.templates.rest") diff --git a/server/crashmanager/tests/test_user_settings.py b/server/crashmanager/tests/test_user_settings.py index cc261eba5..08c93590e 100644 --- a/server/crashmanager/tests/test_user_settings.py +++ b/server/crashmanager/tests/test_user_settings.py @@ -19,7 +19,8 @@ from django.urls import reverse from crashmanager.models import Tool, User -from crashmanager.tests.conftest import _cm_result + +from .conftest import _cm_result LOG = logging.getLogger("fm.crashmanager.tests.usersettings") pytestmark = pytest.mark.usefixtures("crashmanager_test") diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index 8ccc6965c..74c029f10 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -377,7 +377,7 @@ def get_price(sku) -> tuple[float, str]: zones = {} service_id = "6F81-5844-456A" # Compute Engine compute_skus_url = ( - "https://cloudbilling.googleapis.com/v1/services/" + service_id + "/skus" + f"https://cloudbilling.googleapis.com/v1/services/{service_id}/skus" ) def _get_skus_paginated(): diff --git a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py index 381135d42..d3707bcb7 100644 --- a/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py +++ b/server/ec2spotmanager/migrations/0001_squashed_0013_add_gce_fields.py @@ -1,7 +1,5 @@ # Generated by Django 1.11.20 on 2019-12-09 00:08 -from __future__ import annotations - import django.core.files.storage import django.db.migrations.operations.special import django.db.models.deletion diff --git a/server/ec2spotmanager/tasks.py b/server/ec2spotmanager/tasks.py index 23d9557ae..3e2e0d338 100644 --- a/server/ec2spotmanager/tasks.py +++ b/server/ec2spotmanager/tasks.py @@ -117,8 +117,9 @@ def _determine_best_location( # zone+type is blacklisted because a previous spot request timed-out if ( cache.get( - "%s:blacklist:%s:%s:%s" - % (cloud_provider.get_name(), region, zone, instance_type) + "{}:blacklist:{}:{}:{}".format( + cloud_provider.get_name(), region, zone, instance_type + ) ) is not None ): diff --git a/server/ec2spotmanager/tests/__init__.py b/server/ec2spotmanager/tests/__init__.py index 74a210074..5eff17fda 100644 --- a/server/ec2spotmanager/tests/__init__.py +++ b/server/ec2spotmanager/tests/__init__.py @@ -11,8 +11,8 @@ from __future__ import annotations -import logging from datetime import datetime +import logging from typing import cast from django.core.files.base import ContentFile diff --git a/server/ec2spotmanager/tests/test_configs.py b/server/ec2spotmanager/tests/test_configs.py index cff0d278a..913b4c534 100644 --- a/server/ec2spotmanager/tests/test_configs.py +++ b/server/ec2spotmanager/tests/test_configs.py @@ -25,12 +25,8 @@ from . import assert_contains, create_config -LOG = logging.getLogger( - "fm.ec2spotmanager.tests.configs" -) # pylint: disable=invalid-name -pytestmark = pytest.mark.usefixtures( - "ec2spotmanager_test" -) # pylint: disable=invalid-name +LOG = logging.getLogger("fm.ec2spotmanager.tests.configs") +pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") @pytest.mark.parametrize( diff --git a/server/ec2spotmanager/tests/test_configs_rest.py b/server/ec2spotmanager/tests/test_configs_rest.py index f90283241..e66e4ecd8 100644 --- a/server/ec2spotmanager/tests/test_configs_rest.py +++ b/server/ec2spotmanager/tests/test_configs_rest.py @@ -22,12 +22,8 @@ from . import create_config -LOG = logging.getLogger( - "fm.ec2spotmanager.tests.configs.rest" -) # pylint: disable=invalid-name -pytestmark = pytest.mark.usefixtures( - "ec2spotmanager_test" -) # pylint: disable=invalid-name +LOG = logging.getLogger("fm.ec2spotmanager.tests.configs.rest") +pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") def test_rest_pool_configs_no_auth(api_client: APIClient) -> None: diff --git a/server/ec2spotmanager/tests/test_ec2spotmanager.py b/server/ec2spotmanager/tests/test_ec2spotmanager.py index 89c51ce52..8f035c1b2 100644 --- a/server/ec2spotmanager/tests/test_ec2spotmanager.py +++ b/server/ec2spotmanager/tests/test_ec2spotmanager.py @@ -19,12 +19,8 @@ from django.test.client import Client from django.urls import reverse -LOG = logging.getLogger( - "fm.ec2spotmanager.tests.ec2spotmanager" -) # pylint: disable=invalid-name -pytestmark = pytest.mark.usefixtures( - "ec2spotmanager_test" -) # pylint: disable=invalid-name +LOG = logging.getLogger("fm.ec2spotmanager.tests.ec2spotmanager") +pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") def test_ec2spotmanager_index(client: Client) -> None: diff --git a/server/ec2spotmanager/tests/test_pools_rest.py b/server/ec2spotmanager/tests/test_pools_rest.py index 550647541..5f428fedf 100644 --- a/server/ec2spotmanager/tests/test_pools_rest.py +++ b/server/ec2spotmanager/tests/test_pools_rest.py @@ -26,12 +26,8 @@ from . import create_config, create_pool -LOG = logging.getLogger( - "fm.ec2spotmanager.tests.pools.rest" -) # pylint: disable=invalid-name -pytestmark = pytest.mark.usefixtures( - "ec2spotmanager_test" -) # pylint: disable=invalid-name +LOG = logging.getLogger("fm.ec2spotmanager.tests.pools.rest") +pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") def test_rest_pool_cycle_no_auth(api_client: APIClient) -> None: diff --git a/server/ec2spotmanager/tests/test_status_rest.py b/server/ec2spotmanager/tests/test_status_rest.py index 14d54e11f..076848b7e 100644 --- a/server/ec2spotmanager/tests/test_status_rest.py +++ b/server/ec2spotmanager/tests/test_status_rest.py @@ -24,12 +24,8 @@ from . import create_instance -LOG = logging.getLogger( - "fm.ec2spotmanager.tests.status.rest" -) # pylint: disable=invalid-name -pytestmark = pytest.mark.usefixtures( - "ec2spotmanager_test" -) # pylint: disable=invalid-name +LOG = logging.getLogger("fm.ec2spotmanager.tests.status.rest") +pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") def test_rest_status_no_auth(api_client: APIClient) -> None: diff --git a/server/ec2spotmanager/tests/test_task_status.py b/server/ec2spotmanager/tests/test_task_status.py index d30eb7a05..bfb66b7a5 100644 --- a/server/ec2spotmanager/tests/test_task_status.py +++ b/server/ec2spotmanager/tests/test_task_status.py @@ -19,9 +19,7 @@ from . import create_config, create_pool -pytestmark = pytest.mark.usefixtures( - "ec2spotmanager_test" -) # pylint: disable=invalid-name +pytestmark = pytest.mark.usefixtures("ec2spotmanager_test") def test_update_pool_status() -> None: diff --git a/server/server/views.py b/server/server/views.py index 1a0ec68fb..4ea5d51e7 100644 --- a/server/server/views.py +++ b/server/server/views.py @@ -74,11 +74,12 @@ def paginate_requested_list(request: HttpRequest, entries: QuerySet[Model]) -> P parameters 'page' and 'page_size'. """ page_size = request.GET.get("page_size") - if not page_size: - assert page_size is not None + if page_size: page_size_int = int(page_size) + else: page_size_int = 100 paginator = Paginator(entries, page_size_int) + page = request.GET.get("page") try: @@ -133,8 +134,7 @@ def json_to_query(json_str: str): raise RuntimeError(f"Invalid JSON: {e}") def get_query_obj( - obj: str | list[str] | int | dict[str, str] | None, - key: str | None = None, + obj: str | list[str] | int | dict[str, str] | None, key: str | None = None ) -> Q: if obj is None or isinstance(obj, (str, list, int)): diff --git a/server/taskmanager/apps.py b/server/taskmanager/apps.py index 6f0864bef..2084e10d5 100644 --- a/server/taskmanager/apps.py +++ b/server/taskmanager/apps.py @@ -1,5 +1,3 @@ -from __future__ import annotations - from django.apps import AppConfig diff --git a/server/taskmanager/management/commands/taskmanager_pulse_listen.py b/server/taskmanager/management/commands/taskmanager_pulse_listen.py index 9199420b6..9ed258962 100644 --- a/server/taskmanager/management/commands/taskmanager_pulse_listen.py +++ b/server/taskmanager/management/commands/taskmanager_pulse_listen.py @@ -70,8 +70,7 @@ def callback(self, body, msg) -> None: msg.ack() return None raise RuntimeError( - "Unhandled message: %s on %s" - % ( + "Unhandled message: {} on {}".format( msg.delivery_info["routing_key"], msg.delivery_info["exchange"], ) diff --git a/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py b/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py index b28bbedd9..b27f074dd 100644 --- a/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py +++ b/server/taskmanager/migrations/0002_allow_unknown_task_status_and_run_time_calculation.py @@ -1,7 +1,5 @@ # Generated by Django 2.2.12 on 2020-07-22 16:29 -from __future__ import annotations - import django.db.models.deletion from django.db import migrations, models diff --git a/server/taskmanager/tests/test_update_pools.py b/server/taskmanager/tests/test_update_pools.py index 6ebd7dcfb..a6f9a1d55 100644 --- a/server/taskmanager/tests/test_update_pools.py +++ b/server/taskmanager/tests/test_update_pools.py @@ -20,9 +20,8 @@ from dateutil.parser import isoparse from pytest_mock import MockerFixture -from taskmanager.models import Pool, Task - # from taskmanager.cron import delete_expired +from taskmanager.models import Pool, Task from taskmanager.tasks import update_pool_defns, update_task LOG = logging.getLogger("fm.taskmanager.tests.tasks") diff --git a/setup.cfg b/setup.cfg index aafab7529..9061c20d3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,7 +26,6 @@ keywords = fuzz fuzzing security test testing install_requires = fasteners>=0.14.1 requests>=2.20.1 - six>=1.12.0 typing_extensions>=4.0.0 packages = Collector @@ -68,23 +67,3 @@ test = pytest-django pytest-mock pytest-pythonpath -mypy = - black - boto3-stubs - celery-types - django-stubs - djangorestframework-stubs - flake8 - flynt - isort - mypy==0.940 - pytest-flake8 - pyupgrade-directories - types-boto - types-mock - types-PyYAML - types-python-dateutil - types-redis - types-requests - types-setuptools - yesqa diff --git a/setup.py b/setup.py index 81ca21d21..edd3c8492 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. - """setuptools install script""" from __future__ import annotations diff --git a/tox.ini b/tox.ini index 3f45092c6..023185825 100644 --- a/tox.ini +++ b/tox.ini @@ -37,16 +37,23 @@ deps = commands = codecov +[testenv:mypy] +commands = + mypy --install-types --non-interactive {posargs} +setenv = PYTHONPATH = {toxinidir}/server +deps = + mypy==0.931 + django-stubs>=1.9.0 + djangorestframework-stubs>=1.4.0 +usedevelop = true + [testenv:pypi] skip_install = true deps = twine - wheel commands = python setup.py sdist bdist_wheel - bash repack_wheel.sh twine upload --skip-existing dist/* -whitelist_externals = bash [flake8] ignore = From 46814ab871102ba9e7fc88a2c67498a1253ff80e Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 15 Mar 2022 11:48:59 -0700 Subject: [PATCH 115/137] Turn on mypy plugins for django-stubs and djangorestframework-stubs --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e1d7a2816..3ac1c345a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,8 +36,8 @@ profile = "black" strict = true show_error_codes = true plugins = [ -# "mypy_django_plugin.main", -# "mypy_drf_plugin.main", + "mypy_django_plugin.main", + "mypy_drf_plugin.main", ] # Add Python modules to be ignored by mypy here From 1c6c5c560db1cfdcddd21e9f70d0525093103ae4 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 15 Mar 2022 11:49:57 -0700 Subject: [PATCH 116/137] Reorder mypy plugin settings --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3ac1c345a..3ec28e33e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,12 +33,12 @@ known_first_party = [ profile = "black" [tool.mypy] -strict = true -show_error_codes = true plugins = [ "mypy_django_plugin.main", "mypy_drf_plugin.main", ] +strict = true +show_error_codes = true # Add Python modules to be ignored by mypy here [[tool.mypy.overrides]] From 6593c254acd0686b444b0c66bb5ab478db98ae3b Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sun, 1 May 2022 19:03:10 -0700 Subject: [PATCH 117/137] Remove casting in models --- server/covmanager/models.py | 71 +++++------- server/crashmanager/models.py | 187 ++++++++++++++------------------ server/ec2spotmanager/models.py | 156 +++++++++++--------------- server/taskmanager/models.py | 37 +++---- 4 files changed, 195 insertions(+), 256 deletions(-) diff --git a/server/covmanager/models.py b/server/covmanager/models.py index 2884d7658..06a886d6a 100644 --- a/server/covmanager/models.py +++ b/server/covmanager/models.py @@ -3,7 +3,7 @@ import codecs import json from datetime import datetime -from typing import Any, cast +from typing import Any from django.conf import settings from django.contrib.auth.models import User as DjangoUser # noqa @@ -22,9 +22,9 @@ class Repository(models.Model): - classname = str(models.CharField(max_length=255, blank=False)) - name = str(models.CharField(max_length=255, blank=False)) - location = str(models.CharField(max_length=1023, blank=False)) + classname = models.CharField(max_length=255, blank=False) + name = models.CharField(max_length=255, blank=False) + location = models.CharField(max_length=1023, blank=False) def getInstance(self): # Dynamically instantiate the provider as requested @@ -41,24 +41,19 @@ class CollectionFile(models.Model): max_length=255, upload_to="coverage", ) - format = int(str(models.IntegerField(default=0))) + format = models.IntegerField(default=0) class Collection(models.Model): - created = cast(datetime, models.DateTimeField(default=timezone.now)) - description = str(models.CharField(max_length=1023, blank=True)) - repository = cast( - Repository, models.ForeignKey(Repository, on_delete=models.deletion.CASCADE) - ) - revision = str(models.CharField(max_length=255, blank=False)) - branch = str(models.CharField(max_length=255, blank=True)) - tools = cast(QuerySet[Tool], models.ManyToManyField(Tool)) - client = cast(Client, models.ForeignKey(Client, on_delete=models.deletion.CASCADE)) - coverage: CollectionFile | None = cast( - CollectionFile, - models.ForeignKey( - CollectionFile, blank=True, null=True, on_delete=models.deletion.CASCADE - ), + created = models.DateTimeField(default=timezone.now) + description = models.CharField(max_length=1023, blank=True) + repository = models.ForeignKey(Repository, on_delete=models.deletion.CASCADE) + revision = models.CharField(max_length=255, blank=False) + branch = models.CharField(max_length=255, blank=True) + tools = models.ManyToManyField(Tool) + client = models.ForeignKey(Client, on_delete=models.deletion.CASCADE) + coverage: CollectionFile | None = models.ForeignKey( + CollectionFile, blank=True, null=True, on_delete=models.deletion.CASCADE ) def __init__(self, *args: Any, **kwargs: Any) -> None: @@ -212,17 +207,12 @@ def Collection_save( class ReportConfiguration(models.Model): - description = str(models.CharField(max_length=1023, blank=True)) - repository = cast( - Repository, models.ForeignKey(Repository, on_delete=models.deletion.CASCADE) - ) - directives = str(models.TextField()) - public = bool(models.BooleanField(blank=False, default=False)) - logical_parent = cast( - "ReportConfiguration", - models.ForeignKey( - "self", blank=True, null=True, on_delete=models.deletion.CASCADE - ), + description = models.CharField(max_length=1023, blank=True) + repository = models.ForeignKey(Repository, on_delete=models.deletion.CASCADE) + directives = models.TextField() + public = models.BooleanField(blank=False, default=False) + logical_parent = models.ForeignKey( + "self", blank=True, null=True, on_delete=models.deletion.CASCADE ) def apply(self, collection: Collection) -> None: @@ -233,10 +223,8 @@ def apply(self, collection: Collection) -> None: class ReportSummary(models.Model): - collection = cast( - Collection, models.OneToOneField(Collection, on_delete=models.deletion.CASCADE) - ) - cached_result: str | None = str(models.TextField(null=True, blank=True)) + collection = models.OneToOneField(Collection, on_delete=models.deletion.CASCADE) + cached_result: str | None = models.TextField(null=True, blank=True) class Report(models.Model): @@ -245,14 +233,11 @@ class Report(models.Model): # because aggregated collections can be created later, losing the original # creation dates. This date will be used as a reference time frame to # determine week, month, quarter, etc. for displaying purposes. - data_created = cast(datetime, models.DateTimeField(default=timezone.now)) - public = bool(models.BooleanField(blank=False, default=False)) - coverage = cast( - Collection, - models.ForeignKey( - Collection, blank=False, null=False, on_delete=models.deletion.CASCADE - ), + data_created = models.DateTimeField(default=timezone.now) + public = models.BooleanField(blank=False, default=False) + coverage = models.ForeignKey( + Collection, blank=False, null=False, on_delete=models.deletion.CASCADE ) - is_monthly = bool(models.BooleanField(blank=False, default=False)) - is_quarterly = bool(models.BooleanField(blank=False, default=False)) + is_monthly = models.BooleanField(blank=False, default=False) + is_quarterly = models.BooleanField(blank=False, default=False) diff --git a/server/crashmanager/models.py b/server/crashmanager/models.py index 7f4216ff6..8985bbd94 100644 --- a/server/crashmanager/models.py +++ b/server/crashmanager/models.py @@ -5,7 +5,7 @@ import json import logging import re -from typing import Any, TypeVar, cast +from typing import Any, TypeVar from django.conf import settings from django.contrib.auth.base_user import AbstractBaseUser @@ -32,24 +32,24 @@ class Tool(models.Model): - name = str(models.CharField(max_length=63)) + name = models.CharField(max_length=63) def __str__(self) -> str: return self.name class Platform(models.Model): - name = str(models.CharField(max_length=63)) + name = models.CharField(max_length=63) class Product(models.Model): - name = str(models.CharField(max_length=63)) - version = str(models.CharField(max_length=127, blank=True, null=True)) + name = models.CharField(max_length=63) + version = models.CharField(max_length=127, blank=True, null=True) class OS(models.Model): - name = str(models.CharField(max_length=63)) - version = str(models.CharField(max_length=127, blank=True, null=True)) + name = models.CharField(max_length=63) + version = models.CharField(max_length=127, blank=True, null=True) class TestCase(models.Model): @@ -57,9 +57,9 @@ class TestCase(models.Model): storage=FileSystemStorage(location=getattr(settings, "TEST_STORAGE", None)), upload_to="tests", ) - size = int(str(models.IntegerField(default=0))) - quality = int(str(models.IntegerField(default=0))) - isBinary = bool(models.BooleanField(default=False)) + size = models.IntegerField(default=0) + quality = models.IntegerField(default=0) + isBinary = models.BooleanField(default=False) def __init__(self, *args: Any, **kwargs: Any) -> None: # This variable can hold the testcase data temporarily @@ -86,15 +86,15 @@ def storeTestAndSave(self) -> None: class Client(models.Model): - name = str(models.CharField(max_length=255)) + name = models.CharField(max_length=255) class BugProvider(models.Model): - classname = str(models.CharField(max_length=255, blank=False)) - hostname = str(models.CharField(max_length=255, blank=False)) + classname = models.CharField(max_length=255, blank=False) + hostname = models.CharField(max_length=255, blank=False) # This is used to annotate bugs with the URL linking to them - urlTemplate = str(models.CharField(max_length=1023, blank=False)) + urlTemplate = models.CharField(max_length=1023, blank=False) def getInstance(self): # Dynamically instantiate the provider as requested @@ -109,11 +109,9 @@ def __str__(self) -> str: class Bug(models.Model): - externalId = str(models.CharField(max_length=255, blank=True)) - externalType = cast( - BugProvider, models.ForeignKey(BugProvider, on_delete=models.deletion.CASCADE) - ) - closed = cast(datetime, models.DateTimeField(blank=True, null=True)) + externalId = models.CharField(max_length=255, blank=True) + externalType = models.ForeignKey(BugProvider, on_delete=models.deletion.CASCADE) + closed = models.DateTimeField(blank=True, null=True) @property def tools_filter_users(self) -> QuerySet[DjangoUser]: @@ -125,17 +123,14 @@ def tools_filter_users(self) -> QuerySet[DjangoUser]: class Bucket(models.Model): - bug: Bug | None = cast( - Bug, - models.ForeignKey( - Bug, blank=True, null=True, on_delete=models.deletion.CASCADE - ), + bug: Bug | None = models.ForeignKey( + Bug, blank=True, null=True, on_delete=models.deletion.CASCADE ) - signature = str(models.TextField()) - optimizedSignature: str | None = str(models.TextField(blank=True, null=True)) - shortDescription = str(models.CharField(max_length=1023, blank=True)) - frequent = bool(models.BooleanField(blank=False, default=False)) - permanent = bool(models.BooleanField(blank=False, default=False)) + signature = models.TextField() + optimizedSignature: str | None = models.TextField(blank=True, null=True) + shortDescription = models.CharField(max_length=1023, blank=True) + frequent = models.BooleanField(blank=False, default=False) + permanent = models.BooleanField(blank=False, default=False) @property def watchers(self) -> QuerySet[DjangoUser]: @@ -365,10 +360,10 @@ def buckethit_default_range_begin() -> datetime: class BucketHit(models.Model): - bucket = cast(Bucket, models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE)) - tool = cast(Tool, models.ForeignKey(Tool, on_delete=models.deletion.CASCADE)) - begin = cast(datetime, models.DateTimeField(default=buckethit_default_range_begin)) - count = int(str(models.IntegerField(default=0))) + bucket = models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE) + tool = models.ForeignKey(Tool, on_delete=models.deletion.CASCADE) + begin = models.DateTimeField(default=buckethit_default_range_begin) + count = models.IntegerField(default=0) @classmethod def decrement_count(cls, bucket_id: int, tool_id: int, begin: datetime) -> None: @@ -393,39 +388,29 @@ def increment_count(cls, bucket_id: int, tool_id: int, begin: datetime) -> None: class CrashEntry(models.Model): - created = cast(datetime, models.DateTimeField(default=timezone.now)) - tool = cast(Tool, models.ForeignKey(Tool, on_delete=models.deletion.CASCADE)) - platform = cast( - Platform, models.ForeignKey(Platform, on_delete=models.deletion.CASCADE) - ) - product = cast( - Product, models.ForeignKey(Product, on_delete=models.deletion.CASCADE) - ) - os = cast(OS, models.ForeignKey(OS, on_delete=models.deletion.CASCADE)) - testcase = cast( - TestCase, - models.ForeignKey( - TestCase, blank=True, null=True, on_delete=models.deletion.CASCADE - ), + created = models.DateTimeField(default=timezone.now) + tool = models.ForeignKey(Tool, on_delete=models.deletion.CASCADE) + platform = models.ForeignKey(Platform, on_delete=models.deletion.CASCADE) + product = models.ForeignKey(Product, on_delete=models.deletion.CASCADE) + os = models.ForeignKey(OS, on_delete=models.deletion.CASCADE) + testcase = models.ForeignKey( + TestCase, blank=True, null=True, on_delete=models.deletion.CASCADE ) - client = cast(Client, models.ForeignKey(Client, on_delete=models.deletion.CASCADE)) - bucket: Bucket | None = cast( - Bucket, - models.ForeignKey( - Bucket, blank=True, null=True, on_delete=models.deletion.CASCADE - ), + client = models.ForeignKey(Client, on_delete=models.deletion.CASCADE) + bucket: Bucket | None = models.ForeignKey( + Bucket, blank=True, null=True, on_delete=models.deletion.CASCADE ) - rawStdout = str(models.TextField(blank=True)) - rawStderr = str(models.TextField(blank=True)) - rawCrashData = str(models.TextField(blank=True)) - metadata = str(models.TextField(blank=True)) - env = str(models.TextField(blank=True)) - args = str(models.TextField(blank=True)) - crashAddress = str(models.CharField(max_length=255, blank=True)) - crashAddressNumeric = int(str(models.BigIntegerField(blank=True, null=True))) - shortSignature = str(models.CharField(max_length=255, blank=True)) - cachedCrashInfo: str | None = str(models.TextField(blank=True, null=True)) - triagedOnce = bool(models.BooleanField(blank=False, default=False)) + rawStdout = models.TextField(blank=True) + rawStderr = models.TextField(blank=True) + rawCrashData = models.TextField(blank=True) + metadata = models.TextField(blank=True) + env = models.TextField(blank=True) + args = models.TextField(blank=True) + crashAddress = models.CharField(max_length=255, blank=True) + crashAddressNumeric = models.BigIntegerField(blank=True, null=True) + shortSignature = models.CharField(max_length=255, blank=True) + cachedCrashInfo: str | None = models.TextField(blank=True, null=True) + triagedOnce = models.BooleanField(blank=False, default=False) def __init__(self, *args: Any, **kwargs: Any) -> None: # These variables can hold temporarily deserialized data @@ -655,30 +640,30 @@ class BugzillaTemplateMode(Enum): class BugzillaTemplate(models.Model): mode = EnumField(BugzillaTemplateMode, max_length=30) - name = str(models.TextField()) - product = str(models.TextField()) - component = str(models.TextField()) - summary = str(models.TextField(blank=True)) - version = str(models.TextField()) - description = str(models.TextField(blank=True)) - whiteboard = str(models.TextField(blank=True)) - keywords = str(models.TextField(blank=True)) - op_sys = str(models.TextField(blank=True)) - platform = str(models.TextField(blank=True)) - priority = str(models.TextField(blank=True)) - severity = str(models.TextField(blank=True)) - alias = str(models.TextField(blank=True)) - cc = str(models.TextField(blank=True)) - assigned_to = str(models.TextField(blank=True)) - qa_contact = str(models.TextField(blank=True)) - target_milestone = str(models.TextField(blank=True)) - attrs = str(models.TextField(blank=True)) - security = bool(models.BooleanField(blank=False, default=False)) - security_group = str(models.TextField(blank=True)) - comment = str(models.TextField(blank=True)) - testcase_filename = str(models.TextField(blank=True)) - blocks = str(models.TextField(blank=True)) - dependson = str(models.TextField(blank=True)) + name = models.TextField() + product = models.TextField() + component = models.TextField() + summary = models.TextField(blank=True) + version = models.TextField() + description = models.TextField(blank=True) + whiteboard = models.TextField(blank=True) + keywords = models.TextField(blank=True) + op_sys = models.TextField(blank=True) + platform = models.TextField(blank=True) + priority = models.TextField(blank=True) + severity = models.TextField(blank=True) + alias = models.TextField(blank=True) + cc = models.TextField(blank=True) + assigned_to = models.TextField(blank=True) + qa_contact = models.TextField(blank=True) + target_milestone = models.TextField(blank=True) + attrs = models.TextField(blank=True) + security = models.BooleanField(blank=False, default=False) + security_group = models.TextField(blank=True) + comment = models.TextField(blank=True) + testcase_filename = models.TextField(blank=True) + blocks = models.TextField(blank=True) + dependson = models.TextField(blank=True) def __str__(self) -> str: return self.name @@ -693,22 +678,18 @@ class Meta: ("view_taskmanager", "Can see TaskManager app"), ) - user = cast( - DjangoUser, models.OneToOneField(DjangoUser, on_delete=models.deletion.CASCADE) - ) + user = models.OneToOneField(DjangoUser, on_delete=models.deletion.CASCADE) # Explicitly do not store this as a ForeignKey to e.g. BugzillaTemplate # because the bug provider has to decide how to interpret this ID. - defaultTemplateId = int(str(models.IntegerField(default=0))) - defaultProviderId = int(str(models.IntegerField(default=1))) - defaultToolsFilter = cast(QuerySet[Tool], models.ManyToManyField(Tool)) - restricted = bool(models.BooleanField(blank=False, default=False)) - bucketsWatching = cast( - QuerySet[Bucket], models.ManyToManyField(Bucket, through="BucketWatch") - ) + defaultTemplateId = models.IntegerField(default=0) + defaultProviderId = models.IntegerField(default=1) + defaultToolsFilter = models.ManyToManyField(Tool) + restricted = models.BooleanField(blank=False, default=False) + bucketsWatching = models.ManyToManyField(Bucket, through="BucketWatch") # Notifications - inaccessible_bug = bool(models.BooleanField(blank=False, default=False)) - bucket_hit = bool(models.BooleanField(blank=False, default=False)) + inaccessible_bug = models.BooleanField(blank=False, default=False) + bucket_hit = models.BooleanField(blank=False, default=False) @staticmethod def get_or_create_restricted( @@ -740,9 +721,9 @@ def add_default_perms( class BucketWatch(models.Model): - user = cast(User, models.ForeignKey(User, on_delete=models.deletion.CASCADE)) - bucket = cast(Bucket, models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE)) + user = models.ForeignKey(User, on_delete=models.deletion.CASCADE) + bucket = models.ForeignKey(Bucket, on_delete=models.deletion.CASCADE) # This is the primary key of last crash marked viewed by the user # Store as an integer to prevent problems if the particular crash # is deleted later. We only care about its place in the ordering. - lastCrash = int(str(models.IntegerField(default=0))) + lastCrash = models.IntegerField(default=0) diff --git a/server/ec2spotmanager/models.py b/server/ec2spotmanager/models.py index ad57f3a2b..e5cd0e125 100644 --- a/server/ec2spotmanager/models.py +++ b/server/ec2spotmanager/models.py @@ -4,7 +4,7 @@ import os from datetime import datetime from decimal import Decimal -from typing import Any, cast +from typing import Any from django.conf import settings from django.core.files.base import ContentFile @@ -42,61 +42,54 @@ def get_available_name(self, name: str, max_length: int | None = None) -> str: class PoolConfiguration(models.Model): - parent: PoolConfiguration | None = cast( - "PoolConfiguration", - models.ForeignKey( - "self", blank=True, null=True, on_delete=models.deletion.CASCADE - ), + parent: PoolConfiguration | None = models.ForeignKey( + "self", blank=True, null=True, on_delete=models.deletion.CASCADE ) - name = str(models.CharField(max_length=255, blank=False)) - size: int | None = int(str(models.IntegerField(default=1, blank=True, null=True))) - cycle_interval: int | None = int( - str(models.IntegerField(default=86400, blank=True, null=True)) + name = models.CharField(max_length=255, blank=False) + size: int | None = models.IntegerField(default=1, blank=True, null=True) + cycle_interval: int | None = models.IntegerField( + default=86400, blank=True, null=True ) - max_price: Decimal | float | None = cast( - Decimal, - models.DecimalField(max_digits=12, decimal_places=6, blank=True, null=True), + max_price: Decimal | float | None = models.DecimalField( + max_digits=12, decimal_places=6, blank=True, null=True ) - instance_tags = str(models.CharField(max_length=1023, blank=True, null=True)) + instance_tags = models.CharField(max_length=1023, blank=True, null=True) ec2_key_name: str | None = str( models.CharField(max_length=255, blank=True, null=True) ) - ec2_security_groups = str(models.CharField(max_length=255, blank=True, null=True)) - ec2_instance_types = str(models.TextField(blank=True, null=True)) + ec2_security_groups = models.CharField(max_length=255, blank=True, null=True) + ec2_instance_types = models.TextField(blank=True, null=True) ec2_image_name: str | None = str( models.CharField(max_length=255, blank=True, null=True) ) - ec2_userdata_file: UploadedFile | None = cast( - UploadedFile, - models.FileField( - storage=OverwritingStorage( - location=getattr(settings, "USERDATA_STORAGE", None) - ), - upload_to=get_storage_path, - blank=True, - null=True, + ec2_userdata_file: UploadedFile | None = models.FileField( + storage=OverwritingStorage( + location=getattr(settings, "USERDATA_STORAGE", None) ), + upload_to=get_storage_path, + blank=True, + null=True, ) - ec2_userdata_macros = str(models.TextField(blank=True, null=True)) - ec2_allowed_regions = str(models.CharField(max_length=1023, blank=True, null=True)) - ec2_raw_config = str(models.TextField(blank=True, null=True)) - gce_machine_types = str(models.TextField(blank=True, null=True)) + ec2_userdata_macros = models.TextField(blank=True, null=True) + ec2_allowed_regions = models.CharField(max_length=1023, blank=True, null=True) + ec2_raw_config = models.TextField(blank=True, null=True) + gce_machine_types = models.TextField(blank=True, null=True) gce_image_name: str | None = str( models.CharField(max_length=255, blank=True, null=True) ) gce_container_name: str | None = str( models.CharField(max_length=512, blank=True, null=True) ) - gce_docker_privileged = bool(models.BooleanField(default=False)) - gce_disk_size: int | None = int(str(models.IntegerField(blank=True, null=True))) - gce_cmd = str(models.TextField(blank=True, null=True)) - gce_args = str(models.TextField(blank=True, null=True)) - gce_env = str(models.TextField(blank=True, null=True)) + gce_docker_privileged = models.BooleanField(default=False) + gce_disk_size: int | None = models.IntegerField(blank=True, null=True) + gce_cmd = models.TextField(blank=True, null=True) + gce_args = models.TextField(blank=True, null=True) + gce_env = models.TextField(blank=True, null=True) # this is a special case that allows copying ec2_userdata_macros into gce_env during # flatten(). we typically use userdata_macros to be the env vars provided to the # userdata script - gce_env_include_macros = bool(models.BooleanField(default=False)) - gce_raw_config = str(models.TextField(blank=True, null=True)) + gce_env_include_macros = models.BooleanField(default=False) + gce_raw_config = models.TextField(blank=True, null=True) def __init__(self, *args: Any, **kwargs: Any) -> None: # These variables can hold temporarily deserialized data @@ -386,77 +379,60 @@ def deletePoolConfigurationFiles( class InstancePool(models.Model): - config = cast( - PoolConfiguration, - models.ForeignKey(PoolConfiguration, on_delete=models.deletion.CASCADE), - ) - isEnabled = bool(models.BooleanField(default=False)) - last_cycled: datetime | None = cast( - datetime, models.DateTimeField(blank=True, null=True) - ) + config = models.ForeignKey(PoolConfiguration, on_delete=models.deletion.CASCADE) + isEnabled = models.BooleanField(default=False) + last_cycled: datetime | None = models.DateTimeField(blank=True, null=True) class Instance(models.Model): - created = cast(datetime, models.DateTimeField(default=timezone.now)) - pool = cast( - InstancePool, - models.ForeignKey( - InstancePool, blank=True, null=True, on_delete=models.deletion.CASCADE - ), + created = models.DateTimeField(default=timezone.now) + pool = models.ForeignKey( + InstancePool, blank=True, null=True, on_delete=models.deletion.CASCADE ) - hostname = str(models.CharField(max_length=255, blank=True, null=True)) - status_code = int(str(models.IntegerField())) - status_data: str | None = str(models.TextField(blank=True, null=True)) - instance_id = str(models.CharField(max_length=255, blank=True, null=True)) - region = str(models.CharField(max_length=255)) - zone = str(models.CharField(max_length=255)) - size = int(str(models.IntegerField(default=1))) - provider = str(models.CharField(max_length=255)) + hostname = models.CharField(max_length=255, blank=True, null=True) + status_code = models.IntegerField() + status_data: str | None = models.TextField(blank=True, null=True) + instance_id = models.CharField(max_length=255, blank=True, null=True) + region = models.CharField(max_length=255) + zone = models.CharField(max_length=255) + size = models.IntegerField(default=1) + provider = models.CharField(max_length=255) class InstanceStatusEntry(models.Model): - instance = cast( - Instance, models.ForeignKey(Instance, on_delete=models.deletion.CASCADE) - ) - created = cast(datetime, models.DateTimeField(default=timezone.now)) - msg = str(models.CharField(max_length=4095)) - isCritical = bool(models.BooleanField(default=False)) + instance = models.ForeignKey(Instance, on_delete=models.deletion.CASCADE) + created = models.DateTimeField(default=timezone.now) + msg = models.CharField(max_length=4095) + isCritical = models.BooleanField(default=False) class PoolStatusEntry(models.Model): - pool = cast( - InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) - ) - created = cast(datetime, models.DateTimeField(default=timezone.now)) - type = int(str(models.IntegerField())) - msg = str(models.CharField(max_length=4095)) - isCritical = bool(models.BooleanField(default=False)) + pool = models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) + created = models.DateTimeField(default=timezone.now) + type = models.IntegerField() + msg = models.CharField(max_length=4095) + isCritical = models.BooleanField(default=False) class ProviderStatusEntry(models.Model): - provider = str(models.CharField(max_length=255)) - created = cast(datetime, models.DateTimeField(default=timezone.now)) - type = int(str(models.IntegerField())) - msg = str(models.CharField(max_length=4095)) - isCritical = bool(models.BooleanField(default=False)) + provider = models.CharField(max_length=255) + created = models.DateTimeField(default=timezone.now) + type = models.IntegerField() + msg = models.CharField(max_length=4095) + isCritical = models.BooleanField(default=False) class PoolUptimeDetailedEntry(models.Model): - pool = cast( - InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) - ) - created = cast(datetime, models.DateTimeField(default=timezone.now)) - target = int(str(models.IntegerField())) - actual = int(str(models.IntegerField())) + pool = models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) + created = models.DateTimeField(default=timezone.now) + target = models.IntegerField() + actual = models.IntegerField() class PoolUptimeAccumulatedEntry(models.Model): - pool = cast( - InstancePool, models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) - ) - created = cast(datetime, models.DateTimeField(default=timezone.now)) - accumulated_count = int(str(models.IntegerField(default=0))) - uptime_percentage = cast( - Decimal, - models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True), + pool = models.ForeignKey(InstancePool, on_delete=models.deletion.CASCADE) + created = models.DateTimeField(default=timezone.now) + accumulated_count = models.IntegerField(default=0) + uptime_percentage = models.DecimalField( + max_digits=5, decimal_places=2, blank=True, null=True ) diff --git a/server/taskmanager/models.py b/server/taskmanager/models.py index b964bebe3..250f249eb 100644 --- a/server/taskmanager/models.py +++ b/server/taskmanager/models.py @@ -1,34 +1,31 @@ from __future__ import annotations from datetime import datetime, timedelta -from typing import cast from django.db import models class Pool(models.Model): - pool_id = str(models.CharField(max_length=255)) # filename in fuzzing-tc-config - pool_name = str(models.CharField(max_length=255)) # friendly name - platform = str(models.CharField(max_length=15)) - size = int(str(models.PositiveIntegerField(null=True))) - cpu = str(models.CharField(max_length=15, null=True)) - cycle_time = cast(timedelta, models.DurationField(null=True)) - max_run_time = cast(timedelta, models.DurationField(null=True)) + pool_id = models.CharField(max_length=255) # filename in fuzzing-tc-config + pool_name = models.CharField(max_length=255) # friendly name + platform = models.CharField(max_length=15) + size = models.PositiveIntegerField(null=True) + cpu = models.CharField(max_length=15, null=True) + cycle_time = models.DurationField(null=True) + max_run_time = models.DurationField(null=True) class Task(models.Model): - pool = cast( - Pool, models.ForeignKey(Pool, on_delete=models.deletion.CASCADE, null=True) - ) - task_id = str(models.CharField(max_length=64)) - decision_id = str(models.CharField(max_length=64, null=True)) - run_id = int(str(models.PositiveIntegerField())) - state = str(models.CharField(max_length=15)) - created = cast(datetime, models.DateTimeField(null=True)) - status_data = str(models.CharField(max_length=4095, blank=True)) - started = cast(datetime, models.DateTimeField(null=True)) - resolved = cast(datetime, models.DateTimeField(null=True)) - expires = cast(datetime, models.DateTimeField()) + pool = models.ForeignKey(Pool, on_delete=models.deletion.CASCADE, null=True) + task_id = models.CharField(max_length=64) + decision_id = models.CharField(max_length=64, null=True) + run_id = models.PositiveIntegerField() + state = models.CharField(max_length=15) + created = models.DateTimeField(null=True) + status_data = models.CharField(max_length=4095, blank=True) + started = models.DateTimeField(null=True) + resolved = models.DateTimeField(null=True) + expires = models.DateTimeField() class Meta: unique_together = (("task_id", "run_id"),) From e33481877a93144b076492a455128d151bcf4e89 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 18 Oct 2022 15:21:09 -0700 Subject: [PATCH 118/137] Replace ::set-output with new syntax --- .github/workflows/mypytmp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 0b5e785b1..74c8e0ee5 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -33,7 +33,7 @@ jobs: - name: Get pip cache dir id: pip-cache run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache uses: actions/cache@v2 with: From dffdfa0c46198d0d94688cd2480634878918ab22 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Tue, 18 Oct 2022 15:21:10 -0700 Subject: [PATCH 119/137] Update GitHub Actions actions to newer versions since Node.js 12 is getting deprecated --- .github/workflows/mypytmp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mypytmp.yml b/.github/workflows/mypytmp.yml index 74c8e0ee5..d16f174fc 100644 --- a/.github/workflows/mypytmp.yml +++ b/.github/workflows/mypytmp.yml @@ -16,14 +16,14 @@ jobs: python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} # pip cache dependencies to save time - - uses: actions/cache@v2 + - uses: actions/cache@v3 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip @@ -35,7 +35,7 @@ jobs: run: | echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} From 55f8b44f0ab1f5e64a25ffb84a7a5babc6c6d946 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 20:08:36 -0800 Subject: [PATCH 120/137] Restrict tox to 3.x series as the later ones require packaging>=22 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 707dc6bde..169886edb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,7 +37,7 @@ python_requires = >=3.7 [options.extras_require] dev = pre-commit - tox + tox~=3.28.0 server = boto3 celery~=4.4.0 From bcea23303bc0a13ec7b0f3716bfe678728371856 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 20:11:44 -0800 Subject: [PATCH 121/137] Bump mypy and related packages that are run under tox --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index f36abaf02..08a31ee4a 100644 --- a/tox.ini +++ b/tox.ini @@ -50,9 +50,9 @@ commands = mypy --install-types --non-interactive {posargs} setenv = PYTHONPATH = {toxinidir}/server deps = - mypy==0.931 - django-stubs>=1.9.0 - djangorestframework-stubs>=1.4.0 + mypy==0.991 + django-stubs>=1.14.0 + djangorestframework-stubs>=1.8.0 usedevelop = true [testenv:pypi] From c858db3c3fa7e800ee1b18212087205804d42307 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 20:47:03 -0800 Subject: [PATCH 122/137] Turn on --explicit-package-bases for mypy --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 08a31ee4a..cff041083 100644 --- a/tox.ini +++ b/tox.ini @@ -47,7 +47,7 @@ commands = [testenv:mypy] commands = - mypy --install-types --non-interactive {posargs} + mypy --explicit-package-bases --install-types --non-interactive {posargs} setenv = PYTHONPATH = {toxinidir}/server deps = mypy==0.991 From 51eceb89938fc299b7d6c72884d0b508c174fd01 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 20:47:29 -0800 Subject: [PATCH 123/137] Install more typestubs packages that did not get installed automatically --- tox.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tox.ini b/tox.ini index cff041083..039d2d418 100644 --- a/tox.ini +++ b/tox.ini @@ -50,6 +50,9 @@ commands = mypy --explicit-package-bases --install-types --non-interactive {posargs} setenv = PYTHONPATH = {toxinidir}/server deps = + boto3-stubs>=1.26.64 + celery-types>=0.14.0 + ffpuppet~=0.9.2 mypy==0.991 django-stubs>=1.14.0 djangorestframework-stubs>=1.8.0 From c8b919e53cd85f9ef1c197ebfea9f5aec622ad3a Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 20:47:58 -0800 Subject: [PATCH 124/137] Remove apps from settings.py, via tox settings, to try and make mypy work --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index 039d2d418..e1b7c396f 100644 --- a/tox.ini +++ b/tox.ini @@ -46,7 +46,12 @@ commands = codecov [testenv:mypy] +whitelist_externals = sed commands = + sed -i 's/ "ec2spotmanager",/ # "ec2spotmanager",/' server/server/settings.py + sed -i 's/ "crashmanager",/ # "crashmanager",/' server/server/settings.py + sed -i 's/ "taskmanager",/ # "taskmanager",/' server/server/settings.py + sed -i 's/ "covmanager",/ # "covmanager",/' server/server/settings.py mypy --explicit-package-bases --install-types --non-interactive {posargs} setenv = PYTHONPATH = {toxinidir}/server deps = From 7b9dbfd26131048564a2016c1abe077e16a28520 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 21:10:30 -0800 Subject: [PATCH 125/137] Ignore more package not found mypy errors, mostly around the ones in FuzzManager --- pyproject.toml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 3ec28e33e..ad873c915 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,10 +43,23 @@ show_error_codes = true # Add Python modules to be ignored by mypy here [[tool.mypy.overrides]] module = [ + "celeryconf", "chartjs.colors", # Package: django-chartjs "chartjs.views.base", # Package: django-chartjs + "covmanager.SourceCodeProvider.GITSourceCodeProvider", + "covmanager.SourceCodeProvider.HGSourceCodeProvider", + "covmanager.SourceCodeProvider.SourceCodeProvider", + "covmanager.models", + "crashmanager", + "crashmanager.models", "crispy_forms.helper", # Package: django-crispy-forms "crispy_forms.layout", # Package: django-crispy-forms + "ec2spotmanager", + "ec2spotmanager.CloudProvider.CloudProvider", + "ec2spotmanager.cron", + "ec2spotmanager.models", + "ec2spotmanager.tasks", + "ec2spotmanager.tests", "enumfields", # Package: django-enumfields "enumfields.fields", # Package: django-enumfields "fasteners", # Package: fasteners @@ -59,8 +72,14 @@ module = [ "notifications", # Package: django-notifications-hq "notifications.models", # Package: django-notifications-hq "notifications.signals", # Package: django-notifications-hq + "server.auth", "server.covmanager.models", # Located here in server/covmanager/models.py + "server.utils", + "server.views", "taskcluster", # Package: taskcluster + "taskmanager.models", + "taskmanager.tasks", + "taskmanager.tests", "S3Manager", # Located here in misc/afl_libfuzzer/S3Manager.py ] ignore_missing_imports = true From bcd3f4f0b2a2c2f3e1f6f4b8fa44fad905055bbf Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 21:11:53 -0800 Subject: [PATCH 126/137] Make mypy runs via tox always pass for now, to avoid having to manually revert server/server/settings.py --- tox.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e1b7c396f..3ea73c29a 100644 --- a/tox.ini +++ b/tox.ini @@ -52,7 +52,11 @@ commands = sed -i 's/ "crashmanager",/ # "crashmanager",/' server/server/settings.py sed -i 's/ "taskmanager",/ # "taskmanager",/' server/server/settings.py sed -i 's/ "covmanager",/ # "covmanager",/' server/server/settings.py - mypy --explicit-package-bases --install-types --non-interactive {posargs} + - mypy --explicit-package-bases --install-types --non-interactive {posargs} + sed -i 's/ # "ec2spotmanager",/ "ec2spotmanager",/' server/server/settings.py + sed -i 's/ # "crashmanager",/ "crashmanager",/' server/server/settings.py + sed -i 's/ # "taskmanager",/ "taskmanager",/' server/server/settings.py + sed -i 's/ # "covmanager",/ "covmanager",/' server/server/settings.py setenv = PYTHONPATH = {toxinidir}/server deps = boto3-stubs>=1.26.64 From 942f4d9d199520cc68d206e44881d327be01b4c6 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 21:17:52 -0800 Subject: [PATCH 127/137] 793 mypy issues left --- FTB/Signatures/tests/test_CrashSignature.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FTB/Signatures/tests/test_CrashSignature.py b/FTB/Signatures/tests/test_CrashSignature.py index 0c4708e08..70b81442f 100644 --- a/FTB/Signatures/tests/test_CrashSignature.py +++ b/FTB/Signatures/tests/test_CrashSignature.py @@ -563,7 +563,7 @@ def test_SignatureMatchAssertionSlashes() -> None: assert windows_sig.matches(bs_windows) -def test_SignatureSanitizerSoftRssLimitHeapProfile(): +def test_SignatureSanitizerSoftRssLimitHeapProfile() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData( [], @@ -578,7 +578,7 @@ def test_SignatureSanitizerSoftRssLimitHeapProfile(): assert isinstance(testSig.symptoms[0], StackFramesSymptom) -def test_SignatureSanitizerHardRssLimitHeapProfile(): +def test_SignatureSanitizerHardRssLimitHeapProfile() -> None: config = ProgramConfiguration("test", "x86-64", "linux") crashInfo = CrashInfo.fromRawCrashData( [], From 6a6d12e3c5f6f02748a9f059cf8a0145f3b11c4f Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Fri, 3 Feb 2023 21:20:17 -0800 Subject: [PATCH 128/137] 791 mypy issues left --- FTB/Signatures/tests/test_CrashInfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FTB/Signatures/tests/test_CrashInfo.py b/FTB/Signatures/tests/test_CrashInfo.py index bfe3cc535..382f781f9 100644 --- a/FTB/Signatures/tests/test_CrashInfo.py +++ b/FTB/Signatures/tests/test_CrashInfo.py @@ -2936,7 +2936,7 @@ def test_ValgrindLeakParser() -> None: assert crashInfo.crashAddress is None -def test_SanitizerSoftRssLimitHeapProfile(): +def test_SanitizerSoftRssLimitHeapProfile() -> None: """test that heap profile given after soft rss limit is exceeded is used in place of the (useless) SEGV stack""" config = ProgramConfiguration("test", "x86-64", "linux") @@ -2958,7 +2958,7 @@ def test_SanitizerSoftRssLimitHeapProfile(): assert crashInfo.crashAddress == 40 -def test_SanitizerHardRssLimitHeapProfile(): +def test_SanitizerHardRssLimitHeapProfile() -> None: """test that heap profile given after hard rss limit is exceeded is used in place of the (useless) SEGV stack""" config = ProgramConfiguration("test", "x86-64", "linux") From c3545cc160ad3071d7165dc3c9f8c2664c9b0aa0 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 4 Feb 2023 00:19:29 -0800 Subject: [PATCH 129/137] Revert server/server/settings.py no matter whether mypy finds issues or not --- tox.ini | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/tox.ini b/tox.ini index 3ea73c29a..858ecc3a2 100644 --- a/tox.ini +++ b/tox.ini @@ -48,15 +48,26 @@ commands = [testenv:mypy] whitelist_externals = sed commands = - sed -i 's/ "ec2spotmanager",/ # "ec2spotmanager",/' server/server/settings.py - sed -i 's/ "crashmanager",/ # "crashmanager",/' server/server/settings.py - sed -i 's/ "taskmanager",/ # "taskmanager",/' server/server/settings.py - sed -i 's/ "covmanager",/ # "covmanager",/' server/server/settings.py - - mypy --explicit-package-bases --install-types --non-interactive {posargs} - sed -i 's/ # "ec2spotmanager",/ "ec2spotmanager",/' server/server/settings.py - sed -i 's/ # "crashmanager",/ "crashmanager",/' server/server/settings.py - sed -i 's/ # "taskmanager",/ "taskmanager",/' server/server/settings.py - sed -i 's/ # "covmanager",/ "covmanager",/' server/server/settings.py + sed -i -e 's/ "ec2spotmanager",/ # "ec2spotmanager",/' \ + -e 's/ "crashmanager",/ # "crashmanager",/' \ + -e 's/ "taskmanager",/ # "taskmanager",/' \ + -e 's/ "covmanager",/ # "covmanager",/' server/server/settings.py + # Ensure server/settings.py has its changes above reverted in the event of failure + python -c 'import argparse,subprocess,sys ; \ + parser = argparse.ArgumentParser() ; \ + parser.add_argument("-p", "--posargs"); \ + p_mypy = subprocess.run(["mypy", \ + "--explicit-package-bases", "--install-types", "--non-interactive", \ + parser.parse_args().posargs, \ + ]); \ + subprocess.run(["sed", "-i", \ + ("s/ # \\\"ec2spotmanager\\\",/ \\\"ec2spotmanager\\\",/;" \ + "s/ # \\\"crashmanager\\\",/ \\\"crashmanager\\\",/;" \ + "s/ # \\\"taskmanager\\\",/ \\\"taskmanager\\\",/;" \ + "s/ # \\\"covmanager\\\",/ \\\"covmanager\\\",/;"), \ + "server/server/settings.py", \ + ]); \ + sys.exit(p_mypy.returncode);' -p {posargs} setenv = PYTHONPATH = {toxinidir}/server deps = boto3-stubs>=1.26.64 From fad54f5305b2918acfeec699e71035337cde86e5 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 4 Feb 2023 01:50:03 -0800 Subject: [PATCH 130/137] Reorder mypy tox run dependencies and add typing-extensions --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 858ecc3a2..81779b857 100644 --- a/tox.ini +++ b/tox.ini @@ -72,10 +72,11 @@ setenv = PYTHONPATH = {toxinidir}/server deps = boto3-stubs>=1.26.64 celery-types>=0.14.0 - ffpuppet~=0.9.2 - mypy==0.991 django-stubs>=1.14.0 djangorestframework-stubs>=1.8.0 + ffpuppet~=0.9.2 + mypy==0.991 + typing-extensions>=4.4.0 usedevelop = true [testenv:pypi] From 99c0ffe6a07cd0164cbeea1a5ffd4ff94471faf9 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 4 Feb 2023 01:50:35 -0800 Subject: [PATCH 131/137] 784 mypy issues left --- .../CloudProvider/CloudProvider.py | 4 ++-- .../CloudProvider/EC2SpotCloudProvider.py | 18 ++++++++++-------- server/ec2spotmanager/tests/conftest.py | 3 +-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index 4223c4c83..5c92e459c 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -113,7 +113,7 @@ def start_instances( instance_type: str, count: int, tags: dict[str, str], - ) -> None: + ) -> dict[str, Any]: """ Start instances using specified configuration. @@ -184,7 +184,7 @@ def get_image(self, region: str, config: PoolConfiguration) -> str | None: @staticmethod @abstractmethod - def get_cores_per_instance() -> dict[str, float]: + def get_cores_per_instance() -> dict[str, int]: """ returns dictionary of instance types and their number of cores diff --git a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py index 5eee12a4e..dfdbe549a 100644 --- a/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/EC2SpotCloudProvider.py @@ -3,7 +3,7 @@ import datetime import logging import re -from typing import cast +from typing import Any, cast import boto3 import boto.ec2 @@ -45,7 +45,7 @@ def _connect(self, region: str) -> EC2Manager: return self.cluster @wrap_provider_errors - def terminate_instances(self, instances_ids_by_region) -> None: + def terminate_instances(self, instances_ids_by_region: dict[str, Any]) -> None: for region, instance_ids in instances_ids_by_region.items(): cluster = self._connect(region) self.logger.info( @@ -75,7 +75,7 @@ def terminate_instances(self, instances_ids_by_region) -> None: cluster.terminate(boto_instances) @wrap_provider_errors - def cancel_requests(self, requested_instances_by_region) -> None: + def cancel_requests(self, requested_instances_by_region: dict[str, Any]) -> None: for region, instance_ids in requested_instances_by_region.items(): cluster = self._connect(region) cluster.cancel_spot_requests(instance_ids) @@ -93,9 +93,9 @@ def start_instances( userdata, image: str, instance_type: str, - count, + count: str, _tags: str, - ): + ) -> dict[str, Any]: images: dict[str, dict[str, str]] = self._create_laniakea_images(config) self.logger.info( @@ -265,7 +265,7 @@ def check_instances_requests(self, region, instances, tags): @wrap_provider_errors def check_instances_state(self, pool_id: int | None, region: str): - instance_states = {} + instance_states: dict[str, Any] = {} cluster = self._connect(region) try: @@ -341,9 +341,11 @@ def config_supported(config) -> bool: return all(config.get(key) for key in fields) @wrap_provider_errors - def get_prices_per_region(self, region_name: str, instance_types=None): + def get_prices_per_region( + self, region_name: str, instance_types: str | None = None + ) -> dict[str, Any]: """Gets spot prices of the specified region and instance type""" - prices = {} # {instance-type: region: {az: [prices]}}} + prices: dict[str, Any] = {} # {instance-type: region: {az: [prices]}}} zone_blacklist = ["us-east-1a", "us-east-1f"] now = timezone.now() diff --git a/server/ec2spotmanager/tests/conftest.py b/server/ec2spotmanager/tests/conftest.py index 36eb190b5..ab17fc04c 100644 --- a/server/ec2spotmanager/tests/conftest.py +++ b/server/ec2spotmanager/tests/conftest.py @@ -14,7 +14,6 @@ import functools import sys -from typing import cast from unittest.mock import Mock import pytest @@ -35,7 +34,7 @@ def _create_user( password: str = "test", has_permission: bool = True, ) -> User: - user = cast(User, User.objects.create_user(username, email, password)) + user = User.objects.create_user(username, email, password) user.user_permissions.clear() if has_permission: content_type = ContentType.objects.get_for_model(cmUser) From 68164ce77f9ba03da2639f7a1dc468192249f1b9 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 4 Feb 2023 16:03:27 -0800 Subject: [PATCH 132/137] Cast response.url to be of the type "str | None" --- server/covmanager/tests/test_collections.py | 26 +++++++++++--- server/covmanager/tests/test_covmanager.py | 5 ++- server/covmanager/tests/test_repositories.py | 6 +++- server/crashmanager/tests/test_bugs.py | 36 +++++++++++++++---- server/crashmanager/tests/test_crashes.py | 6 +++- .../crashmanager/tests/test_crashmanager.py | 15 ++++++-- server/crashmanager/tests/test_signatures.py | 30 ++++++++++++---- server/crashmanager/tests/test_stats.py | 6 +++- .../crashmanager/tests/test_user_settings.py | 11 ++++-- server/ec2spotmanager/tests/test_configs.py | 16 ++++++--- .../tests/test_ec2spotmanager.py | 10 ++++-- server/ec2spotmanager/tests/test_pools.py | 6 +++- server/taskmanager/tests/test_taskmanager.py | 11 ++++-- 13 files changed, 146 insertions(+), 38 deletions(-) diff --git a/server/covmanager/tests/test_collections.py b/server/covmanager/tests/test_collections.py index ffa412efd..1fa633e7e 100644 --- a/server/covmanager/tests/test_collections.py +++ b/server/covmanager/tests/test_collections.py @@ -15,6 +15,7 @@ import logging import os import re +import typing import pytest import requests @@ -41,7 +42,10 @@ def test_collections_no_login(name: str, client: Client) -> None: path = reverse(name) response = client.get(path, follow=False) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) @pytest.mark.parametrize( @@ -66,7 +70,10 @@ def test_collections_diff_no_login(client: Client) -> None: path = reverse("covmanager:collections_diff_api", kwargs={"path": ""}) response = client.get(path, follow=False) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) def test_collections_diff_simple_get(client: Client, cm: _result) -> None: @@ -91,7 +98,10 @@ def test_collections_patch_no_login(client: Client) -> None: ) response = client.get(path, follow=False) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) def test_collections_patch_simple_get(client: Client, cm: _result) -> None: @@ -136,7 +146,10 @@ def test_collections_browse_no_login(client: Client) -> None: path = reverse("covmanager:collections_browse", kwargs={"collectionid": 0}) response = client.get(path, follow=False) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) def test_collections_browse_simple_get(client: Client) -> None: @@ -156,7 +169,10 @@ def test_collections_browse_api_no_login(client: Client) -> None: ) response = client.get(path, follow=False) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) def test_collections_browse_api_simple_get(client: Client, cm: _result) -> None: diff --git a/server/covmanager/tests/test_covmanager.py b/server/covmanager/tests/test_covmanager.py index 4035ada76..817eeaf0e 100644 --- a/server/covmanager/tests/test_covmanager.py +++ b/server/covmanager/tests/test_covmanager.py @@ -12,6 +12,7 @@ from __future__ import annotations import logging +import typing import pytest import requests @@ -27,7 +28,9 @@ def test_covmanager_index(client: Client) -> None: client.login(username="test", password="test") resp = client.get(reverse("covmanager:index")) assert resp.status_code == requests.codes["found"] - assert resp.url == reverse("covmanager:collections") + assert typing.cast(typing.Union[str, None], getattr(resp, "url", None)) == reverse( + "covmanager:collections" + ) def test_covmanager_noperm(client: Client) -> None: diff --git a/server/covmanager/tests/test_repositories.py b/server/covmanager/tests/test_repositories.py index cf46bfc75..822a81c3e 100644 --- a/server/covmanager/tests/test_repositories.py +++ b/server/covmanager/tests/test_repositories.py @@ -13,6 +13,7 @@ import json import logging +import typing import pytest import requests @@ -33,7 +34,10 @@ def test_repositories_no_login(name: str, client: Client) -> None: path = reverse(name) response = client.get(path, follow=False) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) def test_repositories_view_simpleget(client: Client) -> None: diff --git a/server/crashmanager/tests/test_bugs.py b/server/crashmanager/tests/test_bugs.py index 2d25883a5..50c98ccf6 100644 --- a/server/crashmanager/tests/test_bugs.py +++ b/server/crashmanager/tests/test_bugs.py @@ -12,6 +12,7 @@ from __future__ import annotations import logging +import typing import pytest import requests @@ -45,7 +46,10 @@ def test_bug_providers_no_login( path = reverse(name, kwargs=kwargs) resp = client.get(path) assert resp.status_code == requests.codes["found"] - assert resp.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(resp, "url", None)) + == "/login/?next=" + path + ) @pytest.mark.parametrize( @@ -66,7 +70,10 @@ def test_bugzilla_templates_no_login( path = reverse(name, kwargs=kwargs) resp = client.get(path) assert resp.status_code == requests.codes["found"] - assert resp.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(resp, "url", None)) + == "/login/?next=" + path + ) @pytest.mark.parametrize( @@ -157,7 +164,10 @@ def test_template_edit(client: Client, cm: _cm_result) -> None: LOG.debug(response) # Redirecting to template list when the action is successful assert response.status_code == requests.codes["found"] - assert response.url == "/crashmanager/bugzilla/templates/" + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/crashmanager/bugzilla/templates/" + ) assert len(BugzillaTemplate.objects.all()) == 1 template = BugzillaTemplate.objects.get() assert template.mode.value == "bug" @@ -178,7 +188,10 @@ def test_template_dup(client: Client, cm: _cm_result) -> None: LOG.debug(response) # Redirecting to template list when the action is successful assert response.status_code == requests.codes["found"] - assert response.url == "/crashmanager/bugzilla/templates/" + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/crashmanager/bugzilla/templates/" + ) assert len(BugzillaTemplate.objects.all()) == 2 template = BugzillaTemplate.objects.get(pk=pk) clone = BugzillaTemplate.objects.get(pk=pk + 1) @@ -221,7 +234,10 @@ def test_template_del(client: Client, cm: _cm_result) -> None: LOG.debug(response) # Redirecting to template list when the action is successful assert response.status_code == requests.codes["found"] - assert response.url == "/crashmanager/bugzilla/templates/" + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/crashmanager/bugzilla/templates/" + ) assert len(BugzillaTemplate.objects.all()) == 0 @@ -241,7 +257,10 @@ def test_template_create_bug_post(client: Client, cm: _cm_result) -> None: LOG.debug(response) # Redirecting to template list when the action is successful assert response.status_code == requests.codes["found"] - assert response.url == "/crashmanager/bugzilla/templates/" + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/crashmanager/bugzilla/templates/" + ) assert len(BugzillaTemplate.objects.all()) == 1 template = BugzillaTemplate.objects.get() assert template.mode.value == "bug" @@ -262,7 +281,10 @@ def test_template_create_comment_post(client: Client, cm: _cm_result) -> None: LOG.debug(response) # Redirecting to template list when the action is successful assert response.status_code == requests.codes["found"] - assert response.url == "/crashmanager/bugzilla/templates/" + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/crashmanager/bugzilla/templates/" + ) assert len(BugzillaTemplate.objects.all()) == 1 template = BugzillaTemplate.objects.get() assert template.mode.value == "comment" diff --git a/server/crashmanager/tests/test_crashes.py b/server/crashmanager/tests/test_crashes.py index 2f6f0d699..8c0c73b92 100644 --- a/server/crashmanager/tests/test_crashes.py +++ b/server/crashmanager/tests/test_crashes.py @@ -12,6 +12,7 @@ from __future__ import annotations import logging +import typing import pytest import requests @@ -51,7 +52,10 @@ def test_crashes_no_login(client: Client, name: str, kwargs: dict[str, int]) -> path = reverse(name, kwargs=kwargs) resp = client.get(path) assert resp.status_code == requests.codes["found"] - assert resp.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(resp, "url", None)) + == "/login/?next=" + path + ) @pytest.mark.parametrize( diff --git a/server/crashmanager/tests/test_crashmanager.py b/server/crashmanager/tests/test_crashmanager.py index 49ce37119..259538964 100644 --- a/server/crashmanager/tests/test_crashmanager.py +++ b/server/crashmanager/tests/test_crashmanager.py @@ -12,6 +12,7 @@ from __future__ import annotations import logging +import typing import pytest import requests @@ -28,7 +29,10 @@ def test_crashmanager_redirect(client: Client) -> None: """Request without login hits the login redirect""" resp = client.get("/") assert resp.status_code == requests.codes["found"] - assert resp.url == "/login/?next=/" + assert ( + typing.cast(typing.Union[str, None], getattr(resp, "url", None)) + == "/login/?next=/" + ) def test_crashmanager_no_login(client: Client) -> None: @@ -36,7 +40,9 @@ def test_crashmanager_no_login(client: Client) -> None: client.login(username="test", password="test") resp = client.get("/") assert resp.status_code == requests.codes["found"] - assert resp.url == reverse("crashmanager:index") + assert typing.cast(typing.Union[str, None], getattr(resp, "url", None)) == reverse( + "crashmanager:index" + ) def test_crashmanager_logout(client: Client) -> None: @@ -50,7 +56,10 @@ def test_crashmanager_logout(client: Client) -> None: response = client.get("/") LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=/" + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=/" + ) def test_crashmanager_noperm(client: Client) -> None: diff --git a/server/crashmanager/tests/test_signatures.py b/server/crashmanager/tests/test_signatures.py index 4368ce94a..6594ef0b9 100644 --- a/server/crashmanager/tests/test_signatures.py +++ b/server/crashmanager/tests/test_signatures.py @@ -14,6 +14,7 @@ import json import logging +import typing import pytest import requests @@ -47,7 +48,10 @@ def test_signatures_no_login(client: Client, name: str, kwargs: dict[str, int]) path = reverse(name, kwargs=kwargs) resp = client.get(path) assert resp.status_code == requests.codes["found"] - assert resp.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(resp, "url", None)) + == "/login/?next=" + path + ) def test_signatures_view(client: Client) -> None: # pylint: disable=invalid-name @@ -219,7 +223,9 @@ def test_del_signature_empty( response = client.post(reverse("crashmanager:sigdel", kwargs={"sigid": bucket.pk})) LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == reverse("crashmanager:signatures") + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("crashmanager:signatures") assert not Bucket.objects.count() @@ -233,7 +239,9 @@ def test_del_signature_leave_entries( response = client.post(reverse("crashmanager:sigdel", kwargs={"sigid": bucket.pk})) LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == reverse("crashmanager:signatures") + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("crashmanager:signatures") assert not Bucket.objects.count() crash = CrashEntry.objects.get(pk=crash.pk) # re-read assert crash.bucket is None @@ -251,7 +259,9 @@ def test_del_signature_del_entries( ) LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == reverse("crashmanager:signatures") + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("crashmanager:signatures") assert not Bucket.objects.count() assert not CrashEntry.objects.count() @@ -336,7 +346,9 @@ def test_watch_signature_del( assert not BucketWatch.objects.count() assert Bucket.objects.get() == bucket assert response.status_code == requests.codes["found"] - assert response.url == reverse("crashmanager:sigwatch") + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("crashmanager:sigwatch") def test_watch_signature_delsig( @@ -365,7 +377,9 @@ def test_watch_signature_update( ) LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == reverse("crashmanager:sigwatch") + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("crashmanager:sigwatch") watch = BucketWatch.objects.get(pk=watch.pk) assert watch.bucket == bucket assert watch.lastCrash == crash2.pk @@ -384,7 +398,9 @@ def test_watch_signature_new( ) LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == reverse("crashmanager:sigwatch") + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("crashmanager:sigwatch") watch = BucketWatch.objects.get() assert watch.bucket == bucket assert watch.lastCrash == crash.pk diff --git a/server/crashmanager/tests/test_stats.py b/server/crashmanager/tests/test_stats.py index 8d5426c22..df539ffe6 100644 --- a/server/crashmanager/tests/test_stats.py +++ b/server/crashmanager/tests/test_stats.py @@ -13,6 +13,7 @@ import datetime import logging +import typing import pytest import requests @@ -35,7 +36,10 @@ def test_stats_view_no_login(client: Client) -> None: path = reverse(VIEW_NAME) resp = client.get(path) assert resp.status_code == requests.codes["found"] - assert resp.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(resp, "url", None)) + == "/login/?next=" + path + ) def test_stats_view_no_crashes(client: Client) -> None: diff --git a/server/crashmanager/tests/test_user_settings.py b/server/crashmanager/tests/test_user_settings.py index e2b0cdeb8..cf1c9023c 100644 --- a/server/crashmanager/tests/test_user_settings.py +++ b/server/crashmanager/tests/test_user_settings.py @@ -12,6 +12,7 @@ from __future__ import annotations import logging +import typing import pytest import requests @@ -31,7 +32,10 @@ def test_user_settings_no_login(client: Client) -> None: path = reverse("crashmanager:usersettings") resp = client.get(path) assert resp.status_code == requests.codes["found"] - assert resp.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(resp, "url", None)) + == "/login/?next=" + path + ) def test_user_settings_simple_get(client: Client) -> None: @@ -75,7 +79,10 @@ def test_user_settings_edit(client: Client, cm: _cm_result) -> None: LOG.debug(response) # Redirecting to user settings when the action is successful assert response.status_code == requests.codes["found"] - assert response.url == "/crashmanager/usersettings/" + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/crashmanager/usersettings/" + ) user.refresh_from_db() assert Tool.objects.count() == 2 assert list(user.defaultToolsFilter.all()) == list(Tool.objects.all()) diff --git a/server/ec2spotmanager/tests/test_configs.py b/server/ec2spotmanager/tests/test_configs.py index 913b4c534..a7d0cbf5e 100644 --- a/server/ec2spotmanager/tests/test_configs.py +++ b/server/ec2spotmanager/tests/test_configs.py @@ -15,6 +15,7 @@ import decimal import json import logging +import typing import pytest import requests @@ -45,7 +46,10 @@ def test_configs_no_login(client: Client, name: str, kwargs: dict[str, object]) response = client.get(path) LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) def test_configs_view_no_configs(client: Client) -> None: @@ -184,9 +188,9 @@ def test_create_config_view_create(client: Client) -> None: assert cfg.gce_disk_size == 12 assert json.loads(cfg.gce_env) == {"tag1": "value1", "tag2": "value2"} assert response.status_code == requests.codes["found"] - assert response.url == reverse( - "ec2spotmanager:configview", kwargs={"configid": cfg.pk} - ) + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("ec2spotmanager:configview", kwargs={"configid": cfg.pk}) assert json.loads(cfg.gce_cmd) == ["cat"] assert json.loads(cfg.gce_args) == ["foo", "bar"] assert json.loads(cfg.gce_raw_config) == {"tag3": "value3", "tag4": "value4"} @@ -315,7 +319,9 @@ def test_del_config_view_delete(client: Client) -> None: ) LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == reverse("ec2spotmanager:configs") + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("ec2spotmanager:configs") assert PoolConfiguration.objects.count() == 0 diff --git a/server/ec2spotmanager/tests/test_ec2spotmanager.py b/server/ec2spotmanager/tests/test_ec2spotmanager.py index 8f035c1b2..2a470a692 100644 --- a/server/ec2spotmanager/tests/test_ec2spotmanager.py +++ b/server/ec2spotmanager/tests/test_ec2spotmanager.py @@ -13,6 +13,7 @@ from __future__ import annotations import logging +import typing import pytest import requests @@ -29,7 +30,9 @@ def test_ec2spotmanager_index(client: Client) -> None: response = client.get(reverse("ec2spotmanager:index")) LOG.debug(response) assert response.status_code == requests.codes["found"] - assert response.url == reverse("ec2spotmanager:pools") + assert typing.cast( + typing.Union[str, None], getattr(response, "url", None) + ) == reverse("ec2spotmanager:pools") def test_ec2spotmanager_logout(client: Client) -> None: @@ -41,7 +44,10 @@ def test_ec2spotmanager_logout(client: Client) -> None: LOG.debug(response) response = client.get(index) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + index + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + index + ) def test_ec2spotmanager_noperm(client: Client) -> None: diff --git a/server/ec2spotmanager/tests/test_pools.py b/server/ec2spotmanager/tests/test_pools.py index b3ef4b756..2f3c40b79 100644 --- a/server/ec2spotmanager/tests/test_pools.py +++ b/server/ec2spotmanager/tests/test_pools.py @@ -13,6 +13,7 @@ from __future__ import annotations import logging +import typing import pytest import requests @@ -47,7 +48,10 @@ def test_pools_no_login(client: Client, name: str, kwargs: dict[str, object]) -> path = reverse(name, kwargs=kwargs) resp = client.get(path) assert resp.status_code == requests.codes["found"] - assert resp.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(resp, "url", None)) + == "/login/?next=" + path + ) def test_pools_view_no_pools(client: Client) -> None: diff --git a/server/taskmanager/tests/test_taskmanager.py b/server/taskmanager/tests/test_taskmanager.py index 38877a8ce..f2c83b890 100644 --- a/server/taskmanager/tests/test_taskmanager.py +++ b/server/taskmanager/tests/test_taskmanager.py @@ -12,6 +12,7 @@ from __future__ import annotations import logging +import typing import pytest import requests @@ -31,7 +32,10 @@ def test_views_no_login(name: str, client: Client) -> None: path = reverse(name) response = client.get(path, follow=False) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) def test_index_simple_get(client: Client) -> None: @@ -56,7 +60,10 @@ def test_detail_view_no_login(client: Client) -> None: path = reverse("taskmanager:pool-view-ui", args=(pool.pk,)) response = client.get(path, follow=False) assert response.status_code == requests.codes["found"] - assert response.url == "/login/?next=" + path + assert ( + typing.cast(typing.Union[str, None], getattr(response, "url", None)) + == "/login/?next=" + path + ) def test_detail_view_simple_get(client: Client, settings: SettingsWrapper) -> None: From 61c95d83b0067d3f903bd62dd5a425d0c9604ae5 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 4 Feb 2023 16:14:52 -0800 Subject: [PATCH 133/137] Cast response to be of the type "HttpResponse" --- server/crashmanager/tests/test_crashes.py | 3 +- server/crashmanager/tests/test_signatures.py | 40 +++++-- server/crashmanager/tests/test_stats.py | 11 +- server/ec2spotmanager/tests/test_configs.py | 109 ++++++++++--------- server/ec2spotmanager/tests/test_pools.py | 7 +- 5 files changed, 96 insertions(+), 74 deletions(-) diff --git a/server/crashmanager/tests/test_crashes.py b/server/crashmanager/tests/test_crashes.py index 8c0c73b92..be6e78265 100644 --- a/server/crashmanager/tests/test_crashes.py +++ b/server/crashmanager/tests/test_crashes.py @@ -16,6 +16,7 @@ import pytest import requests +from django.http.response import HttpResponse from django.test.client import Client from django.urls import reverse @@ -35,7 +36,7 @@ def test_crashes_view(client: Client) -> None: # pylint: disable=invalid-name LOG.debug(response) assert response.status_code == requests.codes["ok"] assert response.context["restricted"] is False - assert_contains(response, "crasheslist") + assert_contains(typing.cast(HttpResponse, response), "crasheslist") @pytest.mark.parametrize( diff --git a/server/crashmanager/tests/test_signatures.py b/server/crashmanager/tests/test_signatures.py index 6594ef0b9..3aa50d8f2 100644 --- a/server/crashmanager/tests/test_signatures.py +++ b/server/crashmanager/tests/test_signatures.py @@ -18,6 +18,7 @@ import pytest import requests +from django.http.response import HttpResponse from django.test.client import Client from django.urls import reverse @@ -60,7 +61,7 @@ def test_signatures_view(client: Client) -> None: # pylint: disable=invalid-nam response = client.get(reverse("crashmanager:signatures")) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "signatureslist") + assert_contains(typing.cast(HttpResponse, response), "signatureslist") def test_del_signature_simple_get( @@ -78,8 +79,13 @@ def test_del_signature_simple_get( response = client.get(reverse("crashmanager:sigdel", kwargs={"sigid": bucket.pk})) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "Are you sure that you want to delete this signature?") - assert_contains(response, "Bucket contains no crash entries.") + assert_contains( + typing.cast(HttpResponse, response), + "Are you sure that you want to delete this signature?", + ) + assert_contains( + typing.cast(HttpResponse, response), "Bucket contains no crash entries." + ) # 1 crash not in toolfilter cm.create_toolfilter(crash1.tool) @@ -88,7 +94,10 @@ def test_del_signature_simple_get( response = client.get(reverse("crashmanager:sigdel", kwargs={"sigid": bucket.pk})) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "Are you sure that you want to delete this signature?") + assert_contains( + typing.cast(HttpResponse, response), + "Are you sure that you want to delete this signature?", + ) assert_contains( response, "Also delete all crash entries with this bucket: 0 in tool filter, " @@ -103,7 +112,10 @@ def test_del_signature_simple_get( response = client.get(reverse("crashmanager:sigdel", kwargs={"sigid": bucket.pk})) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "Are you sure that you want to delete this signature?") + assert_contains( + typing.cast(HttpResponse, response), + "Are you sure that you want to delete this signature?", + ) assert_contains( response, "Also delete all crash entries with this bucket: 1 in tool filter " @@ -116,7 +128,10 @@ def test_del_signature_simple_get( response = client.get(reverse("crashmanager:sigdel", kwargs={"sigid": bucket.pk})) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "Are you sure that you want to delete this signature?") + assert_contains( + typing.cast(HttpResponse, response), + "Are you sure that you want to delete this signature?", + ) assert_contains( response, "Also delete all crash entries with this bucket: 1 in tool filter, " @@ -129,7 +144,10 @@ def test_del_signature_simple_get( response = client.get(reverse("crashmanager:sigdel", kwargs={"sigid": bucket.pk})) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "Are you sure that you want to delete this signature?") + assert_contains( + typing.cast(HttpResponse, response), + "Are you sure that you want to delete this signature?", + ) assert_contains( response, "Also delete all crash entries with this bucket: 1 in tool filter, " @@ -195,7 +213,7 @@ def test_new_signature_view(client: Client) -> None: response = client.get(reverse("crashmanager:signew")) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "createoredit") + assert_contains(typing.cast(HttpResponse, response), "createoredit") def test_edit_signature_view( @@ -210,7 +228,7 @@ def test_edit_signature_view( response = client.get(reverse("crashmanager:sigedit", kwargs={"sigid": bucket.pk})) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "createoredit") + assert_contains(typing.cast(HttpResponse, response), "createoredit") assert response.context["bucketId"] == bucket.pk @@ -338,7 +356,7 @@ def test_watch_signature_del( "Are you sure that you want to stop watching this signature for new crash " "entries?", ) - assert_contains(response, bucket.shortDescription) + assert_contains(typing.cast(HttpResponse, response), bucket.shortDescription) response = client.post( reverse("crashmanager:sigwatchdel", kwargs={"sigid": bucket.pk}) ) @@ -420,4 +438,4 @@ def test_watch_signature_crashes( assert response.status_code == requests.codes["ok"] assert response.context["watchId"] == watch.id assert response.context["restricted"] is False - assert_contains(response, "crasheslist") + assert_contains(typing.cast(HttpResponse, response), "crasheslist") diff --git a/server/crashmanager/tests/test_stats.py b/server/crashmanager/tests/test_stats.py index df539ffe6..08939f0e4 100644 --- a/server/crashmanager/tests/test_stats.py +++ b/server/crashmanager/tests/test_stats.py @@ -17,6 +17,7 @@ import pytest import requests +from django.http.response import HttpResponse from django.test.client import Client from django.urls import reverse @@ -48,7 +49,7 @@ def test_stats_view_no_crashes(client: Client) -> None: response = client.get(reverse(VIEW_NAME)) assert response.status_code == requests.codes["ok"] assert response.context["total_reports_per_hour"] == 0 - assert_contains(response, VIEW_ENTRIES_FMT % 0) + assert_contains(typing.cast(HttpResponse, response), VIEW_ENTRIES_FMT % 0) assert not response.context["frequentBuckets"] @@ -61,7 +62,7 @@ def test_stats_view_with_crash( response = client.get(reverse(VIEW_NAME)) assert response.status_code == requests.codes["ok"] assert response.context["total_reports_per_hour"] == 1 - assert_contains(response, VIEW_ENTRIES_FMT % 1) + assert_contains(typing.cast(HttpResponse, response), VIEW_ENTRIES_FMT % 1) assert not response.context["frequentBuckets"] @@ -79,7 +80,7 @@ def test_stats_view_with_crashes( response = client.get(reverse(VIEW_NAME)) assert response.status_code == requests.codes["ok"] assert response.context["total_reports_per_hour"] == 4 - assert_contains(response, VIEW_ENTRIES_FMT % 4) + assert_contains(typing.cast(HttpResponse, response), VIEW_ENTRIES_FMT % 4) response_buckets = response.context["frequentBuckets"] assert len(response_buckets) == 1 assert response_buckets[0] == bucket @@ -95,12 +96,12 @@ def test_stats_view_old( response = client.get(reverse(VIEW_NAME)) assert response.status_code == requests.codes["ok"] assert response.context["total_reports_per_hour"] == 1 - assert_contains(response, VIEW_ENTRIES_FMT % 1) + assert_contains(typing.cast(HttpResponse, response), VIEW_ENTRIES_FMT % 1) assert not response.context["frequentBuckets"] crash.created -= datetime.timedelta(hours=1, seconds=1) crash.save() response = client.get(reverse(VIEW_NAME)) assert response.status_code == requests.codes["ok"] assert response.context["total_reports_per_hour"] == 0 - assert_contains(response, VIEW_ENTRIES_FMT % 0) + assert_contains(typing.cast(HttpResponse, response), VIEW_ENTRIES_FMT % 0) assert not response.context["frequentBuckets"] diff --git a/server/ec2spotmanager/tests/test_configs.py b/server/ec2spotmanager/tests/test_configs.py index a7d0cbf5e..2262fd489 100644 --- a/server/ec2spotmanager/tests/test_configs.py +++ b/server/ec2spotmanager/tests/test_configs.py @@ -19,6 +19,7 @@ import pytest import requests +from django.http.response import HttpResponse from django.test.client import Client from django.urls import reverse @@ -73,7 +74,7 @@ def test_configs_view_config(client: Client) -> None: assert len(configtree) == 1 # 1 config assert set(configtree) == {config} # same config assert len(configtree[0].children) == 0 - assert_contains(response, "config #1") + assert_contains(typing.cast(HttpResponse, response), "config #1") def test_configs_view_configs(client: Client) -> None: @@ -88,8 +89,8 @@ def test_configs_view_configs(client: Client) -> None: assert set(configtree) == set(configs) # same configs assert len(configtree[0].children) == 0 assert len(configtree[1].children) == 0 - assert_contains(response, "config #1") - assert_contains(response, "config #2") + assert_contains(typing.cast(HttpResponse, response), "config #1") + assert_contains(typing.cast(HttpResponse, response), "config #2") def test_configs_view_config_tree(client: Client) -> None: @@ -119,9 +120,9 @@ def test_configs_view_config_tree(client: Client) -> None: raise Exception(f"unexpected configuration: {cfg.name}") assert seen1 assert seen3 - assert_contains(response, "config #1") - assert_contains(response, "config #2") - assert_contains(response, "config #3") + assert_contains(typing.cast(HttpResponse, response), "config #1") + assert_contains(typing.cast(HttpResponse, response), "config #2") + assert_contains(typing.cast(HttpResponse, response), "config #3") def test_create_config_view_create_form(client: Client) -> None: @@ -130,10 +131,10 @@ def test_create_config_view_create_form(client: Client) -> None: response = client.get(reverse("ec2spotmanager:configcreate")) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "Create Configuration") - assert_contains(response, 'name="name"') - assert_contains(response, 'name="size"') - assert_contains(response, 'name="cycle_interval"') + assert_contains(typing.cast(HttpResponse, response), "Create Configuration") + assert_contains(typing.cast(HttpResponse, response), 'name="name"') + assert_contains(typing.cast(HttpResponse, response), 'name="size"') + assert_contains(typing.cast(HttpResponse, response), 'name="cycle_interval"') def test_create_config_view_create(client: Client) -> None: @@ -216,21 +217,21 @@ def test_create_config_view_clone(client: Client) -> None: response = client.get(reverse("ec2spotmanager:configcreate"), {"clone": cfg.pk}) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "Clone Configuration") - assert_contains(response, "config #1 (Cloned)") - assert_contains(response, "1234567") - assert_contains(response, "7654321") - assert_contains(response, "key #1") - assert_contains(response, "group #1") - assert_contains(response, "machine #1") - assert_contains(response, "ami #1") - assert_contains(response, "yup=123") - assert_contains(response, "nope=456") - assert_contains(response, "nowhere") - assert_contains(response, "0.01") - assert_contains(response, "bad=false") - assert_contains(response, "good=true") - assert_contains(response, "hello=world") + assert_contains(typing.cast(HttpResponse, response), "Clone Configuration") + assert_contains(typing.cast(HttpResponse, response), "config #1 (Cloned)") + assert_contains(typing.cast(HttpResponse, response), "1234567") + assert_contains(typing.cast(HttpResponse, response), "7654321") + assert_contains(typing.cast(HttpResponse, response), "key #1") + assert_contains(typing.cast(HttpResponse, response), "group #1") + assert_contains(typing.cast(HttpResponse, response), "machine #1") + assert_contains(typing.cast(HttpResponse, response), "ami #1") + assert_contains(typing.cast(HttpResponse, response), "yup=123") + assert_contains(typing.cast(HttpResponse, response), "nope=456") + assert_contains(typing.cast(HttpResponse, response), "nowhere") + assert_contains(typing.cast(HttpResponse, response), "0.01") + assert_contains(typing.cast(HttpResponse, response), "bad=false") + assert_contains(typing.cast(HttpResponse, response), "good=true") + assert_contains(typing.cast(HttpResponse, response), "hello=world") def test_view_config_view(client: Client) -> None: @@ -255,20 +256,20 @@ def test_view_config_view(client: Client) -> None: ) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "config #1") - assert_contains(response, "1234567") - assert_contains(response, "7654321") - assert_contains(response, "key #1") - assert_contains(response, "group #1") - assert_contains(response, "machine #1") - assert_contains(response, "ami #1") - assert_contains(response, "yup=123") - assert_contains(response, "nope=456") - assert_contains(response, "nowhere") - assert_contains(response, "0.01") - assert_contains(response, "bad=false") - assert_contains(response, "good=true") - assert_contains(response, "hello=world") + assert_contains(typing.cast(HttpResponse, response), "config #1") + assert_contains(typing.cast(HttpResponse, response), "1234567") + assert_contains(typing.cast(HttpResponse, response), "7654321") + assert_contains(typing.cast(HttpResponse, response), "key #1") + assert_contains(typing.cast(HttpResponse, response), "group #1") + assert_contains(typing.cast(HttpResponse, response), "machine #1") + assert_contains(typing.cast(HttpResponse, response), "ami #1") + assert_contains(typing.cast(HttpResponse, response), "yup=123") + assert_contains(typing.cast(HttpResponse, response), "nope=456") + assert_contains(typing.cast(HttpResponse, response), "nowhere") + assert_contains(typing.cast(HttpResponse, response), "0.01") + assert_contains(typing.cast(HttpResponse, response), "bad=false") + assert_contains(typing.cast(HttpResponse, response), "good=true") + assert_contains(typing.cast(HttpResponse, response), "hello=world") def test_edit_config_view(client: Client) -> None: @@ -293,21 +294,21 @@ def test_edit_config_view(client: Client) -> None: ) LOG.debug(response) assert response.status_code == requests.codes["ok"] - assert_contains(response, "Edit Configuration") - assert_contains(response, "config #1") - assert_contains(response, "1234567") - assert_contains(response, "7654321") - assert_contains(response, "key #1") - assert_contains(response, "group #1") - assert_contains(response, "machine #1") - assert_contains(response, "ami #1") - assert_contains(response, "yup=123") - assert_contains(response, "nope=456") - assert_contains(response, "nowhere") - assert_contains(response, "0.01") - assert_contains(response, "bad=false") - assert_contains(response, "good=true") - assert_contains(response, "hello=world") + assert_contains(typing.cast(HttpResponse, response), "Edit Configuration") + assert_contains(typing.cast(HttpResponse, response), "config #1") + assert_contains(typing.cast(HttpResponse, response), "1234567") + assert_contains(typing.cast(HttpResponse, response), "7654321") + assert_contains(typing.cast(HttpResponse, response), "key #1") + assert_contains(typing.cast(HttpResponse, response), "group #1") + assert_contains(typing.cast(HttpResponse, response), "machine #1") + assert_contains(typing.cast(HttpResponse, response), "ami #1") + assert_contains(typing.cast(HttpResponse, response), "yup=123") + assert_contains(typing.cast(HttpResponse, response), "nope=456") + assert_contains(typing.cast(HttpResponse, response), "nowhere") + assert_contains(typing.cast(HttpResponse, response), "0.01") + assert_contains(typing.cast(HttpResponse, response), "bad=false") + assert_contains(typing.cast(HttpResponse, response), "good=true") + assert_contains(typing.cast(HttpResponse, response), "hello=world") def test_del_config_view_delete(client: Client) -> None: diff --git a/server/ec2spotmanager/tests/test_pools.py b/server/ec2spotmanager/tests/test_pools.py index 2f3c40b79..80deb4fe3 100644 --- a/server/ec2spotmanager/tests/test_pools.py +++ b/server/ec2spotmanager/tests/test_pools.py @@ -17,6 +17,7 @@ import pytest import requests +from django.http.response import HttpResponse from django.test.client import Client from django.urls import reverse @@ -62,7 +63,7 @@ def test_pools_view_no_pools(client: Client) -> None: assert response.status_code == requests.codes["ok"] poollist = response.context["poollist"] assert len(poollist) == 0 # 0 pools - assert_contains(response, POOLS_ENTRIES_FMT % 0) + assert_contains(typing.cast(HttpResponse, response), POOLS_ENTRIES_FMT % 0) def test_pools_view_pool(client: Client) -> None: @@ -75,7 +76,7 @@ def test_pools_view_pool(client: Client) -> None: assert response.status_code == requests.codes["ok"] poollist = response.context["poollist"] assert len(poollist) == 1 # 1 pools - assert_contains(response, POOLS_ENTRIES_FMT % 1) + assert_contains(typing.cast(HttpResponse, response), POOLS_ENTRIES_FMT % 1) assert set(poollist) == {pool} @@ -89,7 +90,7 @@ def test_pools_view_pools(client: Client) -> None: assert response.status_code == requests.codes["ok"] poollist = response.context["poollist"] assert len(poollist) == 2 # 2 pools - assert_contains(response, POOLS_ENTRIES_FMT % 2) + assert_contains(typing.cast(HttpResponse, response), POOLS_ENTRIES_FMT % 2) assert set(poollist) == set(pools) From 3b8394a958887bef28cf9816976c23a17a4ec271 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 4 Feb 2023 16:39:50 -0800 Subject: [PATCH 134/137] 673 mypy issues left --- conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 52c8697c2..a00a7971f 100644 --- a/conftest.py +++ b/conftest.py @@ -11,8 +11,10 @@ import sys from pathlib import Path +from _pytest.config import Config -def pytest_ignore_collect(path, config): + +def pytest_ignore_collect(path: str, config: Config) -> bool: # Django 4.1 requires 3.8 # 3.11 causes an ImportError in vine (via celery) if sys.version_info < (3, 8) or sys.version_info >= (3, 11): From 11b2185382f5545454acb534cb670629443d1707 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Sat, 4 Feb 2023 16:53:25 -0800 Subject: [PATCH 135/137] 671 mypy issues left --- server/ec2spotmanager/views.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/ec2spotmanager/views.py b/server/ec2spotmanager/views.py index ec7116ee0..1e12e6fd9 100644 --- a/server/ec2spotmanager/views.py +++ b/server/ec2spotmanager/views.py @@ -2,7 +2,7 @@ import json from operator import attrgetter -from typing import Any +from typing import Any, cast import fasteners import redis @@ -78,7 +78,10 @@ def pools(request: HttpRequest) -> HttpResponse: .order_by("config__name") ) # fetch all pool configs since most will be used by flatten later - configs = {cfg.id: cfg for cfg in PoolConfiguration.objects.all()} + configs = { + cast(int, getattr(cfg, "id", None)): cfg + for cfg in PoolConfiguration.objects.all() + } # These are all keys that are allowed for exact filtering exactFilterKeys = [ @@ -167,7 +170,7 @@ def viewPool(request: HttpRequest, poolid: int) -> HttpResponse: pool.msgs = PoolStatusEntry.objects.filter(pool=pool).order_by("-created") - provider_msgs: dict[str, list[str]] = {} + provider_msgs: dict[str, list[ProviderStatusEntry]] = {} relevant_providers = {} for msg in ProviderStatusEntry.objects.all().order_by("-created"): # a status provider is relevant to this pool if it is supported by the config, From 1b5901df59f9eee91d06a21e485a338b387deb49 Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 6 Feb 2023 20:41:23 -0800 Subject: [PATCH 136/137] Bump mypy to 1.0.0 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 81779b857..1ec15e731 100644 --- a/tox.ini +++ b/tox.ini @@ -75,7 +75,7 @@ deps = django-stubs>=1.14.0 djangorestframework-stubs>=1.8.0 ffpuppet~=0.9.2 - mypy==0.991 + mypy==1.0.0 typing-extensions>=4.4.0 usedevelop = true From 65a25d8f043ac76aa506f14856cd8f9c9d0b05fd Mon Sep 17 00:00:00 2001 From: "Gary Kwong [:gkw]" Date: Mon, 6 Feb 2023 20:41:57 -0800 Subject: [PATCH 137/137] 668 mypy issues left --- server/ec2spotmanager/CloudProvider/CloudProvider.py | 2 +- server/ec2spotmanager/CloudProvider/GCECloudProvider.py | 2 +- server/ec2spotmanager/tests/test_tasks.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/ec2spotmanager/CloudProvider/CloudProvider.py b/server/ec2spotmanager/CloudProvider/CloudProvider.py index 5c92e459c..f9b827bdd 100644 --- a/server/ec2spotmanager/CloudProvider/CloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/CloudProvider.py @@ -33,7 +33,7 @@ 64: "stopping", 80: "stopped", } -INSTANCE_STATE = {val: key for key, val in INSTANCE_STATE_CODE.items()} +INSTANCE_STATE: dict[str, int] = {val: key for key, val in INSTANCE_STATE_CODE.items()} # List of currently supported providers. This and what is returned by get_name() must # match diff --git a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py index 74c029f10..ff0589400 100644 --- a/server/ec2spotmanager/CloudProvider/GCECloudProvider.py +++ b/server/ec2spotmanager/CloudProvider/GCECloudProvider.py @@ -154,7 +154,7 @@ def _node_to_instance(self, node): ".".join(reversed(ip_addr.split("."))) + ".bc.googleusercontent.com" ) instance["instance_id"] = node.name - instance["status_code"] = self.NODE_STATE_MAP[node.extra["status"]] + instance["status_code"] = str(self.NODE_STATE_MAP[node.extra["status"]]) return instance @wrap_provider_errors diff --git a/server/ec2spotmanager/tests/test_tasks.py b/server/ec2spotmanager/tests/test_tasks.py index 9d155e32b..f2cea31e8 100644 --- a/server/ec2spotmanager/tests/test_tasks.py +++ b/server/ec2spotmanager/tests/test_tasks.py @@ -156,7 +156,7 @@ def __init__(self, *args: str, **kwds: str) -> None: @property def state_code(self) -> int: - return INSTANCE_STATE["running"] + return int(INSTANCE_STATE["running"]) def add_tags( self, tags: Iterable[tuple[str, str]], dry_run: bool = False @@ -221,7 +221,7 @@ def test_instance_shutting_down(mocker: MockerFixture) -> None: class _MockInstance(boto.ec2.instance.Instance): @property def state_code(self) -> int: - return INSTANCE_STATE["shutting-down"] + return int(INSTANCE_STATE["shutting-down"]) def add_tags( self, _tags: Iterable[tuple[str, str]], _dry_run: bool = False @@ -231,7 +231,7 @@ def add_tags( class _MockInstance2(_MockInstance): @property def state_code(self) -> int: - return INSTANCE_STATE["terminated"] + return int(INSTANCE_STATE["terminated"]) boto_instance1 = _MockInstance() boto_instance1.id = "i-123" @@ -336,7 +336,7 @@ def test_instance_not_updatable(mocker: MockerFixture) -> None: class _MockInstance(boto.ec2.instance.Instance): @property def state_code(self) -> int: - return INSTANCE_STATE["stopping"] + return int(INSTANCE_STATE["stopping"]) boto_instance = _MockInstance() boto_instance.id = "i-123"