Skip to content

Logging improvements#1201

Merged
karya0 merged 7 commits intomainfrom
dev/karya0/logging2
Apr 23, 2025
Merged

Logging improvements#1201
karya0 merged 7 commits intomainfrom
dev/karya0/logging2

Conversation

@karya0
Copy link
Copy Markdown
Member

@karya0 karya0 commented Apr 21, 2025

  • DMTCP_LOG_FILE env var to specify a path for log file. This allows multiple processes to use the same log file and is important when debugging distributed computations.
  • Single-line logging -- when logging to single file, one line per log message makes it easier to parse log files using external tooling.
  • Bug fixes to make --enable-logging work.
  • Some non-fatal asserts replaced with warnings.

Copy link
Copy Markdown
Collaborator

@xuyao0127 xuyao0127 left a comment

Choose a reason for hiding this comment

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

LGTM

@karya0 karya0 requested a review from Copilot April 21, 2025 22:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the logging infrastructure and fixes related bugs to simplify diagnostics during distributed computations. Key changes include:

  • Enhanced logging statements with safer type casts and one-line logging for easier parsing.
  • Refactored timestamp generation and environment-based log file initialization.
  • Bug fixes in coordinator message and signal handling along with associated assertion/logging utilities.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/writeckpt.cpp Added explicit casts in logging to clarify address types.
src/util_misc.cpp Replaced gettimeofday with clock_gettime and updated timestamp generation logic.
src/util_init.cpp Introduced DMTCP_LOG_FILE env var to allow custom log file paths.
src/plugin/pid/virtualpidtable.cpp Removed debug output (printMaps) to reduce verbosity.
src/dmtcp_coordinator.cpp Converted several JASSERT instances to warnings and refined signal/message handling.
src/dlwrappers.cpp Commented out JTRACE calls prone to deadlock to enhance stability.
src/constants.h Updated virtual PID constants and added new ENV_VAR_LOG_FILE definition.
jalib/jassert.h Added overload for Print on mutable char pointers and introduced one-line assert macros.
jalib/jassert.cpp Adjusted assert message formatting and newline handling in the destructor.
Comments suppressed due to low confidence (1)

src/constants.h:60

  • The new MAX_VIRTUAL_PID value is significantly lower than before; please ensure that this limit aligns with system and deployment requirements.
#define MAX_VIRTUAL_PID             ((pid_t)1000000)

@karya0 karya0 merged commit 8ef1e42 into main Apr 23, 2025
1 check passed
@karya0 karya0 deleted the dev/karya0/logging2 branch April 30, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants