FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 06-17-2011, 04:45 PM
Jonathan Ryshpan
 
Default Cd to nonexistent directory in /proc

Investigating a hanging instance of googleearth (wich process number
3110), I noticed that it's possible to
cd /proc/3110
while on the other hand
ls /proc
does not show 3110 as being in the proc directory.

Any ideas what's going on?

Thanks - jon


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-17-2011, 10:03 PM
Jonathan Ryshpan
 
Default Cd to nonexistent directory in /proc

Investigating a hanging instance of googleearth (wich process number
3110), I noticed that it's possible to
cd /proc/3110
while on the other hand
ls /proc
does not show 3110 as being in the proc directory.

Any ideas what's going on?

Thanks - jon



--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-18-2011, 12:16 AM
Patrick O'Callaghan
 
Default Cd to nonexistent directory in /proc

On Fri, 2011-06-17 at 15:03 -0700, Jonathan Ryshpan wrote:
> Investigating a hanging instance of googleearth (wich process number
> 3110), I noticed that it's possible to
> cd /proc/3110
> while on the other hand
> ls /proc
> does not show 3110 as being in the proc directory.
>
> Any ideas what's going on?

I can't imagine how that could happen, unless the directory entry
disappeared between you doing the cd and the ls, perhaps because the
process terminated. OTOH is you can reproduce this reliably, it could
merit a Bugzilla report.

poc

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-18-2011, 01:12 AM
Kevin Martin
 
Default Cd to nonexistent directory in /proc

On 06/17/2011 07:16 PM, Patrick O'Callaghan wrote:
> On Fri, 2011-06-17 at 15:03 -0700, Jonathan Ryshpan wrote:
>> Investigating a hanging instance of googleearth (wich process number
>> 3110), I noticed that it's possible to
>> cd /proc/3110
>> while on the other hand
>> ls /proc
>> does not show 3110 as being in the proc directory.
>>
>> Any ideas what's going on?
> I can't imagine how that could happen, unless the directory entry
> disappeared between you doing the cd and the ls, perhaps because the
> process terminated. OTOH is you can reproduce this reliably, it could
> merit a Bugzilla report.
>
> poc
>

It's a kernel / system call bug somewhere. We ran (the company I work for) into this exact bug in our software application (a
monitoring tool for monitoring system health, applications, doing log file scraping). Monitoring of processes worked on AIX,
Solaris, etc. but with a version of Linux starting about 3-4 years ago, it stopped working reliably. It has to do with a system
call and I can't remember at this time what it was. I'll look back on our application fixes and see if I can come up with what the
fix was. It might absolutely merit a Bugzilla.

Kevin
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-18-2011, 03:04 AM
Cameron Simpson
 
Default Cd to nonexistent directory in /proc

On 17Jun2011 20:12, Kevin Martin <kevintm@ameritech.net> wrote:
| On 06/17/2011 07:16 PM, Patrick O'Callaghan wrote:
| > On Fri, 2011-06-17 at 15:03 -0700, Jonathan Ryshpan wrote:
| >> Investigating a hanging instance of googleearth (wich process number
| >> 3110), I noticed that it's possible to
| >> cd /proc/3110
| >> while on the other hand
| >> ls /proc
| >> does not show 3110 as being in the proc directory.
| >>
| >> Any ideas what's going on?
| > I can't imagine how that could happen, unless the directory entry
| > disappeared between you doing the cd and the ls, perhaps because the
| > process terminated. OTOH is you can reproduce this reliably, it could
| > merit a Bugzilla report.
| >
| > poc
| >
|
| It's a kernel / system call bug somewhere. We ran (the company I work for) into this exact bug in our software application (a
| monitoring tool for monitoring system health, applications, doing log file scraping). Monitoring of processes worked on AIX,
| Solaris, etc. but with a version of Linux starting about 3-4 years ago, it stopped working reliably. It has to do with a system
| call and I can't remember at this time what it was. I'll look back on our application fixes and see if I can come up with what the
| fix was. It might absolutely merit a Bugzilla.

[speculation...]
It might be raciness in the readdir calls. I'd imagine /proc is rather
volatile becuase of all the PIDs. Readdir has always been a weak link in
the directory listing stuff (not just Linux, though it or GNU ls might
be particularly prone to exposing it).
[/speculation]

Because readdir is racy, my personal practice is to write code like
this:

opendir(...)
loop over readdir() as fast as possible, stashing names
closedir()
now stat() or whatever all the names as needed

stat() et al are not racy. We keep the raciness in the smallest
timeframe possible with the above approach.

Cheers,
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

ASCII n s. [from the greek] Those people who, at certain times of the year,
have no shadow at noon; such are the inhabitatants of the torrid zone.
- 1837 copy of Johnson's Dictionary
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-18-2011, 04:38 AM
Patrick O'Callaghan
 
Default Cd to nonexistent directory in /proc

On Sat, 2011-06-18 at 13:04 +1000, Cameron Simpson wrote:
> On 17Jun2011 20:12, Kevin Martin <kevintm@ameritech.net> wrote:
> | On 06/17/2011 07:16 PM, Patrick O'Callaghan wrote:
> | > On Fri, 2011-06-17 at 15:03 -0700, Jonathan Ryshpan wrote:
> | >> Investigating a hanging instance of googleearth (wich process number
> | >> 3110), I noticed that it's possible to
> | >> cd /proc/3110
> | >> while on the other hand
> | >> ls /proc
> | >> does not show 3110 as being in the proc directory.
> | >>
> | >> Any ideas what's going on?
> | > I can't imagine how that could happen, unless the directory entry
> | > disappeared between you doing the cd and the ls, perhaps because the
> | > process terminated. OTOH is you can reproduce this reliably, it could
> | > merit a Bugzilla report.
> | >
> | > poc
> | >
> |
> | It's a kernel / system call bug somewhere. We ran (the company I work for) into this exact bug in our software application (a
> | monitoring tool for monitoring system health, applications, doing log file scraping). Monitoring of processes worked on AIX,
> | Solaris, etc. but with a version of Linux starting about 3-4 years ago, it stopped working reliably. It has to do with a system
> | call and I can't remember at this time what it was. I'll look back on our application fixes and see if I can come up with what the
> | fix was. It might absolutely merit a Bugzilla.
>
> [speculation...]
> It might be raciness in the readdir calls. I'd imagine /proc is rather
> volatile becuase of all the PIDs. Readdir has always been a weak link in
> the directory listing stuff (not just Linux, though it or GNU ls might
> be particularly prone to exposing it).
> [/speculation]

The problem might be similar to this:
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18/2.6.18-mm2/broken-out/proc-readdir-race-fix-take-3.patch

poc

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-18-2011, 09:03 AM
Jonathan Ryshpan
 
Default Cd to nonexistent directory in /proc

On Fri, 2011-06-17 at 19:46 -0430, Patrick O'Callaghan wrote:
> On Fri, 2011-06-17 at 15:03 -0700, Jonathan Ryshpan wrote:
> > Investigating a hanging instance of googleearth (wich process number
> > 3110), I noticed that it's possible to
> > cd /proc/3110
> > while on the other hand
> > ls /proc
> > does not show 3110 as being in the proc directory.
> >
> > Any ideas what's going on?

> I can't imagine how that could happen, unless the directory entry
> disappeared between you doing the cd and the ls, perhaps because the
> process terminated. OTOH is you can reproduce this reliably, it could
> merit a Bugzilla report.

There's been a suggestion of a race condition. Possibly, but if so it
was a very slow race. The condition persisted over (I'd say) at least
10 minutes, during which time I did a number of "cd"s and "ls"s,
repeatedly getting the results reported above. Unfortunately by now,
it's no longer possible to "cd /proc/3110" on the system.

If the condition ever repeats, I'll report further. I was prompted to
look by the existence of
/home/jonrysh/.googleearth/instance-running-lock
(which is supposed to be a symbolic link to /proc/<googleearth-process>)
at a time when googleearth was not running. Others may want to
investigate when this happens, which it does for me every month or so.

jon

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-20-2011, 12:48 PM
"Bryn M. Reeves"
 
Default Cd to nonexistent directory in /proc

On 06/17/2011 05:45 PM, Jonathan Ryshpan wrote:
> Investigating a hanging instance of googleearth (wich process number
> 3110), I noticed that it's possible to
> cd /proc/3110
> while on the other hand
> ls /proc
> does not show 3110 as being in the proc directory.

The number is a PID and the directory entry follows the process lifecycle - most
likely it exited between the cd and the ls.

Regards,
Bryn.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 06-20-2011, 12:48 PM
"Bryn M. Reeves"
 
Default Cd to nonexistent directory in /proc

On 06/17/2011 05:45 PM, Jonathan Ryshpan wrote:
> Investigating a hanging instance of googleearth (wich process number
> 3110), I noticed that it's possible to
> cd /proc/3110
> while on the other hand
> ls /proc
> does not show 3110 as being in the proc directory.

The number is a PID and the directory entry follows the process lifecycle - most
likely it exited between the cd and the ls.

Regards,
Bryn.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 01:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org