fix(processmonitor): Bump smartdaemon and stop aggressive pidusage cache clearing in ProcessMonitor

This commit is contained in:
2025-09-03 11:47:06 +00:00
parent f10a7847c2
commit 61c4aabba3
5 changed files with 77 additions and 62 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## 2025-09-03 - 5.10.2 - fix(processmonitor)
Bump smartdaemon and stop aggressive pidusage cache clearing in ProcessMonitor
- Update dependency @push.rocks/smartdaemon from ^2.0.9 to ^2.1.0 in package.json.
- Remove per-PID pidusage.clear calls in ts/daemon/processmonitor.ts (getProcessGroupStats) to avoid potential errors or unexpected behavior from manually clearing pidusage cache.
## 2025-09-03 - 5.10.1 - fix(processmonitor)
Skip null pidusage entries when aggregating process-group memory/CPU to avoid errors

View File

@@ -35,7 +35,7 @@
"@push.rocks/npmextra": "^5.3.3",
"@push.rocks/projectinfo": "^5.0.2",
"@push.rocks/smartcli": "^4.0.11",
"@push.rocks/smartdaemon": "^2.0.9",
"@push.rocks/smartdaemon": "^2.1.0",
"@push.rocks/smartfile": "^11.2.7",
"@push.rocks/smartinteract": "^2.0.16",
"@push.rocks/smartipc": "^2.3.0",

122
pnpm-lock.yaml generated
View File

@@ -18,8 +18,8 @@ importers:
specifier: ^4.0.11
version: 4.0.11
'@push.rocks/smartdaemon':
specifier: ^2.0.9
version: 2.0.9
specifier: ^2.1.0
version: 2.1.0
'@push.rocks/smartfile':
specifier: ^11.2.7
version: 11.2.7
@@ -826,8 +826,8 @@ packages:
'@push.rocks/smartcrypto@2.0.4':
resolution: {integrity: sha512-1+/5bsjyataf5uUkUNnnVXGRAt+gHVk1KDzozjTqgqJxHvQk1d9fVDohL6CxUhUucTPtu5VR5xNBiV8YCDuGyw==}
'@push.rocks/smartdaemon@2.0.9':
resolution: {integrity: sha512-TJd2N/vMAY3qpuy7ub0btNsSqdy7oU/hF/D+BbmfJVAiTKpvlgtCXKE5POwfuee03SONyh8LuH5Ey1ycIpsEHA==}
'@push.rocks/smartdaemon@2.1.0':
resolution: {integrity: sha512-cxc05jvA/frb3rJ5EdQkkfbJXiFC33u57LmOaBye6Hynj4w/ZZjph7WLAkp6Yx8+75Ldajm6LXIRxn91+RbDeQ==}
'@push.rocks/smartdata@5.16.4':
resolution: {integrity: sha512-COiKw8yk9iAcLN44WmZHG8Gi0v+HGkgM8Osoq7Cns+UsOA+grPepqbN2r0XPG1fm5vOdJcaydi2ZU0xrnbGVvQ==}
@@ -898,6 +898,9 @@ packages:
'@push.rocks/smartlog@3.1.8':
resolution: {integrity: sha512-j4H5x4/hEmiIO7q+/LKyX3N+AhRIOj1jDE4TvZDvujZkbT/9wEWfpO1bqeMe/EQbg1eOQMlAuyrcLXUcDICpQg==}
'@push.rocks/smartlog@3.1.9':
resolution: {integrity: sha512-Lix1pazMhvnSUyj4Bt+pO+SvImw3l0dm5A0LTTx/QaSlWP8bpAQNQ+8z7wfQy3pIKFHkApxvGM6WprgCCS2itQ==}
'@push.rocks/smartmanifest@2.0.2':
resolution: {integrity: sha512-QGc5C9vunjfUbYsPGz5bynV/mVmPHkrQDkWp8ZO8VJtK1GZe+njgbrNyxn2SUHR0IhSAbSXl1j4JvBqYf5eTVg==}
@@ -1270,8 +1273,8 @@ packages:
resolution: {integrity: sha512-EYqsIYJmkR1VhVE9pccnk353xhs+lB6btdutJEtsp7R055haMJp2yE16eSxw8fv+G0WUY6vqxyYOP8kOqawxYQ==}
engines: {node: '>=18.0.0'}
'@smithy/core@3.9.0':
resolution: {integrity: sha512-B/GknvCfS3llXd/b++hcrwIuqnEozQDnRL4sBmOac5/z/dr0/yG1PURNPOyU4Lsiy1IyTj8scPxVqRs5dYWf6A==}
'@smithy/core@3.9.1':
resolution: {integrity: sha512-E3erEn1SjPq8P9w2fPlp1+slaq6FlrRKlsaLCo0aPMY2j94lwZlwz1yqY4yDeX3+ViG+sOEPPRBZGfdciMtABA==}
engines: {node: '>=18.0.0'}
'@smithy/credential-provider-imds@4.0.7':
@@ -1338,16 +1341,16 @@ packages:
resolution: {integrity: sha512-ZhvqcVRPZxnZlokcPaTwb+r+h4yOIOCJmx0v2d1bpVlmP465g3qpVSf7wxcq5zZdu4jb0H4yIMxuPwDJSQc3MQ==}
engines: {node: '>=18.0.0'}
'@smithy/middleware-endpoint@4.1.19':
resolution: {integrity: sha512-EAlEPncqo03siNZJ9Tm6adKCQ+sw5fNU8ncxWwaH0zTCwMPsgmERTi6CEKaermZdgJb+4Yvh0NFm36HeO4PGgQ==}
'@smithy/middleware-endpoint@4.1.20':
resolution: {integrity: sha512-6jwjI4l9LkpEN/77ylyWsA6o81nKSIj8itRjtPpVqYSf+q8b12uda0Upls5CMSDXoL/jY2gPsNj+/Tg3gbYYew==}
engines: {node: '>=18.0.0'}
'@smithy/middleware-retry@4.1.19':
resolution: {integrity: sha512-X58zx/NVECjeuUB6A8HBu4bhx72EoUz+T5jTMIyeNKx2lf+Gs9TmWPNNkH+5QF0COjpInP/xSpJGJ7xEnAklQQ==}
engines: {node: '>=18.0.0'}
'@smithy/middleware-retry@4.1.20':
resolution: {integrity: sha512-T3maNEm3Masae99eFdx1Q7PIqBBEVOvRd5hralqKZNeIivnoGNx5OFtI3DiZ5gCjUkl0mNondlzSXeVxkinh7Q==}
'@smithy/middleware-retry@4.1.21':
resolution: {integrity: sha512-oFpp+4JfNef0Mp2Jw8wIl1jVxjhUU3jFZkk3UTqBtU5Xp6/ahTu6yo1EadWNPAnCjKTo8QB6Q+SObX97xfMUtA==}
engines: {node: '>=18.0.0'}
'@smithy/middleware-serde@4.0.9':
@@ -1398,8 +1401,8 @@ packages:
resolution: {integrity: sha512-iW6HjXqN0oPtRS0NK/zzZ4zZeGESIFcxj2FkWed3mcK8jdSdHzvnCKXSjvewESKAgGKAbJRA+OsaqKhkdYRbQQ==}
engines: {node: '>=18.0.0'}
'@smithy/smithy-client@4.5.0':
resolution: {integrity: sha512-ZSdE3vl0MuVbEwJBxSftm0J5nL/gw76xp5WF13zW9cN18MFuFXD5/LV0QD8P+sCU5bSWGyy6CTgUupE1HhOo1A==}
'@smithy/smithy-client@4.5.1':
resolution: {integrity: sha512-PuvtnQgwpy3bb56YvHAP7eRwp862yJxtQno40UX9kTjjkgTlo//ov+e1IVCFTiELcAOiqF2++Y0e7eH/Zgv5Vw==}
engines: {node: '>=18.0.0'}
'@smithy/types@4.3.2':
@@ -1438,16 +1441,16 @@ packages:
resolution: {integrity: sha512-xgl75aHIS/3rrGp7iTxQAOELYeyiwBu+eEgAk4xfKwJJ0L8VUjhO2shsDpeil54BOFsqmk5xfdesiewbUY5tKQ==}
engines: {node: '>=18.0.0'}
'@smithy/util-defaults-mode-browser@4.0.27':
resolution: {integrity: sha512-i/Fu6AFT5014VJNgWxKomBJP/GB5uuOsM4iHdcmplLm8B1eAqnRItw4lT2qpdO+mf+6TFmf6dGcggGLAVMZJsQ==}
'@smithy/util-defaults-mode-browser@4.0.28':
resolution: {integrity: sha512-83Iqb9c443d8S/9PD6Bb770Q3ZvCenfgJDoR98iveI+zKpu6d4mOVS2RKBU9Z4VQPbRcrRj71SY0kZePGh+wZg==}
engines: {node: '>=18.0.0'}
'@smithy/util-defaults-mode-node@4.0.26':
resolution: {integrity: sha512-z81yyIkGiLLYVDetKTUeCZQ8x20EEzvQjrqJtb/mXnevLq2+w3XCEWTJ2pMp401b6BkEkHVfXb/cROBpVauLMQ==}
engines: {node: '>=18.0.0'}
'@smithy/util-defaults-mode-node@4.0.27':
resolution: {integrity: sha512-3W0qClMyxl/ELqTA39aNw1N+pN0IjpXT7lPFvZ8zTxqVFP7XCpACB9QufmN4FQtd39xbgS7/Lekn7LmDa63I5w==}
'@smithy/util-defaults-mode-node@4.0.28':
resolution: {integrity: sha512-LzklW4HepBM198vH0C3v+WSkMHOkxu7axCEqGoKdICz3RHLq+mDs2AkDDXVtB61+SHWoiEsc6HOObzVQbNLO0Q==}
engines: {node: '>=18.0.0'}
'@smithy/util-endpoints@3.0.7':
@@ -4681,26 +4684,26 @@ snapshots:
'@aws-sdk/util-user-agent-browser': 3.734.0
'@aws-sdk/util-user-agent-node': 3.758.0
'@smithy/config-resolver': 4.1.5
'@smithy/core': 3.9.0
'@smithy/core': 3.9.1
'@smithy/fetch-http-handler': 5.1.1
'@smithy/hash-node': 4.0.5
'@smithy/invalid-dependency': 4.0.5
'@smithy/middleware-content-length': 4.0.5
'@smithy/middleware-endpoint': 4.1.19
'@smithy/middleware-retry': 4.1.20
'@smithy/middleware-endpoint': 4.1.20
'@smithy/middleware-retry': 4.1.21
'@smithy/middleware-serde': 4.0.9
'@smithy/middleware-stack': 4.0.5
'@smithy/node-config-provider': 4.1.4
'@smithy/node-http-handler': 4.1.1
'@smithy/protocol-http': 5.1.3
'@smithy/smithy-client': 4.5.0
'@smithy/smithy-client': 4.5.1
'@smithy/types': 4.3.2
'@smithy/url-parser': 4.0.5
'@smithy/util-base64': 4.0.0
'@smithy/util-body-length-browser': 4.0.0
'@smithy/util-body-length-node': 4.0.0
'@smithy/util-defaults-mode-browser': 4.0.27
'@smithy/util-defaults-mode-node': 4.0.27
'@smithy/util-defaults-mode-browser': 4.0.28
'@smithy/util-defaults-mode-node': 4.0.28
'@smithy/util-endpoints': 3.0.7
'@smithy/util-middleware': 4.0.5
'@smithy/util-retry': 4.0.7
@@ -4788,26 +4791,26 @@ snapshots:
'@aws-sdk/util-user-agent-browser': 3.734.0
'@aws-sdk/util-user-agent-node': 3.758.0
'@smithy/config-resolver': 4.1.5
'@smithy/core': 3.9.0
'@smithy/core': 3.9.1
'@smithy/fetch-http-handler': 5.1.1
'@smithy/hash-node': 4.0.5
'@smithy/invalid-dependency': 4.0.5
'@smithy/middleware-content-length': 4.0.5
'@smithy/middleware-endpoint': 4.1.19
'@smithy/middleware-retry': 4.1.20
'@smithy/middleware-endpoint': 4.1.20
'@smithy/middleware-retry': 4.1.21
'@smithy/middleware-serde': 4.0.9
'@smithy/middleware-stack': 4.0.5
'@smithy/node-config-provider': 4.1.4
'@smithy/node-http-handler': 4.1.1
'@smithy/protocol-http': 5.1.3
'@smithy/smithy-client': 4.5.0
'@smithy/smithy-client': 4.5.1
'@smithy/types': 4.3.2
'@smithy/url-parser': 4.0.5
'@smithy/util-base64': 4.0.0
'@smithy/util-body-length-browser': 4.0.0
'@smithy/util-body-length-node': 4.0.0
'@smithy/util-defaults-mode-browser': 4.0.27
'@smithy/util-defaults-mode-node': 4.0.27
'@smithy/util-defaults-mode-browser': 4.0.28
'@smithy/util-defaults-mode-node': 4.0.28
'@smithy/util-endpoints': 3.0.7
'@smithy/util-middleware': 4.0.5
'@smithy/util-retry': 4.0.7
@@ -4863,12 +4866,12 @@ snapshots:
'@aws-sdk/core@3.758.0':
dependencies:
'@aws-sdk/types': 3.734.0
'@smithy/core': 3.9.0
'@smithy/core': 3.9.1
'@smithy/node-config-provider': 4.1.4
'@smithy/property-provider': 4.0.5
'@smithy/protocol-http': 5.1.3
'@smithy/signature-v4': 5.1.3
'@smithy/smithy-client': 4.5.0
'@smithy/smithy-client': 4.5.1
'@smithy/types': 4.3.2
'@smithy/util-middleware': 4.0.5
fast-xml-parser: 4.4.1
@@ -4929,7 +4932,7 @@ snapshots:
'@smithy/node-http-handler': 4.1.1
'@smithy/property-provider': 4.0.5
'@smithy/protocol-http': 5.1.3
'@smithy/smithy-client': 4.5.0
'@smithy/smithy-client': 4.5.1
'@smithy/types': 4.3.2
'@smithy/util-stream': 4.2.4
tslib: 2.8.1
@@ -5103,7 +5106,7 @@ snapshots:
'@aws-sdk/credential-provider-web-identity': 3.758.0
'@aws-sdk/nested-clients': 3.758.0
'@aws-sdk/types': 3.734.0
'@smithy/core': 3.9.0
'@smithy/core': 3.9.1
'@smithy/credential-provider-imds': 4.0.7
'@smithy/property-provider': 4.0.5
'@smithy/types': 4.3.2
@@ -5222,7 +5225,7 @@ snapshots:
'@aws-sdk/core': 3.758.0
'@aws-sdk/types': 3.734.0
'@aws-sdk/util-endpoints': 3.743.0
'@smithy/core': 3.9.0
'@smithy/core': 3.9.1
'@smithy/protocol-http': 5.1.3
'@smithy/types': 4.3.2
tslib: 2.8.1
@@ -5253,26 +5256,26 @@ snapshots:
'@aws-sdk/util-user-agent-browser': 3.734.0
'@aws-sdk/util-user-agent-node': 3.758.0
'@smithy/config-resolver': 4.1.5
'@smithy/core': 3.9.0
'@smithy/core': 3.9.1
'@smithy/fetch-http-handler': 5.1.1
'@smithy/hash-node': 4.0.5
'@smithy/invalid-dependency': 4.0.5
'@smithy/middleware-content-length': 4.0.5
'@smithy/middleware-endpoint': 4.1.19
'@smithy/middleware-retry': 4.1.20
'@smithy/middleware-endpoint': 4.1.20
'@smithy/middleware-retry': 4.1.21
'@smithy/middleware-serde': 4.0.9
'@smithy/middleware-stack': 4.0.5
'@smithy/node-config-provider': 4.1.4
'@smithy/node-http-handler': 4.1.1
'@smithy/protocol-http': 5.1.3
'@smithy/smithy-client': 4.5.0
'@smithy/smithy-client': 4.5.1
'@smithy/types': 4.3.2
'@smithy/url-parser': 4.0.5
'@smithy/util-base64': 4.0.0
'@smithy/util-body-length-browser': 4.0.0
'@smithy/util-body-length-node': 4.0.0
'@smithy/util-defaults-mode-browser': 4.0.27
'@smithy/util-defaults-mode-node': 4.0.27
'@smithy/util-defaults-mode-browser': 4.0.28
'@smithy/util-defaults-mode-node': 4.0.28
'@smithy/util-endpoints': 3.0.7
'@smithy/util-middleware': 4.0.5
'@smithy/util-retry': 4.0.7
@@ -6219,12 +6222,12 @@ snapshots:
'@types/node-forge': 1.3.14
node-forge: 1.3.1
'@push.rocks/smartdaemon@2.0.9':
'@push.rocks/smartdaemon@2.1.0':
dependencies:
'@push.rocks/lik': 6.2.2
'@push.rocks/smartfile': 11.2.7
'@push.rocks/smartfm': 2.2.2
'@push.rocks/smartlog': 3.1.8
'@push.rocks/smartlog': 3.1.9
'@push.rocks/smartlog-destination-local': 9.0.2
'@push.rocks/smartpath': 6.0.0
'@push.rocks/smartshell': 3.3.0
@@ -6405,6 +6408,19 @@ snapshots:
'@push.rocks/webrequest': 3.0.37
'@tsclass/tsclass': 9.2.0
'@push.rocks/smartlog@3.1.9':
dependencies:
'@api.global/typedrequest-interfaces': 3.0.19
'@push.rocks/consolecolor': 2.0.3
'@push.rocks/isounique': 1.0.5
'@push.rocks/smartclickhouse': 2.0.17
'@push.rocks/smartfile': 11.2.7
'@push.rocks/smarthash': 3.2.3
'@push.rocks/smartpromise': 4.2.3
'@push.rocks/smarttime': 4.1.1
'@push.rocks/webrequest': 3.0.37
'@tsclass/tsclass': 9.2.0
'@push.rocks/smartmanifest@2.0.2': {}
'@push.rocks/smartmarkdown@3.0.3':
@@ -7055,7 +7071,7 @@ snapshots:
tslib: 2.8.1
uuid: 9.0.1
'@smithy/core@3.9.0':
'@smithy/core@3.9.1':
dependencies:
'@smithy/middleware-serde': 4.0.9
'@smithy/protocol-http': 5.1.3
@@ -7172,9 +7188,9 @@ snapshots:
'@smithy/util-middleware': 4.0.5
tslib: 2.8.1
'@smithy/middleware-endpoint@4.1.19':
'@smithy/middleware-endpoint@4.1.20':
dependencies:
'@smithy/core': 3.9.0
'@smithy/core': 3.9.1
'@smithy/middleware-serde': 4.0.9
'@smithy/node-config-provider': 4.1.4
'@smithy/shared-ini-file-loader': 4.0.5
@@ -7197,12 +7213,12 @@ snapshots:
tslib: 2.8.1
uuid: 9.0.1
'@smithy/middleware-retry@4.1.20':
'@smithy/middleware-retry@4.1.21':
dependencies:
'@smithy/node-config-provider': 4.1.4
'@smithy/protocol-http': 5.1.3
'@smithy/service-error-classification': 4.0.7
'@smithy/smithy-client': 4.5.0
'@smithy/smithy-client': 4.5.1
'@smithy/types': 4.3.2
'@smithy/util-middleware': 4.0.5
'@smithy/util-retry': 4.0.7
@@ -7288,10 +7304,10 @@ snapshots:
'@smithy/util-stream': 4.2.4
tslib: 2.8.1
'@smithy/smithy-client@4.5.0':
'@smithy/smithy-client@4.5.1':
dependencies:
'@smithy/core': 3.9.0
'@smithy/middleware-endpoint': 4.1.19
'@smithy/core': 3.9.1
'@smithy/middleware-endpoint': 4.1.20
'@smithy/middleware-stack': 4.0.5
'@smithy/protocol-http': 5.1.3
'@smithy/types': 4.3.2
@@ -7345,10 +7361,10 @@ snapshots:
bowser: 2.12.1
tslib: 2.8.1
'@smithy/util-defaults-mode-browser@4.0.27':
'@smithy/util-defaults-mode-browser@4.0.28':
dependencies:
'@smithy/property-provider': 4.0.5
'@smithy/smithy-client': 4.5.0
'@smithy/smithy-client': 4.5.1
'@smithy/types': 4.3.2
bowser: 2.12.1
tslib: 2.8.1
@@ -7364,13 +7380,13 @@ snapshots:
'@smithy/types': 4.3.2
tslib: 2.8.1
'@smithy/util-defaults-mode-node@4.0.27':
'@smithy/util-defaults-mode-node@4.0.28':
dependencies:
'@smithy/config-resolver': 4.1.5
'@smithy/credential-provider-imds': 4.0.7
'@smithy/node-config-provider': 4.1.4
'@smithy/property-provider': 4.0.5
'@smithy/smithy-client': 4.5.0
'@smithy/smithy-client': 4.5.1
'@smithy/types': 4.3.2
tslib: 2.8.1
optional: true

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tspm',
version: '5.10.1',
version: '5.10.2',
description: 'a no fuzz process manager'
}

View File

@@ -448,13 +448,6 @@ export class ProcessMonitor extends EventEmitter {
`Total memory for process group: ${this.humanReadableBytes(totalMemory)}`,
);
// Clear pidusage cache for all PIDs to prevent memory leaks
for (const pid of pids) {
try {
(plugins.pidusage as any)?.clear?.(pid);
} catch {}
}
resolve({ memory: totalMemory, cpu: totalCpu });
},
);