Skip to main content

PMDaemon v0.1.3 - Critical Bug Fixes & Enhanced State Persistence

Shawn McAllister
Lead Developer

We're excited to announce PMDaemon v0.1.3, a critical stability release that resolves major issues with process monitoring, state persistence, and cleanup operations. This release transforms PMDaemon from having significant operational issues to being a rock-solid, production-ready process manager.

๐ŸŽ‰ What's New in v0.1.3โ€‹

This release focuses entirely on stability and reliability, addressing critical bugs that affected core functionality. PMDaemon now properly tracks process PIDs, maintains consistent UUIDs across restarts, detects ports from application logs, and performs complete cleanup operations without leaving zombie processes.

๐Ÿ› Critical Bug Fixesโ€‹

๐Ÿ” Process Monitoring & State Trackingโ€‹

  • Fixed PID Detection - Process PIDs now display correctly instead of showing "-"
  • Fixed Port Detection - Ports are now properly detected and displayed in the process list
  • Fixed UUID Persistence - Process IDs remain consistent across PMDaemon restarts
  • Enhanced State Restoration - Processes are properly restored with all metadata after daemon restarts

๐Ÿงน Process Lifecycle Managementโ€‹

  • Fixed Zombie Process Bug - delete all command now properly removes all processes and configuration files
  • Enhanced Cleanup Operations - Metadata files are properly created and removed during process lifecycle
  • Improved Error Handling - Better error reporting during cleanup operations

๐Ÿ“Š Monitoring & Loggingโ€‹

  • Enhanced Log Reading - Improved debugging and error reporting for log operations
  • Port Detection from Logs - Automatically detects ports from application output (e.g., "Server bound to 127.0.0.1:3000")
  • Real-time Monitoring - Fixed issues with the monit command displaying accurate process information

โœจ Technical Improvementsโ€‹

๐Ÿ—„๏ธ Metadata Persistence Systemโ€‹

  • New Metadata Files - Process runtime state is now saved to .meta.json files
  • Comprehensive State Tracking - Stores process IDs, assigned ports, PIDs, and instance numbers
  • Automatic Restoration - All metadata is automatically restored when PMDaemon restarts

๐Ÿ”ง Enhanced Process Managementโ€‹

  • Stored PID Field - New field to track PIDs when process handles are unavailable
  • Improved Loading Logic - Fixed issue where metadata files were incorrectly loaded as process configurations
  • Better Port Management - Enhanced port allocation and persistence across restarts

๐Ÿš€ Before vs Afterโ€‹

Process Monitoring Displayโ€‹

Before v0.1.3:

โ”‚ ID       โ”† Name        โ”† Status โ”† PID โ”† Port โ”‚
โ”‚ fa007933 โ”† my-app โ”† online โ”† - โ”† - โ”‚

After v0.1.3:

โ”‚ ID       โ”† Name        โ”† Status โ”† PID     โ”† Port  โ”‚
โ”‚ fa007933 โ”† my-app โ”† online โ”† 2642197 โ”† 3000 โ”‚

Delete All Operationโ€‹

Before v0.1.3:

  • Left zombie processes in the list
  • Incomplete file cleanup
  • Phantom processes after restart

After v0.1.3:

  • Complete process removal
  • All configuration and metadata files cleaned up
  • Clean state after delete all

๐Ÿ” What Was Fixedโ€‹

1. PID Tracking Issueโ€‹

  • Problem: PIDs showed as "-" even for running processes
  • Root Cause: Process handles couldn't be restored after PMDaemon restart
  • Solution: Added stored_pid field to persist PIDs in metadata files

2. Port Detection Issueโ€‹

  • Problem: Ports showed as "-" even when processes were bound to specific ports
  • Root Cause: Port information wasn't persisted and couldn't be detected from logs
  • Solution: Added port detection from log output and metadata persistence

3. UUID Consistency Issueโ€‹

  • Problem: Process IDs changed on every PMDaemon restart
  • Root Cause: New UUIDs were generated instead of restoring saved ones
  • Solution: Added UUID persistence in metadata files

4. Zombie Process Bugโ€‹

  • Problem: delete all left phantom processes and incomplete cleanup
  • Root Cause: Metadata files were loaded as process configurations
  • Solution: Fixed loading logic to exclude .meta.json files from process loading

๐Ÿ“Š Technical Detailsโ€‹

  • New Dependencies: Added regex crate for log parsing
  • Enhanced Error Handling: Better error reporting during cleanup operations
  • Improved Debugging: Added comprehensive logging for troubleshooting
  • Metadata System: Complete runtime state persistence and restoration

๐Ÿ†š Reliability Improvementsโ€‹

IssueBefore v0.1.3After v0.1.3
PID DisplayโŒ Shows "-"โœ… Shows actual PID
Port DisplayโŒ Shows "-"โœ… Shows actual port
UUID ConsistencyโŒ Changes each restartโœ… Persistent across restarts
Delete All CleanupโŒ Leaves zombiesโœ… Complete cleanup
State RestorationโŒ Partialโœ… Complete
Log-based Port DetectionโŒ Not supportedโœ… Automatic detection

๐Ÿ”— Resourcesโ€‹


PMDaemon v0.1.3 represents a major stability milestone, resolving all critical operational issues and making PMDaemon truly production-ready. Upgrade today for a reliable process management experience!

Download: GitHub Releases Documentation: https://entrepeneur4lyf.github.io/pmdaemon