Closed Bug 1717448 Opened 4 years ago Closed 1 year ago

Integrate and support {fmt} for c++20 std::format-style formatting in gecko

Categories

(Core :: XPCOM, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: nika, Assigned: padenot)

References

(Blocks 1 open bug, Regressed 2 open bugs)

Details

Attachments

(15 files, 7 obsolete files)

48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
13.14 KB, text/plain
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
9.21 KB, patch
Details | Diff | Splinter Review
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details
48 bytes, text/x-phabricator-request
Details

In C++20, a new formatting library was defined which uses rust/python style {} format indicators for formatting strings etc. std::format also supports formatting custom types in various manners and will be expanded on in future c++ versions.

In general, gecko has continued to use printf-style formatting over stream style formatting for various reasons, including code size and style. This new format string type has improved flexibility and type safety like operator<< stream formatting, while also being performant and codesize efficient like printf.

While we cannot directly adapt c++20's implementation, as we are still using c++17 and no standard library supports the full spec yet, there is a community implementation of the syntax in the {fmt} library, which also provides extra flexibility allowing us to integrate into ns[C]String more efficiently.

This bug tracks potentially vendoring {fmt} into the tree and adding basic support to core xpcom features like MOZ_LOG and ns[C]String for the library.

One thing to look out for: how it formats floats (specifically, the rounding for floats)

(In reply to Mike Hommey [:glandium] from comment #1)

One thing to look out for: how it formats floats (specifically, the rounding for floats)

I looked into this a while back, and the {fmt} library appears to take glibc's approach to float rounding rather than our approach with double-conversion and ecmascript rules (from that testing I also noticed that their printf implementation appears to have some issues around padding/sign digits, however it's unclear whether this impacts their normal format strings).

If we import the crate, we'll probably want to apply some patches on the source to replace the floating point formatting infrastructure with our existing infrastructure in order to use the ecmascript rules and double-conversion under the hood, as it seems somewhat unlikely to me that they'd be interested in upstreaming ecmascript rounding support.

Depends on: C++20

This proposal uses an third-party library, rather than c++20's format implementation, so doesn't depend on c++20.

No longer depends on: C++20

I finally got annoyed enough.

My initial focus will be on providing better logging and assertion reporting. We can patch it to support our floating point representation in a second stage, it's around here: https://github.com/fmtlib/fmt/blob/master/include/fmt/format.h#L3589-L3612, and doesn't look horribly complicated to do or maintain (famous last words).

Attachment #9413477 - Attachment description: WIP: Bug 1717448 - Vendor {fmt} in third_party. → Bug 1717448 - Vendor {fmt} in third_party. r?glandium
Attachment #9413564 - Attachment description: WIP: Bug 1717448 - Teach MOZ_LOG to use {fmt}. → Bug 1717448 - Teach MOZ_LOG to use {fmt}. r?glandium
Attachment #9413565 - Attachment description: WIP: Bug 1717448 - Print the diagnostic message in AssertedCast with {fmt}. → Bug 1717448 - Print the diagnostic message in AssertedCast with {fmt}. r?nbp
Attachment #9413566 - Attachment description: WIP: Bug 1717448 - Use {fmt} to log in the AudioData ctor. → Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r?chunmin
Attachment #9413567 - Attachment is obsolete: true

This seems to be useful with this initial set of patches, but happy to hear what people would like added. I'm thinking of writing a big bag of regexp to ease conversion.

Attaching an old patch with my WIP changes from when I last looked into this in 2022 where I was adding nsCString support for {fmt}.

Also FWIW, I believe we are much closer to building with c++20 than we were 2-3 years ago when I first looked into this, which might mean that holding out for std::format might make more sense in terms of keeping dependencies down, though I suppose std::format is unlikely to do things like rounding of doubles in the way that we want it to.

It might be worth waiting for c++20 before trying to do this so we can properly compare the options we have available.

