Segmentation fault when running usrp_spectrum_sense.py

Hi all,

I updated my gnuradio to gnuradio-3.1.0. And when I run
usrp_spectrum_sense.py, it gives the output like:

==============================
$ sudo ./usrp_spectrum_sense.py 400M 450M
Using RX d’board A: TV Rx Rev 2
gain = 57.5
Segmentation fault

Could anyone give any suggestion on how to solve it? I can receive the
FM
radio stations, and other script works fine. I don’t know why this
happened?

Thanks,
Roseline

View this message in context:
http://www.nabble.com/Segmentation-fault-when-running-usrp_spectrum_sense.py-tf4761218.html#a13616514
Sent from the GnuRadio mailing list archive at Nabble.com.

On Tue, Nov 06, 2007 at 03:00:19PM -0800, Eric B. wrote:

gain = 57.5
I can reproduce this on the trunk using a 32-bit machine and SuSE 10.1.
Works OK on a 64-bit machine running Fedora 7.

I’ll investigate further.

Eric

No immediate insight.

I opened ticket:199

Eric

On Tue, Nov 06, 2007 at 01:35:17PM -0800, Ruby Lin wrote:

Segmentation fault

Could anyone give any suggestion on how to solve it? I can receive the FM
radio stations, and other script works fine. I don’t know why this happened?

Thanks,
Roseline

I can reproduce this on the trunk using a 32-bit machine and SuSE 10.1.
Works OK on a 64-bit machine running Fedora 7.

I’ll investigate further.

Eric

As another data point: Sometimes this happens on OSX, and sometimes
it doesn’t. On otherwise identical computers (Intel-iMac, 10.4.10,
latest updates, MacPorts for background libraries, includes, and
apps), with the only difference being the version of Python and
related python stuff (2.4 versus 2.5), for the computer with 2.5 it
works, while the one with 2.4 it gives a “bus error”. At least on
OSX, this happens w/o/r/t which daughtercard is being selected, and
it doesn’t happen in the low-level fusb code (which on OSX is
spitting out buffer overflows - the data is coming in, but not
really being used by the TB/FG: there is 1 request for
data from the TB/FG, then no more). Sorry I can’t provide more info
yet; I haven’t had time to track it down further. - MLD

I am using 32-bit machine using Ubuntu. Thanks for your further
investigation.

Ruby

Eric B. wrote:

Using RX d’board A: TV Rx Rev 2

Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


View this message in context:
http://www.nabble.com/Segmentation-fault-when-running-usrp_spectrum_sense.py-tf4761218.html#a13619298
Sent from the GnuRadio mailing list archive at Nabble.com.

On Tue, Nov 06, 2007 at 03:00:19PM -0800, Eric B. wrote:

gain = 57.5
Segmentation fault

Could anyone give any suggestion on how to solve it? I can receive the FM
radio stations, and other script works fine. I don’t know why this happened?

Thanks,
Roseline

It seems that this is a Python 2.4 vs 2.5 issue, not 32-bit vs 64-bit.

2.5 works, 2.4 segfaults.

Given that the trunk and 3.1 branch are now creating threads
independent of python, it may be that there is some “one time,
per-thread” init that may be required under 2.4.

We are using

PyGILState_Ensure() and PyGILState_Release(d_gstate)

in gr_feval.i. It may be that there’s a known python 2.4 bug that we
need to work around.

Could somebody please check this out?
I suggest starting with the python bug tracker.

Thanks,
Eric