Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential bug when reopening datastream after it has closed already. #113

Open
ehpor opened this issue Jun 30, 2023 · 3 comments · May be fixed by #112
Open

Potential bug when reopening datastream after it has closed already. #113

ehpor opened this issue Jun 30, 2023 · 3 comments · May be fixed by #112
Assignees
Labels
bug Something isn't working

Comments

@ehpor
Copy link
Collaborator

ehpor commented Jun 30, 2023

From hicat-package2 CI:

Traceback (most recent call last):
  File "/usr/share/miniconda/envs/catkit2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/share/miniconda/envs/catkit2/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/runner/work/hicat-package2/hicat-package2/hicat-package2/hicat2/conftest.py", line 27, in run_testbed
    testbed = Testbed(port, is_simulated, config)
  File "/home/runner/work/hicat-package2/hicat-package2/catkit2/catkit2/testbed/testbed.py", line 179, in __init__
    self.services[service_id] = ServiceReference(service_id, service_type, ServiceState.CLOSED, dependencies)
  File "/home/runner/work/hicat-package2/hicat-package2/catkit2/catkit2/testbed/testbed.py", line 50, in __init__
    self.state_stream = DataStream.create('state', service_id, 'int8', [1], 20)
RuntimeError: Something went wrong while creating shared memory.

We are not outputing any details about this error, so there's no way to debug this.

@ehpor ehpor added the bug Something isn't working label Jun 30, 2023
@ehpor ehpor self-assigned this Jun 30, 2023
@ehpor ehpor linked a pull request Jun 30, 2023 that will close this issue
@RemiSoummer
Copy link
Collaborator

Is this related to the issue we had found together that needed with an Attribute error because the service was not available yet on the CI due to the slowness of the machines on GitHub or is this something entirely new here.

@ehpor
Copy link
Collaborator Author

ehpor commented Jul 2, 2023

Yes, this is related. Some of the errors while fixing this CI problem were these non-descriptive ones. At this point in the program, there should be no problem opening new datastreams, but apparently there is some problem. The corresponding PR adds more descriptive error messages to point out what went wrong during shared memory creation.

@lanemeier7
Copy link
Collaborator

I am getting this error intermittently with my CI system. Sometimes when test cases are run I get the "Something went wrong while creating shared memory." bubbling up.

self = <catkit2.testbed.testbed_proxy.TestbedProxy object at 0x000001DDE7186CA8>
item = 'accufiz_interferometer'
    def __getattr__(self, item):
        '''Get the ServiceProxy named after the attribute.
    
        This acts as a shortcut for :func:`~catkit2.testbed.TestbedProxy.get_service`.
    
        Parameters
        ----------
        item : string
            The identifier for the service for which to return the ServiceProxy.
    
        Returns
        -------
        ServiceProxy or derived class object.
            A ServiceProxy for the named service.
        '''
        try:
            service = self.get_service(item)
    
            # Remember the service for next time.
            setattr(self, item, service)
    
            return service
        except Exception as e:
>           raise AttributeError(str(e))
E           AttributeError: Something went wrong while opening shared memory.
c:\catkit2\catkit2\testbed\testbed_proxy.py:66: AttributeError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants