std::osyncstream outputs garbled text and causes seg fault

That's not how osyncstream is supposed to be used. Every thread needs to construct its own osyncstream; there is no synchronization on access to the osyncstream itself. Only the transfer performed by emit is synchronized, and then only with respect to the streambuf it wraps.

Having a global osyncstream is therefore entirely pointless.