Skip to content

AttributeError: 'MacSafeQueue' object has no attribute '_counter' when using MonitoringHub on MacOS with HTEX #3856

@d33bs

Description

@d33bs

Describe the bug
Parsl experiences a exception when attempting to run MonitoringHub on MacOS: AttributeError: 'MacSafeQueue' object has no attribute '_counter'. This results in a hung process which never seems to exit and has to be manually terminated. The monitoring.db` database seems to be created but not populated afterwards. I tested this quickly within a Ubuntu 22.04.4 environment and the same does not occur (runs successfully and populates the monitoring database).

To Reproduce

  • MacOS 15
  • Python 3.10
  • Parsl 2025.5.12
  • Install deps: pip install "parsl[monitoring] numpy
  • Run the following code using python test.py
import parsl

from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.monitoring.monitoring import MonitoringHub
from parsl.addresses import address_by_route

from parsl.app.app import python_app

if __name__ == '__main__':
    # Load a Parsl configuration with the HTEX executor
    parsl.load(Config(
        executors=[
            HighThroughputExecutor(
                label="local_htex",
                cores_per_worker=1,
                max_workers_per_node=4,
                address=address_by_route(),
            )
        ],
        monitoring=MonitoringHub(
            hub_address=address_by_route(),
            monitoring_debug=True,
            resource_monitoring_interval=0.0001,
        ),
        strategy='none'
        ))

    @python_app
    def allocate_memory(task_id):
        import numpy as np
        arr = np.ones((40_000_000,), dtype=np.float64)
        return f"Task {task_id} allocated memory successfully"

    # Launch 3 memory-using tasks
    futures = [allocate_memory(0)]

    # Collect and print results
    for fut in futures:
        print(fut.result())

    parsl.dfk().cleanup()

Expected behavior
I'd hope that the process is able to complete successfully or provide helpful information on how to troubleshoot or diagnose the challenge.

Distributed Environment

  • Parsl was launched on a local MacOS machine for testing.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions