QuicR
THiS REPO IS NOT UNDER ACTIVE DEVELOPMENT
Transport based on QuicR API
License: BSD 2-Clause "Simplified" License
THiS REPO IS NOT UNDER ACTIVE DEVELOPMENT
The session_mutex
is locked when unsubscribe()
is called. That then calls removeSubscribeState()
void
QuicRClientRawSession::unsubscribe(const quicr::Namespace& quicr_namespace,
const std::string& /* origin_url */,
const std::string& /* auth_token */)
{
// The removal of the delegate is done on receive of subscription ended
std::lock_guard<std::mutex> lock(session_mutex);
messages::MessageBuffer msg{};
messages::Unsubscribe unsub{ 0x1, quicr_namespace };
msg << unsub;
removeSubscribeState(quicr_namespace,
SubscribeResult::SubscribeStatus::ConnectionClosed);
transport->enqueue(transport_context_id, transport_stream_id, msg.take());
}
And removeSubscribeState()
is this:
void
QuicRClientRawSession::removeSubscribeState(
const quicr::Namespace& quicr_namespace,
const SubscribeResult::SubscribeStatus& reason)
{
std::lock_guard<std::mutex> _(session_mutex);
if (!!subscribe_state.count(quicr_namespace)) {
subscribe_state.erase(quicr_namespace);
}
if (!!sub_delegates.count(quicr_namespace)) {
if (auto sub_delegate = sub_delegates[quicr_namespace].lock())
sub_delegate->onSubscriptionEnded(quicr_namespace, reason);
sub_delegates.erase(quicr_namespace);
}
}
The same mutex is locked again.
One of the two needs to be removed. I'd suggest removing it from unsubscribe()
, as it doesn't appear to be necessary there.
When told to disconnect, if the transport is in the middle of trying to connect, everything else obeys he command, but transport keeps on connecting away, until it times out finally, and realizes it was told to shutdown.
Steps to reproduce (using Decimus):
UDP actually just seems to keep trying forever and ever, never lets go.
First discussed: #56 (comment)
https://github.com/Quicr/libquicr/blob/main/src/quicr_client_raw_session.cpp#L232
The sizeof() may or may not be the right choice, but use of payload.size()
here is wrong since payload was moved.
I don't have much detail here, dropping this so I don't forget. I saw a crash in the following on teardown.
#0 0x0000000104ea129c in quicr::QuicRTransportDelegate::on_recv_notify(unsigned long long const&, unsigned long long const&) ()
This seems to happen in conjunction when there's another weird issue, where I'm seemingly getting loss or the relay is running very slowly even locally. When that's happening, I always get the above on teardown.
qmedia`quicr::QuicRTransportDelegate::on_recv_notify:
0x105585248 <+0>: sub sp, sp, #0x140
0x10558524c <+4>: stp x28, x27, [sp, #0x120]
0x105585250 <+8>: stp x29, x30, [sp, #0x130]
0x105585254 <+12>: add x29, sp, #0x130
0x105585258 <+16>: stur x0, [x29, #-0x18]
0x10558525c <+20>: stur x1, [x29, #-0x20]
0x105585260 <+24>: stur x2, [x29, #-0x28]
0x105585264 <+28>: ldur x8, [x29, #-0x18]
0x105585268 <+32>: str x8, [sp, #0x38]
0x10558526c <+36>: stur wzr, [x29, #-0x2c]
0x105585270 <+40>: b 0x105585274 ; <+44>
0x105585274 <+44>: ldur w8, [x29, #-0x2c]
0x105585278 <+48>: subs w8, w8, #0x96
0x10558527c <+52>: b.ge 0x1055855cc ; <+900>
0x105585280 <+56>: b 0x105585284 ; <+60>
0x105585284 <+60>: ldr x8, [sp, #0x38]
0x105585288 <+64>: ldr x8, [x8, #0x8]
0x10558528c <+68>: add x0, x8, #0x8
0x105585290 <+72>: bl 0x10557d290 ; std::__1::shared_ptr<qtransport::ITransport>::operator->() const
0x105585294 <+76>: ldur x1, [x29, #-0x20]
0x105585298 <+80>: ldur x2, [x29, #-0x28]
-> 0x10558529c <+84>: ldr x8, [x0] EXC_BAD_ACCESS (code=1, address=0x0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.