From owner-svn-src-all@freebsd.org Thu Dec 14 11:49:34 2017 Return-Path: Delivered-To: svn-src-all@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 04CF9EA0F51; Thu, 14 Dec 2017 11:49:34 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C556804E8; Thu, 14 Dec 2017 11:49:33 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id vBEBnSM1035698 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2017 12:49:29 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: jhb@FreeBSD.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id vBEBnOGc048087; Thu, 14 Dec 2017 18:49:24 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r326758 - in head/sys/i386: conf include To: John Baldwin , Konstantin Belousov , Conrad Meyer , Alexey Dokuchaev References: <201712110432.vBB4WbnE021090@repo.freebsd.org> <20171211091943.GF2272@kib.kiev.ua> <5A2E5D44.9030904@grosbein.net> <4a9c76c9-8063-9420-b198-14487b089840@FreeBSD.org> <5A30378A.3040609@grosbein.net> <5A3261BD.5050404@grosbein.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5A326544.1030706@grosbein.net> Date: Thu, 14 Dec 2017 18:49:24 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5A3261BD.5050404@grosbein.net> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_Q_PLUS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 11:49:34 -0000 On 14.12.2017 18:34, Eugene Grosbein wrote: > On 13.12.2017 04:55, John Baldwin wrote: >> On 12/12/17 3:09 PM, Eugene Grosbein wrote: >>> On 13.12.2017 02:32, John Baldwin wrote: >>> >>>> Certainly for MIPS I have found that compiling with clang >>>> instead of gcc for mips64 gives a kernel that panics for stack overflow for any >>>> use of NFS. It might be that this is due to something MIPS-specific, but it >>>> might be worthwhile retesting with kstack_pages=2 and building the kernel >>>> with CROSS_TOOLCHAIN=i386-gcc after installing the appropriate package. >>> >>> You may want to check NFS code that uses stack heavily. >>> Here are numbers for i386 (bytes-on-stack, module, what function): >>> >>> 1344 nfs_nfsdport.o : >>> 1152 nfs_nfsdserv.o : >>> 1128 nfs_nfsdserv.o : >>> 952 nfs_nfsdserv.o : >>> 664 nfs_nfsdserv.o : >>> 640 nfs_nfsdserv.o : >>> 624 nfs_nfsdserv.o : >>> 608 nfs_nfsdserv.o : >>> 600 nfs_clvfsops.o : >> >> My point is that you should compare gcc with clang as 10.x switched to >> clang and that may be a factor in the stack overflows beginning with 10.x. > > I think thats's NFS code who is guilty. You can see example of amd64 (sic!) kstack exhaustion > due to 40+ frames deep call chain here: > > https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087429.html Final post in the thread describes amd64 crash with kstack_pages=5 due to 75 frames: https://lists.freebsd.org/pipermail/freebsd-stable/2017-July/087477.html He increased kstack_pages upto 6 and stopped posting, as it obviously helped him finally. By the way, I finally realised why I do not have KVA problems with my i386 hosts: I run all of them (no PAE) with options KVA_PAGES=512 (2GB) at least and even 768 (3GB) in case of ZFS instead of default 256 (1GB) to make it stable. Tell me more of untweaked FreeBSD stability...