Re: Fwd: Adding timeouts to device access?
Brought to you by:
aeb,
bencollins
From: Takashi S. <o-t...@sa...> - 2025-06-29 02:48:53
|
Hi, I'm sorry to be late for reply, however I was traveling. On Mon, Jun 23, 2025 at 05:53:47PM +1000, 小太 wrote: > Hello, I tried sending an email (see below) to > lin...@li... a few days ago but it hasn't showed > up on the archive: > https://sourceforge.net/p/linux1394/mailman/linux1394-devel/?viewmonth=202506 > Is it awaiting moderation or got dropped as spam? Did I send it wrong? The moderation of list is kind of outside what I usually deal with, unforntunately. Additionally, the moderators of list is inactive so long. > ---------- Forwarded message --------- > From: 小太 <no...@ko...e> > Date: Fri, 20 Jun 2025 at 19:23 > Subject: Re: Adding timeouts to device access? > To: <lin...@li...> > > > On Fri, 20 Jun 2025 at 19:17, 小太 <no...@ko...e> wrote: > > > Hello, I've been trying to debug an odd issue with my hardware where it > > sometimes just stops responding (hardware failure is my guess at the > > moment). > > This resulted in hung tasks in the kernel that sometimes even prevents the > > OS from cleanly shutting down > > > > In particular, I believe these lines are prone to hanging indefinitely in > > the event the hardware fails to respond: > > - > > https://github.com/torvalds/linux/blob/75f5f23f8787c5e184fcb2fbcd02d8e9317dc5e7/drivers/firewire/core-card.c#L753 > > - > > https://github.com/torvalds/linux/blob/75f5f23f8787c5e184fcb2fbcd02d8e9317dc5e7/drivers/firewire/core-transaction.c#L433 > > > > Would it make sense to turn these into wait_for_completion_timeout() or > > even wait_for_completion_interruptible_timeout() instead? > > If so, some questions: > > - What would be a reasonable timeout value? 1 second? Less? > > - If fw_run_transaction() times out, what should it > > return? RCODE_CANCELLED? > > > > Whoops, I was meant to include the hung task logs but forgot. Here they are > > (Snip) Would I ask you the situation facing the issue? Especially, what kind of 1394 OHCI hardware you used. Thanks Takashi Sakamoto |