From owner-freebsd-current@freebsd.org Fri Nov 16 15:42:15 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 BB7241135BB7 for ; Fri, 16 Nov 2018 15:42:14 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (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 0598183E87 for ; Fri, 16 Nov 2018 15:42:14 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-io1-xd43.google.com with SMTP id f12-v6so17397658iog.0 for ; Fri, 16 Nov 2018 07:42:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=tJr6AJ82cNWEoDXdb50TBjkmu9z3xoD8wAO+Xurci1k=; b=Tnoxiou7stCI9weAVLdxpbugj7esPBCN0jDAnrOcoQVp8yGX2gi1rz4cHFV9KiAJpC MAfl1keXQAtNhvIQ50oUQKlIhgUYFrRAhxFPABE9RZii08SBlbh9O9ptlI9RYXsu5aPZ S05Q8B5YLFit7aeYjCVTlcjmtQRXrQYLU0wo7Shx8Kk/Sh1FBDnziLkQ+u7fNVZDAYdT W3cfKKhSEBopKZQCE37pcuTHTSOwggEQ6WldJtTRHef9QFMrx7T3G6XOaLRTEZBtNQYF 1Xx5OicfHcGr3bFAH5lm/l87slwFmzRLAZx/y24v5SMS+KNXUR6wm4seLb9oiBKAQizH r/gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=tJr6AJ82cNWEoDXdb50TBjkmu9z3xoD8wAO+Xurci1k=; b=BJN1MfJdXkbFQHJ6Ib/W5jA+VDSil8jIlSMwrbHwRfUSqw/+w5AoiRBZ/QY7sWkMth 4A0sFtcjibapeIVP15r5SNNZhLsfWRNW5eRGDT+joBS8UMPVwnoxaglLxQWs5LKq+1La Yrhg3zfdUfgpQtf+13WayxABEYCWRwZZATuo2fXin6GrSkj/yc4StJThJp+XlN6KdqVf wPax8IarYxMGlnaXSi2pvNnWedsw+S2n4bKDuH5dHwl5Y/4LYQ0GRg7My9qG4ECUoPHW QV6eEJW3JpFCbAGz8PeJzDiC1P1gPKRAviHH752Bsr2iZCX1mK8NfgVmTYBVvPHjCpbb m5QQ== X-Gm-Message-State: AGRZ1gKxHy2WKUNeFa1lHqhm9PcePwoP6REBqEM3QTJvxl81AiIGK00a Cof2jAle1UgCjx4vyJ3kroS2VPWX X-Google-Smtp-Source: AJdET5dPi2sC4iLv/H1b35xb4tMKF1qPpauHIwyA5b3+8DnXcqYc5xE2c3NrogaF2+7ugeHLirFOuw== X-Received: by 2002:a6b:c410:: with SMTP id y16-v6mr9657756ioa.77.1542382933140; Fri, 16 Nov 2018 07:42:13 -0800 (PST) Received: from raichu (toroon0560w-lp130-07-64-229-95-98.dsl.bell.ca. [64.229.95.98]) by smtp.gmail.com with ESMTPSA id s13sm192877ioj.71.2018.11.16.07.42.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Nov 2018 07:42:12 -0800 (PST) Sender: Mark Johnston Date: Fri, 16 Nov 2018 10:42:10 -0500 From: Mark Johnston To: Sylvain GALLIANO Cc: freebsd-current@freebsd.org Subject: Re: Panic on kern_event.c Message-ID: <20181116154210.GB17379@raichu> References: <20181107043503.GB30861@raichu> <20181115221019.GA2514@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 0598183E87 X-Spamd-Result: default: False [-3.30 / 40.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[3.4.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.85)[-0.846,0]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; IP_SCORE(-0.75)[ip: (0.79), ipnet: 2607:f8b0::/32(-2.63), asn: 15169(-1.81), country: US(-0.10)] X-Rspamd-Server: mx1.freebsd.org 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 15:42:15 -0000 On Fri, Nov 16, 2018 at 03:47:39PM +0100, Sylvain GALLIANO wrote: > Le jeu. 15 nov. 2018 à 23:10, Mark Johnston a écrit : > > > 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_prev,__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_prev,__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.