-
Notifications
You must be signed in to change notification settings - Fork 16
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
Unaligned access causing SIGBUS on Raspbian #84
Comments
Please use
Now do what is necessary to trigger a crash.
|
gdb works just fine if provided with the executable binary file. As you found, it doesn't understand a script file. By:
If you are working in
For details see https://sourceware.org/gdb/current/onlinedocs/gdb.html/Invoking-GDB.html#Invoking-GDB |
Thanks a lot for your instruction! Thread 15 "UDP-rx 172.16.7" received signal SIGBUS, Bus error.
|
Once GDB has been triggered. Run the above command. This will produce a very large amount of text. Please copy all of this text into a file and attach that file to this issue. (please no screenshots!) |
Hope that I'm doing rigtht.
|
The faulting frame.
|
Could you try making this change? Then re-run diff --git a/modules/pvData/src/misc/pv/byteBuffer.h b/modules/pvData/src/misc/pv/byteBuffer.h
index e507f15..4a71c8a 100644
--- a/modules/pvData/src/misc/pv/byteBuffer.h
+++ b/modules/pvData/src/misc/pv/byteBuffer.h
@@ -157,7 +157,7 @@ struct swap<8> {
* in execution time and/or object code size of byte-wise copy.
*/
-#ifdef _ARCH_PPC
+#if defined(_ARCH_PPC) || defined(__arm__) || defined(_M_ARM)
template<typename T>
union alignu { |
It works. I can pvget/pvmonitor now. Thank you!!!
|
I'm gonna check if it runs well on my colleague's Macbook with M1.
|
Can you provide any more detail about your system? Is it running a custom/local Linux kernel build? I have a pi3b with stock Raspbian, which seems to be able to handle unaligned memory access transparently. So I don't see any A couple of things to check:
Assuming a Raspbian kernel config...
|
Also, check
|
If I switch to "fixup+warn" mode
shows what are probably the same accesses which result in a
In "fixup" mode I don't see any issues.
A very informative post I came across. |
SIGBUS
on Raspbian
SIGBUS
on Raspbian
Ah, you are running a 64-bit (aarch64) kernel, while my pi3 has 32-bit (armv7l). This certainly explains the absence of Anyway, I've merged a fix (#85) which should have the same effect as the patch which you tested. Thank you for reporting this! |
Still works well on M1. |
Glad to help! |
Hardware: Respberry Pi 4B
OS: Raspbian GNU/Linux 11 (bullseye)
EPICS version:7.0.5、7.0.6.1、7.0.7
I built an IOC application with a simple db file:
I add pvAccess Server in the App/src/Makefile
After
make
I run the ioc app and I can caget the channel for example Scale1. But when I use pvget the terminal running the ioc above exit the last message isepics> Bus error
The text was updated successfully, but these errors were encountered: