Uploaded image for project: 'Near Realtime RAN Intelligent Controller'
  1. Near Realtime RAN Intelligent Controller
  2. RIC-803

rmr_close() does not work properly

XMLWordPrintable

      Hi Scott,

      I was wondering if there is an issue with rmr_close() API. I have implemented a unit test where I create 2 RMR instances inside the same process using rmr_init() and rmr_ready(), send some ping-pong between them and finally rmr_close() them. Then, without terminating the process, I create 2 more RMR instances using the same RMR ports and try sending message from one another. It says the message is send successfully but in the other side rmr_torcv_msg() always returns NULL.

       

      When I look at rmr_close(), seems like there isn’t any resource releasing related with SI95:

       

       

      /*
          Compatability (mostly) with NNG.
      */
      extern void rmr_close( void* vctx ) {
          uta_ctx_t *ctx;
          if( (ctx = (uta_ctx_t *) vctx) == NULL ) {
              return;
          } 
          nn_close( ctx->nn_sock );
      }
      

       

       

      I also looked rmr_close() in rmr_si.c, and seems like the TCP related resource releasing is not happening; SIclose() not called:

       

       

      /*
          Clean up things.
          There isn't an si_flush() per se, but we can pause, generate
          a context switch, which should allow the last sent buffer to
          flow. There isn't exactly an nng_term/close either, so there
          isn't much we can do.
      */
      extern void rmr_close( void* vctx ) {
          uta_ctx_t *ctx;
          if( (ctx = (uta_ctx_t *) vctx) == NULL ) {
              return;
          }
          ctx->shutdown = 1;
          SItp_stats( ctx->si_ctx );          // dump some interesting stats
          // FIX ME -- how to we turn off si; close all sessions etc?
          //SIclose( ctx->nn_sock );
      }
      

       

       

      Is it possible if you can fix this so that RMR context is release properly?

       

      Best Regards,

      Bengi

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            EScottDaniels Scott Daniels
            bmizrahi Bengi Mizrahi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: