Skip to content

fix: crash when trace-logging in tests#5529

Merged
bthomee merged 3 commits intoXRPLF:developfrom
mvadari:test-log-fix
Jul 2, 2025
Merged

fix: crash when trace-logging in tests#5529
bthomee merged 3 commits intoXRPLF:developfrom
mvadari:test-log-fix

Conversation

@mvadari
Copy link
Copy Markdown
Collaborator

@mvadari mvadari commented Jul 2, 2025

High Level Overview of Change

This PR fixes a crash in tests when the test Env is run at trace/debug log level.

This issue only affects tests, and only if logging at trace/debug level, so really only relevant during rippled development, and does not affect production servers.

Note: I think the logs run a bit slower with this fix, due to the lock, but IMO that's not a big deal since this is only relevant for development

h/t @sublimator for the fix in the issue

Context of Change

Fixes #5388

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

API Impact

N/A

Test Plan

Worked locally.

Repro instructions are in the issue.

@bthomee bthomee requested a review from vlntb July 2, 2025 17:29
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.1%. Comparing base (e18f27f) to head (930d882).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #5529     +/-   ##
=========================================
- Coverage     79.1%   79.1%   -0.0%     
=========================================
  Files          816     816             
  Lines        71605   71605             
  Branches      8237    8240      +3     
=========================================
- Hits         56625   56619      -6     
- Misses       14980   14986      +6     

see 4 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@vlntb vlntb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One little nit.

Co-authored-by: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com>
@bthomee bthomee added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Jul 2, 2025
Co-authored-by: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com>
@mvadari mvadari added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Jul 2, 2025
@bthomee bthomee enabled auto-merge (squash) July 2, 2025 19:10
@bthomee bthomee merged commit c2f3e2e into XRPLF:develop Jul 2, 2025
2 checks passed
mvadari added a commit to mvadari/rippled that referenced this pull request Jul 3, 2025
This PR fixes a crash in tests when the test `Env is run at trace/debug log level.

This issue only affects tests, and only if logging at trace/debug level, so really only relevant during rippled development, and does not affect production servers.
ximinez added a commit that referenced this pull request Jul 21, 2025
…refactoring-1

* upstream/develop: (56 commits)
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  test: switch some unit tests to doctest (#5383)
  ...
ximinez added a commit that referenced this pull request Jul 22, 2025
…actoring-2

* ximinez/lending-refactoring-1: (57 commits)
  Fix formatting
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  ...
ximinez added a commit that referenced this pull request Jul 22, 2025
…actoring-3

* ximinez/lending-refactoring-2: (57 commits)
  Fix formatting
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  ...
mvadari added a commit that referenced this pull request Jul 23, 2025
Co-authored-by: Jingchen <a1q123456@users.noreply.github.com>
Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
Co-authored-by: Denis Angell <dangell@transia.co>
Co-authored-by: Vlad <129996061+vvysokikh1@users.noreply.github.com>
Co-authored-by: Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
Co-authored-by: yinyiqian1 <yqian@ripple.com>
Co-authored-by: Michael Legleux <legleux@users.noreply.github.com>
Co-authored-by: Bart <bthomee@users.noreply.github.com>
Co-authored-by: Chenna Keshava B S <21219765+ckeshava@users.noreply.github.com>
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
Co-authored-by: Luc des Trois Maisons <3maisons@gmail.com>
Co-authored-by: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com>
fix: crash when trace-logging in tests (#5529)
Fix compilation error with clang-20 and cleanup (#5543)
fix: Link with boost libraries explicitly (#5546)
fix: add allowTrustLineLocking flag for account_info (#5525)
fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
Fix macos runner (#5585)
Fix clang-format CI job (#5598)
resolved actions/runner#2058.
This was referenced Aug 27, 2025
@mvadari mvadari deleted the test-log-fix branch February 4, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Double free of object malloc error when running beast::severities::kTrace

3 participants