From b48ada653e49a6cd2ef0264bc6818e9b529dee91 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Mon, 11 Dec 2000 18:55:49 +0000 Subject: [PATCH] Added a FAQ about multithreaded core dumps on linux and the kernel patch. --- FAQ | 7 +++++++ contrib/linux/coredump-patch | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 contrib/linux/coredump-patch diff --git a/FAQ b/FAQ index a01c144640..bea4f7eb7f 100644 --- a/FAQ +++ b/FAQ @@ -63,3 +63,10 @@ bar: ran out of space" A: This is often caused by TXT records with missing close quotes. Check that all TXT records containing quoted strings have both open and close quotes. + + +Q: How do I produce a useful core file on Linux? + +A: Apply the kernel patch found in bind9/linux/coredump-patch and rebuild +the kernel. This patch causes multithreaded programs to dump the correct +thread. diff --git a/contrib/linux/coredump-patch b/contrib/linux/coredump-patch new file mode 100644 index 0000000000..d1792901ad --- /dev/null +++ b/contrib/linux/coredump-patch @@ -0,0 +1,12 @@ +--- binfmt_elf.c.old Mon Dec 11 10:49:57 2000 ++++ binfmt_elf.c Wed Nov 1 13:05:23 2000 +@@ -1091,7 +1091,8 @@ + + if (!current->dumpable || + limit < ELF_EXEC_PAGESIZE || +- atomic_read(¤t->mm->count) != 1) ++/* atomic_read(¤t->mm->count) != 1) */ ++ test_and_set_bit(31, ¤t->mm->def_flags) != 0) + return 0; + current->dumpable = 0; +