# Gr-ctrlport-monitor timeout exception

**URL:** <https://www.ruby-forum.com/t/gr-ctrlport-monitor-timeout-exception/237409>\
**Category:** GNU Radio\
**Created:** [November 11, 2013, 10:10pm UTC](https://www.ruby-forum.com/t/gr-ctrlport-monitor-timeout-exception/237409 "2013-11-11T22:10:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [November 11, 2013, 10:10pm UTC](https://www.ruby-forum.com/t/gr-ctrlport-monitor-timeout-exception/237409/1 "2013-11-11T22:10:50Z")

</div>

I’m using ControlPort to monitor transmissions through a USRP. I have a  
flowgraph responsible for generating burst traffic and streaming to a  
uhd\_sink. Then I have a uhd\_source tuned to the same frequency as the  
uhd\_sink, and I connect it to a ctrlport\_probe2\_c block with length=128.  
I have ControlPort support compiled-in and enabled from a config file.  
I’m able to connect to a remotely running flowgraph using  
gr-ctrlport-monitor and plot the PSD of the “samples” vector pulled from  
the probe2 block every 100 milliseconds. The problem is that after (what  
seems to be) a nondeterministic time, the ICE port stops responding and  
gr-ctrlport-monitor reports an error:

ctrlport-monitor: radio.get threw exception (exception  
::Ice::ConnectTimeoutException  
{  
}).

When I close and restart, gr-ctrlport-monitor times out and segfaults:

2013-11-11 16:02:47.329422 /usr/local/bin/gr-ctrlport-monitor: error:  
Traceback (most recent call last):  
File “/usr/lib/pymodules/python2.7/Ice.py”, line 984, in main  
status = self.doMain(args, initData)  
File “/usr/lib/pymodules/python2.7/Ice.py”, line 1031, in doMain  
return self.run(args)  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/IceRadioClient.py”,  
line 97, in run  
radio = self.getRadio(host, port)  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/IceRadioClient.py”,  
line 36, in getRadio  
radio = GNURadio.ControlPortPrx.checkedCast(base)  
File “/usr/local/lib/python2.7/dist-packages/gnuradio\_ice.py”, line  
1257, in checkedCast  
return  
\_M\_gnuradio.ctrlport.GNURadio.ControlPortPrx.ice\_checkedCast(proxy,  
‘::GNURadio::ControlPort’, facetOrCtx, \_ctx)  
ConnectTimeoutException: exception ::Ice::ConnectTimeoutException  
{  
}

Segmentation fault (core dumped)

So there are two issues to note here:

- 

```
     Something in the ICE instance is breaking on the GNU Radio 

```

flowgraph side. The port is still open; it just times out. Trying to  
instantiate gr-ctrlport-monitor to an incorrect port just says  
“connection refused,” as expected.

- 

```
     gr-ctrlport-monitor is not robust to connection-related 

```

errors like timeouts or refused connections.

Is there any advice of what I can turn on or enable in GNU Radio or my  
flowgraph to debug the first problem? I can live with the second problem  
as long as I can make sure ICE doesn’t break on me.

Thanks,  
Sean

---

<div class="post-metadata">

**Author:** ![NowlanS\_Sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@NowlanS\_Sean](https://www.ruby-forum.com/u/NowlanS_Sean)\
**Post date:** [November 13, 2013, 5:12pm UTC](https://www.ruby-forum.com/t/gr-ctrlport-monitor-timeout-exception/237409/2 "2013-11-13T17:12:01Z")

</div>

> }).  
> File  
> “/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/IceRadioClient.py”, line  
> 36, in getRadio
> 
> - Something in the ICE instance is breaking on the GNU Radio flowgraph  
> side. The port is still open; it just times out. Trying to instantiate  
> gr-ctrlport-monitor to an incorrect port just says “connection refused,” as  
> expected.
> - gr-ctrlport-monitor is not robust to connection-related errors like  
> timeouts or refused connections.
> 
> Is there any advice of what I can turn on or enable in GNU Radio or my flowgraph  
> to debug the first problem? I can live with the second problem as long as I can  
> make sure ICE doesn’t break on me.
> 
> Thanks,  
> Sean

Sorry for getting antsy about this, but I’m really not sure how to go  
about debugging ICE server stuff. It seems like it’s buried pretty  
deeply in gnuradio-runtime. Where’s the best place to start looking to  
find out why the ICE server stops responding?

Sean

---

<div class="post-metadata">

**Author:** ![NowlanS\_Sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@NowlanS\_Sean](https://www.ruby-forum.com/u/NowlanS_Sean)\
**Post date:** [November 13, 2013, 5:43pm UTC](https://www.ruby-forum.com/t/gr-ctrlport-monitor-timeout-exception/237409/3 "2013-11-13T17:43:00Z")

</div>

I’ve seen ICE do this before, but usually its because my flowgraph dies,  
via segfault or something. When the flowgraph dies, the ice endpoints  
aren’t available anymore so the controlport monitor timesout when  
attempting to query them. Are you sure your flowgraph isn’t crapping  
out  
for some reason or another?

Tim

On Wed, Nov 13, 2013 at 11:10 AM, Nowlan, Sean

---

<div class="post-metadata">

**Author:** ![NowlanS\_Sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@NowlanS\_Sean](https://www.ruby-forum.com/u/NowlanS_Sean)\
**Post date:** [December 3, 2013, 9:14pm UTC](https://www.ruby-forum.com/t/gr-ctrlport-monitor-timeout-exception/237409/4 "2013-12-03T21:14:41Z")

</div>

Sorry it took me a bit of time to respond. Yes, I’m sure my flowgraph is  
still running and producing data as expected. Can anybody think of why  
the ice endpoint would die unexpectedly?

Sean

From: Tim N. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
Sent: Wednesday, November 13, 2013 11:42 AM  
To: Nowlan, Sean  
Cc: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Discuss-gnuradio] gr-ctrlport-monitor timeout exception

I’ve seen ICE do this before, but usually its because my flowgraph dies,  
via segfault or something. When the flowgraph dies, the ice endpoints  
aren’t available anymore so the controlport monitor timesout when  
attempting to query them. Are you sure your flowgraph isn’t crapping  
out for some reason or another?

Tim

On Wed, Nov 13, 2013 at 11:10 AM, Nowlan, Sean  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> }).  
> File  
> “/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/IceRadioClient.py”, line  
> 36, in getRadio
> 
> - Something in the ICE instance is breaking on the GNU Radio flowgraph  
> side. The port is still open; it just times out. Trying to instantiate  
> gr-ctrlport-monitor to an incorrect port just says “connection refused,” as  
> expected.
> - gr-ctrlport-monitor is not robust to connection-related errors like  
> timeouts or refused connections.
> 
> Is there any advice of what I can turn on or enable in GNU Radio or my flowgraph  
> to debug the first problem? I can live with the second problem as long as I can  
> make sure ICE doesn’t break on me.
> 
> Thanks,  
> Sean

Sorry for getting antsy about this, but I’m really not sure how to go  
about debugging ICE server stuff. It seems like it’s buried pretty  
deeply in gnuradio-runtime. Where’s the best place to start looking to  
find out why the ICE server stops responding?

Sean

---

<div class="post-metadata">

**Author:** ![NowlanS\_Sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@NowlanS\_Sean](https://www.ruby-forum.com/u/NowlanS_Sean)\
**Post date:** [December 3, 2013, 9:25pm UTC](https://www.ruby-forum.com/t/gr-ctrlport-monitor-timeout-exception/237409/5 "2013-12-03T21:25:48Z")

</div>

Perhaps this is happening due to the ICE endpoint’s TCP timeout setting.  
I have it configured to 300 ms based on the example ctrlport.conf file  
distributed with GNU Radio. I’ll try increasing this. A few questions:

1. 

```
 What disadvantages would there be to setting this to something 

```

really high?

1. 

```
 I need to monitor things over a potentially unreliable 

```

connection. It looks straightforward to configure the ICE endpoint to  
use UDP. What would it take to make gr-ctrlport-monitor work with a UDP  
endpoint?

Thanks,  
Sean

From: [discuss-gnuradio-bounces+sean.nowlan=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+sean.nowlan=removed_email_address@domain.invalid)  
[[mailto:discuss-gnuradio-bounces+sean.nowlan=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+sean.nowlan=removed_email_address@domain.invalid)] On  
Behalf Of Nowlan, Sean  
Sent: Tuesday, December 03, 2013 3:13 PM  
To: Tim N.  
Cc: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Discuss-gnuradio] gr-ctrlport-monitor timeout exception

Sorry it took me a bit of time to respond. Yes, I’m sure my flowgraph is  
still running and producing data as expected. Can anybody think of why  
the ice endpoint would die unexpectedly?

Sean

From: Tim N. [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
Sent: Wednesday, November 13, 2013 11:42 AM  
To: Nowlan, Sean  
Cc: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Discuss-gnuradio] gr-ctrlport-monitor timeout exception

I’ve seen ICE do this before, but usually its because my flowgraph dies,  
via segfault or something. When the flowgraph dies, the ice endpoints  
aren’t available anymore so the controlport monitor timesout when  
attempting to query them. Are you sure your flowgraph isn’t crapping  
out for some reason or another?

Tim

On Wed, Nov 13, 2013 at 11:10 AM, Nowlan, Sean  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> }).  
> File  
> “/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/IceRadioClient.py”, line  
> 36, in getRadio
> 
> - Something in the ICE instance is breaking on the GNU Radio flowgraph  
> side. The port is still open; it just times out. Trying to instantiate  
> gr-ctrlport-monitor to an incorrect port just says “connection refused,” as  
> expected.
> - gr-ctrlport-monitor is not robust to connection-related errors like  
> timeouts or refused connections.
> 
> Is there any advice of what I can turn on or enable in GNU Radio or my flowgraph  
> to debug the first problem? I can live with the second problem as long as I can  
> make sure ICE doesn’t break on me.
> 
> Thanks,  
> Sean

Sorry for getting antsy about this, but I’m really not sure how to go  
about debugging ICE server stuff. It seems like it’s buried pretty  
deeply in gnuradio-runtime. Where’s the best place to start looking to  
find out why the ICE server stops responding?

Sean
