This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Empty core dump file

> From: David Aldrich [David.Aldrich@EMEA.NEC.COM]
> This is a file permissions problem because if I mount the shared
> folder with a specific uid the core file is correctly saved.  So I
> must use a mount command such as:
> mount -t vboxsf -o rw,uid=1000,gid=1000 SVNProj /media/SVNProj
> which I store in /etc/rc.local
> If I omit uid the core file becomes empty.
> The problem with this is that I must customise the mount command for
> each user, i.e. mount needs their uid.
> Is there a better solution for this problem please?

As you say, this is a file permission problem.  By default, the core
file is writtin in the current directory of the process that has
crashed; if the crashing process cannot write into its current
directory, a core file cannot be generated.

The ideal solution is to have the current directory be writable by the
process, as that is by far the commonest situation in Un*x operations,
and there are likely to be other standard system management operations
that fail if the process cannot write its current directory.

Can you arrange your processes to not change their current directory
to /media/SVNProj?  Or if you really intend every user to be able to
write into /media/SVNProj, change the permissions on that directory so
they can.

Another approach would be to have the core files written in another
directory.  I'm not sure of the details but the manual page core(5)
says that with 2.6 kernels and 2.4 kernels after 2.4.21, there is a
/proc/sys/kernel/core_pattern file that seems to allow specification
of the directory for the core file.  So you could do

    echo '/tmp/core.%p' >/proc/sys/kernel/core_pattern

and have all core files written into the /tmp directory.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]