Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: dspence on July 03, 2026, 09:53:19 AM
-
Hi all,
I have been using the following settings on TC13 to get useful core dumps (thanks to Rich for helping me out):
This is in an application's startup script:
# Set the core dump file size limit.
# Limit each dump to 781250 blocks of 512 bytes, i.e. 400 MB.
ulimit -c 781250
This is in bootlocal.sh:
# Write all core dumps to /data/coredumps. Attach the name of the executable to the file name.
# This way, the system will always store *only the latest* core dump of each executable.
mkdir -p /data/coredumps
chmod 1777 /data/coredumps
sysctl -w kernel.core_pattern='/data/coredumps/core.%e'
The drive that the /data/ link points to has over 200 GB of free space, so the truncation is not happening because of limited space in the target location.
With Tiny Core 13 this worked well. With Tiny Core 17 this results in small "truncated" core files.
I tried changing to use "ulimit -c unlimited" and that didn't help.
For comparison, the same program on TC13 generates a core file about 156 MB in size, and on TC17 it generates a file about 73 KB in size. Maybe these weren't from the same crash but in general that's what the sizes look like. With GDB I can see the stack trace on TC13 and on TC17 it gives messages like "warning: BFD: warning: /mnt/sda1/coredumps/core.test has a segment extending past end of file" and "warning: failed to parse execution context from corefile: Cannot access memory at address 0x7fffbba85fe0", "Failed to read a valid object file image from memory", "Backtrace stopped: Cannot access memory at address 0x7fffbba837f8", etc.
Is there another setting I have to change?
Thanks.