Skip to content

Commit a49cb73

Browse files
committed
Actually use CleanupTask in TempLocationManager
This task was never scheduled or executed, but its countdown-latch was waited on during shutdown. This resulted in the following log message each time a process was launched with profiling enabled: [dd.trace 2025-02-18 15:07:21:489 +0000] [Temp Location Manager Cleanup] INFO com.datadog.profiling.controller.TempLocationManager - Cleanup task timed out. /var/folders/6l/65lfwqj14ps6w4gt7495gly80000gq/T/ddprof/pid_4866 temp directory might not have been cleaned up properly
1 parent 5b7780b commit a49cb73

File tree

1 file changed

+1
-1
lines changed
  • dd-java-agent/agent-profiling/profiling-controller/src/main/java/com/datadog/profiling/controller

1 file changed

+1
-1
lines changed

dd-java-agent/agent-profiling/profiling-controller/src/main/java/com/datadog/profiling/controller/TempLocationManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ private TempLocationManager() {
294294
tempDir = baseTempDir.resolve(TEMPDIR_PREFIX + pid);
295295
if (runStartupCleanup) {
296296
// do not execute the background cleanup task when running in tests
297-
AgentTaskScheduler.INSTANCE.execute(() -> cleanup(false));
297+
AgentTaskScheduler.INSTANCE.execute(cleanupTask);
298298
}
299299

300300
Thread selfCleanup =

0 commit comments

Comments
 (0)