From owner-freebsd-current@freebsd.org Sat Oct 20 19:03:33 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 EFD3FFF1A7C for ; Sat, 20 Oct 2018 19:03:32 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 89E3982EE7 for ; Sat, 20 Oct 2018 19:03:32 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 4C8BCFF1A7B; Sat, 20 Oct 2018 19:03:32 +0000 (UTC) Delivered-To: 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 29E90FF1A7A for ; Sat, 20 Oct 2018 19:03:32 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-yw1-xc2d.google.com (mail-yw1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) (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 B9D8782EE6 for ; Sat, 20 Oct 2018 19:03:31 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-yw1-xc2d.google.com with SMTP id z206-v6so3234823ywb.3 for ; Sat, 20 Oct 2018 12:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oiNWG6/eS8Pbmh+bFqmpWbA4CC899YNn6q5CZdrp83g=; b=UEOJjGU8RCzqChPyHo5X5aandLYm8l31a6JQMkdN4dyF2U5OBQ9pXTyvAIO55Qyysp htkYaTK0cZUK7/dh482V4v02kmHIqdbx8ko/zeBPKcLNIODZFHWRhB9meDSyiJU8uSqt 5AN1gwRRQWJfb1OBPObKw8OWsaQHX2d7Y95mdfT8lNgcnLH7W+XElqzdtLY+Ne3T2S7j C/2fo4KC468faHrRkrBFhpdXLqlbfqBcvljaHf+1ws9FtL+0XBh23eUgRVtR/6OvoIaO WyCG7BHWXSJlzbmIN77ksZWHZsHvmnKqSWAD6wG/D0pzao7LjfyZuQaVcY5Ayy3Ly7tO WZhA== 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=oiNWG6/eS8Pbmh+bFqmpWbA4CC899YNn6q5CZdrp83g=; b=sjplg8fdwgd2cZlHNuVjXEVQtEu8AX2m1ub84DrNQ99q3uNzGDFkCNY7X+Wg+RDa9S x3jONQ+N9ssQXXRp9+P4ll942EF8EzNbhK2+dNGLMo4o9xUtKW1VxEVBDrusJvXTax2o L8OltCg7bhYkOhp+it/itB3tFV2x81J8ZN54YpW2OovL/wr17c9HTjJttg6ue4O93p1H vuofXY/R8nOrX6x0ze5yO3jCVO4wmF4NIlGpnPe/ui7OsKMcI1uazZua0YFBCO99U13z Xd9No58FlONRBadeANQHSa082ek2OA/JC7Lm6v7SQ80vjgkv3ALFl0xNo1A40sGSuvXB iWyw== X-Gm-Message-State: ABuFfoiaxIeH700bSClgH+LbdY9VOyEUNfxvlR8MNKY5U2NMXYgj/3ZW 3ULY3WU1cKvoax9Oq1CeSH9zG1vxS1YIlNorIrE= X-Google-Smtp-Source: ACcGV61LqqqxZ0/T0KXSWkhKNpjbkiZ6tW2zke47gQ0LgkF/uwqEnlmPRsR3LkHS0uE0/Up8BME9Vs+xFZbUlexh2To= X-Received: by 2002:a81:ac52:: with SMTP id z18-v6mr26887362ywj.320.1540062211034; Sat, 20 Oct 2018 12:03:31 -0700 (PDT) MIME-Version: 1.0 References: <20181020165604.GA4946@x2.osted.lan> In-Reply-To: <20181020165604.GA4946@x2.osted.lan> From: blubee blubeeme Date: Sun, 21 Oct 2018 03:03:19 +0800 Message-ID: Subject: Re: Page fault in midi/sequencer.c To: peter@holm.cc Cc: current@freebsd.org Content-Type: text/plain; charset="UTF-8" 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: Sat, 20 Oct 2018 19:03:33 -0000 On Sun, Oct 21, 2018 at 12:59 AM Peter Holm wrote: > I can trigger this on 13.0-CURRENT r339445 with a non-root test program: > > Calling uiomove() with the following non-sleepable locks held: > exclusive sleep mutex seqflq (seqflq) r = 0 (0xfffff80003860c08) locked @ > dev/sound/midi/sequencer.c:952 > stack backtrace: > #0 0xffffffff80bfe263 at witness_debugger+0x73 > #1 0xffffffff80bff1b8 at witness_warn+0x448 > #2 0xffffffff80bf6a91 at uiomove_faultflag+0x71 > #3 0xffffffff809439e6 at mseq_write+0x4c6 > #4 0xffffffff80a4f725 at devfs_write_f+0x185 > #5 0xffffffff80c02a87 at dofilewrite+0x97 > #6 0xffffffff80c0287f at kern_pwritev+0x5f > #7 0xffffffff80c0277d at sys_pwrite+0x8d > #8 0xffffffff81070af7 at amd64_syscall+0x2a7 > #9 0xffffffff8104a4ad at fast_syscall_common+0x101 > Kernel page fault with the following non-sleepable locks held: > exclusive sleep mutex seqflq (seqflq) r = 0 (0xfffff80003860c08) locked @ > dev/sound/midi/sequencer.c:952 > stack backtrace: > #0 0xffffffff80bfe263 at witness_debugger+0x73 > #1 0xffffffff80bff1b8 at witness_warn+0x448 > #2 0xffffffff810700d3 at trap_pfault+0x53 > #3 0xffffffff8106f70a at trap+0x2ba > #4 0xffffffff81049bc5 at calltrap+0x8 > #5 0xffffffff80bf6b42 at uiomove_faultflag+0x122 > #6 0xffffffff809439e6 at mseq_write+0x4c6 > #7 0xffffffff80a4f725 at devfs_write_f+0x185 > #8 0xffffffff80c02a87 at dofilewrite+0x97 > #9 0xffffffff80c0287f at kern_pwritev+0x5f > #10 0xffffffff80c0277d at sys_pwrite+0x8d > #11 0xffffffff81070af7 at amd64_syscall+0x2a7 > #12 0xffffffff8104a4ad at fast_syscall_common+0x101 > > > Fatal trap 12: page fault while in kernel mode > cpuid = 4; apic id = 04 > fault virtual address = 0x20ea6b > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff8106d32d > stack pointer = 0x28:0xfffffe00a844a660 > frame pointer = 0x28:0xfffffe00a844a660 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 2356 (xxx) > [ thread pid 2356 tid 100278 ] > Stopped at copyin_nosmap_erms+0xdd: movl (%rsi),%edx > db> > > -- > Peter > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > It's a known fault in the oss implementation midi parsing code. The easiest route is to use something else to parse midi for the time being. OSS was ported over and many outstanding bugs are still laying around. Best, Owen