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

RuntimeError (AWS_ERROR_PRIORITY_QUEUE_EMPTY) occurs after 245 connection calls to greengrasscoreipc.connect() #521

Closed
shomerj opened this issue Oct 6, 2023 · 7 comments
Labels
automation-exempt This issue will not be closed by autoclose action

Comments

@shomerj
Copy link

shomerj commented Oct 6, 2023

Describe the bug

Python 3.9, arm32v7, Ubuntu buster

Not sure if this is a bug or explicitly built into the code.
Our system has been receiving RuntimeError after 245 calls when connecting to awsiot.greengrasscoreipc.connect(). The specific error message is RuntimeError: 30 (AWS_ERROR_PRIORITY_QUEUE_EMPTY): Attempt to pop an item from an empty queue.

Expected Behavior

Expected connection call to continue to working

Current Behavior

After the 245th established connection RuntimeError (AWS_ERROR_PRIORITY_QUEUE_EMPTY) is raised.

Reproduction Steps

This code snippet has reproduced the error:

import awsiot.greengrasscoreipc

count = 0
while True:
    ipc_client = awsiot.greengrasscoreipc.connect()
    print(f"Number of loops: {count}")
    count += 1

This was also tested with sleep added after each call.
Screenshot 2023-10-03 at 4 54 41 PM

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.12.6

Environment details (OS name and version, etc.)

Debian GNU/Linux, Debian 10 (buster)

@shomerj shomerj added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 6, 2023
@xiazhvera
Copy link
Contributor

Hi @shomerj,

It is hard to say what cause the issue by the error message here. Would you like to provide more logs? Please make sure to remove anything credential information in the log.
You can enable the logs by:

io.init_logging(io.LogLevel.Debug, `<out file>`)

@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Oct 11, 2023
@github-actions
Copy link

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added closing-soon This issue will automatically close in 5 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 5 days unless further comments are made. labels Oct 13, 2023
@bretambrose bretambrose reopened this Oct 20, 2023
@bretambrose bretambrose added automation-exempt This issue will not be closed by autoclose action and removed closed-for-staleness labels Oct 20, 2023
@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. label Oct 20, 2023
@bretambrose
Copy link
Contributor

The Greengrass IPC client bindings intentionally contain a reference cycle. You must call .close() on the client to break the cycle and put the client in a state where it can be GCd.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@bretambrose
Copy link
Contributor

I'll see if there are some places in the documentation where it would make sense to add this information.

@bretambrose bretambrose removed bug This issue is a bug. p2 This is a standard priority issue labels Mar 21, 2024
@bretambrose
Copy link
Contributor

Closing as of #572

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation-exempt This issue will not be closed by autoclose action
Projects
None yet
Development

No branches or pull requests

4 participants