[oi-dev] OI no longer automounts USB sticks

Gary Mills gary_mills at fastmail.fm
Tue Jul 27 21:02:24 UTC 2021


On Sun, Jun 27, 2021 at 01:00:46AM -0700, Joshua M. Clulow wrote:
> 
> OK, so I have looked into this a little bit.  It seems like there is a
> bug in the HAL code we ship, or in the glib that OI is now using, or
> somewhere inbetween.
[...]
> This seems about right.  These writes are into a self-pipe (i.e., both
> ends of the pipe are held open within this single hald process) that
> is established in the sysevent_init() routine, and stored in the
> "sysevent_pipe_fds" global where I was able to confirm with pfiles
> that the pipe is still open.
> 
> Where things appear to fall down is once we get into the glib area.
> The strings that are written into one end of the pipe by the sysevent
> consumer, as described above, are meant to then be read through a glib
> GIOChannel object in sysevent_iochannel_data():
[...]
> I have run out of steam on this for now, but I hope this is enough for
> someone to keep digging.

As far as I can tell, nobody has taken up the chase from here.  I'd
like to do that myself, but I don't know enough dtrace to do it.  This
does look like a job for dtrace.  In particular, I'd like to find out
what glib is doing after that function call.  There should be a read()
system call at the bottom of it all.  I'd like to see what's returned
from that system call.  Pipes on illumos are completely different
internally from pipes on Linux, and certainly could behave
differently.  Self-pipes on illumos are even more likely to misbehave.

Would it be possible for you to suggest some dtrace code that will
reveal what I need from that glib function?


-- 
-Gary Mills-		-refurb-		-Winnipeg, Manitoba, Canada-



More information about the oi-dev mailing list