discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] usrp_spectrum_sense.py segmentation fault problem


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] usrp_spectrum_sense.py segmentation fault problem
Date: Tue, 20 Dec 2011 20:24:28 -0500

On Tue, Dec 20, 2011 at 11:02 AM, Thomas Tsou <address@hidden> wrote:
On Tue, Dec 20, 2011 at 5:11 AM, Sebastian Döring
<address@hidden> wrote:
>> ------------------------------------------------------------------------------------------------------
>> #0  0x0013a455 in sem_post@@GLIBC_2.1 () from
>> /lib/tls/i686/cmov/libpthread.so.0
>> #1  0x0810ab61 in PyThread_release_lock (lock=0x0) at
>> ../Python/thread_pthread.h:374
>> #2  0x080dbad3 in PyEval_ReleaseLock () at ../Python/ceval.c:262
>> #3  0x00fa6073 in gr_py_feval_dd::calleval(double) ()

This is likely a similar issue with the Python GIL (global interpreter
lock) that occurred previously on the E100. In that case the final
cause was a missing ctypes library.

http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2011-June/001479.html

To find out, try this thread hack. The patch is old, so you will
probably need to apply manually against the current master.

diff --git a/uhd_spectrum_sense_sum.py b/uhd_spectrum_sense_sum.py
index 70f530f..31bf458 100644
--- a/uhd_spectrum_sense_sum.py
+++ b/uhd_spectrum_sense_sum.py
@@ -32,7 +32,11 @@ import sys
 import math
 import struct
 import time
+import threading

+class ThreadClass(threading.Thread):
+    def run(self):
+        return

 class tune(gr.feval_dd):
   """
@@ -306,6 +310,9 @@ def main_loop(tb):


 if __name__ == '__main__':
+    t = ThreadClass()
+    t.start()
+
   tb = my_top_block()
   try:
       tb.start()              # start executing flow graph in
another thread...

 Thomas


Please let us know if this patch works. I think this has been an outstanding issue in GNU Radio for a while. It'd be good to get a fix for it in.

Thanks,
Tom
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]