From nobody Thu Nov 27 04:58:21 2025 X-Original-To: freebsd-hackers@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 4dH42Q5Jvwz6JPmj for ; Thu, 27 Nov 2025 04:58:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dH42Q1FMXz3VXy for ; Thu, 27 Nov 2025 04:58:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-343806688c5so357015a91.0 for ; Wed, 26 Nov 2025 20:58:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1764219512; x=1764824312; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CcDYq4dZ91rg7BGQ8PB3iaFVIPUPEd+OixcgyuEw7Wk=; b=igRTMpvLpcK2rYEy2aqfPmFc/5s8Iy0ZHYbvWJ6e1HsJtiRSDYnr+s6RYgouOKcd5C ZtPPeGac5CtJJQwcY9Kude/XjQr0jcmlBlAER7tLR4Rdw0hrlzPvIK8cvCmM/uXdPzwl D4lLejJsYsZko+7Z0rfvjL3WGx+ojm8GOwUgOXn0LG0nIKXEGbt+kcVLUOpEhSbDnMwu PrEsXm9uuRUbdfw8nS9c2FCqOiK+APiiA8crD+qPQBzLuDqzA/kCdZ7aew0ewPmG1xex RDP/f2rHIaD5S1SvHCPIGkNa5abXIC3EqYF2WFz1kRTrP0DI3bPsd2Octge1+HJHULbV kbRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764219512; x=1764824312; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CcDYq4dZ91rg7BGQ8PB3iaFVIPUPEd+OixcgyuEw7Wk=; b=ffpXBoUY0qYlgr4usecs977HkSciarlFtheORQz4A1w5bTHg/0K4CJAWV1ZfU8wjzm NLDAoxvLUc/XQkib5H6YoB6C2eGs5eU0qo45aDzkJEt7fiVUHeoKqxuWxgBBP8KZnAt4 9aRUjwzjp8ROjTBqYPO2bvNF+OZfBX1kK83+547Wyw33bj3L0Cw2VVTTHhrRrc8Ai1uR XqlLJXvk6r3MR7UZX/dbYj7LH3OWmboiGKPInbO0foUhkDJ8CMbhV3GvifqMurzkziBy zL5A51cct4SRDWj5rhLLNQpuY9U8+n6ChNyszVoko0QadstDSoPt7BXrD5lgMADEe/Hm t2Gw== X-Gm-Message-State: AOJu0YzEEC9bPwxqqJn9bG7LrLLjz1kDKHHFs5c8zSPGHRWPAbGjt58Q v91tmrOwuRGYj7pf6a28WME1lK1huIZC8X9FSgtMUCf5ZetxMx2VKdlL1DybO1nM957o4WmHcZx GBfS4IODNnVe76Y7NYCSAfieVlSn4Rdbx/AQwzHGPcZoWYRLXOHfj X-Gm-Gg: ASbGncuiNN0njgpbe7yjq3f2ICWcEHjiUVDpLTrmD03DHHl+EjCmLnLtG1QdesmUETo +cz0J/Df4IKWNLJsgyS1L2KJXujfHsWJdmKcAgayIfUWr1duBwEeDOde+CcY+QRj1ebibClDu46 o0/PevIE90pYWozB+t9Eym2d2J8qT7ErlAtfRwX6EZNDQ8639GsoPkjKSHAza+oqzDmR2XewF3o EeopEwOHgfREdRnPRTPhY+z43S7detM/ROlJDlqfwazoSOaIwxwZVSncDI6lkBEQHfb430= X-Google-Smtp-Source: AGHT+IF/21S6xUsF4N10b2fBkgOEgRa/PwVfIhPuBLS67BNMkt7A1Rtd+N4cW5Geh6qbg+PPpgf8W1I0GoCN/foY/x8= X-Received: by 2002:a17:90b:1f82:b0:340:a19f:c25b with SMTP id 98e67ed59e1d1-3475ed50999mr10123091a91.24.1764219511916; Wed, 26 Nov 2025 20:58:31 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: <458400081.20251126171621.ref@yahoo.com> <458400081.20251126171621@yahoo.com> In-Reply-To: <458400081.20251126171621@yahoo.com> From: Warner Losh Date: Wed, 26 Nov 2025 21:58:21 -0700 X-Gm-Features: AWmQ_bllA1m9VHb09FaIV8FuQmldQOUNxO9GzwP0Hh283mcjvNhTyaAGWDWFVuo Message-ID: Subject: Re: any way to recover from I/O hang? To: Anthony Pankov Cc: freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="00000000000050557006448c5d4b" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dH42Q1FMXz3VXy --00000000000050557006448c5d4b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 26, 2025 at 7:16=E2=80=AFAM Anthony Pankov wrote: > > Recently I'm again facing a situation where some UFS (?) error on one > partition forced me to reboot whole server and interrupt people's work. > As I understand the brief is: > > Reason: A process in state 'D' (uninterruptible wait/sleep) is blocked on > an I/O operation (e.g., waiting for a network file share, a disk operatio= n, > or a device that is no longer responding) at the kernel level. The proces= s > is not awaken to handle signals until the condition it is waiting for is > resolved. > Solution: You cannot kill a 'D' state process with any signal, including > SIGKILL (kill -9). The condition must be resolved (e.g., fixing the netwo= rk > connection, waiting for the I/O to time out, or potentially unmounting th= e > filesystem with umount -f if it's a mounted network share). In some rare > cases involving buggy kernel code or hardware failure, a reboot may be th= e > only option. > > In my case there was a jailed samba which share one ufs-formatted > partition. The samba processes hangs one by one and sharing has stopped i= t > work. > There was no message in log. Geom reported no errors. Disk's has no error= . > It seems that there was some introduced inconsistency in UFS. > My thoughts was to stop/kill samba, remove samba's jail, unmount partitio= n > and do fsck. > > But 'jail -r' exit with something 'rc.shutdown exited ... 9' and left jai= l > running. pskill -KILL for samba processes say nothing and do nothing. > 'umount -f' say 'Device is busy'. Various utilities such as 'df' hangs. S= o > I forced to shutdown the server which has other important and workable > service to resolve the situation. > > I wander is there any way to treat such a cases? May be 'umount -f' can > have more power... > So no errors from geom? Or from CAM? what's the underlying storage hardware? And what's the wchan / straceback for the processes in 'D' state? And do you know the location of the file that's waiting for I/O? There's a number of things that might cause this, but they typically are noisy about it. There's a couple of deadlock issues that might cause this, but getting some more information is needed to understand what might be done to mitigate or prevent the deadlocks. P.S. Previous situation was when I do simple (as I think) experiments with > ggated and have forced to reboot server when 'mount' hung. > I assume ggate isn't involved when this happens now, right? Warner > -- > Best regards, > Anthony Pankov mailto:anthony.pankov@yahoo.com > > > --00000000000050557006448c5d4b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Nov 26,= 2025 at 7:16=E2=80=AFAM Anthony Pankov <anthony.pankov@yahoo.com> wrote:

Recently I'm again facing a situation where some UFS (?) error on one p= artition forced me to reboot whole server and interrupt people's work.<= br> As I understand the brief is:

Reason: A process in state 'D' (uninterruptible wait/sleep) is bloc= ked on an I/O operation (e.g., waiting for a network file share, a disk ope= ration, or a device that is no longer responding) at the kernel level. The = process is not awaken to handle signals until the condition it is waiting f= or is resolved.
Solution: You cannot kill a 'D' state process with any signal, incl= uding SIGKILL (kill -9). The condition must be resolved (e.g., fixing the n= etwork connection, waiting for the I/O to time out, or potentially unmounti= ng the filesystem with umount -f if it's a mounted network share). In s= ome rare cases involving buggy kernel code or hardware failure, a reboot ma= y be the only option.

In my case there was a jailed samba which share one ufs-formatted partition= . The samba processes hangs one by one and sharing has stopped it work.
There was no message in log. Geom reported no errors. Disk's has no err= or. It seems that there was some introduced inconsistency in UFS.
My thoughts was to stop/kill samba, remove samba's jail, unmount partit= ion and do fsck.

But 'jail -r' exit with something 'rc.shutdown exited ... 9'= ; and left jail running. pskill -KILL for samba processes say nothing and d= o nothing.
'umount -f' say 'Device is busy'. Various utilities such as= 'df' hangs. So I forced to shutdown the server which has other imp= ortant and workable service to resolve the situation.

I wander is there any way to treat such a cases? May be 'umount -f'= can have more power...

So no errors fr= om geom? Or from CAM? what's the underlying storage hardware? And what&= #39;s the wchan / straceback for the processes in 'D' state? And do= you know the location of the file that's waiting for I/O?
There's a number of things that might cause this, but they= typically are noisy about it. There's a couple of deadlock issues that= might cause this, but getting some more information is needed to understan= d what might be done to mitigate or prevent the deadlocks.

P.S. Previous situati= on was when I do simple (as I think) experiments with ggated and have force= d to reboot server when 'mount' hung.

I assume ggate=C2=A0isn't involved when this happens now, right?=

Warner
=C2=A0
--
Best regards,
=C2=A0Anthony Pankov=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mailto:anthony.pankov@yahoo.com


--00000000000050557006448c5d4b--