From owner-freebsd-current@freebsd.org Fri Nov 16 16:57:09 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 141C41136FF4 for ; Fri, 16 Nov 2018 16:57:09 +0000 (UTC) (envelope-from sg@efficientip.com) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 342908632E for ; Fri, 16 Nov 2018 16:57:08 +0000 (UTC) (envelope-from sg@efficientip.com) Received: by mail-ed1-x536.google.com with SMTP id b34-v6so20187613ede.13 for ; Fri, 16 Nov 2018 08:57:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientip.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VleH+XgyZKQEOnwFbAkXn+qQt+jFH665v8jwnDEDKLs=; b=JwbBYWePBtWVc5De0qjZ6X9TbO7VGKJRau35agR8GqIOwDUdljwCUAQ9UuhL8Itgkr IlI/bfAI2Uu3YJq1Z/ZgKgPG4Z0Z7wLuQ1H1fvE8KSTROXpTX1n5zbN/ght7qwli6DU6 z5jh11OkZV5DbS5Te/jdnsu9zE6Jbb3eg0gew= 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=VleH+XgyZKQEOnwFbAkXn+qQt+jFH665v8jwnDEDKLs=; b=CDDoxTAKzMVgP7cb9VTuqVX9KUUS+yBpy9Uqe2kV6teNiBGHsAJH7+foq0us9tK1jS 9bOUAR11/INAsj17lpLL0yxsjl8ywDgUw+Q99A4Ejz/yOmyzSTNV58Gn8wTxEAKFj61S r2HWKQcbH9D+h2+1NL3GiiZUZ35MnQ6cJTWjURhd/FQI23n1hyhNg16z5eBZd/07I/aH daayWzHeP7gN0pyMFZMx/a5gFekpYC2/9oPOqq68v311OvGGF4z4OWJpqEQVGVohl5BX k/FV1h0fClHvU/d5RLPy/HCj4ghSh9Fh1f0RWvR08pleitNoxyZDbyCh1vfOugWU7t0S toJA== X-Gm-Message-State: AGRZ1gL7Te1863WMBdUuWQqpR6kldTDGCX7bHZH7mimExmZqOZbaPoXP fSrFipIuwT/R3XwLgByROeOA2vqNahsprrFzbV/pLwcdYmQ= X-Google-Smtp-Source: AJdET5f+Sm8bSJrQz/bSbE6f/ZjGigmMqM+/gwP1DlGffONtJ440OO2olAwsd+uQ2sQybo48vCsoCtqBbAgdkclp15w= X-Received: by 2002:a17:906:3193:: with SMTP id 19-v6mr9371859ejy.134.1542387427021; Fri, 16 Nov 2018 08:57:07 -0800 (PST) MIME-Version: 1.0 References: <20181107043503.GB30861@raichu> <20181115221019.GA2514@raichu> <20181116154210.GB17379@raichu> In-Reply-To: <20181116154210.GB17379@raichu> From: Sylvain GALLIANO Date: Fri, 16 Nov 2018 17:56:54 +0100 Message-ID: Subject: Re: Panic on kern_event.c To: markj@freebsd.org Cc: freebsd-current@freebsd.org X-Rspamd-Queue-Id: 342908632E X-Spamd-Result: default: False [-5.65 / 40.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[efficientip.com]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[efficientip.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt1.aspmx.l.google.com]; DKIM_TRACE(0.00)[efficientip.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[6.3.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.38)[ip: (-8.07), ipnet: 2a00:1450::/32(-1.90), asn: 15169(-1.82), country: US(-0.10)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 16 Nov 2018 16:57:09 -0000 Le ven. 16 nov. 2018 =C3=A0 16:42, Mark Johnston a =C3= =A9crit : > On Fri, Nov 16, 2018 at 03:47:39PM +0100, Sylvain GALLIANO wrote: > > Le jeu. 15 nov. 2018 =C3=A0 23:10, Mark Johnston a = =C3=A9crit > : > > > > > On Thu, Nov 08, 2018 at 05:05:03PM +0100, Sylvain GALLIANO wrote: > > > > Hi, > > > > > > > > I replaced > > > > << printf("XXX knote %p already in tailq status:%x kq_count:%d [%= p > %p] > > > > > > > > %u\n",kn,kn->kn_status,kq->kq_count,kn->kn_tqe.tqe_next,kn->kn_tqe.tqe_pr= ev,__LINE__); > > > > by > > > > >> panic("XXX knote %p already in tailq status:%x kq_count:%d [%p > %p] > > > > > > > > %u\n",kn,kn->kn_status,kq->kq_count,kn->kn_tqe.tqe_next,kn->kn_tqe.tqe_pr= ev,__LINE__); > > > > > > > > Here is the stack during panic: > > > > panic: XXX knote 0xfffff801e1c6ddc0 already in tailq status:1 > kq_count:2 > > > > [0 0xfffff8000957a978] 2671 > > > > > > > Could you please give the following patch a try? > > > > > > If possible, could you also ktrace one of the active syslog-ng > processes > > > for some time, perhaps 15 seconds, and share the kdump? I have been > > > trying to reproduce the problem without any luck. > > > > > Unfortunately patched kernel is not stable: > > - some processes run at 100% CPU (STOP state) and cannot be killed > > - sometime the system completely freeze (need a hard reboot) > > > > I cannot reproduce the issue as soon as syslog-ng is under ktrace (even > > after 10GB of ktrace file) > > When I stop ktrace, issue come back after few minutes. > > That's ok, I'd like to see part of the ktrace even if the problem > doesn't occur; this bug appears to be a race condition, so it's not > surprising that ktrace might hide it. > Lucky ktrace this time, issue occured 2 times: Nov 16 16:13:29 solid kernel: XXX knote 0xfffff8003282fb40 already in tailq status:1 kq_count:1 [0 0xfffff80032883138] 2671 Nov 16 16:14:39 solid kernel: XXX knote 0xfffff8003282f3c0 already in tailq status:1 kq_count:1 [0 0xfffff80032883138] 2671 ktrace.out.xz located in: https://drive.google.com/drive/folders/1MbqJQm12-KOYDbb4-9uNRTnAdsNqLaIP?us= p=3Dsharing