-
Notifications
You must be signed in to change notification settings - Fork 339
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
@after()
handler is causing a deadlock
#130
Comments
Yes, right now it's possible to trigger requests in the The fix that was introduced has one drawback: it hides any error that happens during the execution of the handler. So I'm wondering if you suffer of that. Can you enable debug logs by configuring the log level to debug and print the log? You can do that like this:
|
Or do you have an |
I'm using the last version of the ocpp lib from pip (0.7.1) Nothing unusual is seen in the logs:
From the Charge Point's point of view, the ChangeConfiguration packet is received, and a Confirmation is sent. Here is a complete example of the problem built from the project CS sample:
|
And can you tell if the ChargePoint received the message and answered to the ChangeConfiguration? If there is no answer for 30 sec, you will see a timeout error at least |
Yes, the Charge Point receives a valid ChangeConfiguration request, and send a valid ChangeConfiguration confirmation (I've double checked it with WireShark). The confirmation doesn't appear on the Central System side.
There is a timeout after 30 sec indeed. |
I want to be sure to not interfere with my own implementation, so I've implemented a complete sample which reproduce the problem, with only the Python library. The attached files:
Here's what I can observe in the logs, from the CS:
And nothing else (before the timeout occurs). And from the CP:
So as with my own implementation, the ChangeConfiguration confirmation is sent and never received on the other side. I hope somebody could look into it and confirm this behavior. |
I can reproduce the problem. The logs of
|
@after()
handler is causing a deadlock
I've founded the problem. I removed by accident this line in the last release. |
0.7.1 reintroduced a deadlock bug when was already fixed in 0.4.2. Sending a call in an `@after` handler would cause a deadlock. Fixes #130
It works now, thanks. |
I hope to release 0.7.2 containing a fix soon |
0.7.1 reintroduced a deadlock bug that was already fixed in 0.4.2. Sending a call in an `@after` handler would cause a deadlock. Fixes mobilityhouse#130
Hello,
I'm using this project to implement a Central System to test a (proprietary) Charge Point implementation.
In order to simulate several behaviors, I want to trigger CS initiated requests, but I can't get it to work.
For example, let's imagine you want to trigger a ChangeConfiguration request (from the CS to the CP) after a Heartbeat request (from the CP to the CS).
My naive attempt is to include the following code in the CS sample class (OCPP 1.6). But the execution hangs after the call().
The PDU is sent to the CP, but no further data is received.
I'm new to Python, and I don't know if I understand the project architecture or coroutines correctly.
Thanks to all contributors for this project.
The text was updated successfully, but these errors were encountered: