From owner-freebsd-current@freebsd.org Wed May 27 18:26:06 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DF072CAD2E for ; Wed, 27 May 2020 18:26:06 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49XK5n6l4Tz3cHP; Wed, 27 May 2020 18:26:05 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: by mail-lj1-x242.google.com with SMTP id q2so30114372ljm.10; Wed, 27 May 2020 11:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EvmfyDtsNvwyIJ9W6zJhbuVJ9zLLmnq/2XtiB7SUr/c=; b=t+0B7h5o3W64850+B5uGR44NmYr5W3wRuOblCriNcVwON67wWva30+XYlsJoviYmy1 IHGtw1usbPF5aIzD5LjUDIYtohI/qbPYSfSFkZohk689XpFr7jFxNDztYAUEzJwYqYaR oaijq4VI47jnL0TFd4tPsXcs5ddkN3HlQqEd/sFMNWTVSJtpLpdIHQagXWj8DdEY28zP Hbx+A6qw84/+kdWc+DbSIugGjdAr0D3VABdc+le/2+9kwkwHmB5BNPP2lB+0plAg2KTk XMd32iBHGx95fv6se1lbz7gSNd4At+CiwHNw+TENEC8KKpKO7NUAO2xhw8r3Knzc/i3L Q6EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EvmfyDtsNvwyIJ9W6zJhbuVJ9zLLmnq/2XtiB7SUr/c=; b=YdKLrOVM7kwiRn4fN7oVHjed4qWl9uTlH6t7crk24UiSvBm4L/FZUd+rH00mrEzBjb gwbo4UixhYZ7LqMhE6PeC8y6J8dr7pJkkwV+85e2HcZ315c4CW37O5p/uk7pKIAO1WwS Lc+zgXd1FK077muvNk2b2w1vy8FurEczOm/AtPyOCXDAThbFmAh7P4jmeWSWMQTd/Als 0igKopFEUV8BSp4RkxUuEU/bXWIGPk/7YWqQqrVvrnc+sCb+5rG+wG7ytJORXlcLeO6U V/8yuY+SoaadTNqw4FKnITOqph5gCheRDThefdS5Kc6cTNowpjKoO7eCtEHP3RGoQTqk 05wg== X-Gm-Message-State: AOAM532AraTSOIcB2se+waUoqNp+ulWnnsn9Y1k6K6dSrvYrG6GaSFdl P2usidsl6nOfH3R60S5spCToeejmHQjM5R1HPVM= X-Google-Smtp-Source: ABdhPJw7e1+VVlARFtWrXTKuonLdY03JcCXh0+87OTOmlE+fEPqOrmfHtMLl1T+BnTYzOvzUhWZ+kymwhKX5WFXpWoo= X-Received: by 2002:a2e:7808:: with SMTP id t8mr3811729ljc.353.1590603964182; Wed, 27 May 2020 11:26:04 -0700 (PDT) MIME-Version: 1.0 References: <20200521235659.GA14173@night.db.net> In-Reply-To: <20200521235659.GA14173@night.db.net> From: Andreas Nilsson Date: Wed, 27 May 2020 20:25:52 +0200 Message-ID: Subject: Re: hwpstate_intel hangs kernel To: Diane Bruce Cc: cem@freebsd.org, "Andrey V. Elsukov" , Current FreeBSD X-Rspamd-Queue-Id: 49XK5n6l4Tz3cHP X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=t+0B7h5o; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of andrnils@gmail.com designates 2a00:1450:4864:20::242 as permitted sender) smtp.mailfrom=andrnils@gmail.com X-Spamd-Result: default: False [-3.19 / 15.00]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.02)[-1.023]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_HAM_LONG(-1.00)[-0.999]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::242:from]; NEURAL_HAM_SHORT(-0.17)[-0.169]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_CC(0.00)[freebsd.org,yandex.ru]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 18:26:06 -0000 On Fri, May 22, 2020 at 1:57 AM Diane Bruce wrote: > On Wed, Feb 05, 2020 at 02:45:50PM +0100, Andreas Nilsson wrote: > > Ok I am going to respond to this old email from February.. > > > Hello, > > > > I upgraded to a newer version, git 87d669d3863-c266265, and I do not > > experience the random hang anymore. The machine still hangs on boot on > > "hwpstate_intel0: on cpu0" unless I set > > 'hint.hwpstate_intel.0.disabled=3D"1"' in loader.conf. > > > > As a few others know on IRC I ran into exactly this same problem > on a brand new Lenovo Carbon. I missed this thread somehow. > I also had to bisect the commit. Would it be possible to put > a note into UPDATING and default to disabled=3D1 for now? ;) > Well, I've been trying to chase this a bit more. But I could sure use some help from more experienced kernel developers. debug.hwpstate_verbose=3D"1" in loader.conf, and booting in verbose mode I get this: pcib0: allocated type 4 (8x3f8-8xaf8) for rid 8 of uart0 uart0 failed to probe at port 0x3f8 irg 4 on isa0 pcib0: allocated type 4 (0x2f8-0x2f8) for rid 0 uart1 uart1 failed to probe at port 0x2f8 irq 3 on isa0 isa_probe_children: probing PnP devices Acpi0sExecute: task queue not started cpu0: hwpstate registered Acpi0sExecute: task queue not started cpu1: hwpstate registered Acpi0sExecute; task queue not started cpu2: hwpstate registered Acpi0sExecute: task queue not started cpu3: hwpstate registered hwpstate_intel0: on cpu0 hwpstate_intel0: hwpstate_attach1 hwpstate_intel0: hwpstate_attach2 hwpstate_intel0: hwpstate_attach3 where the hwpstate_attachX is some device_printf(dev,"hwpstate_attachX\n"); I've sprinkled in to try to where it actually fails. I'm not sure about if device_printf happens immediately. The modifications have been made to the function intel_hwpstate_attach around line 480 in sys/x86/cpufreq/hwpstate_intel.c /* ecx */ if (cpu_power_ecx & CPUID_PERF_BIAS) sc->hwp_perf_bias =3D true; ret =3D set_autonomous_hwp(sc); device_printf(dev, "hwpstate_attach3\n"); if (ret){ device_printf(dev, "hwpstate_attach3a %i\n",ret); return (ret); } device_printf(dev, "hwpstate_attach4\n"); Any ideas to test? I'm curios about the "Acpi0sExecute: task queue not started" lines, but I've not had the chance to see if they are present on a computer that successfully boots with the hwpstate driver. Best regards Andreas > ... > > > > Best regards > > Andreas > > > > On Sat, Feb 1, 2020 at 11:26 PM Andreas Nilsson > wrote: > > > > > Hello Conrad, > > > > > > thank you Andrey for bisecting! I'll try with that hint and see how i= t > > > works for me. > > > > > > Best regards > > > Andreas > > > > > > On Sat, Feb 1, 2020, 18:18 Conrad Meyer wrote: > > > > > >> Hi Andrey, > > >> > > >> Please try 'hint.hwpstate_intel.0.disabled=3D"1"' as a workaround fo= r > now. > > >> > > >> I think I have identified at least one problematic piece of code, > > >> although I don't know if it's the root cause. I will go ahead and f= ix > > >> that, which may not fix the hang, and also add some debug printfs th= at > > >> can be enabled to help identify the real issue. > > >> > > >> Thanks for the report and bisect. > > >> > > >> Best, > > >> Conrad > > >> > > >> On Sat, Feb 1, 2020 at 6:06 AM Andrey V. Elsukov > > >> wrote: > > >> > > > >> > 31.01.2020 18:11, Andrey V. Elsukov =D0=BF=D0=B8=D1=88=D0=B5=D1=82= : > > >> > > On 24.01.2020 19:52, Andreas Nilsson wrote: > > >> > >> It hangs during kernel boot and the last message printed on > console > > >> is: > > >> > >> hwpstate_intel0: on cpu0 > > >> > > > > >> > > Hi, > > >> > > > > >> > > Did you find the cause of this hang? > > >> > > I also tried to update today from r350816 to r357330. But my > Lenovo X1 > > >> > > Carbon 4th hangs on the same message. > > >> > > > > >> > > > >> > Hi, > > >> > > > >> > I have bisected the bad commit, it is r357002. > > Yep. I also had to bisect this from what is now some 5 months ago :-( > > Diane > -- > - db@FreeBSD.org db@db.net http://www.db.net/~db >