Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1825920ybl; Sat, 10 Aug 2019 10:32:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJO1O2IxaqKLFC79boShcTtHwu/cOruHE0O4ackBYy0mNJJZTR/Jy7zONntqEywTdZcwJ6 X-Received: by 2002:a63:5c7:: with SMTP id 190mr22440511pgf.67.1565458362149; Sat, 10 Aug 2019 10:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565458362; cv=none; d=google.com; s=arc-20160816; b=lmaJacl8ICRd5CVBw6XKjd1GOUTn7zEUwGQwZ6/+htCU5OVokzZ3FDNIafvGQZy385 npjxyXRRQwPWXBsWinLBXXDNstco085FnlX9ObSndToPCWpuhuVYop7dzx1h2pXkNExT 6J6PxV52Uf+yzXNkd7lzvcsbW1E7m6e4KG0zQVHhNjVy7uRmbav8YsEMH5jEOeiC3dpB +rvdZKU3TdpuWFyauVmt49GR5L7HvOmTn5B8ApCceWPgTdH6mCegApHMgWJHRTVx/ECx qSEsbpLEYqXo+FSHeLHisYHU+Xa5KQWljdVgxAnbJ/MdRRrPNHtAwre6Q7YkfsD4serL cI8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Nh2+htaPdovSPjJGm4Nu7xCU5HKbNOyWDxMG2NORELA=; b=qM5Ke1m3mlGHl+h2kIcwD92JNrFZewi2qT5a0l+9uXKM6TAU66H4/+yfhvC31oXhkm mWTYtdmSlKPN+0ZUf56WBKc9/7ei/AoXeL2vzpDsm+dUmXoH6mjyNWhMDdQSpbOGeqQl Pw+sVxT8Qo5hbU8up37s5dlY3Y2nT+2XlWDrSeXvJT4APB4S84FL8JoLhAJ6kAWihs+K w8QeLNH860+wbX5E4J+schPQee/9CdtSLkc89SsIWN/nhJFwT6mdYRSZ/xoPOCUeCiJm HOX7Y0OiOD9z0mS2zU8fRWCdc7Nq23X/M95x68k52JoAdVe/tp1+eOZoOKN4hHTTIa3p BJTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si24330015pgt.192.2019.08.10.10.32.26; Sat, 10 Aug 2019 10:32:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726165AbfHJRbz (ORCPT + 99 others); Sat, 10 Aug 2019 13:31:55 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:58304 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbfHJRbz (ORCPT ); Sat, 10 Aug 2019 13:31:55 -0400 Received: from p200300ddd71876237e7a91fffec98e25.dip0.t-ipconnect.de ([2003:dd:d718:7623:7e7a:91ff:fec9:8e25]) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hwVDb-00076N-2q; Sat, 10 Aug 2019 19:31:51 +0200 Date: Sat, 10 Aug 2019 19:31:45 +0200 (CEST) From: Thomas Gleixner To: Paul Menzel cc: x86@kernel.org, LKML Subject: Re: [Linux 5.2.7] powertop --auto-tune: BUG: kernel NULL pointer dereference, address: 0000000000000000 In-Reply-To: <4b54ff1e-f18b-3c58-7caa-945a0775c24c@molgen.mpg.de> Message-ID: References: <4b54ff1e-f18b-3c58-7caa-945a0775c24c@molgen.mpg.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Paul, On Sat, 10 Aug 2019, Paul Menzel wrote: > > I have no idea, who to report this to, so I please refer me to the correct > list. I have no idea yet either :) > With Linux 5.2.7 from Debian Sid/unstable and PowerTOP 2.10, executing > > sudo powertop --auto-tune > > causes a NULL pointer dereference, and the graphical session crashes due to an > effect on the i915 driver. It worked in the past with the 4.19 series from > Debian. > > Here is the trace, and please find all Linux kernel logs attached. > > > [ 2027.170589] BUG: kernel NULL pointer dereference, address: > > 0000000000000000 > > [ 2027.170600] #PF: supervisor instruction fetch in kernel mode > > [ 2027.170604] #PF: error_code(0x0010) - not-present page > > [ 2027.170609] PGD 0 P4D 0 [ 2027.170619] Oops: 0010 [#1] SMP PTI ... > > [ 2027.170730] do_dentry_open+0x13a/0x370 If you have compiled with debug info, please decode the line: linux/scripts/faddr2line vmlinux do_dentry_open+0x13a/0x370 That gives us the fops pointer which is NULL. > > [ 2027.170745] path_openat+0x2c6/0x1480 > > [ 2027.170757] ? terminate_walk+0xe6/0x100 > > [ 2027.170767] ? path_lookupat.isra.48+0xa3/0x220 > > [ 2027.170779] ? reuse_swap_page+0x105/0x320 > > [ 2027.170791] do_filp_open+0x93/0x100 > > [ 2027.170804] ? __check_object_size+0x15d/0x189 > > [ 2027.170816] do_sys_open+0x184/0x220 > > [ 2027.170828] do_syscall_64+0x53/0x130 > > [ 2027.170837] entry_SYSCALL_64_after_hwframe+0x44/0xa9 That's an open crashing. We just don't know which file. Is the machine completely hosed after that or is it just the graphics stuff dying? If it's not completely dead then instead of running it from your graphical desktop you could switch to a VGA terminal Alt+Ctrl+F1 (or whatever function key your distro maps to) after boot and run powertop with strace from there: strace -f -o xxx.log powertop With a bit of luck xxx.log should contain the information about the file it tries to open. Alternatively if you have a serial console you can enable the sys_enter_open* tracepoints: # echo 1 >/sys/kernel/debug/tracing/events/syscalls/sys_enter_open # echo 1 >/sys/kernel/debug/tracing/events/syscalls/sys_enter_openat Either add 'ftrace_dump_on_oops' to the kernel command line or enable it from the shell: # echo 1 > /proc/sys/kernel/ftrace_dump_on_oops Then run powertop. After the crash it will take some time to spill out the trace buffer over serial, but it will pinpoint the offending file. Once we know which file it is, we also know who needs to stare at it :) Thanks, tglx