Tracking down crash on ModDwarf

Hi Guys,

I have a plugin that I am working on.

On my linux machine it never crashes.

On the ModDwarf I have had a couple of crashes, I’m guessing something to do with floating point.

What is the recommended way of finding out where it is going bang, I have ulimit -c unlimited set but I don’t seem to be able to find any core dumps.

1 Like

what flags did you use to build it for the dwarf?

1 Like

Here are the flags used:

aarch64-mod-linux-gnu-g++ -Iincludes -c -Wall -Wextra -pipe -Wno-unused-parameter -fPIC -DPIC -DNDEBUG -O3 -ffast-math -fvisibility=hidden -std=c++11 -mcpu=cortex-a35 -mtune=cortex-a35 -ffast-math -fno-finite-math-only -fomit-frame-pointer -fprefetch-loop-arrays -ftree-vectorize -funroll-loops -funsafe-loop-optimizations -D__MOD_DEVICES__ -D_MOD_DEVICE_DWARF -Wl,-O1 -Wl,--as-needed -Wl,--strip-all -fvisibility-inlines-hidden
aarch64-mod-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined -Wl,-O1 -Wl,--as-needed -Wl,--strip-all -lm -shared

If I could get a core dump I would be a step further, I have tried /proc/sys/kernel/core_uses_pid, /proc/sys/kernel/core_pattern and I have ulimit -c unlimited

I have tested trying to get a core using a normal process yes and killall -s 11 yes, no core generated,

1 Like

Changing those files in /etc/profile gives me core files :slight_smile:

1 Like

you can use the debug targets in mod-plugin-builder to get a proper debug build with defined symbols.
alike

./bootstrap.sh moddwarf-debug
# sourcing then with
source local.env moddwarf-debug

there are developer images that contain valgrind and a few other tools, but we need to wait for servers to be back online for those.

2 Likes

Thanks, developer image sounds good.

I have gdbserver and gdb running on the dwarf now and coredumps working, of course now it isn’t crashing, but at least it is all setup for when it does!

2 Likes