Re: signals logged / [RFC] log out-of-virtual-memory events

2007-06-10 Thread Jan Engelhardt
On Jun 10 2007 22:06, Jiri Kosina wrote: >On Sun, 10 Jun 2007, Folkert van Heusden wrote: > >> Signed-of by: Folkert van Heusden <[EMAIL PROTECTED] > >This looks broken BTW. > >> +printk(KERN_INFO "Sig %d sent to %d owned by %d.%d >> (%s), sent by pid %d, uid %d\n", >> +

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-06-10 Thread Jiri Kosina
On Sun, 10 Jun 2007, Folkert van Heusden wrote: > Signed-of by: Folkert van Heusden <[EMAIL PROTECTED] This looks broken BTW. > + printk(KERN_INFO "Sig %d sent to %d owned by %d.%d > (%s), sent by pid %d, uid %d\n", > + sig, t->pid, t->uid, t->gid

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-06-10 Thread Folkert van Heusden
> > >> >+{ > > >> if (sig_fatal(t, sig)) { > > >> >+printk(KERN_WARNING "Sig %d send to %d owned by %d.%d > > >(%s)\n", > > >> s/send/sent/; > > >> >+sig, t -> pid, t -> uid, t -> gid, t -> comm); > > >> t->pid, t->uid, t->gid, t->comm); > > > > > > > Gargh ... why doe

Re: [PATCH 1/2] limit print_fatal_signal() rate (was: [RFC] log out-of-virtual-memory events)

2007-05-24 Thread Andrew Morton
On Thu, 24 May 2007 11:55:03 +0200 Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > On Thu, 24 May 2007 09:58:35 +0200 Ingo Molnar <[EMAIL PROTECTED]> wrote: > > > > > > > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > > > > Well OK. But vdso-

Re: [PATCH 1/2] limit print_fatal_signal() rate (was: [RFC] log out-of-virtual-memory events)

2007-05-24 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > [...] The only add-on change should be to not print SIGKILL events. ah, that's already included in the version in -mm. admittedly, the #ifdef __i386__ is quite lame, but there's no generic safely-try-to-show-code-at-addr function available at the mome

Re: [PATCH 1/2] limit print_fatal_signal() rate (was: [RFC] log out-of-virtual-memory events)

2007-05-24 Thread Ingo Molnar
* Andrew Morton <[EMAIL PROTECTED]> wrote: > On Thu, 24 May 2007 09:58:35 +0200 Ingo Molnar <[EMAIL PROTECTED]> wrote: > > > > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > > Well OK. But vdso-print-fatal-signals.patch is designated > > > not-for-mainline anyway. > > > > btw., why? >

Re: [PATCH 1/2] limit print_fatal_signal() rate (was: [RFC] log out-of-virtual-memory events)

2007-05-24 Thread Andrew Morton
On Thu, 24 May 2007 09:58:35 +0200 Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > Well OK. But vdso-print-fatal-signals.patch is designated > > not-for-mainline anyway. > > btw., why? err, because that's what I decided a year ago. I wonder why ;)

Re: [PATCH 1/2] limit print_fatal_signal() rate (was: [RFC] log out-of-virtual-memory events)

2007-05-24 Thread Ingo Molnar
* Andrew Morton <[EMAIL PROTECTED]> wrote: > Well OK. But vdso-print-fatal-signals.patch is designated > not-for-mainline anyway. btw., why? It's very, very useful to distro, early-boot-userspace and glibc development. The only add-on change should be to not print SIGKILL events. Otherwise i

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-23 Thread Folkert van Heusden
> >> >+{ > >> if (sig_fatal(t, sig)) { > >> >+printk(KERN_WARNING "Sig %d send to %d owned by %d.%d > >(%s)\n", > >> s/send/sent/; > >> >+sig, t -> pid, t -> uid, t -> gid, t -> comm); > >> t->pid, t->uid, t->gid, t->comm); > > > > Gargh ... why does this want to be in

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-23 Thread Satyam Sharma
On 5/21/07, Folkert van Heusden <[EMAIL PROTECTED]> wrote: > >What about the following enhancement: I check with sig_fatal if it would > >kill the process and only then emit a message. So when an application > >takes care itself of handling it nothing is printed. > >+/* emit some logging for

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-21 Thread Andrea Righi
Folkert van Heusden wrote: > What about the following enhancement: I check with sig_fatal if it would > kill the process and only then emit a message. So when an application > takes care itself of handling it nothing is printed. > + /* emit some logging for unhandled signals > +

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-21 Thread Folkert van Heusden
> >>> What about the following enhancement: I check with sig_fatal if it would > >>> kill the process and only then emit a message. So when an application > >>> takes care itself of handling it nothing is printed. > >>> + /* emit some logging for unhandled signals > >>> + */ > >>> + if (sig_fatal(

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-21 Thread Andrea Righi
Folkert van Heusden wrote: >>> What about the following enhancement: I check with sig_fatal if it would >>> kill the process and only then emit a message. So when an application >>> takes care itself of handling it nothing is printed. >>> + /* emit some logging for unhandled signals >>> +*/ >

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-21 Thread Folkert van Heusden
> >What about the following enhancement: I check with sig_fatal if it would > >kill the process and only then emit a message. So when an application > >takes care itself of handling it nothing is printed. > >+/* emit some logging for unhandled signals > >+ */ > >+if (sig_fatal(t, sig))

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-21 Thread Jan Engelhardt
On May 21 2007 13:04, Folkert van Heusden wrote: > >What about the following enhancement: I check with sig_fatal if it would >kill the process and only then emit a message. So when an application >takes care itself of handling it nothing is printed. >+ /* emit some logging for unhandled sign

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-21 Thread Gábor Lénárt
On Sun, May 20, 2007 at 11:20:36PM +0200, Folkert van Heusden wrote: > > > + switch(sig) { > > > + case SIGQUIT: > > > + case SIGILL: > > > + case SIGTRAP: > > > + case SIGABRT: > > > + case SIGBUS: > > > + case SIGFPE: > > > + case SIGSEGV: > > > + case SIGXCPU: > > > + case SIGXFSZ: > > > +

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-21 Thread Folkert van Heusden
> >> + switch(sig) { > >> + case SIGQUIT: ... > >> + case SIGSTKFLT: > > > > Unconditional? That's definitely a very bad idea. If anything only unhandled > > signals should be printed this way because some programs use them > > internally. > > But I think your list is far too long anyways. >

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-21 Thread Andrea Righi
Andi Kleen wrote: >> +switch(sig) { >> +case SIGQUIT: >> +case SIGILL: >> +case SIGTRAP: >> +case SIGABRT: >> +case SIGBUS: >> +case SIGFPE: >> +case SIGSEGV: >> +case SIGXCPU: >> +case SIGXFSZ: >> +case SIGSYS: >> +case SIGSTKFLT: > > Uncondi

Re: [PATCH 1/2] limit print_fatal_signal() rate (was: [RFC] log out-of-virtual-memory events)

2007-05-20 Thread Andrew Morton
On Sat, 19 May 2007 12:33:04 +0200 (MEST) Andrea Righi <[EMAIL PROTECTED]> wrote: > Bernd Eckenfels wrote: > > In article <[EMAIL PROTECTED]> you wrote: > >>printk("%s/%d: potentially unexpected fatal signal %d.\n", > >>current->comm, current->pid, signr); > > > > can we

Re: [PATCH 2/2] log out-of-virtual-memory events (was: [RFC] log out-of-virtual-memory events)

2007-05-20 Thread Andrew Morton
On Sat, 19 May 2007 12:34:01 +0200 (MEST) Andrea Righi <[EMAIL PROTECTED]> wrote: > Print informations about userspace processes that fail to allocate new virtual > memory. Why is this useful? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Jeff Dike
On Mon, May 21, 2007 at 12:24:22AM +0200, Andi Kleen wrote: > > > But I think your list is far too long anyways. > > > > So, which ones would you like to have removed then? > > SIGFPE at least and the accounting signals are dubious too. SIGQUIT can > be also relatively common. And SIGSEGV and SI

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Mikael Pettersson
On Sun, 20 May 2007 23:20:36 +0200, Folkert van Heusden wrote: > > > + switch(sig) { > > > + case SIGQUIT: > > > + case SIGILL: > > > + case SIGTRAP: > > > + case SIGABRT: > > > + case SIGBUS: > > > + case SIGFPE: > > > + case SIGSEGV: > > > + case SIGXCPU: > > > + case SIGXFSZ: > > > + case

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Andi Kleen
On Sun, May 20, 2007 at 11:20:36PM +0200, Folkert van Heusden wrote: > > > + switch(sig) { > > > + case SIGQUIT: > > > + case SIGILL: > > > + case SIGTRAP: > > > + case SIGABRT: > > > + case SIGBUS: > > > + case SIGFPE: > > > + case SIGSEGV: > > > + case SIGXCPU: > > > + case SIGXFSZ: > > > +

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Folkert van Heusden
> > > + switch(sig) { > > > + case SIGQUIT: > > > + case SIGILL: > > > + case SIGTRAP: > > > + case SIGABRT: > > > + case SIGBUS: > > > + case SIGFPE: > > > + case SIGSEGV: > > > + case SIGXCPU: > > > + case SIGXFSZ: > > > + case SIGSYS: > > > + case SIGSTKFLT: > > Unconditional? That's defi

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Folkert van Heusden
> > + switch(sig) { > > + case SIGQUIT: > > + case SIGILL: > > + case SIGTRAP: > > + case SIGABRT: > > + case SIGBUS: > > + case SIGFPE: > > + case SIGSEGV: > > + case SIGXCPU: > > + case SIGXFSZ: > > + case SIGSYS: > > + case SIGSTKFLT: > > Unconditional? That's def

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Andi Kleen
> + switch(sig) { > + case SIGQUIT: > + case SIGILL: > + case SIGTRAP: > + case SIGABRT: > + case SIGBUS: > + case SIGFPE: > + case SIGSEGV: > + case SIGXCPU: > + case SIGXFSZ: > + case SIGSYS: > + case SIGSTKFLT: Unconditional? That's defini

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Folkert van Heusden
> >> > > >> > +if (unlikely(sig == SIGQUIT || sig == SIGILL || sig == SIGTRAP > >> > || > >> > +sig == SIGABRT || sig == SIGBUS || sig == SIGFPE || > >> > +sig == SIGSEGV || sig == SIGXCPU || sig == SIGXFSZ || > >> > +sig == SIGSYS || sig == SIGSTK

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Jan Engelhardt
On May 20 2007 18:12, Folkert van Heusden wrote: >> > >> > + if (unlikely(sig == SIGQUIT || sig == SIGILL || sig == SIGTRAP || >> > + sig == SIGABRT || sig == SIGBUS || sig == SIGFPE || >> > + sig == SIGSEGV || sig == SIGXCPU || sig == SIGXFSZ || >> > + sig == SIGSYS || sig =

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Folkert van Heusden
> > > I do not see such on i386, so why for x86_64? > > > >>>So that you know that one of your programs crashed. That's a feature. > > > >>This feature could be handy for i386 too. > > > >Since 2.6.18.2 I use this patch. With 2.6.21.1 it still applies altough > > > >with a small offsets. Works

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Stephen Hemminger
On Sun, 20 May 2007 13:21:11 +0200 Folkert van Heusden <[EMAIL PROTECTED]> wrote: > > I do not see such on i386, so why for x86_64? > > >>>So that you know that one of your programs crashed. That's a feature. > > >>This feature could be handy for i386 too. > > >Since 2.6.18.2 I use this patch.

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-20 Thread Folkert van Heusden
> I do not see such on i386, so why for x86_64? > >>>So that you know that one of your programs crashed. That's a feature. > >>This feature could be handy for i386 too. > >Since 2.6.18.2 I use this patch. With 2.6.21.1 it still applies altough > >with a small offsets. Works like a charm. > > >

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-19 Thread Eric Dumazet
Folkert van Heusden a écrit : I do not see such on i386, so why for x86_64? So that you know that one of your programs crashed. That's a feature. This feature could be handy for i386 too. Since 2.6.18.2 I use this patch. With 2.6.21.1 it still applies altough with a small offsets. Works like

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-19 Thread Folkert van Heusden
> >> I do not see such on i386, so why for x86_64? > >So that you know that one of your programs crashed. That's a feature. > This feature could be handy for i386 too. Since 2.6.18.2 I use this patch. With 2.6.21.1 it still applies altough with a small offsets. Works like a charm. Signed-off by:

Re: [RFC] log out-of-virtual-memory events

2007-05-19 Thread Folkert van Heusden
> >> I'm looking for a way to keep track of the processes that fail to > >> allocate new > >> virtual memory. What do you think about the following approach > >> (untested)? > > Looks like an easy way for users to spam syslogd over and > > over and over again. > > At the very least, shouldn't this

[PATCH 2/2] log out-of-virtual-memory events (was: [RFC] log out-of-virtual-memory events)

2007-05-19 Thread Andrea Righi
Bernd Eckenfels wrote: > In article <[EMAIL PROTECTED]> you wrote: >> + printk(KERN_INFO >> + "out of virtual memory for process %d (%s): total_vm=%lu, >> uid=%d\n", >> + current->pid, current->comm, total_vm, current->uid); > > And align this one with the print_f

[PATCH 1/2] limit print_fatal_signal() rate (was: [RFC] log out-of-virtual-memory events)

2007-05-19 Thread Andrea Righi
Bernd Eckenfels wrote: > In article <[EMAIL PROTECTED]> you wrote: >>printk("%s/%d: potentially unexpected fatal signal %d.\n", >>current->comm, current->pid, signr); > > can we have both KERN_WARNING please? > > Gruss > Bernd Depends on print_fatal_signals patch. --- L

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-19 Thread Andrea Righi
Jan Engelhardt wrote: > On May 19 2007 11:35, Andrea Righi wrote: >> Jan Engelhardt wrote: >>> On May 18 2007 13:47, Andi Kleen wrote: > I do not see such on i386, so why for x86_64? So that you know that one of your programs crashed. That's a feature. >>> This feature could be handy for i

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-19 Thread Jan Engelhardt
On May 19 2007 11:35, Andrea Righi wrote: >Jan Engelhardt wrote: >> On May 18 2007 13:47, Andi Kleen wrote: I do not see such on i386, so why for x86_64? >>> So that you know that one of your programs crashed. That's a feature. >> >> This feature could be handy for i386 too. >> > >What abou

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-19 Thread Andrea Righi
Jan Engelhardt wrote: > On May 18 2007 13:47, Andi Kleen wrote: >>> I do not see such on i386, so why for x86_64? >> So that you know that one of your programs crashed. That's a feature. > > This feature could be handy for i386 too. > What about your /proc/sys/kernel/print-fatal-signals? it must

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-19 Thread Jan Engelhardt
On May 18 2007 13:47, Andi Kleen wrote: > >> I do not see such on i386, so why for x86_64? > >So that you know that one of your programs crashed. That's a feature. This feature could be handy for i386 too. Jan -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [RFC] log out-of-virtual-memory events

2007-05-18 Thread Bernd Eckenfels
In article <[EMAIL PROTECTED]> you wrote: > + printk(KERN_INFO > + "out of virtual memory for process %d (%s): total_vm=%lu, > uid=%d\n", > + current->pid, current->comm, total_vm, current->uid); And align this one with the print_fatal layout: printk(KERN_

Re: [RFC] log out-of-virtual-memory events

2007-05-18 Thread Bernd Eckenfels
In article <[EMAIL PROTECTED]> you wrote: >printk("%s/%d: potentially unexpected fatal signal %d.\n", >current->comm, current->pid, signr); can we have both KERN_WARNING please? Gruss Bernd - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: [RFC] log out-of-virtual-memory events

2007-05-18 Thread Andrea Righi
Andrea Righi wrote: > Robin Holt wrote: >> On Fri, May 18, 2007 at 09:50:03AM +0200, Andrea Righi wrote: >>> Rik van Riel wrote: Andrea Righi wrote: > I'm looking for a way to keep track of the processes that fail to > allocate new > virtual memory. What do you think about the foll

Re: [RFC] log out-of-virtual-memory events

2007-05-18 Thread Andrea Righi
Robin Holt wrote: > On Fri, May 18, 2007 at 09:50:03AM +0200, Andrea Righi wrote: >> Rik van Riel wrote: >>> Andrea Righi wrote: I'm looking for a way to keep track of the processes that fail to allocate new virtual memory. What do you think about the following approach (unteste

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-18 Thread Andi Kleen
> I do not see such on i386, so why for x86_64? So that you know that one of your programs crashed. That's a feature. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/major

Re: [RFC] log out-of-virtual-memory events

2007-05-18 Thread Robin Holt
On Fri, May 18, 2007 at 09:50:03AM +0200, Andrea Righi wrote: > Rik van Riel wrote: > > Andrea Righi wrote: > >> I'm looking for a way to keep track of the processes that fail to > >> allocate new > >> virtual memory. What do you think about the following approach > >> (untested)? > > > > Looks lik

Re: [RFC] log out-of-virtual-memory events

2007-05-18 Thread Andrea Righi
Rik van Riel wrote: > Andrea Righi wrote: >> I'm looking for a way to keep track of the processes that fail to >> allocate new >> virtual memory. What do you think about the following approach >> (untested)? > > Looks like an easy way for users to spam syslogd over and > over and over again. > > At

Re: signals logged / [RFC] log out-of-virtual-memory events

2007-05-17 Thread Jan Engelhardt
On May 17 2007 14:22, Rik van Riel wrote: > Andrea Righi wrote: >> I'm looking for a way to keep track of the processes that fail to allocate >> new >> virtual memory. What do you think about the following approach (untested)? > > Looks like an easy way for users to spam syslogd over and > over an

Re: [RFC] log out-of-virtual-memory events

2007-05-17 Thread Rik van Riel
Andrea Righi wrote: I'm looking for a way to keep track of the processes that fail to allocate new virtual memory. What do you think about the following approach (untested)? Looks like an easy way for users to spam syslogd over and over and over again. At the very least, shouldn't this be depe

[RFC] log out-of-virtual-memory events

2007-05-17 Thread Andrea Righi
I'm looking for a way to keep track of the processes that fail to allocate new virtual memory. What do you think about the following approach (untested)? -- Print informations about the processes that fail to allocate virtual memory. Signed-off-by: Andrea Righi <[EMAIL PROTECTED]> diff -urpN li