From owner-freebsd-current@freebsd.org Wed Oct 16 16:57:48 2019 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 A3D3014B1D3; Wed, 16 Oct 2019 16:57:48 +0000 (UTC) (envelope-from neel@neelc.org) Received: from nyc1.neelc.org (nyc1.neelc.org [IPv6:2a0d:5600:33:11::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46tdlH4ZkCz420X; Wed, 16 Oct 2019 16:57:47 +0000 (UTC) (envelope-from neel@neelc.org) Received: from mail.neelc.org (nyc1.neelc.org [IPv6:2a0d:5600:33:11::2]) by nyc1.neelc.org (Postfix) with ESMTPSA id 8BBEF14DC39; Wed, 16 Oct 2019 12:57:37 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 16 Oct 2019 12:57:37 -0400 From: Neel Chauhan To: Mateusz Guzik Cc: Evilham , FreeBSD Current , owner-freebsd-current@freebsd.org Subject: Re: DRM-current-kmod is still a problem at r353339 In-Reply-To: References: <7ca3b30a-81f6-f79d-1486-7fd29765646f@acm.org> <99c89ca0-462c-f4c7-fa07-6f61e9d39d66@acm.org> Message-ID: X-Sender: neel@neelc.org User-Agent: Roundcube Webmail/1.3.9 X-Rspamd-Queue-Id: 46tdlH4ZkCz420X X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of neel@neelc.org designates 2a0d:5600:33:11::2 as permitted sender) smtp.mailfrom=neel@neelc.org X-Spamd-Result: default: False [-2.68 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a]; IP_SCORE(-0.48)[asn: 63473(-2.36), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[neelc.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:63473, ipnet:2a0d:5600:33::/48, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; ONCE_RECEIVED(0.10)[] 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: Wed, 16 Oct 2019 16:57:48 -0000 While drm-current-kmod worked for a little while, it broke with r353645. https://i.imgur.com/Q5nYZf2.jpg I'm using the same HP Spectre that I used earlier (where it worked and where it panicked). -Neel === https://www.neelc.org/ On 2019-10-13 10:37, Mateusz Guzik wrote: > On 10/13/19, Evilham wrote: >> Hello, >> >> I somehow had managed to mess up my build system and only >> yesterday got it back to compiling properly. >> > > So to be clear, there is an unrelated bug where it seems the module can > decide to abort loading and then it crashes in pseudofs. This can > happen > if there is a mismatch between the kernel and the module itself. > >> >> On ds., oct. 12 2019, Mateusz Guzik wrote: >> >>> Try this: >>> >>> https://people.freebsd.org/~mjg/pmap-fict-invl.diff >> >> >> I tested this patch on top of r353449 and a panic is still >> ocurring when the drm-kmod modules are loaded. >> >> This is on a Lenovo A485 Laptop, which is an AMD Ryzen processor >> and a Radeon Vega graphics. >> My last known working revision is r352987. >> >> >> Here are bits of the core dump, I hope they are useful, if more >> information is needed, please don't hesitate to ask. >> BTW: I usually compile GENERIC-NODEBUG, if that results in the >> dump being useless (sadly I can't tell), I can disable all the >> performance goodies and compile GENERIC :-). >> -- >> Evilham >> >> >> Fatal trap 12: page fault while in kernel mode >> cpuid = 2; apic id = 02 >> fault virtual address = 0xf8 >> fault code = supervisor read data, page not present >> instruction pointer = 0x20:0xffffffff80b1be61 >> stack pointer = 0x28:0xfffffe00dd81ccc0 >> frame pointer = 0x28:0xfffffe00dd81ccf0 >> 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 = 24022 (kldload) >> trap number = 12 >> panic: page fault >> cpuid = 2 >> time = 1570970502 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame >> 0xfffffe00dd81c920 >> vpanic() at vpanic+0x17e/frame 0xfffffe00dd81c980 >> panic() at panic+0x43/frame 0xfffffe00dd81c9e0 >> trap_pfault() at trap_pfault/frame 0xfffffe00dd81ca50 >> trap_pfault() at trap_pfault+0x4f/frame 0xfffffe00dd81cac0 >> trap() at trap+0x288/frame 0xfffffe00dd81cbf0 >> calltrap() at calltrap+0x8/frame 0xfffffe00dd81cbf0 >> --- trap 0xc, rip = 0xffffffff80b1be61, rsp = 0xfffffe00dd81ccc0, >> rbp = 0xfffffe00dd81ccf0 --- >> pfs_destroy() at pfs_destroy+0x11/frame 0xfffffe00dd81ccf0 >> pfs_uninit() at pfs_uninit+0x16/frame 0xfffffe00dd81cd10 >> vfs_modevent() at vfs_modevent+0x474/frame 0xfffffe00dd81cd50 >> module_register_init() at module_register_init+0xa4/frame >> 0xfffffe00dd81cd80 >> linker_load_module() at linker_load_module+0xb49/frame >> 0xfffffe00dd81d0a0 >> linker_load_dependencies() at linker_load_dependencies+0x18c/frame >> 0xfffffe00dd81d0f0 >> link_elf_load_file() at link_elf_load_file+0x1127/frame >> 0xfffffe00dd81d1b0 >> linker_load_module() at linker_load_module+0x89a/frame >> 0xfffffe00dd81d4d0 >> linker_load_dependencies() at linker_load_dependencies+0x18c/frame >> 0xfffffe00dd81d520 >> link_elf_load_file() at link_elf_load_file+0x1127/frame >> 0xfffffe00dd81d5e0 >> linker_load_module() at linker_load_module+0x89a/frame >> 0xfffffe00dd81d900 >> kern_kldload() at kern_kldload+0xbd/frame 0xfffffe00dd81d950 >> sys_kldload() at sys_kldload+0x5b/frame 0xfffffe00dd81d980 >> amd64_syscall() at amd64_syscall+0x3a3/frame 0xfffffe00dd81dab0 >> fast_syscall_common() at fast_syscall_common+0x101/frame >> 0xfffffe00dd81dab0 >> --- syscall (304, FreeBSD ELF64, sys_kldload), rip = 0x8002d1cda, >> rsp = 0x7fffffffd748, rbp = 0x7fffffffdcc0 --- >> KDB: enter: panic >> >> >> __curthread () at /freebsd/src/sys/amd64/include/pcpu_aux.h:55 >> 55 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" >> (offsetof(struct pcpu, >> (kgdb) #0 __curthread () at >> /freebsd/src/sys/amd64/include/pcpu_aux.h:55 >> #1 doadump (textdump=0) at >> /freebsd/src/sys/kern/kern_shutdown.c:392 >> #2 0xffffffff80496a7a in db_dump (dummy=, >> dummy2=, dummy3=, >> dummy4=) >> at /freebsd/src/sys/ddb/db_command.c:575 >> #3 0xffffffff8049683c in db_command (last_cmdp=, >> cmd_table=, dopager=1) >> at /freebsd/src/sys/ddb/db_command.c:482 >> #4 0xffffffff804965ad in db_command_loop () >> at /freebsd/src/sys/ddb/db_command.c:535 >> #5 0xffffffff80499858 in db_trap (type=, >> code=) >> at /freebsd/src/sys/ddb/db_main.c:252 >> #6 0xffffffff80c322a7 in kdb_trap (type=3, code=0, tf=> out>) >> at /freebsd/src/sys/kern/subr_kdb.c:692 >> #7 0xffffffff8105d925 in trap (frame=0xfffffe00dd81c850) >> at /freebsd/src/sys/amd64/amd64/trap.c:585 >> #8 >> #9 kdb_enter (why=0xffffffff811dee7e "panic", msg=> out>) >> at /freebsd/src/sys/kern/subr_kdb.c:479 >> #10 0xffffffff80be377a in vpanic (fmt=, >> ap=) >> at /freebsd/src/sys/kern/kern_shutdown.c:897 >> #11 0xffffffff80be35d3 in panic ( >> fmt=0xffffffff818e4c18 >> "\357\327\037\201\377\377\377\377") at >> /freebsd/src/sys/kern/kern_shutdown.c:835 >> #12 0xffffffff8105ddb0 in trap_fatal (frame=0xfffffe00dd81cc00, >> eva=248) >> at /freebsd/src/sys/amd64/amd64/trap.c:925 >> #13 0xffffffff8105ddff in trap_pfault (frame=0xfffffe00dd81cc00, >> usermode=, signo=, >> ucode=) >> at /freebsd/src/sys/amd64/amd64/trap.c:743 >> #14 0xffffffff8105d458 in trap (frame=0xfffffe00dd81cc00) >> at /freebsd/src/sys/amd64/amd64/trap.c:407 >> #15 >> #16 pfs_destroy (pn=0x0) at >> /freebsd/src/sys/fs/pseudofs/pseudofs.c:324 >> #17 0xffffffff80b1ca96 in pfs_uninit ( >> pi=0xffffffff8360f120 , >> vfc=0xffffffff8360f010 ) >> at /freebsd/src/sys/fs/pseudofs/pseudofs.c:473 >> #18 0xffffffff80caddd4 in vfs_register ( >> vfc=0xffffffff8360f010 ) >> at /freebsd/src/sys/kern/vfs_init.c:497 >> #19 vfs_modevent (mod=, type=, >> data=0xffffffff8360f010 ) >> at /freebsd/src/sys/kern/vfs_init.c:582 >> #20 0xffffffff80bc0b24 in module_register_init ( >> arg=0xffffffff8360eff8 ) >> at /freebsd/src/sys/kern/kern_module.c:123 >> #21 0xffffffff80bb26b9 in linker_file_sysinit (lf=) >> at /freebsd/src/sys/kern/kern_linker.c:236 >> #22 linker_load_file (filename=, result=> out>) >> at /freebsd/src/sys/kern/kern_linker.c:462 >> #23 linker_load_module (kldname=, >> modname=0xffffffff835d4c80 "linuxkpi_gplv2", parent=> out>, >> verinfo=, lfpp=) >> at /freebsd/src/sys/kern/kern_linker.c:2110 >> #24 0xffffffff80bb4eec in linker_load_dependencies >> (lf=0xfffff800060dcc00) >> at /freebsd/src/sys/kern/kern_linker.c:2200 >> #25 0xffffffff810d6027 in link_elf_load_file (cls=, >> filename=0xfffff8000645bcc0 "/boot/modules/drm.ko", >> result=0xfffffe00dd81d358) at >> /freebsd/src/sys/kern/link_elf_obj.c:1004 >> #26 0xffffffff80bb240a in LINKER_LOAD_FILE ( >> cls=0xffffffff81972e90 , filename=> out>, >> result=) at ./linker_if.h:180 >> #27 linker_load_file (filename=, result=> out>) >> at /freebsd/src/sys/kern/kern_linker.c:447 >> #28 linker_load_module (kldname=, >> modname=0xffffffff83542bc4 "drmn", parent=, >> verinfo=, lfpp=) >> at /freebsd/src/sys/kern/kern_linker.c:2110 >> #29 0xffffffff80bb4eec in linker_load_dependencies >> (lf=0xfffff800060db200) >> at /freebsd/src/sys/kern/kern_linker.c:2200 >> #30 0xffffffff810d6027 in link_elf_load_file (cls=, >> filename=0xfffff8000503ed80 "/boot/modules/amdgpu.ko", >> result=0xfffffe00dd81d788) at >> /freebsd/src/sys/kern/link_elf_obj.c:1004 >> #31 0xffffffff80bb240a in LINKER_LOAD_FILE ( >> cls=0xffffffff81972e90 , filename=> out>, >> result=) at ./linker_if.h:180 >> #32 linker_load_file (filename=, result=> out>) >> at /freebsd/src/sys/kern/kern_linker.c:447 >> #33 linker_load_module (kldname=, >> modname=0xfffff8000612b000 "amdgpu", parent=, >> verinfo=, lfpp=) >> at /freebsd/src/sys/kern/kern_linker.c:2110 >> #34 0xffffffff80bb3f2d in kern_kldload (td=, >> file=, fileid=0xfffffe00dd81d964) >> at /freebsd/src/sys/kern/kern_linker.c:1089 >> #35 0xffffffff80bb406b in sys_kldload (td=0xfffff800125d8000, >> uap=) at >> /freebsd/src/sys/kern/kern_linker.c:1115 >> #36 0xffffffff8105e973 in syscallenter (td=0xfffff800125d8000) >> at /freebsd/src/sys/amd64/amd64/../../kern/subr_syscall.c:144 >> #37 amd64_syscall (td=0xfffff800125d8000, traced=0) >> at /freebsd/src/sys/amd64/amd64/trap.c:1162 >> #38 >> #39 0x00000008002d1cda in ?? () >> Backtrace stopped: Cannot access memory at address 0x7fffffffd748 >> (kgdb) >>