LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-07-2010, 07:18 AM   #1
alexroux
LQ Newbie
 
Registered: Sep 2009
Location: Lausanne (Switzerland)
Distribution: Ubuntu
Posts: 12

Rep: Reputation: 3
/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
 
Old 02-07-2010, 11:54 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Probably permissions - try sudo or somesuch. You should be able to view /proc/self/maps from any user.
 
Old 02-08-2010, 12:13 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by alexroux View Post
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.
 
Old 02-08-2010, 04:28 AM   #4
alexroux
LQ Newbie
 
Registered: Sep 2009
Location: Lausanne (Switzerland)
Distribution: Ubuntu
Posts: 12

Original Poster
Rep: Reputation: 3
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).

Last edited by alexroux; 02-08-2010 at 06:43 AM.
 
Old 02-13-2010, 05:30 AM   #5
ineya
Member
 
Registered: Jul 2007
Posts: 39

Rep: Reputation: 16
I have the same problem with 2.6.26-2-686, also it is debian.
 
Old 02-13-2010, 06:14 AM   #6
ineya
Member
 
Registered: Jul 2007
Posts: 39

Rep: Reputation: 16
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;
 
Old 02-16-2010, 10:05 AM   #7
alexroux
LQ Newbie
 
Registered: Sep 2009
Location: Lausanne (Switzerland)
Distribution: Ubuntu
Posts: 12

Original Poster
Rep: Reputation: 3
Thanks!
 
  


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
pmap or /proc/<pid>smap or /proc/<pid>/status iQoder Linux - Newbie 1 07-16-2009 06:32 PM
/proc/pid/maps Moraxus Linux - General 0 02-11-2009 08:49 AM
/proc/<pid>/stat empty? Brian Moffet Linux - Kernel 1 04-27-2008 02:05 AM
/proc/ folder has empty files. deepumnit Debian 3 03-07-2008 09:21 AM
maps from /proc/pid RHEL 4 sanjaykhuntia Linux - Enterprise 0 10-29-2007 07:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:27 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