[haiku-bugs] Re: [Haiku] #14738: [pc_serial] Sometimes gets stuck in Write() (even in async mode)

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Tue, 08 Jan 2019 17:54:16 -0000

#14738: [pc_serial] Sometimes gets stuck in Write() (even in async mode)
---------------------------+----------------------------
   Reporter:  ttcoder      |      Owner:  mmu_man
       Type:  bug          |     Status:  assigned
   Priority:  normal       |  Milestone:  Unscheduled
  Component:  Drivers/TTY  |    Version:  R1/Development
 Resolution:               |   Keywords:
 Blocked By:               |   Blocking:
Has a Patch:  0            |   Platform:  All
---------------------------+----------------------------

Comment (by ttcoder):

 Sent the station a build of CC with a snooze( 100000 ) call before each
 write(); I don't think he's seeing lock-ups/freezes any more, but it seems
 to have made things much worse for some reason, regarding the other bug --
 the one with the serial port getting "out of sync" and confusing the
 switcher box ID...

 Just realized there is this in his syslogs...

 {{{
 KERN: pc_serial: write: failed to get write done sem 0x8000000a
 }}}

 ... and that 0x8000000a resolves to {{{0x8000000a: Interrupted system
 call}}}

 Let's take a bit of a logical leap here, and assume that the above is
 related to either (or both) bugs he is seeing, and needs to be
 addressed...

 I seem to recall that when a piece of call is vulnerable to that, it needs
 to wrap its call in a while() loop, something like "while( write(blah) ==
 B_INTERRUPTED ) try_again()"; maybe that is true of the pc_serial driver
 as well, it would need such a while loop ?

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14738#comment:5>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: