码迷,mamicode.com
首页 > 其他好文 > 详细

executing in nfs will not generate core dump file

时间:2017-06-02 17:42:03      阅读:117      评论:0      收藏:0      [点我收藏+]

标签:ram   linux系统   tin   cut   echo   opera   exec   script   generate   

最近遇到了一个奇怪的问题。

linux系统的pc搭建nfs server,开发板作为nfs client,开发板中全程root权限操作,执行的程序放到 nfs server 中 exports 出的目录中。

 

1. 开发板中已经设置了 ulimit -c unlimited

2. 将程序copy到 开发板的 /tmp 目录下执行,可以正常生成 core 文件,提示 core dumped。

3. 程序放到 nfs 上执行,生成空的 core 文件,不提示 core dumped。

4. 因为在nfs server中设置了 root_squash,anonuid=1001,anongid=1001 ,所以开发板操作nfs是以uid 为1001 的用户操作的。尝试设置成 no_root_squash,发现第3步的执行可以生成core文件,提示 core dumped。

 

这个网址提到了几种可能不会生成 core 文件的原因,网址:https://linux.die.net/man/5/core

对照了一下,没有发现与我遇到的这种问题相对应的。

 

上述网址中提到了一种情况,

The process is executing a set-user-ID (set-group-ID) program that is owned by a user (group) other than the real user (group) ID of the process. (However, see the description of the prctl(2) PR_SET_DUMPABLE operation, and the description of the /proc/sys/fs/suid_dumpable file in proc(5).)

 

我尝试 执行 echo 1 > /proc/sys/fs/suid_dumpable,发现无效。

 

问题未找到根本原因。

 

executing in nfs will not generate core dump file

标签:ram   linux系统   tin   cut   echo   opera   exec   script   generate   

原文地址:http://www.cnblogs.com/vanwoos/p/6933822.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!