SuSE Linux 9.0 ships with coredumps diabled. Modifying
/etc/profile is insufficient to obtain coredumps. The
reason is /usr/bin/gpg-agent in package
newpg-0.9.4-119. Both SuSE and the GNU package
mainainters have been contact concerning this along
with a proposed fix but they have not responded. It is
possible that this "fix" has unforseen security
ramifications. Those interested in an UNSUPPORTED NO
LIABILITY patch can contact Bob Pearson
(gottadoit@mailsnare.net).
=====================================
This is an unsupported patch to enable core dumps in
SLP 9.0.
I am running SuSE Linux Professional 9.0 for the i386
and I use KDM to log
into KDE. KDM and GDM both call gpg-agent
(newpg-0.9.4-119) which starts
up KDE or GNOME after it does its thing.
Unfortunately, the way that this
is done is BOTH the HARD and SOFT limits for core dumps
are set, preventing
descendents from getting core dumps. I have modified:
newpg-0.9.4/common/sysctl.c
to get the hard limit via getrlimit(2) and then set the
soft limit to zero
via setrlimit(2). This allows gpg-agent to still
disable coredumps but
allows other descendents to raise the soft limit up to
the hard limit.
The kernel enforces the soft limit but allows a
descendent process to raise
it to the hard limit. This allows core dumps to be
re-enabled
in /etc/profile.
Build Instructions (complicated).
Install package newpg-0.9.4 SOURCE. Do this by bringing
up YaST and
searching for package newpg. use the scrollbar on the
bottom and scroll
right and check the source box.
# mkdir temp
# cd temp
# cp /usr/src/packages/SOURCES/die-with-parent.diff .
# cp /usr/src/packages/SOURCES/newpg-0.9.4.tar.bz2 .
# cp /usr/src/packages/SPECS/newpg.spec .
Now manually mount the install disc, mine goes to
/media/dvd
# mount /media/dvd
# build newpg.spec
If you have never done this before it uses /var/tmp by
default. This directory
is normally cleaned (all files and subdirectories are
removed) on reboot so
you lose everything. Make sure you have enough disk
space free as build uses
a chroot(1)ed environment.
The build copies all sorts of libraries and executables
from install system
to the chroot(1)ed environment in /var/tmp (NOTE: this
is erased by default
on system boot). This will take several minutes. After
the build finishes if
no packages were missing then:
# cp ../sysutil.c
/var/tmp/buildroot//usr/src/packages/BUILD/newpg-0.9.4/common/sysutils.c
# cd
/var/tmp/buildroot/usr/src/packages/BUILD/newpg-0.9.4/common
# make clean
# make
# cd
/var/tmp/buildroot/usr/src/packages/BUILD/newpg-0.9.4/agent
# make clean
# make
# cp gpg-agent /usr/bin/gpg-agent
You still need to enable coredumps in /etc/profile by
for example:
ulimit -Sc 50000 # only core-files less
than 50 MB are written
#ulimit -Sc 0 # don't create core files
If you want KDE apps to coredump you need to add a line
like
ulimit -Sc 50000
to /opt/kde3/bin/startkde, my suggestion is after the
"trap" line.
Reboot or re-login to KDM or GDM and you will be able
to get coredumps.
Changes to get coredumps