(In reply to Paul Adenot (:padenot) from comment #14)

This seems to be useful with this initial set of patches, but happy to hear what people would like added. I'm thinking of writing a big bag of regexp to ease conversion.

Given the downsides of {fmt} (like not checking format strings at compile time reliably compared to printf, crashing on errors without options for recovery, and probably having a larger binary size overhead in the non-formatting cases), we may want to hold off from trying to do any sort of bulk transition to {fmt}.

(In reply to Nika Layzell [:nika] (ni? for response) from comment #16)

Also FWIW, I believe we are much closer to building with c++20 than we were 2-3 years ago when I first looked into this

My understanding is that this is unfortunately still years away, and that was what prompted me to do this. https://bugzilla.mozilla.org/show_bug.cgi?id=1880779#c2 has some info, and if I read :glandium's messages correctly, https://glandium.github.io/firefox-linux-compat-matrix/ has ballpark numbers (maybe not exactly correct, but not horribly incorrect). We can't do C++20 until we don't support RHEL8, and that is in a long time. Mike, please correct me if I understood things incorrectly.

Given the downsides of {fmt} (like not checking format strings at compile time reliably compared to printf, crashing on errors without options for recovery, and probably having a larger binary size overhead in the non-formatting cases), we may want to hold off from trying to do any sort of bulk transition to {fmt}.

Indeed, but I've been wrong more than once in terms of binary size, so I'm planning to do a conversion on a few of my modules to get a sense of it. My patch set uses type erasure to keep the binary size down, and we can use compile-time checking in lots of cases.

Flags: needinfo?(mh+mozilla)
Attachment #9414173 - Attachment is obsolete: true
Attachment #9414174 - Attachment is obsolete: true

(In reply to Paul Adenot (:padenot) from comment #17)

My understanding is that this is unfortunately still years away, and that was what prompted me to do this. https://bugzilla.mozilla.org/show_bug.cgi?id=1880779#c2 has some info, and if I read :glandium's messages correctly, https://glandium.github.io/firefox-linux-compat-matrix/ has ballpark numbers (maybe not exactly correct, but not horribly incorrect). We can't do C++20 until we don't support RHEL8, and that is in a long time. Mike, please correct me if I understood things incorrectly.

The situation is a little bit more complicated, but as a super simplified version, yes. Where the complication enters, is that RHEL updates do add some new compilers, which may allow us to bump our baseline, BUT, full C++20 support also depends on libstdc++, although depending on the bits we use, that might not be a problem. I don't know if std::format requires new symbols from libstd++ (but that's likely).

Flags: needinfo?(mh+mozilla)

It looks like the excluding logic around ThirdPartyPaths.txt works on include
paths, and not on the path of files on disk, so it's necessary to explicitly
exclude fmt/base.h and fmt/format.h from two checks that fail as things
stand today:

  • the one that checks that explicit is used for single-arg ctors, this is used
    throughout {fmt}
  • the one that checks that val != val isn't used to check for NaN. This is
    used in {fmt} because std::isnan doesn't have an overload for __float128.
Attachment #9414863 - Attachment description: WIP: Bug 1717448 - Integrate {fmt} with nsString. → Bug 1717448 - Integrate {fmt} with nsString.
Attachment #9414863 - Attachment description: Bug 1717448 - Integrate {fmt} with nsString. → Bug 1717448 - Integrate {fmt} with nsString. r?#xpcom-reviewers,nika
Attachment #9413564 - Attachment description: Bug 1717448 - Teach MOZ_LOG to use {fmt}. r?glandium → Bug 1717448 - Teach MOZ_LOG to use {fmt}. r?glandium,nika
Attachment #9413566 - Attachment description: Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r?chunmin → Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r?nika
Attachment #9414865 - Attachment description: WIP: Bug 1717448 - Compilation fix, missing #include + using. → Bug 1717448 - Explicitely qualify back_inserter to fix the build. r?nika
Attachment #9414175 - Attachment description: Bug 1717448 - Add some tests for Gecko integration. r?nika → Bug 1717448 - Add some tests for Gecko integration. r?nika,glandium
Attachment #9416581 - Attachment description: Bug 1717448 - Exclude {fmt} from gecko-specific checks. r?glandium → Bug 1717448 - Exclude {fmt} from gecko-specific checks. r?glandium,nika
Attachment #9416779 - Attachment description: Bug 1717448 - Stub std::generic_category. r?glandium → Bug 1717448 - Don't use std::generic_category and other error reporting facilities. r?glandium

For the H job, try asking @sfink.

Apparently {fmt} uses a function pointer under the hood and that trips our
analysis. In practice this excluded call-site will only print numbers (of
various width and signedness, and also floats), in debug, when the assertion
fails.

Attachment #9414865 - Attachment description: Bug 1717448 - Explicitely qualify back_inserter to fix the build. r?nika → Bug 1717448 - Patch fmt to qualify back_inserter to fix the build. r?nika
Attachment #9414862 - Attachment is obsolete: true
Attachment #9418180 - Attachment description: Bug 1717448 - Exclude AssertedCast diagnostic printout from hazard analysis. r?sfink → Bug 1717448 - Exclude `{fmt}` internals from hazard analysis. r?sfink
Assignee: nika → padenot
Attachment #9416779 - Attachment description: Bug 1717448 - Don't use std::generic_category and other error reporting facilities. r?glandium → Bug 1717448 - Don't use std::generic_category and other error reporting facilities, ignore IO errors. r?glandium
Attachment #9414865 - Attachment is obsolete: true

I've updated all patches here, with current upstream tip + rebased all patches + address all comments except mccr8's about asserting in the nsString adapter, that I will have a look at now.

Notable changes:

  • Our injected float formatting code is cross-checked with Gecko's Printf.cpp implementation, using glibc's test suite, including with translating format string from printf to fmt, bringing more confidence that all this works
  • we can drop the patch that was adding a using namespace std;, fixed upstream
  • merged two patches about error reporting / IO error (content unchanged)
  • had to add our own type_identity util, this is C++20, but isn't upstream any more
  • fixed padding handling when formatting floating point, in some cases we could intermix the padding and the sign (e.g. 000-123.123 would be output instead of -000123.123, but -123.123 is also correctly output: 0s are after the sign, other chars before the sign).
  • needed a couple more header files to compile (e.g. ostream.h)

The rest is largely the same modulo trivial rebases.

Attachment #9419391 - Attachment is obsolete: true
Blocks: 1924560
Attachment #9430127 - Attachment is obsolete: true
Attachment #9416581 - Attachment description: Bug 1717448 - Exclude {fmt} from gecko-specific checks. r?glandium,nika → Bug 1717448 - Exclude {fmt} from gecko-specific checks.
Attachment #9413477 - Attachment description: Bug 1717448 - Vendor {fmt} in third_party. r?glandium → Bug 1717448 - Vendor {fmt} in third_party.
Attachment #9416779 - Attachment description: Bug 1717448 - Don't use std::generic_category and other error reporting facilities, ignore IO errors. r?glandium → Bug 1717448 - Don't use std::generic_category and other error reporting facilities, ignore IO errors.
Attachment #9414864 - Attachment description: Bug 1717448 - Patch `{fmt}` to avoid crashing when printing `nullptr` strings, and attempting to print to an invalid FILE*. r?nika → Bug 1717448 - Patch `{fmt}` to avoid crashing when printing `nullptr` strings, and attempting to print to an invalid FILE*.
Attachment #9414866 - Attachment description: Bug 1717448 - Make `{fmt}` use `double-conversion` for converting float to string internally. r?glandium,nika → Bug 1717448 - Make `{fmt}` use `double-conversion` for converting float to string internally.
Attachment #9418180 - Attachment description: Bug 1717448 - Exclude `{fmt}` internals from hazard analysis. r?sfink → Bug 1717448 - Exclude `{fmt}` internals from hazard analysis.
Attachment #9416780 - Attachment description: Bug 1717448 - Ignore allocations in done within `{fmt}`. r?glandium → Bug 1717448 - Ignore allocations in done within `{fmt}`.
Attachment #9413564 - Attachment description: Bug 1717448 - Teach MOZ_LOG to use {fmt}. r?glandium,nika → Bug 1717448 - Teach MOZ_LOG to use {fmt}.
Attachment #9413565 - Attachment description: Bug 1717448 - Print the diagnostic message in AssertedCast with {fmt}. r?nbp → Bug 1717448 - Print the diagnostic message in AssertedCast with {fmt}.
Attachment #9414863 - Attachment description: Bug 1717448 - Integrate {fmt} with nsString. r?#xpcom-reviewers,nika → Bug 1717448 - Integrate {fmt} with nsString.
Attachment #9414175 - Attachment description: Bug 1717448 - Add some tests for Gecko integration. r?nika,glandium → Bug 1717448 - Add some tests for Gecko integration.
Attachment #9414176 - Attachment description: Bug 1717448 - Add some documentation about using {fmt} in Gecko. r?nika → Bug 1717448 - Add some documentation about using {fmt} in Gecko.
Attachment #9413566 - Attachment description: Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r?nika → Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp.
Attachment #9413477 - Attachment description: Bug 1717448 - Vendor {fmt} in third_party. → Bug 1717448 - Vendor {fmt} in third_party. r?glandium
Attachment #9414864 - Attachment description: Bug 1717448 - Patch `{fmt}` to avoid crashing when printing `nullptr` strings, and attempting to print to an invalid FILE*. → Bug 1717448 - Patch `{fmt}` to avoid crashing when printing `nullptr` strings, and attempting to print to an invalid FILE*. r?nika
Attachment #9414866 - Attachment description: Bug 1717448 - Make `{fmt}` use `double-conversion` for converting float to string internally. → Bug 1717448 - Make `{fmt}` use `double-conversion` for converting float to string internally. r?glandium,nika
Attachment #9416779 - Attachment description: Bug 1717448 - Don't use std::generic_category and other error reporting facilities, ignore IO errors. → Bug 1717448 - Don't use std::generic_category and other error reporting facilities, ignore IO errors. r?glandium
Attachment #9418180 - Attachment description: Bug 1717448 - Exclude `{fmt}` internals from hazard analysis. → Bug 1717448 - Exclude `{fmt}` internals from hazard analysis. r?sfink
Attachment #9416581 - Attachment description: Bug 1717448 - Exclude {fmt} from gecko-specific checks. → Bug 1717448 - Exclude {fmt} from gecko-specific checks. r?glandium,nika
Attachment #9416780 - Attachment description: Bug 1717448 - Ignore allocations in done within `{fmt}`. → Bug 1717448 - Ignore allocations in done within `{fmt}`. r?glandium
Attachment #9413564 - Attachment description: Bug 1717448 - Teach MOZ_LOG to use {fmt}. → Bug 1717448 - Teach MOZ_LOG to use {fmt}. r?glandium,nika
Attachment #9413565 - Attachment description: Bug 1717448 - Print the diagnostic message in AssertedCast with {fmt}. → Bug 1717448 - Print the diagnostic message in AssertedCast with {fmt}. r?nbp
Attachment #9414863 - Attachment description: Bug 1717448 - Integrate {fmt} with nsString. → Bug 1717448 - Integrate {fmt} with nsString. r?#xpcom-reviewers,nika
Attachment #9414175 - Attachment description: Bug 1717448 - Add some tests for Gecko integration. → Bug 1717448 - Add some tests for Gecko integration. r?nika,glandium
Attachment #9414176 - Attachment description: Bug 1717448 - Add some documentation about using {fmt} in Gecko. → Bug 1717448 - Add some documentation about using {fmt} in Gecko. r?nika
Attachment #9413566 - Attachment description: Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. → Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r?nika
Pushed by amarc@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/adef9b3b6231 Vendor {fmt} in third_party. r=glandium https://hg.mozilla.org/integration/autoland/rev/47ed151719a4 Patch `{fmt}` to avoid crashing when printing `nullptr` strings, and attempting to print to an invalid FILE*. r=nika https://hg.mozilla.org/integration/autoland/rev/2e17fb168eaf Make `{fmt}` use `double-conversion` for converting float to string internally. r=glandium,nika https://hg.mozilla.org/integration/autoland/rev/993a64fd729a Don't use std::generic_category and other error reporting facilities, ignore IO errors. r=glandium https://hg.mozilla.org/integration/autoland/rev/f0ca736c051b Exclude `{fmt}` internals from hazard analysis. r=sfink https://hg.mozilla.org/integration/autoland/rev/4381f24f8495 Exclude {fmt} from gecko-specific checks. r=glandium,nika https://hg.mozilla.org/integration/autoland/rev/aebf794911ca Ignore allocations in done within `{fmt}`. r=glandium https://hg.mozilla.org/integration/autoland/rev/8295836348fb Teach MOZ_LOG to use {fmt}. r=glandium,nika https://hg.mozilla.org/integration/autoland/rev/5e5b42a7cde1 Print the diagnostic message in AssertedCast with {fmt}. r=nbp https://hg.mozilla.org/integration/autoland/rev/37ab78b00a4f Integrate {fmt} with nsString. r=#xpcom-reviewers,nika https://hg.mozilla.org/integration/autoland/rev/670256c85479 Add some tests for Gecko integration. r=nika,glandium https://hg.mozilla.org/integration/autoland/rev/41c8a260d55b Add some documentation about using {fmt} in Gecko. r=nika https://hg.mozilla.org/integration/autoland/rev/4254666ea8a7 Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r=nika

Backed out for causing gtest failures on iofwrite.c

[task 2024-10-18T16:31:41.153Z] 16:31:41     INFO -  TEST-START | Fmt.IOError
[task 2024-10-18T16:31:41.153Z] 16:31:41     INFO -  AddressSanitizer:DEADLYSIGNAL
[task 2024-10-18T16:31:41.153Z] 16:31:41     INFO -  =================================================================
[task 2024-10-18T16:31:41.154Z] 16:31:41    ERROR -  ==992==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7f94901e6950 bp 0x000000000006 sp 0x7fffbb4cdcd0 T0)
[task 2024-10-18T16:31:41.154Z] 16:31:41     INFO -  ==992==The signal is caused by a READ memory access.
[task 2024-10-18T16:31:41.154Z] 16:31:41     INFO -  ==992==Hint: this fault was caused by a dereference of a high value address (see register values below).  Disassemble the provided pc to learn which register was used.
[task 2024-10-18T16:31:41.697Z] 16:31:41     INFO -      #0 0x7f94901e6950 in _IO_fwrite /tmp/glibc/libio/iofwrite.c:37
[task 2024-10-18T16:31:41.697Z] 16:31:41     INFO -      #1 0x55622dc91fa9 in fwrite /builds/worker/fetches/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc
[task 2024-10-18T16:31:41.698Z] 16:31:41     INFO -      #2 0x55622de24618 in fwrite_all /builds/worker/workspace/obj-build/dist/include/fmt/format-inl.h:77:3
[task 2024-10-18T16:31:41.698Z] 16:31:41     INFO -      #3 0x55622de24618 in print /builds/worker/workspace/obj-build/dist/include/fmt/format-inl.h:1727:3
[task 2024-10-18T16:31:41.698Z] 16:31:41     INFO -      #4 0x55622de24618 in fmt::v11::vprintln(_IO_FILE*, fmt::v11::basic_string_view<char>, fmt::v11::basic_format_args<fmt::v11::context>) /builds/worker/workspace/obj-build/dist/include/fmt/format-inl.h:1748:3
[task 2024-10-18T16:31:41.698Z] 16:31:41     INFO -      #5 0x7f946a058018 in println<int> /builds/worker/workspace/obj-build/dist/include/fmt/base.h:2887:29
[task 2024-10-18T16:31:41.698Z] 16:31:41     INFO -      #6 0x7f946a058018 in Fmt_IOError_Test::TestBody() /builds/worker/checkouts/gecko/mozglue/tests/gtest/TestFmt.cpp:208:3
[task 2024-10-18T16:31:41.698Z] 16:31:41     INFO -      #7 0x7f946b4b8191 in testing::Test::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2713:5
[task 2024-10-18T16:31:41.698Z] 16:31:41     INFO -      #8 0x7f946b4ba5a9 in testing::TestInfo::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2859:11
[task 2024-10-18T16:31:41.699Z] 16:31:41     INFO -      #9 0x7f946b4bc9e2 in testing::TestSuite::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3037:30
[task 2024-10-18T16:31:41.699Z] 16:31:41     INFO -      #10 0x7f946b4e9687 in testing::internal::UnitTestImpl::RunAllTests() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5967:44
[task 2024-10-18T16:31:41.699Z] 16:31:41     INFO -      #11 0x7f946b4e888b in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc
[task 2024-10-18T16:31:41.699Z] 16:31:41     INFO -      #12 0x7f946b4e888b in testing::UnitTest::Run() /builds/worker/checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5546:10
[task 2024-10-18T16:31:41.699Z] 16:31:41     INFO -      #13 0x7f946b479f1f in RUN_ALL_TESTS /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h:2336:73
[task 2024-10-18T16:31:41.700Z] 16:31:41     INFO -      #14 0x7f946b479f1f in mozilla::RunGTestFunc(int*, char**) /builds/worker/checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:172:10
[task 2024-10-18T16:31:41.700Z] 16:31:41     INFO -      #15 0x7f947990cd1e in XREMain::XRE_mainStartup(bool*) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4716:16
[task 2024-10-18T16:31:41.700Z] 16:31:41     INFO -      #16 0x7f947991842f in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6007:12
[task 2024-10-18T16:31:41.701Z] 16:31:41     INFO -      #17 0x7f94799195d3 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6105:21
[task 2024-10-18T16:31:41.701Z] 16:31:41     INFO -      #18 0x55622dd4c17d in do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:233:22
[task 2024-10-18T16:31:41.701Z] 16:31:41     INFO -      #19 0x55622dd4c17d in main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:465:16
[task 2024-10-18T16:31:41.701Z] 16:31:41     INFO -      #20 0x7f9490188b96 in __libc_start_main /tmp/glibc/csu/../csu/libc-start.c:310
[task 2024-10-18T16:31:41.701Z] 16:31:41     INFO -      #21 0x55622dc73c58 in _start (/builds/worker/workspace/build/application/firefox/firefox+0xc8c58) (BuildId: d2c4a70f6b8c7ca87da0a6df9aba41a74a4798f4)
[task 2024-10-18T16:31:41.702Z] 16:31:41     INFO -  AddressSanitizer can not provide additional info.
[task 2024-10-18T16:31:41.702Z] 16:31:41     INFO -  SUMMARY: AddressSanitizer: SEGV /tmp/glibc/libio/iofwrite.c:37 in _IO_fwrite
[task 2024-10-18T16:31:41.702Z] 16:31:41     INFO -  ==992==ABORTING
[task 2024-10-18T16:31:41.716Z] 16:31:41     INFO -  gtest INFO | gtest | process wait complete, returncode=1
[task 2024-10-18T16:31:41.718Z] 16:31:41     INFO -  mozcrash checking /builds/worker/workspace/build/tests/gtest for minidumps...
[task 2024-10-18T16:31:41.718Z] 16:31:41  WARNING -  gtest TEST-UNEXPECTED-FAIL | gtest | test failed with return code 1
[task 2024-10-18T16:31:41.718Z] 16:31:41     INFO -  gtest INFO | rungtests.py exits with code 1
[task 2024-10-18T16:31:41.739Z] 16:31:41     INFO - Return code: 1
[task 2024-10-18T16:31:41.739Z] 16:31:41    ERROR - No tests run or test summary not found
[task 2024-10-18T16:31:41.739Z] 16:31:41     INFO - TinderboxPrint: gtest-gtest<br/><em class="testfail">T-FAIL</em>
[task 2024-10-18T16:31:41.739Z] 16:31:41  WARNING - setting return code to 2
[task 2024-10-18T16:31:41.739Z] 16:31:41     INFO - The gtest suite: gtest ran with return status: FAILURE
[task 2024-10-18T16:31:41.739Z] 16:31:41     INFO - Running post-action listener: _package_coverage_data
[task 2024-10-18T16:31:41.739Z] 16:31:41     INFO - Running post-action listener: _resource_record_post_action
[task 2024-10-18T16:31:41.739Z] 16:31:41     INFO - Running post-action listener: process_java_coverage_data
[task 2024-10-18T16:31:41.740Z] 16:31:41     INFO - [mozharness: 2024-10-18 16:31:41.739941Z] Finished run-tests step (success)
[task 2024-10-18T16:31:41.740Z] 16:31:41     INFO - [mozharness: 2024-10-18 16:31:41.740094Z] Running uninstall step.
[task 2024-10-18T16:31:41.740Z] 16:31:41     INFO - Running pre-action listener: _resource_record_pre_action
[task 2024-10-18T16:31:41.740Z] 16:31:41     INFO - Running main action method: uninstall
[task 2024-10-18T16:31:41.740Z] 16:31:41     INFO - Skipping uninstall for non-MSIX test
[task 2024-10-18T16:31:41.740Z] 16:31:41     INFO - Running post-action listener: _resource_record_post_action
[task 2024-10-18T16:31:41.740Z] 16:31:41     INFO - [mozharness: 2024-10-18 16:31:41.740373Z] Finished uninstall step (success)
[task 2024-10-18T16:31:41.740Z] 16:31:41     INFO - Running post-run listener: _resource_record_post_run
[task 2024-10-18T16:31:41.803Z] 16:31:41     INFO - Validating Perfherder data against /builds/worker/workspace/mozharness/external_tools/performance-artifact-schema.json
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - PERFHERDER_DATA: {"framework": {"name": "job_resource_usage"}, "suites": [{"name": "gtest.gtest.overall", "extraOptions": ["taskcluster-projects/887720501152/machineTypes/c2-standard-4"], "subtests": [{"name": "cpu_percent", "value": 22.766557971014475}, {"name": "io_write_bytes", "value": 2829402112}, {"name": "io.read_bytes", "value": 4096}, {"name": "io_write_time", "value": 3124612}, {"name": "io_read_time", "value": 228}]}, {"name": "gtest.gtest.start-pulseaudio", "subtests": [{"name": "time", "value": 0.01823795300015263}, {"name": "cpu_percent", "value": 0}]}, {"name": "gtest.gtest.install", "subtests": [{"name": "time", "value": 57.822186512999906}, {"name": "cpu_percent", "value": 25.276906412478315}]}, {"name": "gtest.gtest.stage-files", "subtests": [{"name": "time", "value": 1.7499074580000524}, {"name": "cpu_percent", "value": 16.371875}]}, {"name": "gtest.gtest.run-tests", "subtests": [{"name": "time", "value": 9.418066888999874}, {"name": "cpu_percent", "value": 8.565425531914894}]}, {"name": "gtest.gtest.uninstall", "subtests": [{"name": "time", "value": 0.00016078400039987173}, {"name": "cpu_percent", "value": 0}]}]}
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - Total resource usage - Wall time: 69s; CPU: Can't collect data; Read bytes: 4096; Write bytes: 2829402112; Read time: 228; Write time: 3124612
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - TinderboxPrint: I/O read bytes / time<br/>4,096 / 228
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - TinderboxPrint: I/O write bytes / time<br/>2,829,402,112 / 3,124,612
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - TinderboxPrint: CPU idle<br/>188.4 (68.4%)
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - TinderboxPrint: CPU iowait<br/>24.2 (8.8%)
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - TinderboxPrint: CPU system<br/>3.8 (1.4%)
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - TinderboxPrint: CPU user<br/>59.0 (21.4%)
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - TinderboxPrint: Swap in / out<br/>0 / 0
[task 2024-10-18T16:31:41.805Z] 16:31:41     INFO - start-pulseaudio - Wall time: 0s; CPU: Can't collect data; Read bytes: 0; Write bytes: 0; Read time: 0; Write time: 0
[task 2024-10-18T16:31:41.808Z] 16:31:41     INFO - install - Wall time: 58s; CPU: 25%; Read bytes: 4096; Write bytes: 1728339968; Read time: 228; Write time: 1890776
[task 2024-10-18T16:31:41.809Z] 16:31:41     INFO - stage-files - Wall time: 2s; CPU: 16%; Read bytes: 0; Write bytes: 151699456; Read time: 0; Write time: 127776
[task 2024-10-18T16:31:41.810Z] 16:31:41     INFO - run-tests - Wall time: 9s; CPU: 9%; Read bytes: 0; Write bytes: 935993344; Read time: 0; Write time: 1091392
[task 2024-10-18T16:31:41.810Z] 16:31:41     INFO - uninstall - Wall time: 0s; CPU: Can't collect data; Read bytes: 0; Write bytes: 0; Read time: 0; Write time: 0
[task 2024-10-18T16:31:41.926Z] 16:31:41  WARNING - returning nonzero exit status 2
[task 2024-10-18T16:31:41.952Z] cleanup
[task 2024-10-18T16:31:41.952Z] + cleanup
[task 2024-10-18T16:31:41.952Z] + local rv=2
[task 2024-10-18T16:31:41.952Z] + [[ -s /builds/worker/.xsession-errors ]]
[task 2024-10-18T16:31:41.952Z] + cp /builds/worker/.xsession-errors /builds/worker/artifacts/public/xsession-errors.log
[task 2024-10-18T16:31:41.954Z] + '[' ']'
[task 2024-10-18T16:31:41.954Z] + true
[task 2024-10-18T16:31:41.954Z] + cleanup_xvfb
[task 2024-10-18T16:31:41.954Z] ++ pidof Xvfb
[task 2024-10-18T16:31:41.957Z] + local xvfb_pid=50
[task 2024-10-18T16:31:41.957Z] + local vnc=false
[task 2024-10-18T16:31:41.957Z] + local interactive=false
[task 2024-10-18T16:31:41.957Z] + '[' -n 50 ']'
[task 2024-10-18T16:31:41.957Z] + [[ false == false ]]
[task 2024-10-18T16:31:41.957Z] + [[ false == false ]]
[task 2024-10-18T16:31:41.957Z] + kill 50
[task 2024-10-18T16:31:41.957Z] + screen -XS xvfb quit
[task 2024-10-18T16:31:41.976Z] + exit 2
[taskcluster 2024-10-18 16:31:42.558Z] === Task Finished ===
[taskcluster 2024-10-18 16:31:43.571Z] Unsuccessful task run with exit code: 2 completed in 173.889 seconds
Flags: needinfo?(padenot)
Attachment #9413477 - Attachment description: Bug 1717448 - Vendor {fmt} in third_party. r?glandium → Bug 1717448 - Vendor {fmt} in third_party. r=glandium
Attachment #9414864 - Attachment description: Bug 1717448 - Patch `{fmt}` to avoid crashing when printing `nullptr` strings, and attempting to print to an invalid FILE*. r?nika → Bug 1717448 - Patch `{fmt}` to avoid crashing when printing `nullptr` strings, and attempting to print to an invalid FILE*. r=nika
Attachment #9414866 - Attachment description: Bug 1717448 - Make `{fmt}` use `double-conversion` for converting float to string internally. r?glandium,nika → Bug 1717448 - Make `{fmt}` use `double-conversion` for converting float to string internally. r=glandium,nika
Attachment #9416779 - Attachment description: Bug 1717448 - Don't use std::generic_category and other error reporting facilities, ignore IO errors. r?glandium → Bug 1717448 - Don't use std::generic_category and other error reporting facilities, ignore IO errors. r=glandium
Attachment #9418180 - Attachment description: Bug 1717448 - Exclude `{fmt}` internals from hazard analysis. r?sfink → Bug 1717448 - Exclude `{fmt}` internals from hazard analysis. r=sfink
Attachment #9416581 - Attachment description: Bug 1717448 - Exclude {fmt} from gecko-specific checks. r?glandium,nika → Bug 1717448 - Exclude {fmt} from gecko-specific checks. r=glandium,nika
Attachment #9416780 - Attachment description: Bug 1717448 - Ignore allocations in done within `{fmt}`. r?glandium → Bug 1717448 - Ignore allocations in done within `{fmt}`. r=sfink
Attachment #9413564 - Attachment description: Bug 1717448 - Teach MOZ_LOG to use {fmt}. r?glandium,nika → Bug 1717448 - Teach MOZ_LOG to use {fmt}. r=nika
Attachment #9413565 - Attachment description: Bug 1717448 - Print the diagnostic message in AssertedCast with {fmt}. r?nbp → Bug 1717448 - Print the diagnostic message in AssertedCast with {fmt}. r=nbp
Attachment #9414863 - Attachment description: Bug 1717448 - Integrate {fmt} with nsString. r?#xpcom-reviewers,nika → Bug 1717448 - Integrate {fmt} with nsString. r=#xpcom-reviewers,mccr8,nika
Attachment #9414175 - Attachment description: Bug 1717448 - Add some tests for Gecko integration. r?nika,glandium → Bug 1717448 - Add some tests for Gecko integration. r=glandium
Attachment #9414176 - Attachment description: Bug 1717448 - Add some documentation about using {fmt} in Gecko. r?nika → Bug 1717448 - Add some documentation about using {fmt} in Gecko. r=nika
Attachment #9413566 - Attachment description: Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r?nika → Bug 1717448 - Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r=nika
Pushed by padenot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9719b35b85d6 Vendor {fmt} in third_party. r=glandium https://hg.mozilla.org/integration/autoland/rev/e595c59c8b0c Patch `{fmt}` to avoid crashing when printing `nullptr` strings, and attempting to print to an invalid FILE*. r=nika https://hg.mozilla.org/integration/autoland/rev/a6a266e1cedf Make `{fmt}` use `double-conversion` for converting float to string internally. r=glandium,nika https://hg.mozilla.org/integration/autoland/rev/f2c1cb4d8185 Don't use std::generic_category and other error reporting facilities, ignore IO errors. r=glandium https://hg.mozilla.org/integration/autoland/rev/54fd0897fac3 Exclude `{fmt}` internals from hazard analysis. r=sfink https://hg.mozilla.org/integration/autoland/rev/7fa5b359b4c3 Exclude {fmt} from gecko-specific checks. r=glandium,nika https://hg.mozilla.org/integration/autoland/rev/a4adf3ab7665 Ignore allocations in done within `{fmt}`. r=sfink https://hg.mozilla.org/integration/autoland/rev/683a40d698a3 Teach MOZ_LOG to use {fmt}. r=nika https://hg.mozilla.org/integration/autoland/rev/9bd358abca26 Print the diagnostic message in AssertedCast with {fmt}. r=nbp https://hg.mozilla.org/integration/autoland/rev/ffa33e073c36 Integrate {fmt} with nsString. r=xpcom-reviewers,nika,mccr8 https://hg.mozilla.org/integration/autoland/rev/9b55c0eea2be Add some tests for Gecko integration. r=glandium https://hg.mozilla.org/integration/autoland/rev/3ada13e9d071 Add some documentation about using {fmt} in Gecko. r=nika https://hg.mozilla.org/integration/autoland/rev/e873c27d97a9 Replace printf-style logging by MOZ_LOG_FMT in AudioData.cpp. r=nika https://hg.mozilla.org/integration/autoland/rev/2548732ae2f3 apply code formatting via Lando
Regressions: 1926089
Regressions: 1926155
Regressions: 1926253
Flags: needinfo?(padenot)
Depends on: 1928856
Blocks: 1943076
Regressions: 1987410
Depends on: 1990743
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: