linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dnotify oddity in 2.4.19pre6aa1
@ 2002-04-23 16:58 Andrew Burgess
  2002-05-03  7:31 ` Stephen Rothwell
  2002-05-03  7:32 ` Stephen Rothwell
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Burgess @ 2002-04-23 16:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: sfr

I am seeing something very strange with the dnotify feature in kernel
2.4.19pre6aa1. I'm developing a file copy daemon that makes backups of
files as soon as they change so I run dnotify on every directory in my
system (essentially). I based my program on the example in dnotify.txt
in the Documentation directory.

I notice that after a while two things happen:

1) In my copyd process I start getting signals for directories that are not
changing. Even stranger, I get signals for fd that I've never opened.

2) Other processes, like sendmail, start exiting with the same signal
(RTMIN+5). (I use +5 because I started seeing the problem with +0 and I
took a wild guess that RTMIN+0 was being used for something else).

This does not seem to happen if I reboot and do not restart my copyd process.

My system does cycle through process descriptors every few minutes (lots of
short lived server processes) and sendmail also runs through pids rapidly.

I'm wondering if something isn't being properly reset or cleared when a process
exits so when the same process or fd data structure (or whatever) is reused inside
the kernel the signals are still active somehow? This is a SMP Athlon, perhaps
an SMP race?

Do I need to configure something more in my kernel? I don't see any config
options for realtime or rt or anything like that. And it does work fine after
a reboot.

I can't use ordinary signals for this because they miss dnotifys when activity
is high.

Thanks very much
Andrew


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: dnotify oddity in 2.4.19pre6aa1
  2002-04-23 16:58 dnotify oddity in 2.4.19pre6aa1 Andrew Burgess
@ 2002-05-03  7:31 ` Stephen Rothwell
  2002-05-04  7:41   ` Kurt Wall
  2002-05-03  7:32 ` Stephen Rothwell
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2002-05-03  7:31 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: linux-kernel

Hi Andrew,

Sorry I have been a bit slow on this.

On Tue, 23 Apr 2002 09:58:14 -0700 Andrew Burgess <aab@cichlid.com> wrote:
>
> I am seeing something very strange with the dnotify feature in kernel
> 2.4.19pre6aa1. I'm developing a file copy daemon that makes backups of
> files as soon as they change so I run dnotify on every directory in my
> system (essentially). I based my program on the example in dnotify.txt
> in the Documentation directory.

So far, so good :-)

> I notice that after a while two things happen:
> 
> 1) In my copyd process I start getting signals for directories that are
> not changing. Even stranger, I get signals for fd that I've never
> opened.

OK, this is weird, but I am looking into it.

> 2) Other processes, like sendmail, start exiting with the same signal
> (RTMIN+5). (I use +5 because I started seeing the problem with +0 and I
> took a wild guess that RTMIN+0 was being used for something else).

Does your copyd fork and exit after it has enabled the dnotify?  Is it
still running when other processes start being killed?

> This does not seem to happen if I reboot and do not restart my copyd
> process.
> 
> My system does cycle through process descriptors every few minutes (lots
> of short lived server processes) and sendmail also runs through pids
> rapidly.
> 
> I'm wondering if something isn't being properly reset or cleared when a
> process exits so when the same process or fd data structure (or
> whatever) is reused inside the kernel the signals are still active
> somehow? This is a SMP Athlon, perhaps an SMP race?

That is a possibility, although I thought we had stomped on this bug.

> Do I need to configure something more in my kernel? I don't see any
> config options for realtime or rt or anything like that. And it does
> work fine after a reboot.

No, should be fine.

Can you send me a copy of your copyd (or the relevant subparts of it),
please?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: dnotify oddity in 2.4.19pre6aa1
  2002-04-23 16:58 dnotify oddity in 2.4.19pre6aa1 Andrew Burgess
  2002-05-03  7:31 ` Stephen Rothwell
@ 2002-05-03  7:32 ` Stephen Rothwell
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2002-05-03  7:32 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: linux-kernel

On Tue, 23 Apr 2002 09:58:14 -0700 Andrew Burgess <aab@cichlid.com> wrote:
>
> I am seeing something very strange with the dnotify feature in kernel
> 2.4.19pre6aa1. I'm developing a file copy daemon that makes backups of
> files as soon as they change so I run dnotify on every directory in my
> system (essentially). I based my program on the example in dnotify.txt
> in the Documentation directory.

Do you have the same problems on 2.4.18 or 2.4.19pre8?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: dnotify oddity in 2.4.19pre6aa1
  2002-05-03  7:31 ` Stephen Rothwell
@ 2002-05-04  7:41   ` Kurt Wall
  0 siblings, 0 replies; 4+ messages in thread
From: Kurt Wall @ 2002-05-04  7:41 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Andrew Burgess, linux-kernel

Scribbling feverishly on May 03, Stephen Rothwell managed to emit:
> Hi Andrew,
> 
> Sorry I have been a bit slow on this.
> 
> On Tue, 23 Apr 2002 09:58:14 -0700 Andrew Burgess <aab@cichlid.com> wrote:
> >
> > I am seeing something very strange with the dnotify feature in kernel
> > 2.4.19pre6aa1. I'm developing a file copy daemon that makes backups of
> > files as soon as they change so I run dnotify on every directory in my
> > system (essentially). I based my program on the example in dnotify.txt
> > in the Documentation directory.
> 
> So far, so good :-)
> 
> > I notice that after a while two things happen:
> > 
> > 1) In my copyd process I start getting signals for directories that are
> > not changing. Even stranger, I get signals for fd that I've never
> > opened.
> 
> OK, this is weird, but I am looking into it.
> 
> > 2) Other processes, like sendmail, start exiting with the same signal
> > (RTMIN+5). (I use +5 because I started seeing the problem with +0 and I
> > took a wild guess that RTMIN+0 was being used for something else).

glibc reserves RTMIN+[012] for its own use, so you have to use
RTMIN+[n>2].

[...]

Kurt
-- 
Command, n.:
	Statement presented by a human and accepted by a computer in
such a manner as to make the human feel as if he is in control.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-05-04  7:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23 16:58 dnotify oddity in 2.4.19pre6aa1 Andrew Burgess
2002-05-03  7:31 ` Stephen Rothwell
2002-05-04  7:41   ` Kurt Wall
2002-05-03  7:32 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).