-
Notifications
You must be signed in to change notification settings - Fork 382
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
sometimes got POPO__CHUNK_LOCKING_ERROR #999
Comments
…e mutex functions for errno checking Signed-off-by: Christian Eltzschig <me@elchris.org>
@qclzdh I looked at the code and found a bug in our mutex implementation which causes the mutex to print always |
Thanks, @elfenpiff , i will run with the patch again, and update the result to you. |
@elfenpiff , with the new path, i got this error: |
@qclzdh do you have a few more information on how to reproduce this, e.g. are there multiple publishers or multiple subscribers? Was an application stopped or died before this happened? |
i compile iox with one-to-many-only, and there is several subscribers in different process, i re-checked the log, one warning log "[Warning]: Application xxxxx_336 not responding (last response 1563 milliseconds ago) --> removing it" appeared before this locking error, is this related? |
@qclzdh yes, this is related. Can you share more information like the As far as I know |
@elBoberido , here is options: SubscriberOptions.queueCapacity: 16U It seems it takes few days on ubuntu to reproduce this, but it only takes few hours on arm64-qemu, i just got more log. [2022-01-05 11:51:49.510065] W/iceoryx(353/350): 2022-01-05 11:51:49.509 [Warning]: sending keep alive |
@qclzdh with your question in mind related to thread safety of publisher and subscriber and the errors with the same pid but different tid, is the publisher guarded by a mutex? Edit: #include "iceoryx_hoofs/internal/concurrent/smart_lock.hpp"
...
iox::concurrent::smart_lock<iox::popo::Publisher<MyType>> publisher(
iox::concurrent::ForwardArgsToCTor, iox::capro::ServiceDescription{"Foo", "Bar", "Baz"}); With this, all methods will be locked by a mutex upon access. If you want to call multiple methods with only locking once you can do auto publisherScopeGuard = publisher.getScopeGuard();
publisherScopeGuard->loan().and_then([](auto& sample) { sample.publish(); }); |
Signed-off-by: Christian Eltzschig <me@elchris.org>
…e mutex functions for errno checking Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Christian Eltzschig <me@elchris.org>
…e mutex functions for errno checking Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Christian Eltzschig <me@elchris.org>
…-in-mutex iox-#999 The posixCall must use the return value of the mutex functio…
@qclzdh Have you tried the proposal from @elBoberido. Publishers and Subscribers are not thread safe on their API, so you would have to protect with a mutex or our smart_lock |
@budrus Finally, i understand why this happened in my side.
|
@budrus Yes, we used mutex for those APIs. |
@qclzdh there is an option to run RouDi without monitoring |
@elBoberido thanks, i noticed this, and disable the monitor mode. |
@qclzdh As far as I understood you now know what the problem was. Then I would close this issue. Feel free to reopen if you still have a problem |
…e mutex functions for errno checking Signed-off-by: Christian Eltzschig <me@elchris.org>
Signed-off-by: Christian Eltzschig <me@elchris.org>
Required information
Operating system:
E.g. Ubuntu 18.04 LTS
Compiler version:
E.g. GCC 7.4.0
Observed result or behaviour:
got this error during publishing data:
_iceoryx/iceoryx_hoofs/source/posix_wrapper/mutex.cpp:67 { bool iox::posix::mutex::lock() -> pthread_mutex_lock } ::: [ 0 ] Success
ICEORYX error! POPO__CHUNK_LOCKING_ERROR
iceoryx_hoofs/source/error_handling/error_handling.cpp:57: static void iox::ErrorHandler::ReactOnErrorLevel(iox::ErrorLevel, const char): Assertion `false' failed._*
Expected result or behaviour:
What do you expect to happen?
No error happend
Conditions where it occurred / Performed steps:
Describe how one can reproduce the bug.
It's very difficult to reproduce this error, but i already see this error several times.
Could you give some hints, why this happened?
The text was updated successfully, but these errors were encountered: