From nobody Fri Nov 28 09:48:44 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 4dHpQT4cyBz6JY5J for ; Fri, 28 Nov 2025 09:48:33 +0000 (UTC) (envelope-from anthony.pankov@yahoo.com) Received: from sonic310-57.consmr.mail.ir2.yahoo.com (sonic310-57.consmr.mail.ir2.yahoo.com [77.238.177.30]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHpQT1ZM8z46v4 for ; Fri, 28 Nov 2025 09:48:33 +0000 (UTC) (envelope-from anthony.pankov@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1764323310; bh=bg6e1ToHXr0S5yTiPriClrvrbsMHtmqZQcu6ZsHgciA=; h=Date:From:To:CC:Subject:In-Reply-To:References:From:Subject:Reply-To; b=cLBqKr4XERiMqtBHmP2gMAQl0Xr3Sgb0vhGxKJEOB2GCRLcmdJgnt4AB3juDYSeyoyZmMvWB2Oseri4tcfjckT9siZyDkzK74yt4iGWMuKZ9mY8eT4tv0n+fxe4hUIxLRFj/IKz/aGEDMkzUdLr0w2vlK25+oavEaNnBrB9vV3rmPf8ET/C1ptcAJD5cnjmLSxJTiAzmpdZQRfSW6FIE+VCJu2BhWBUT9EMzE8zSONdoR6vLy4aUVWK5REIMS/b0xX310Jt3mORDw/xGmPq7hYfR5wHDgEM4ZNgb89/0I4KVdCuxNcrjIqpn026eQozh1sB5zsz1irEjmX9ZBWlcmw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1764323310; bh=fAjeVUjLCwusautHccP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QTZJjGThCU eZNHPNP6xkgJ2Xi4usiOlQWiYb2V0AZgMqAJ_8dJLod76Iby4DaMb9UEgBQakSJ_WfhVd.Oqfd5P keh4sqSr0NWUb6yrzrn.OSENuSz6dTlvEgoV9og305.ZA5uh0w2NRqM449m6GQD.YONgZgJZWdCe FEk7S1kxni5tpSut9yRao5J_qOyBbIBQ59qn5rHTMLj16lDEAamw.QwpB6do96YyfRzQB8nRFcLd e.cF_nz.5cjVfZNjxWsLcgsJEEH7kQuy3_bn12LcEiaS3VzfYVG.hy0thDD9Bb3NlLnnNM9DAAsE ZiY3bG9dVbupXPxthWE6Wide_JGELj1XbXqSM1jPfXVlog2FfINavTACpFbbRMrr7FiKi4kDRwbW e1X.t4FgHnk1AigPcFmkozMCInfNbapEZYKk.ZpN8rJGo6VzUe1QMWT1LvU7Lup9nPwMKN.dzm4j hSStxj9SBLKZKT5jc9vAMtBVCLXrf4yPjsTQlsFxWOXVmtYiGCE9hAMq_5W6TSxB_qDHg0ASLgp1 QpA0iDd5b1RGzsg.USWoZ0.3e2w-- X-Sonic-MF: X-Sonic-ID: 7f525482-883a-4ca2-931c-dcad45eaca1b Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ir2.yahoo.com with HTTP; Fri, 28 Nov 2025 09:48:30 +0000 Received: by hermes--production-ir2-76fb978d99-n5kt6 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4262976befc841241317d34e0fb6a73d; Fri, 28 Nov 2025 09:48:26 +0000 (UTC) Date: Fri, 28 Nov 2025 12:48:44 +0300 From: Anthony Pankov Message-ID: <1777092313.20251128124844@yahoo.com> To: Warner Losh CC: freebsd-hackers@freebsd.org Subject: Re: any way to recover from I/O hang? In-Reply-To: References: <458400081.20251126171621.ref@yahoo.com> <458400081.20251126171621@yahoo.com> <908785764.20251127131317@yahoo.com> 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.24794 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34010, ipnet:77.238.176.0/22, country:GB] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dHpQT1ZM8z46v4 Friday, November 28, 2025, 1:06:19 AM, you wrote: > 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. I wander do kernel care about infinite I/O waiting? Neither the problem nor previous situation with ggate doesn't seem like a deadlock for me. If I remember correctly with ggate reviving ggate server do revive 'hanged' client which also was unresponsible to -KILL and 'umount -f'. Anyway I think it's very desirable that 'umount -f' will apply more force and not give up with "device busy" message. I partially understand that "more force" is a complex problem. May be of something like replacing mountpoint vnode structures by deadfs structures. > On Thu, Nov 27, 2025 at 3:13 AM Anthony Pankov > wrote: >> >> Thursday, November 27, 2025, 7:58:21 AM, you wrote: >> >> > On Wed, Nov 26, 2025 at 7:16 AM 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, including >> >> 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 rare >> >> 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 stopped >> 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' 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? >> >> 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 there >> was more claims and finally samba share stop working. As I understand UFS >> 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 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? >> >> 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.com >> >> >> >> >> >> >> >> >> -- >> Best regards, >> Anthony >> >> -- Best regards, Anthony