Skip to contentSkip to conversation

Disable the debug.exception-trace sysctl by default

PATCH In review Nicholas Miell 2 participants 4 messages Jul 28, 2005 – Aug 3, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Disable the debug.exception-trace sysctl by default

debug.exception-trace causes a large amount of log spew when on, and it's on by default, which is an irritation.

Here's a patch to turn it off.

--- linux-2.6.12/arch/x86_64/mm/fault.c.~1~ 2005-06-28
21:33:27.000000000 -0700
+++ linux-2.6.12/arch/x86_64/mm/fault.c 2005-07-27 23:46:10.000000000
-0700
@@ -284,7 +284,7 @@
}

int page_fault_trace = 0;
-int exception_trace = 1;
+int exception_trace = 0;

/*
* This routine handles page faults. It determines the address,

Signature · 1 line
Nicholas Miell <[email protected]>
#1 lore raw
Quoted 4 lines · Nicholas Miell

debug.exception-trace causes a large amount of log spew when on, and it's on by default, which is an irritation.

Here's a patch to turn it off.

Rejected.

-Andi

#2 lore raw
Quoted 6 lines · Andi Kleen
Quoted 4 lines · Nicholas Miell

debug.exception-trace causes a large amount of log spew when on, and it's on by default, which is an irritation.

Here's a patch to turn it off.

Rejected.

Why?

Getting 5000 lines of
"inkscape[13137] trap int3 rip:425051 rsp:7fffffa26158 error:0" in my logs every time I ltrace something is vastly irritating and serves no useful purpose.

Admittedly, I can (and have) turned this off, but disabling it by default will probably save somebody else the trouble of figuring out where this crap is coming from and how to kill it.

Signature · 1 line
Nicholas Miell <[email protected]>
#3 lore raw
Quoted 9 lines · Nicholas Miell
Quoted 6 lines · Andi Kleen
Quoted 4 lines · Nicholas Miell

debug.exception-trace causes a large amount of log spew when on, and it's on by default, which is an irritation.

Here's a patch to turn it off.

Rejected.

Why?

It is supposed to print normally silent segfaults. That improves quality of software greatly because people actually notice them and bugs get only fixed when they are noticed.

We started it early with the port, but it is still very useful.

Some misguided distributions unfortunately turn it off by default, but I think they pay the price in general software quality.

Quoted 5 lines

Getting 5000 lines of
"inkscape[13137] trap int3 rip:425051 rsp:7fffffa26158 error:0" in my logs every time I ltrace something is vastly irritating and serves no useful purpose.

Normally it's not supposed to print anything when the process is under control of a debugger. But we made an exception for strace.

Unfortunately that triggers with ltrace because it uses PTRACE_SYSCALL instead of PTRACE_CONT.

Anyways, this patch would fix that:

arch/x86_64/mm/fault.c +1 -3
Index: linux/arch/x86_64/mm/fault.c
===================================================================
@@ -211,9 +211,7 @@ int unhandled_signal(struct task_struct 
 {
 	if (tsk->pid == 1)
 		return 1;
-	/* Warn for strace, but not for gdb */
-	if (!test_ti_thread_flag(tsk->thread_info, TIF_SYSCALL_TRACE) &&
-	    (tsk->ptrace & PT_PTRACED))
+	if (tsk->ptrace & PT_PTRACED)
 		return 0;
 	return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) ||
 		(tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL);
Quoted 3 lines

Admittedly, I can (and have) turned this off, but disabling it by default will probably save somebody else the trouble of figuring out where this crap is coming from and how to kill it.

Giving some other users with the pleasure to figure why things mysteriously break with silent segfaults. Not a good tradeoff.

-Andi