Skip to content

Commit 5dda30c

Browse files
committed
[iris] Disable periodic memray memory profiling
memray attach has been triggering segfaults in the processes it profiles, so the controller's periodic profile loop now captures only py-spy CPU profiles. Memory profiling can be re-enabled once the memray issue is understood. On-demand memory profile RPCs and CLI paths are unchanged.
1 parent 562bad0 commit 5dda30c

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

lib/iris/src/iris/cluster/controller/controller.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,11 @@ def _run_profile_loop(self, stop_event: threading.Event) -> None:
15181518
logger.exception("Profile loop iteration failed")
15191519

15201520
def _profile_all_running_tasks(self) -> None:
1521-
"""Capture CPU and memory profiles for every running task and store in the DB."""
1521+
"""Capture CPU profiles (py-spy) for every running task and store in the DB.
1522+
1523+
Memory profiling via memray is currently disabled because memray attach
1524+
has been triggering segfaults in target processes.
1525+
"""
15221526
workers = healthy_active_workers_with_attributes(self._db)
15231527
if not workers:
15241528
return
@@ -1539,12 +1543,7 @@ def _profile_all_running_tasks(self) -> None:
15391543
)
15401544
self._dispatch_profiles(profile_targets, cpu_profile_type, "cpu", self._config.profile_duration)
15411545

1542-
memory_profile_type = job_pb2.ProfileType(
1543-
memory=job_pb2.MemoryProfile(format=job_pb2.MemoryProfile.STATS),
1544-
)
1545-
self._dispatch_profiles(profile_targets, memory_profile_type, "memory", self._config.profile_duration)
1546-
1547-
logger.info("Profile round (cpu+memory): captured for %d tasks", len(profile_targets))
1546+
logger.info("Profile round (cpu): captured for %d tasks", len(profile_targets))
15481547

15491548
def _dispatch_profiles(
15501549
self,

0 commit comments

Comments
 (0)