From owner-svn-src-head@freebsd.org Tue Aug 27 17:22:17 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E0EDDAD2F; Tue, 27 Aug 2019 17:22:17 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) 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 46Hwfd3k3Qz46tB; Tue, 27 Aug 2019 17:22:17 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f47.google.com with SMTP id o11so6490740lfb.12; Tue, 27 Aug 2019 10:22:17 -0700 (PDT) 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=tqXfSnjGDh5wtO+upAeU+Q7nNIkO+XsB+ek0IuZfdcw=; b=tP579vjHO4LGVoZbP+y4JnBMwYQYCM5+u1CCeNBdv+I8B3/blssRJvCBr8Flf/Ni4f wCdpXMc0cYJOJYycmoyrV9t0cFf7T6D63QmgB1ZDzX3yOfEDkUJP3F0o05kYsfWnG2EP /lnEgV9UgSqAM3fsghreqq5c3zA1iqGN1EA1IDTEEKHFV0eCL3MS/95Xw5dwrqF/Yp3b tQEOrdQ0Ns4Xx/elNWkRdZ4C0mGj76oEvrTe84rDZXmSfJfzp+6fgcpEKnNejbq7/CIt UmxvApow1a0rnzR7sgNAuWxizR2ZumvicUw+CsVLQm0e6hzLetb0uUMythzl72Yyvwdl /8vQ== X-Gm-Message-State: APjAAAUHCHqP2iCVEFHpVaacXD1qPVJHwc9LrAlD4wMKQdJkcsY9oF74 1FBNi8V4AWhgE21er2Odp8fE7rz1qyrxuRaXYnGBeKLFtpU= X-Google-Smtp-Source: APXvYqyQ2R7cQV4lLl3m0L6UrlRrcnB3sH/Vv+fgS0yHS1qXAfjvMxfI8y8TmGIs5jXRd6DN6pLivqJ1SG34GPeLqCg= X-Received: by 2002:ac2:51d0:: with SMTP id u16mr14967589lfm.178.1566926535407; Tue, 27 Aug 2019 10:22:15 -0700 (PDT) MIME-Version: 1.0 References: <201908270001.x7R01vUB052426@repo.freebsd.org> <20190827143953.GA5092@x8.osted.lan> <6f06637f-6486-bd2c-eebe-f14924e11e38@FreeBSD.org> <20190827170527.GA7111@x8.osted.lan> In-Reply-To: <20190827170527.GA7111@x8.osted.lan> From: Alan Somers Date: Tue, 27 Aug 2019 11:22:03 -0600 Message-ID: Subject: Re: svn commit: r351522 - in head: sbin/ifconfig share/man/man4 sys/conf sys/kern sys/modules sys/modules/ktls_ocf sys/net sys/netinet sys/netinet/tcp_stacks sys/netinet6 sys/opencrypto sys/sys tools/t... To: Peter Holm Cc: John Baldwin , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 46Hwfd3k3Qz46tB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Tue, 27 Aug 2019 17:22:17 -0000 On Tue, Aug 27, 2019 at 11:05 AM Peter Holm wrote: > On Tue, Aug 27, 2019 at 09:02:31AM -0700, John Baldwin wrote: > > On 8/27/19 7:39 AM, Peter Holm wrote: > > > On Tue, Aug 27, 2019 at 12:01:57AM +0000, John Baldwin wrote: > > >> Author: jhb > > >> Date: Tue Aug 27 00:01:56 2019 > > >> New Revision: 351522 > > >> URL: https://svnweb.freebsd.org/changeset/base/351522 > > >> > > >> Log: > > >> Add kernel-side support for in-kernel TLS. > > >> > > > > > > Could this be yours? > > > > > > 20190827 15:55:34 all (496/668): sendfile12.sh > > > Aug 27 15:56:16 mercat1 kernel: pid 50036 (swap), jid 0, uid 0, was > killed: out of swap space > > > panic: non-ext_pgs mbuf with TLS session > > > > Possibly, though if sfio was freed and marked with 0xdeadc0de junk, then > it > > would trip over this assertion for any use-after-free. I see in gdb > that you > > couldn't see sfio because of clang's poor debug info. It would be > really good > > to try to find the contents of sfio to debug this further. > > > > You should be able to find it via 'bp->b_caller1' in frame 14: > > > > 'p *(struct sf_io *)bp->b_caller1' > > > > Here's a repeat where the involved files are compiled with "-O0": > https://people.freebsd.org/~pho/stress/log/jhb009.txt > > Let me know if you need the kernel + core. > > - Peter > This panic is easily reproducible by the fusefs test suite. $ cd /usr/tests/sys/fs/fusefs/ $ ./read --gtest_filter=Read.sendfile panic: non-ext_pgs mbuf with TLS session cpuid = 3 time = 1566926504 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0050bdc560 vpanic() at vpanic+0x19d/frame 0xfffffe0050bdc5b0 panic() at panic+0x43/frame 0xfffffe0050bdc610 sendfile_iodone() at sendfile_iodone+0x28e/frame 0xfffffe0050bdc660 vn_sendfile() at vn_sendfile+0x1598/frame 0xfffffe0050bdc8f0 sendfile() at sendfile+0x127/frame 0xfffffe0050bdc980 amd64_syscall() at amd64_syscall+0x2b9/frame 0xfffffe0050bdcab0 fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0050bdcab0 --- syscall (393, FreeBSD ELF64, sys_sendfile), rip = 0x80052d9ea, rsp = 0x7fffffffe5a8, rbp = 0x7fffffffe790 --- -Alan