From nobody Sun Nov 05 17:54:39 2023 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SNhxy4jdTz4ymKn for ; Sun, 5 Nov 2023 17:56:54 +0000 (UTC) (envelope-from oleg.nauman@gmail.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SNhxx5QD1z3PTf for ; Sun, 5 Nov 2023 17:56:53 +0000 (UTC) (envelope-from oleg.nauman@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=M+TuIGlA; spf=pass (mx1.freebsd.org: domain of oleg.nauman@gmail.com designates 2a00:1450:4864:20::631 as permitted sender) smtp.mailfrom=oleg.nauman@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9a6190af24aso558202166b.0 for ; Sun, 05 Nov 2023 09:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699207009; x=1699811809; darn=freebsd.org; h=content-transfer-encoding:mime-version:organization:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=pN81T9nklWFbtgbuYQ/hw1hsfULnMH/W6UMlCkF/AiM=; b=M+TuIGlA0YOCqdqB2UcBgd0+tdaVb/S3JQJGsnq8u3ahYvI/zkNBWpPVgWPBBwTahg EzlB5egTNlehWz91KcpzqHdwB/J7Tc+7AZxLgkyfKHpimXuQliXlirnPmRWOKKZ6tUAc FQHQdLyfNO8PQcU/3qtRhhz98YKK0SSiGnEFyDT3kFyoy4GYj8rjjK4LB39tD+/eM/Gq Hoe2tCGWEZHbEKxXtvDOQSHSFg9vv2KZKSVvYzcA1rosIoHEc93n+i+6Tz16r2aHa7AX LX0Y6XNqOk+xxgM+aLSxrNSXxvvhd/jriY9B7GrwpFonKxwW/SZ5wzS82Fc+g8ACUJgC P2VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699207009; x=1699811809; h=content-transfer-encoding:mime-version:organization:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pN81T9nklWFbtgbuYQ/hw1hsfULnMH/W6UMlCkF/AiM=; b=oy+BVkZDxY8HFlz2beidY4JYAizjubRtOj14e/nxhqHZFJhnEc2Od7anFE13LZIntF MdLxmPlPjQx9RNce8SAHk0ZMtY0lR3craYCzZUNnxJ902KKV+r8sctY/kjpvNmzvr4+9 tVwmuVmPMWRaAJgBCBl/TUvHul8uaGsI62mp8Ib0iGOOqW8zEYxa/4pAXP+Oe9SN6VXF VGDGSIJucXWDSThBFLetzVYlEvXErHLUQWRyGgug6/Fby0NgRGgyx88yJ7BbSPkOKmrZ GVvO7ha8BzXeg0aW7Otv8zxOMTFJOeDz+DuB+HwIzVPcf7487pkJZKKTMn0jHoQrxH9G GuuQ== X-Gm-Message-State: AOJu0YwAHVhjdbE4QWchwpRsVd1+GftVjc/w9X+49/4I1cUOm0gFfgk+ wMuViMv2kTr9xJYCT1NYd1vH4pt0LsU= X-Google-Smtp-Source: AGHT+IF6D4vbc2gSMr7ce4hOL2Lebz6m4n05ay1VsbGo0HscEXffwhq56rtp6sDqaP1E9nPg6BzJFA== X-Received: by 2002:a17:907:7f9f:b0:9df:bc50:2516 with SMTP id qk31-20020a1709077f9f00b009dfbc502516mr1652711ejc.61.1699207009402; Sun, 05 Nov 2023 09:56:49 -0800 (PST) Received: from moonset.home ([88.154.48.113]) by smtp.gmail.com with ESMTPSA id v17-20020a1709063bd100b009cc1e8ed7c5sm3227613ejf.133.2023.11.05.09.56.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 09:56:48 -0800 (PST) From: "Oleg V. Nauman" To: FreeBSD Current Subject: Kernel with INVARIANTS panicing if drm is loaded Date: Sun, 05 Nov 2023 19:54:39 +0200 Message-ID: <2806934.Tv9pZ1cZgq@moonset.home> Organization: Private persom List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spamd-Result: default: False [-1.62 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_SPAM_MEDIUM(0.88)[0.877]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; CTE_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::631:from]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[current@freebsd.org]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; HAS_ORG_HEADER(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4SNhxx5QD1z3PTf X-Spamd-Bar: - I am observing kernel panic when entering multiuser mode after sucessful system boot. It happens when I load CURRENT kernel with INVARIANTS and drm module loaded ( drm-515-kmod-5.15.118_1 in particular ) . drm module and kenel are in sync FreeBSD moonset.home 15.0-CURRENT FreeBSD 15.0-CURRENT #3 main-n266267- e116e040f309: Sun Nov 5 10:00:51 EET 2023 root@moonset.home:/usr/obj/usr/ src/amd64.amd64/sys/moonset amd64 panic: sleepq_add: td 0xfffff8000203c000 to sleep on wchan 0xfffff800021d8648 with sleeping prohibited ............... Reading symbols from /boot/kernel/kernel... Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug... Unread portion of the kernel message buffer: panic: malloc(M_WAITOK) with sleeping prohibited cpuid = 0 time = 1699171621 ............. __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57 57 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu, (kgdb) #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:57 #1 doadump (textdump=) at /usr/src/sys/kern/kern_shutdown.c:405 #2 0xffffffff81e2ec53 in vt_kms_postswitch () from /boot/modules/drm.ko #3 0xffffffff8043ad6e in vt_window_switch (vw=0xfffff800021d8640) at /usr/src/sys/dev/vt/vt_core.c:595 #4 0xffffffff804ec583 in kern_reboot (howto=4) at /usr/src/sys/kern/kern_shutdown.c:501 #5 0xffffffff804eccfa in vpanic ( fmt=0xffffffff808263fb "malloc(M_WAITOK) with sleeping prohibited", ap=ap@entry=0xfffffe00ce259850) at /usr/src/sys/kern/kern_shutdown.c:970 #6 0xffffffff804ecb03 in panic (fmt=) at /usr/src/sys/kern/kern_shutdown.c:894 #7 0xffffffff804c8a04 in malloc_dbg (vap=, sizep=, mtp=, flags=) at /usr/src/sys/kern/kern_malloc.c:540 #8 0xffffffff804c885c in malloc (size=, mtp=0xffffffff81e931c0 , flags=) at /usr/src/sys/kern/kern_malloc.c:641 #9 0xffffffff81c5a750 in intel_atomic_state_alloc () from /boot/modules/i915kms.ko #10 0xffffffff81dfe404 in drm_client_modeset_commit_atomic () from /boot/modules/drm.ko #11 0xffffffff81dfe614 in drm_client_modeset_commit_locked () from /boot/modules/drm.ko #12 0xffffffff81dfe7a1 in drm_client_modeset_commit () from /boot/modules/drm.ko #13 0xffffffff81e41ab3 in drm_fb_helper_restore_fbdev_mode_unlocked () from /boot/modules/drm.ko #14 0xffffffff81e2ed91 in vt_kms_postswitch () from /boot/modules/drm.ko #15 0xffffffff8043ac31 in vt_window_switch (vw=0xfffff80001d3a600, vw@entry=0xffffffff80a47178 ) at /usr/src/sys/dev/vt/vt_core.c:612 #16 0xffffffff8043be0f in vtterm_cngrab (tm=, tm@entry=) at /usr/src/sys/dev/vt/vt_core.c:1863 #17 0xffffffff804893f6 in cngrab () at /usr/src/sys/kern/kern_cons.c:385 #18 0xffffffff804ecc79 in vpanic ( fmt=0xffffffff808799a9 "%s: td %p to sleep on wchan %p with sleeping prohibited", ap=ap@entry=0xfffffe00ce259c20) at /usr/src/sys/kern/kern_shutdown.c:942 #19 0xffffffff804ecb03 in panic (fmt=) at /usr/src/sys/kern/kern_shutdown.c:894 #20 0xffffffff805465b3 in sleepq_add (wchan=wchan@entry=0xfffff800021d8648, lock=lock@entry=0xfffff80001823340, wmesg=wmesg@entry=0xffffffff808b194e "tq_drain", flags=0, flags@entry=, queue=queue@entry=0) at /usr/src/sys/kern/subr_sleepqueue.c:326 #21 0xffffffff804f8efe in _sleep (ident=ident@entry=0xfffff800021d8648, lock=lock@entry=0xfffff80001823340, priority=priority@entry=0, wmesg=0xffffffff808b194e "tq_drain", sbt=sbt@entry=0, pr=pr@entry=0, flags=256) at /usr/src/sys/kern/kern_synch.c:207 #22 0xffffffff8054cffb in TQ_SLEEP (tq=0xfffff80001823300, p=0xfffff800021d8648, wm=) at /usr/src/sys/kern/subr_taskqueue.c:124 #23 taskqueue_drain (queue=0xfffff80001823300, task=0xfffff800021d8648) at /usr/src/sys/kern/subr_taskqueue.c:614 #24 0xffffffff81e2ed35 in vt_kms_postswitch () from /boot/modules/drm.ko #25 0xffffffff8043ac31 in vt_window_switch (vw=0xfffff800021d8648, vw@entry=0xfffff800038fb180) at /usr/src/sys/dev/vt/vt_core.c:612 #26 0xffffffff8043b3b2 in vt_late_window_switch (vw=0xfffff800038fb180) at /usr/src/sys/dev/vt/vt_core.c:468 #27 vt_proc_window_switch (vw=0xfffff800038fb180) at /usr/src/sys/dev/vt/vt_core.c:553 #28 0xffffffff8043e318 in vt_processkey ( kbd=0xffffffff80cef898 , vd=0xffffffff80a472c8 , c=) at /usr/src/sys/dev/vt/vt_core.c:903 #29 vt_kbdevent (kbd=0xffffffff80cef898 , event=, arg=0xffffffff80a472c8 ) at /usr/src/sys/dev/vt/vt_core.c:1018 #30 0xffffffff8078ffcf in atkbd_intr (kbd=0xffffffff80cef898 , arg=) at /usr/src/sys/dev/atkbdc/atkbd.c:565 #31 0xffffffff804b1376 in intr_event_execute_handlers (ie=0xfffff800010ece00, p=) at /usr/src/sys/kern/kern_intr.c:1205 #32 ithread_execute_handlers (ie=0xfffff800010ece00, p=) at /usr/src/sys/kern/kern_intr.c:1218 #33 ithread_loop (arg=arg@entry=0xfffff80001c5aea0) at /usr/src/sys/kern/kern_intr.c:1306 #34 0xffffffff804adae2 in fork_exit ( callout=0xffffffff804b1120 , arg=0xfffff80001c5aea0, frame=0xfffffe00ce259f40) at /usr/src/sys/kern/kern_fork.c:1160 #35 #36 0x0000000000000b88 in ?? () Backtrace stopped: Cannot access memory at address 0xbc7 (kgdb)