-
Notifications
You must be signed in to change notification settings - Fork 56
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
benchmark-publish subscripe panic #81
Comments
anyone know what reason? |
@fengtuo58 what OS and Rust Version are you using? |
Linux tegra-ubuntu 5.15.98-rt-tegra #1 SMP PREEMPT RT Fri Jan 12 16:33:29 CST 2024 aarch64 aarch64 aarch64 GNU/Linux @elfenpiff |
… since it can have different layouts (linux)
The bug is fixed and merged to |
@fengtuo58 btw, I noticed you are related to BYD and am wondering whether BYD would be interested in accelerating the development of iceoryx2 |
The problem still exists, platform info: Linux tegra 5.10.120-tegra #2 SMP PREEMPT Thu Jan 4 16:55:19 CST 2024 aarch64 aarch64 aarch64 GNU/Linux |
@fengtuo58 do you have more output? It is cut off right before it looked to become interesting |
…nd-try [#81] Add better log error output for signal handler failure
I cannot reproduce it locally, but it seems to occur when the shared memory is zeroed. We zero it to ensure that the target has really enough memory available. If this fails I suspect that linux tegra maybe has a different subset of fetchable signals than other linux distributions. I added a more detailed error output to identify this signal which is registered via Could you please retry the benchmark from current main and provide the log full log output? Hopefully, this identifies the signal and helps to fix this issue. |
@elBoberido @elfenpiff I tried the latest main branch code and attached the crash log. |
In fact, Ubuntu 20.04 x86_64 also had this problem and did not try other versions. |
@elBoberido @elfenpiff I have found the reason for this problem. |
@passchaos whoa, can you share something about your setup? bindgen should actually take care of this. This means it is either a bug in bindgen or you have a quite exotic setup. |
@passchaos I can confirm the bug with ubuntu 20.04, and I think this is a bug in the underlying bindgen since the maintainer did underestimate what "interesting" things you can do with C. So what is the problem, I go over what the C pre-processor is doing.
In step 2.2 bindgen seems to lose it. It keeps the old macro values and this causes a screw up. But I have no idea why in the first place the value of So somehow we have to make bindgen aware that here are potentially macros defined, undefined, defined again. |
So the bug is in #define A 1
#define B 2
#undef A
#define A 2
#undef B
#define B 1 The result should that /* automatically generated by rust-bindgen 0.65.1 */
pub const A: u32 = 1;
pub const B: u32 = 2; |
Here is the bindgen bugreport: rust-lang/rust-bindgen#2722 |
@passchaos @fengtuo58 The bug is fixed and iceoryx2 0.2.2 is released. |
@passchaos @fengtuo58 would be great if you could confirm that it is also fixed for you and then close the issue :) |
@elBoberido I confirm that the issue are fixed, both for tegra and ubuntu. |
Oh, totally forgot that just a workaround was merged and we need to wait for a proper fix in bindgen. |
It is not work at this commit ./benchmark-publish-subscribe |
1 similar comment
It is not work at this commit ./benchmark-publish-subscribe |
@fengtuo58 the output you posted cannot be from the current main branch. This is the current string "This should never happen! posix::sigaction returned {}. Unable to register raw signal since sigaction was called with invalid parameters: {:?} which lead to error: {:?}." So there must be |
Bug report after analysis
bindgen-0.69.2
is unable to handle macro redefines, see: rust-lang/rust-bindgen#2722The signal
SIGSTOP
andSIGCONT
are redefined under ubuntu 20.04 in the included filebits/signum.h
ofsignal.h
. The redefinition turnsSIGCONT
into the unfetchable signalSIGSTOP
which leads to a failure in thesigaction
call.The quick fix is to comment out the
Continue
signal in the abstraction, since it is also nowhere used. When the bindgen bug report is closed, we can revert the change and close the issue.Continue
signal insignal.rs
Continue
signal after bindgen bugfixOriginal bug report from @fengtuo58
This should never happen! Unable to register raw sional since sigaction was called with invalid parameters.
thread "
iceorvx2-bb/posix/src/signal.rs:516:13:
panicked at
rom: SignalHandler ( registered signals: 11 ) :.: This should never happen! Unable to register raw signal since sigaction was called with inve
lid parameters
note: run with RUST BACKTRACE=1' environment variable to display a backtrace
12 [F] SianalHandler f registered sianals: [7
This should never happen! nable to register raw sional since sigaction was called with invalid parameters
thread ' ' panicked at iceoryx2-bb/posix/src/sianal,rs:516:13:
rom: SianalHandler ! registered sianals: : This should never happen: Unable
to register raw signal since sigaction was called with inva
lid parameters .
stack backtrace:
The text was updated successfully, but these errors were encountered: