From owner-freebsd-current@freebsd.org Mon May 25 19:21:52 2020 Return-Path: Delivered-To: freebsd-current@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 3DA872C82AE for ; Mon, 25 May 2020 19:21:52 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:300:2185:123::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49W6R21qFjz4QYK for ; Mon, 25 May 2020 19:21:49 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [104.207.135.49]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 04PJLfuw073204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 May 2020 20:21:41 +0100 (BST) (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 04PJLeqT073203; Mon, 25 May 2020 20:21:40 +0100 (BST) (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202005251921.04PJLeqT073203@donotpassgo.dyslexicfish.net> Date: Mon, 25 May 2020 20:21:40 +0100 Organization: Dyslexic Fish To: freebsd-current@freebsd.org Cc: jamie@catflap.org Subject: Panic when attempting to create tunnel when a tunnel with the named alias exists User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [104.207.135.49]); Mon, 25 May 2020 20:21:41 +0100 (BST) X-Rspamd-Queue-Id: 49W6R21qFjz4QYK X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=catflap.org; spf=pass (mx1.freebsd.org: domain of jamie@catflap.org designates 2001:19f0:300:2185:123::1 as permitted sender) smtp.mailfrom=jamie@catflap.org X-Spamd-Result: default: False [-3.22 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.934]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:dyslexicfish.net]; NEURAL_HAM_LONG(-1.02)[-1.025]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.46)[-0.456]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[catflap.org,none]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:20473, ipnet:2001:19f0::/38, country:US] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 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: Mon, 25 May 2020 19:21:52 -0000 >From the "Why did you do that?" department: I stumbled across a panic in 12.1-stable and 13-current. If you attempt to create a tunnel, which would have the same name as an already existing tunnel "alias" hardlink, you get a panic. E.G: # ifconfig tun create name tun1 # ifcondif tun create FreeBSD 12.1-STABLE: | Fatal trap 12: page fault while in kernel mode | cpuid = 0; apic id = 00 | fault virtual address = 0x28 | fault code = supervisor read data, page not present | instruction pointer = 0x20:0xffffffff80ccbd38 | stack pointer = 0x28:0xfffffe000056d4e0 | frame pointer = 0x28:0xfffffe000056d510 | 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 = 1434 (cat) | trap number = 12 | panic: page fault | cpuid = 0 | time = 1589762473 | KDB: stack backtrace: | #0 0xffffffff80c1d2f7 at kdb_backtrace+0x67 | #1 0xffffffff80bd062d at vpanic+0x19d | #2 0xffffffff80bd0483 at panic+0x43 | #3 0xffffffff810a7dcc at trap_fatal+0x39c | #4 0xffffffff810a7e19 at trap_pfault+0x49 | #5 0xffffffff810a740f at trap+0x29f | #6 0xffffffff81081bdc at calltrap+0x8 | #7 0xffffffff80cddcdc at tuncreate+0xec | #8 0xffffffff80cdde32 at tunopen+0x22 | #9 0xffffffff80a85710 at devfs_open+0x120 | #10 0xffffffff81229976 at VOP_OPEN_APV+0x76 | #11 0xffffffff80cb1ba7 at vn_open_vnode+0x1b7 | #12 0xffffffff80cb17e6 at vn_open_cred+0x336 | #13 0xffffffff80ca9d33 at kern_openat+0x213 | #14 0xffffffff810a8984 at amd64_syscall+0x364 | #15 0xffffffff81082500 at fast_syscall_common+0x101 | Uptime: 12m13s | Automatic reboot in 15 seconds - press a key on the console to abort | --> Press a key on the console to reboot, FreeBSD 13-CURRENT: | panic: make_dev_sv: bad si_name (error=17, si_name=tun5) | cpuid = 0 | time = 1589763850 | KDB: stack backtrace: | db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001adf4610 | vpanic() at vpanic+0x182/frame 0xfffffe001adf4660 | panic() at panic+0x43/frame 0xfffffe001adf46c0 | make_dev_sv() at make_dev_sv+0x373/frame 0xfffffe001adf4750 | make_dev_s() at make_dev_s+0x3b/frame 0xfffffe001adf47b0 | tun_create_device() at tun_create_device+0xde/frame 0xfffffe001adf4830 | tun_clone_create() at tun_clone_create+0x119/frame 0xfffffe001adf4880 | if_clone_createif() at if_clone_createif+0x4a/frame 0xfffffe001adf48d0 | ifioctl() at ifioctl+0x6e3/frame 0xfffffe001adf49a0 | kern_ioctl() at kern_ioctl+0x27b/frame 0xfffffe001adf4a00 | sys_ioctl() at sys_ioctl+0x127/frame 0xfffffe001adf4ad0 | amd64_syscall() at amd64_syscall+0x140/frame 0xfffffe001adf4bf0 | fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe001adf4bf0 | --- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x8004933fa, rsp = 0x7fffffffe288, rbp = 0x7fffffffe2d0 --- | KDB: enter: panic Cheers, Jamie