On Thu, Jul 23, 2020 at 3:57 AM Rick Payne <[email protected]> wrote:

>
> Trying to characterise some performance stuff, I thought I'd run socat
> under OSv however it panics:
>
> $ sudo scripts/run.py -n -e 'socat tcp4-listen:6971 open:/dev/null'OSv
> v0.55.0
> eth0: 192.168.122.76
> Booted up in 3245.70 ms
> Cmdline: socat tcp4-listen:6971 open:/dev/null
> Assertion failed: type == SOCK_STREAM (libc/af_local.cc:
> socketpair_af_local: 101)
>

We implemented AF_LOCAL (UNIX-domain, local, sockets)  very early in OSv's
development (2013), and at the time implemented only the part we needed -
stream sockets. Unfortunately we never got around to completing the
datagram sockets :-(
It should be easy to implement datagram sockets, while leaving out some
more esoteric features like ancillary messages, like passing file
descriptors - which aren't useful to single-process application in any case.

In any case, the assert() there is obviously not a great thing to do, both
because it crashes the node and because a user seeing this would not even
know that this is about an unimplemented feature. What we usually did in
later code was to print a debugging message about an unimplemented feature,
and then return a failure with errno to the caller. We have useful macros
like NO_SYS for this in <osv/stubbing.hh>.

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/CANEVyjtQgEySnAZY72E%2B5Tt%2BXN01shxpHnYv-7a_Fw5QM_XsUQ%40mail.gmail.com.

Reply via email to