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

[Bug] The SHM buffer check error log is misleading #814

Open
YuanYuYuan opened this issue Nov 12, 2024 · 2 comments
Open

[Bug] The SHM buffer check error log is misleading #814

YuanYuYuan opened this issue Nov 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@YuanYuYuan
Copy link
Contributor

YuanYuYuan commented Nov 12, 2024

Describe the bug

When sending SHM buffers across machines, we check the SHM buffer availability on the receiver side with this function. However, this reports an error that is NOT shown in zenoh rust example. Since we had already properly returned the result in the zenoh-c function, do we need to duplicate this error in the log?

To reproduce

  1. Build the examples z_pub_shm and z_sub_shm.
  2. Run the two examples on different hosts.
  3. The error log is shown below.
2024-11-12T06:35:36.001040Z  INFO ThreadId(02) zenoh::net::runtime::orchestrator: Zenoh can be reached at: tcp/192.168.0.109:34133
2024-11-12T06:35:36.001490Z  INFO ThreadId(02) zenoh::net::runtime::orchestrator: zenohd listening scout messages on 224.0.0.224:7446
Declaring Subscriber on 'demo/example/**'...
Enter 'q' to quit...
2024-11-12T06:35:36.176089Z ERROR rx-1 ThreadId(07) zenohcd::zbytes: Failed to convert the payload
>> [Subscriber] Received PUT ('demo/example/zenoh-rs-pub': '[  91] Pub from Rust SHM!') [RAW]
2024-11-12T06:35:37.175526Z ERROR rx-1 ThreadId(07) zenohcd::zbytes: Failed to convert the payload
>> [Subscriber] Received PUT ('demo/example/zenoh-rs-pub': '[  92] Pub from Rust SHM!') [RAW]

System info

@YuanYuYuan YuanYuYuan added the bug Something isn't working label Nov 12, 2024
@yellowhatter
Copy link
Contributor

yellowhatter commented Nov 13, 2024

@YuanYuYuan I think we are using this:

tracing::error!("Failed to convert the payload");

And yes, IMHO we should:

  1. Rename all as_shm* to try_as_shm* in API
  2. Do not post error messages for try_as_shm

@milyin @DenisBiryukov91 what do you think?

@yellowhatter
Copy link
Contributor

In opposite to other as_* like as_string, as_shm is used to probe the buffer on shm nature, and unsuccessful result is not as hard error as for orther APIs

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

2 participants