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

Error when using c_node #516

Open
starlitxiling opened this issue May 28, 2024 · 9 comments
Open

Error when using c_node #516

starlitxiling opened this issue May 28, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@starlitxiling
Copy link
Contributor

Describe the bug
I tried to send and receive messages using the C API in dora, but it gave some errors. I found that the init_dora_context_from_env or dora_next_event function had a problem, and then I found that DORA_NODE_CONFIG was not set. I don't know how dora sets DORA_NODE_CONFIG according to the yml file during operation, but this problem did not occur in the 0.3.2 version of dora.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots or Video
image
image

Environments

  • System info: Ubuntu 20.04
  • Dora version: 0.3.4
@github-actions github-actions bot added the bug Something isn't working label May 28, 2024
@haixuanTao
Copy link
Collaborator

DORA_NODE_CONFIG is an environment variable that is set when dora spawn a node in dora start you should not set it yourself.

If this issue happens, there is probably something wrong with how you start the dataflow or the environment variables that are being passed to your process.

It seems to be fine in our CI.

Would you mind trying what the difference is between the CI and your node, in this very specific context?

@starlitxiling
Copy link
Contributor Author

Yes, I tried to run some C examples according to CI, and found that sometimes it does not have the above error, but sometimes it will have the error that DORA_NODE_CONFIG is not set. I don't know why, my system and dora version have not changed between them.

@phil-opp
Copy link
Collaborator

Could you share a link to your code? It's a bit unclear to me how a segfault could occur inside the poll_next method of some channel library.

@starlitxiling
Copy link
Contributor Author

I just tried this https://github.com/dora-rs/autoware.universe/tree/feature/autoware_dora/tools/C_node_test and c++-dataflow in dora's example. Regarding segfault, I felt during debugging that init_dora_context_from_env did not initialize a pointer correctly, and then an error occurred in dora_next_event. Now my dora version has been changed to 0.3.3, and this problem does not occur.

@phil-opp
Copy link
Collaborator

Thanks for the update! So the problem appears to be fixed after updating to dora v0.3.3?

@starlitxiling
Copy link
Contributor Author

When my dora version is 0.3.4, it sometimes has this problem. The repo branch of the c library I use is the main branch. When I switch to tags/v0.3.3, the problem does not occur.

@bobd988
Copy link
Contributor

bobd988 commented May 30, 2024

I met same issue after I upgraded to 0.3.4 last night

@phil-opp
Copy link
Collaborator

phil-opp commented Jun 6, 2024

I tried to reproduce this a few times with the C_Python_test example as suggested in #515 (comment), but this error never happened for me.

@starlitxiling
Copy link
Contributor Author

Yes, it only appears sometimes, can you tell me your system information and dora version, and which branch of the dora repo is it (I don't know if this has anything to do with dora-node-api.h or something)

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

No branches or pull requests

4 participants