Skip to content

Commit d61b7ea

Browse files
committed
Watchdog: dump /dev/shm + log FI_EFA_ENABLE_SHM_TRANSFER env var
When the 60s watchdog fires, list /dev/shm contents to verify whether SHM regions exist or not. Also log FI_EFA_ENABLE_SHM_TRANSFER at rank 0 startup to confirm the env var was received.
1 parent 632eb0f commit d61b7ea

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

palace/main.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ int main(int argc, char *argv[])
210210
FILE *f = fopen(path, "a");
211211
if (!f) return;
212212
fprintf(f, "=== WATCHDOG FIRED (60s timeout) ===\n");
213+
// Dump /dev/shm contents to see if SHM regions exist
214+
fprintf(f, "--- /dev/shm listing ---\n");
215+
FILE *shm_ls = popen("ls -la /dev/shm/ 2>&1 | head -30", "r");
216+
if (shm_ls) {
217+
char line[512];
218+
while (fgets(line, sizeof(line), shm_ls)) fputs(line, f);
219+
pclose(shm_ls);
220+
}
213221
// Dump kernel stack
214222
char stack_path[64];
215223
snprintf(stack_path, sizeof(stack_path), "/proc/%d/stack", getpid());
@@ -250,6 +258,8 @@ int main(int argc, char *argv[])
250258
};
251259
log_env("FI_PROVIDER");
252260
log_env("FI_LOG_LEVEL");
261+
log_env("FI_EFA_ENABLE_SHM_TRANSFER");
262+
log_env("FI_EFA_RNR_RETRY");
253263
log_env("FI_OFI_RXM_USE_SRX");
254264
log_env("FI_UNIVERSE_SIZE");
255265
log_env("OMPI_MCA_pml");

0 commit comments

Comments
 (0)