LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   /proc/pid/maps files empty for all processes (https://www.linuxquestions.org/questions/linux-kernel-70/proc-pid-maps-files-empty-for-all-processes-787559/)

alexroux 02-07-2010 07:18 AM

/proc/pid/maps files empty for all processes
 
Hello,

I have three machines with Debian 5. I had to reinstall one of them recently and I don't know why /proc/pid/maps files are all empty on that machine. Do you have a clue for a possible reason?

All three machines are up to date. They are running kernel 2.6.26-2-686. I am accessing them by ssh. /etc/sshd/sshd_config are identical on all machines.

Regards

syg00 02-07-2010 11:54 PM

Probably permissions - try sudo or somesuch. You should be able to view /proc/self/maps from any user.

Valery Reznic 02-08-2010 12:13 AM

Quote:

Originally Posted by alexroux (Post 3855576)
Hello,

I have three machines with Debian 5. I had to reinstall one of them recently and I don't know why /proc/pid/maps files are all empty on that machine. Do you have a clue for a possible reason?

All three machines are up to date. They are running kernel 2.6.26-2-686. I am accessing them by ssh. /etc/sshd/sshd_config are identical on all machines.

Regards

What do you mean - "empty" ?
ls -l shows that file sizes are 0, or no output when you try cat them ?

If first - it's normal. You still should get output.

alexroux 02-08-2010 04:28 AM

I tried with root access, same problem.

By empty I mean that there is nothing in it. "cat" command returns nothing.

I suspect a Debian kernel update, because the problem also appears on the two other machines after having them updated and rebooted. They probably have changed a kernel option because it works on Ubuntu with a more recent kernel (2.6.31).

ineya 02-13-2010 05:30 AM

I have the same problem with 2.6.26-2-686, also it is debian.

ineya 02-13-2010 06:14 AM

Found the problem:

Code:

--- linux-2.6-2.6.26/fs/proc/base.c    2008-07-13 16:51:29.000000000 -0500
+++ linux/fs/proc/base.c        2009-12-26 02:14:58.000000000 -0600
@@ -251,7 +251,8 @@
        task_lock(task);
        if (task->mm != mm)
                goto out;
-      if (task->mm != current->mm && __ptrace_may_attach(task) < 0)
+      if (task->mm != current->mm && ((mm->flags & MMF_IN_EXEC) ||
+                                      __ptrace_may_attach(task) < 0))
                goto out;
        task_unlock(task);
        return mm;


alexroux 02-16-2010 10:05 AM

Thanks!


All times are GMT -5. The time now is 02:26 AM.