From nobody Thu Nov 27 22:06:19 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 4dHVrY5tgPz6JFG2 for ; Thu, 27 Nov 2025 22:06:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (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 4dHVrY3Vmgz3gRc for ; Thu, 27 Nov 2025 22:06:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-343ff854297so1577463a91.1 for ; Thu, 27 Nov 2025 14:06:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1764281191; x=1764885991; 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=/uzuOmdnX9E5R7tCVF28w3VWaH66MwYOSeKJCuQr0Jw=; b=zpVYVvKYTP7CxWwjbc44KkWhoh/LdFS+HrPBP2oZIIPzRRpgwsnGWmCstsYfnySAgl q3OpYETRM4I7LYVpy6Yl6hTdxfIQ5F+zLQtY57lBtdLLitLuEZzDyag2/HVa+5ziQO7S 8aeM6xacZF/pi7o5pO86YhgonxsL6vRa+8nVR7UEyS72uqBJgASlcEDszr+6jQQjOqf4 DApHGHhrlhO4LQ+i/WP743eahJVDH758h72xlh8y0b1IqzCChypprgt+jK6p0XfgdMZZ c4EJTAUB1xKvbnincv8kWPSyIYhUnhNcSg4mPNBhHFU3OFi6wx929hPm5maV3E2WtGEX 5S/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764281191; x=1764885991; 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=/uzuOmdnX9E5R7tCVF28w3VWaH66MwYOSeKJCuQr0Jw=; b=Q6La1Av86NSu95DdgeMqbtU4O4uq4T3E4amFXNssC9CjKf4G4NAInqd9DCxEYrFMwi nQKrc1wCFca4O9+5lf5dipJTeLqYobaGVL7qgDOAM9vK7J3a+/E6sFCzc1+HXLEPcKmW xiRD5fn2vmh4LcF7PsshvxNox4HTlNbbIr3ZICFrUe2QIfE2BAOoDsILivfMgEXXExrD djCVmEefWjqkLEAGfRydHQH+kwtgUyAqGZQKrI7sSlaFgVNDP+55NVJHD8zfpeNl3KZ0 BtuQI72ZnzNQ2JFibDzq31ObqMhKpjUvimEbSXbLY4QYqp+ZD4sP/eMuT1gAClf/XeVa VPRQ== X-Gm-Message-State: AOJu0YzuobYL1JWbxvaGPQpAweQ3rbtPTI0AhOqfaLoVQxEfz4uh4mMG xRNgMLVPeSm+vb+Woa7Djrsh19a6AZEsORObnM3YbKO8rNS7R22SEBknD7DO+lgdzizyYTCl9o6 iR60x8ifxmWjhdlK3GwtTkmW65kSD+uEUzzOkxF2LMw== X-Gm-Gg: ASbGncsrhrjKTjx3F2bYI1VG7dtMKZC+EJ7h6NUB+fQvaQ5T3DQeN7wGlKFKeWfVo8t hkqwxR3Yn3ZoOLiuSo6YtiGidDcROuL1DKeDmdn4ZnNtVhSw2roW++XgJobXArM8SevKqR07S2K kHIPICZooGa3pl9mIpG4oNz289+o7M460UCZo7PbGujTM2mbtcR3G99MXbEdEoBZpr4yb6BGdWC vxD27n/WcxoWOH+biHc8p2he5gO3ypV+WQmXfezKbsggdrwc1NaciSgMau/QItxKTaHZ1O16UbC mz39Og== X-Google-Smtp-Source: AGHT+IHJkWm/y8/QjmsUXLpuqRDJn90WTg7cqaISMbcFgs0XFfRgF1JEq8O9NwhuE6ep4FHM1QdR/69uWrDNkW92Ubs= X-Received: by 2002:a17:90b:4b8c:b0:340:c4dc:4b70 with SMTP id 98e67ed59e1d1-34733e4ce95mr24902466a91.6.1764281191082; Thu, 27 Nov 2025 14:06: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> <908785764.20251127131317@yahoo.com> In-Reply-To: <908785764.20251127131317@yahoo.com> From: Warner Losh Date: Thu, 27 Nov 2025 15:06:19 -0700 X-Gm-Features: AWmQ_bnPQHgHI6paWpAmuKGfjqAy8XgLRBRVSethDYVgPoFVpYeToU_0AETWYGo 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="000000000000adbb8006449ab978" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dHVrY3Vmgz3gRc --000000000000adbb8006449ab978 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Without a wchan waiter or tracebacks, I can't help at all. Nothing you've said is actionable, alas. umount should clear everything up, but if you've hit some bug where the I/O never completes due to deadlock, nothing can help you... except maybe tracebacks to we can understand what that deadlock might be. Warner On Thu, Nov 27, 2025 at 3:13=E2=80=AFAM Anthony Pankov wrote: > > Thursday, November 27, 2025, 7:58:21 AM, you wrote: > > > 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 > operation, > >> 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 for = is > >> resolved. > >> Solution: You cannot kill a 'D' state process with any signal, includi= ng > >> SIGKILL (kill -9). The condition must be resolved (e.g., fixing the > network > >> connection, waiting for the I/O to time out, or potentially unmounting > the > >> filesystem with umount -f if it's a mounted network share). In some ra= re > >> cases involving buggy kernel code or hardware failure, a reboot may 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 stoppe= d > it > >> 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 > partition > >> 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 do nothing. > >> 'umount -f' say 'Device is busy'. Various utilities such as 'df' hangs= . > So > >> 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' ca= n > >> 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? > > No errors. UFS was on gmirror and 'gmirror status' said 'OK'. > Unfortunately I was unable to do meaningful investigation under stress. > There was a number of smbd process in a jail which ignore killing and > anything else. > The first inconsistency found by fsck later was a file with mtime > corresponding to a first claim of a problem from one user. Hour later the= re > was more claims and finally samba share stop working. As I understand UF= S > inconsistency grew over that hour. Because there was multiple smbd > processes each corresponding to different user there it is no one file > maked problem. > > > > There's a number of things that might cause this, but they typically ar= e > > 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? > > That's right. I note this because it seems that stoping ggate server > while running ggate client is the simplest way to reproduce the problem. > > P.S. I was really hope that "umount -f" awake waiting processes for > killing. > > > > > >> -- > >> Best regards, > >> Anthony Pankov mailto:anthony.pankov@yahoo.co= m > >> > >> > >> > > > -- > Best regards, > Anthony > > --000000000000adbb8006449ab978 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Without a wchan waiter or tracebacks, I can't help at = all. Nothing you've said is actionable, alas. umount should clear every= thing up, but if you've hit some bug where the I/O never completes due = to deadlock, nothing can help you... except maybe tracebacks to we can unde= rstand what that deadlock might be.

