From nobody Wed Sep 01 17:48:02 2021 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4FE49178A03D for ; Wed, 1 Sep 2021 17:48:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) (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 4H0BNt1RsFz4Sqp for ; Wed, 1 Sep 2021 17:48:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x92e.google.com with SMTP id s4so305258uar.5 for ; Wed, 01 Sep 2021 10:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o/SLJYLrvJyl3X4GBTHji2WtSwFoB0AuepwoH2gktPA=; b=ZAnxr9clKCpDd1n3gxyy3c7bj2vOdqlT21jwXfElWvtSL1Ma6aBOs8lChof93YJMjQ AwX7kZiAP0BGnpCidZeh8kzzkhHqL6DEJUQiDVv8tT/iiEaehyjH5SWmby9S8S6p5N8g kN/EoO1pTKsSZ0QKUFKHoI9GqzDB9VS9okm4H8jntm42HV6o6eiUV/QDtnAnhpENXxfa L+pB9Uk2CFLDczBYZ52qcQPUq/dcYMyq+O9C6BOJvX0FvO1KypLAeKBJjyamMZV2ctaC m474eZZfUWgE1aZZUYVl0lHyjip5+Qx5+6mgAKAe0MTs/UlOikNW0X03jsp+dSOJBuN3 2crA== 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=o/SLJYLrvJyl3X4GBTHji2WtSwFoB0AuepwoH2gktPA=; b=EEmY/alC8vzMEJs4RBGADY9AHajec72msP4xXPqcIy4NNGx6fIEtlmei5a4wH82x7f ELlF6ScnUegDSE3HWJAdAR3C3JgnU1mfVYZfpzODPdzGJ+Z1xX6lKWtGtAbwTXiXlR6o fcyMJwBcj+v/tGmviqu6FmNhUALhQXXD9tOTpmz2QOplSPm5Zt5XBGVgI6dfuXCzgTSL fpBIj7neLcGli5cWOLT5E4N0sxoPPb52p3c9tjkST6CRxKinFrBK9G1VCfhln9ZlIHOK zqk7Py9MrkNRFm8tf47ibqVzlSvsV9dc4mV2tC3vzJ2wcYHrU96faY5sHflqCwravmQF Q0KQ== X-Gm-Message-State: AOAM53079KA2uuS1wS2ilpmah+i+pPO2RXe+yP1jPivsoGFiGECQykqN GOvhTK6b12nw/L+ZuXLCPHpiOAwxqiNyaS0wf6Q9Tw== X-Google-Smtp-Source: ABdhPJybLRs+XqHc5k2jwOKayAbnvY47h26Yoqvzywq9OywRJDknLDbN8kRFo9+K0emlTntlJO2ZOCATlxRJYzZ+/K0= X-Received: by 2002:a9f:23d0:: with SMTP id 74mr855270uao.69.1630518493554; Wed, 01 Sep 2021 10:48:13 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <5476ea21-9e8a-32f5-08ff-add46c02d910@freebsd.org> <5d812d36e5291af35ecadf910a6d5f76b60f1441.camel@freebsd.org> <24848efe-aee7-8fe2-9437-005a854a3525@freebsd.org> In-Reply-To: <24848efe-aee7-8fe2-9437-005a854a3525@freebsd.org> From: Warner Losh Date: Wed, 1 Sep 2021 11:48:02 -0600 Message-ID: Subject: Re: Patched gpsd and /dev/pps0 results in "sleeping thread" kernel panic To: Craig Leres Cc: Ian Lepore , FreeBSD Hackers Content-Type: multipart/alternative; boundary="0000000000009bbae905caf2aba2" X-Rspamd-Queue-Id: 4H0BNt1RsFz4Sqp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: Y --0000000000009bbae905caf2aba2 Content-Type: text/plain; charset="UTF-8" On Wed, Sep 1, 2021 at 11:28 AM Craig Leres wrote: > On 9/1/21 8:07 AM, Ian Lepore wrote: > > Warner, I pointed out a small change needed to your proposed patch in > > D31763. > > I was able to figure out what to change and am happy to report that it > solves the kernel panic; thanks! Now I'm back to only fighting with gpsd. > That patch looks good to me. I'll update the phab here in a few minutes. > Are the other calls to pps_init() ok? > > steel 183 # find . -name '*.c' | xargs fgrep -w pps_init > ./dev/sio/sio.c: pps_init(&com->pps); > ./i386/i386/elan-mmcr.c: pps_init(&elan_pps); > ./kern/kern_tc.c:pps_init(struct pps_state *pps) > ./kern/kern_tc.c: pps_init(pps); > > I've attached my working version of the patch. > Great! Thanks for testing. sio.c and elan-mmcr.c are likely not worth updating since they are quite old (sio.c has been removed from main, and the elan CPU is little-used with -current). The Elan was from the late 90s or early 2000s, give or take, and designs have moved on since it went EOL over a decade ago. I got rid of my old gear based on that years ago as well, so I can't easily test it. The kern_tc.c file is fine. Warner --0000000000009bbae905caf2aba2--