LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-24-2009, 10:54 AM   #1
rainzone
LQ Newbie
 
Registered: Jun 2009
Location: Rochester, NY, USA
Posts: 9

Rep: Reputation: 0
core dump file won't write to nfs-mounted directory


I'm fighting with a core dump / nfs issue and I'm hoping someone on LinuxQuestions might able to help.

I'm running Red Hat Enterprise Linux 5 (kernel 2.6.18-128), and am networked on a tiny, private network to a server that's running Solaris 10. I want core dumps that are generated by the Red Hat box to be written to an nfs-mounted directory on the Solaris box. I've successfully redirected core dumps locally on the RH box by setting /proc/sys/kernel/core_pattern to my desired directory/filename, but when I send them to the nfs-mounted directory on the Solaris box it will not write them.
Reroute process I used:
Local (works fine):
echo "/tmp/corefiles/core_%e_%t" > /proc/sys/kernel/core_pattern

remote, assume /var/remote is nfs mounted (fails to write file):
echo "/var/remote/path/core_%e_%t" > /proc/sys/kernel/core_pattern

I've also set "ulimit -c unlimited" to rule out any size issues.

I am able to write files to the mounted partition, both as root, and as a user, both before and after a core dump occurs (in fact I manually copied a local core file to the remote partition right after a core dump). To allow root to write to the mounted directory, on the Solaris box I have modified /etc/dfs/dfstab to allow root access on the private network, to prevent "root squash" as follows:
share -F nfs -o sec=sys,rw,root=@<first 3 bytes of my local IP> -d "Remote Log Directory" <path to mounted directory>

I've verified that root can write there by writing files onto that box while logged on as root on the RH box. When a seg fault occurs with my nfs re-route in place I only see "segmentation fault" but no (core dumped), and no error message.

Any idea what I'm missing? Thanks for any suggestions you might have!

- Sean
 
Old 08-24-2009, 02:56 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hmmm. Can't see any reason that wouldn't work.

What user is the app which is dumping core running as?

Dave
 
Old 08-25-2009, 07:30 AM   #3
rainzone
LQ Newbie
 
Registered: Jun 2009
Location: Rochester, NY, USA
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the reply, Dave. The app is initiated as root (in order to create some posix realtime threads), then changes its own user id to a particular user name (call it userx), which it remains at unless it needs to create another thread or a driver (in which case it temporarily becomes root and then returns to userx). When a crash occurs we have a crash handler that then changes the uid back to root, but I've tried taking that out, so it crashes as userx, with the only difference being that a local core file ownership is set to userx rather than root. But in either case, it won't write to the nfs mount.

However, all this is seems moot because I tried simply running an xterm window and causing it to 'crash' with a seg fault, and the same problem occurs. So it's not really app-dependent.

-Sean
 
Old 08-25-2009, 09:06 AM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Some findings:

Segfault'ing a Linux process on a local mount results in a normal core file.
Segfault'ing a Linux process on a Linux NFS mount results in a normal core file.
Segfault'ing a Linux process on a Solaris NFS mount results in an empty core file. Which is a bit odd.

I'd say this is a Linux Vs Solaris NFS thing rather than anything you've got set up wrong.

You might (just maybe) get some joy by mounting the filesystem as NFS2, rather than NFS3/4. I believe this is switched off by default on late Solaris builds. I'm also not entirely sure what versions of NFS Linux actually supports.

Dave

Edit:
I was going to suggest something like fuse-sshfs, but having tried it, no core dumps there either.

Last edited by ilikejam; 08-25-2009 at 09:13 AM.
 
Old 08-25-2009, 03:20 PM   #5
rainzone
LQ Newbie
 
Registered: Jun 2009
Location: Rochester, NY, USA
Posts: 9

Original Poster
Rep: Reputation: 0
Dave, Thanks for testing this on your system -- I really appreciate your help! I'll look into NFS2. I also thought about routing the file to a pipe, but I think the max pipe buffer size could cause me trouble.

Sean
 
Old 08-25-2009, 04:30 PM   #6
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
A pipe to a 'cat -' script might well work.
Maybe even a fifo called 'core' on the local FS, with a 'cat core > /nfs/mount/core' waiting (probably not, but you never know). I'd take a look myself, but I'm away from the Solarium at the moment.

Dave
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fedora core 5 nfs mount:no such file or directory horizonti_2004 Linux - Networking 5 09-15-2007 06:14 PM
fedora core 5 nfs mount:no such file or directory horizonti_2004 Linux - Server 2 09-12-2007 07:00 PM
file size limit exeeded for NFS mounted directory rizwan.cheema Red Hat 2 11-28-2006 04:52 AM
.forward file not working for user having it's home directoryon NFS mounted directory skverma_in Linux - General 0 02-14-2005 02:54 AM
core.2200 888.0 memory dump - file just appeared in my home directory Lakota Linux - Newbie 2 10-06-2003 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration