From owner-svn-src-head@freebsd.org Thu Jun 15 14:15:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F538D8B43F; Thu, 15 Jun 2017 14:15:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B785C76AB3; Thu, 15 Jun 2017 14:15:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5FEFfF5093186 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 15 Jun 2017 17:15:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5FEFfF5093186 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5FEFfcD093185; Thu, 15 Jun 2017 17:15:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Jun 2017 17:15:41 +0300 From: Konstantin Belousov To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r319874 - head/sys/kern Message-ID: <20170615141540.GT2088@kib.kiev.ua> References: <201706122111.v5CLBBUT092606@repo.freebsd.org> <20170612234356.GD50023@FreeBSD.org> <20170613120643.GX2088@kib.kiev.ua> <20170615050400.GP50023@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170615050400.GP50023@FreeBSD.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2017 14:15:47 -0000 On Wed, Jun 14, 2017 at 10:04:00PM -0700, Gleb Smirnoff wrote: > On Tue, Jun 13, 2017 at 03:06:43PM +0300, Konstantin Belousov wrote: > K> On Mon, Jun 12, 2017 at 04:43:56PM -0700, Gleb Smirnoff wrote: > K> > On Mon, Jun 12, 2017 at 09:11:11PM +0000, Konstantin Belousov wrote: > K> > K> Author: kib > K> > K> Date: Mon Jun 12 21:11:11 2017 > K> > K> New Revision: 319874 > K> > K> URL: https://svnweb.freebsd.org/changeset/base/319874 > K> > K> > K> > K> Log: > K> > K> Print unimplemented syscall number to the ctty on SIGSYS, if enabled > K> > K> by the knob kern.lognosys. > K> > > K> > Why is it off by default? > K> In some (non-default) situation it may cause lot of ctty output. > K> I made the knob tunable to allow it to be set very early (init) > K> if needed. > > I remember myself being a beginner UNIX user, and all this > "bad system call, core dumped" messages were so annoyingly > uninformative for me, and I had no idea how to track to the > actual problem. This feature gives a lot of clue for a beginner > user, but having it default to off, devaluates its value. > > To avoid possible tty spam for an application that produces ton > of bad syscalls, but ignores SIGSYS, we can enable the feature > for those processes, who doesn't ignore SIGSYS. I am curious how would you define the process or thread state which ignores SIGSYS. The signal can be ignored or blocked in the signal mask, or catched. All these dispositions cause controlling terminal spam. Also, I do no see a good solution for rate-limiting the message. I argue that rate-limiting must be per-process or even per-thread and not system global, but I do not want to add even an int field to struct thread for this.