Warner

On Thu, Nov 27, 2025 at 3:13=E2=80=AFAM Anthony Pa= nkov <anthony.pankov@yahoo.c= om> wrote:
anthony.pankov@yahoo.com= >
> wrote:

>>
>> Recently I'm again facing a situation where some UFS (?) error= on one
>> partition forced me to reboot whole server and interrupt people= 9;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 o= peration,
>> 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 = for is
>> resolved.
>> Solution: You cannot kill a 'D' state process with any sig= nal, including
>> SIGKILL (kill -9). The condition must be resolved (e.g., fixing th= e network
>> connection, waiting for the I/O to time out, or potentially unmoun= ting the
>> filesystem with umount -f if it's a mounted network share). In= some 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<= br> >> partition. The samba processes hangs one by one and sharing has st= opped it
>> work.
>> There was no message in log. Geom reported no errors. Disk's h= as no error.
>> It seems that there was some introduced inconsistency in UFS.
>> My thoughts was to stop/kill samba, remove samba's jail, unmou= nt partition
>> 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 do nothi= ng.
>> 'umount -f' say 'Device is busy'. Various utilitie= s such as 'df' hangs. So
>> I forced to shutdown the server which has other important and work= able
>> service to resolve the situation.
>>
>> I wander is there any way to treat such a cases? May be 'umoun= t -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 &= #39;D' state?
> And do you know the location of the file that's waiting for I/O?
No errors. UFS was on gmirror and 'gmirror status' said 'OK'= ;. Unfortunately I was unable to do meaningful investigation under stress.= =C2=A0 There was a number of smbd process in a jail which ignore killing an= d anything else.
The first inconsistency found by fsck later was=C2=A0 a file with mtime cor= responding to a first claim of a problem from one user. Hour later there wa= s more claims and finally samba share stop working.=C2=A0 As I understand U= FS inconsistency grew over that hour. Because there was multiple smbd proce= sses each corresponding to different user there it is no one file maked pro= blem.


> There's a number of things that might cause this, but they typical= ly are
> noisy about it. There's a couple of deadlock issues that might cau= se this,
> but getting some more information is needed to understand what might b= e
> 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?

That's right.=C2=A0 I note this because it seems that stoping ggate ser= ver while running ggate client is the simplest way to reproduce the problem= .

P.S. I was really hope that "umount -f" awake waiting processes f= or killing.




>> --
>> Best regards,
>>=C2=A0 Anthony 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
>>
>>
>>


--
Best regards,
Anthony

--000000000000adbb8006449ab978--