On Thu, 31 Mar 2022 at 18:19, Gary Mills <gary_mi...@fastmail.fm> wrote:
> On Thu, Mar 31, 2022 at 04:48:04PM -0500, Gary Mills wrote:
> > Ah, that behavior makes it much more difficult to diagnose the
> > problem.  Intermittent operation is not something I even considered.
> > Could there be a critical timing someplace?  I don't know how you
> > would even answer that question.
>
> The only thing I can think of that occurs at a random time is signals.
> Linux signal handling is quite different from illumos signal handling.
> Both OSes can lose repeated signals.
>
> The other pecularity, although not entirely random, is that hal writes
> UTF strings to a pipe, and reads them back from the same pipe.  Pipes
> also are quite different between Linux and illumos.  In particular,
> illumos pipes use streams, and require a context switch before the
> packet can move along the pipe.

A few things:

  - though we support STREAMS-compatible pipes, we use
    a more direct fast path by default; see use of FIFOFAST

  - nobody can support pipes without context switching,
    pipe reads and writes requiring interaction with
    the kernel, and often lead to another process, so
    there are usually at least three contexts involved

Even through all of this, though, there will likely always be at least
minute differences in timing between the platforms.  If the code is
correct, this will not matter.

The only way to solve this problem will be to debug exactly what's
going wrong, whether it's in glib or HAL or somewhere inbetween.  Some
previous mail to the list that includes some debugging I started on in
June:

    https://openindiana.org/pipermail/oi-dev/2021-June/032756.html

    https://openindiana.org/pipermail/oi-dev/2021-June/032768.html

Some combination of DTrace, truss, and mdb, is likely to help -- along
with source inspection.  You could conceivably even add or enable more
debug logging to HAL or to glib or to both and rebuild.  I don't have
an OI workstation myself, which is why I haven't spent more time on
this.  If you decide to dig in, though, either myself or someone in
#illumos IRC or on the illumos mailing list will likely be able to
help with pointers once you have questions.


Cheers.

--
Joshua M. Clulow
http://blog.sysmgr.org

_______________________________________________
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev

Reply via email to