GithubHelp home page GithubHelp logo

quicr / libquicr Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 5.0 4.03 MB

Transport based on QuicR API

License: BSD 2-Clause "Simplified" License

CMake 6.11% Makefile 0.38% C++ 92.73% Dockerfile 0.58% Shell 0.21%

libquicr's Introduction

QuicR

THiS REPO IS NOT UNDER ACTIVE DEVELOPMENT

libquicr's People

Contributors

fluffy avatar ghostofcookie avatar paulej avatar shenning00 avatar suhashere avatar timevens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libquicr's Issues

Deadlock in QuicRClientRawSession

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.

Transport not obeying shutdown while connecting

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):

  • Set relay address to somewhere random where it could never possibly connect.
  • Attempt to connect to a meeting
  • Leave the meeting while it is connecting
  • Watch logs, transport will still be logging it is trying to connect (at least with QUIC)

UDP actually just seems to keep trying forever and ever, never lets go.

First discussed: #56 (comment)

Crash in `on_recv_notify`

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.