Discussion:
[Discuss-gnuradio] GRC seg fault
Jason Matusiak
2015-07-17 12:27:55 UTC
Permalink
Hello,

I had a nicely working GRC on an Ubuntu 14.04 VM. I then installed the
GR-CDMA module via PyBombs. I was going through the steps to build the
different packages and GRC started acting weird. I closed it down and
then when I reopened it, it throws this error:
$ gnuradio-companion
Segmentation fault (core dumped)

I ran:
$ gdb --args python $(which gnuradio-companion)

followed by "run", and it produces:
(gdb) run
Starting program: /usr/bin/python /usr/local/bin/gnuradio-companion
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffed061700 (LWP 24737)]
[New Thread 0x7fffec860700 (LWP 24738)]
Traceback (most recent call last):
File
"/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py",
line 63, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[New Thread 0x7fffde7f6700 (LWP 24739)]
[New Thread 0x7fffddff5700 (LWP 24740)]
[New Thread 0x7fffdb7f4700 (LWP 24741)]
[New Thread 0x7fffd8ff3700 (LWP 24742)]
[New Thread 0x7fffd67f2700 (LWP 24743)]

Program received signal SIGSEGV, Segmentation fault.
0x00000000000124d6 in ?? ()


What is going wrong? Is there anything I can do to narrow this down
further? I went into the gnuradio/build and did a make clean && make &&
sudo make install, but that does not fix anything.

Any tips would be appreciated!
Jason Matusiak
2015-07-17 13:03:20 UTC
Permalink
I forgot to include the backtrace:
(gdb) bt
#0 0x00000000000124d6 in ?? ()
#1 0x00007fffbecf4f41 in init_osmosdr_swig ()
from /usr/lib/python2.7/dist-packages/osmosdr/_osmosdr_swig.so
#2 0x000000000042266c in _PyImport_LoadDynamicModule ()
#3 0x000000000043ff37 in ?? ()
#4 0x000000000049968d in PyEval_EvalFrameEx ()
#5 0x0000000000499ef2 in PyEval_EvalFrameEx ()
#6 0x00000000004a090c in PyEval_EvalCodeEx ()
#7 0x0000000000588d42 in PyEval_EvalCode ()
#8 0x0000000000588dfa in PyImport_ExecCodeModuleEx ()
#9 0x00000000005b1f0f in ?? ()
#10 0x0000000000540948 in ?? ()
#11 0x0000000000540d08 in ?? ()
#12 0x000000000054111b in ?? ()
#13 0x000000000051dd20 in ?? ()
#14 0x00000000004dc9cb in PyEval_CallObjectWithKeywords ()
#15 0x000000000049b87e in PyEval_EvalFrameEx ()
#16 0x00000000004a090c in PyEval_EvalCodeEx ()
#17 0x0000000000588d42 in PyEval_EvalCode ()
#18 0x0000000000588dfa in PyImport_ExecCodeModuleEx ()
#19 0x00000000005b1f0f in ?? ()
#20 0x000000000044d4d2 in ?? ()
#21 0x0000000000540948 in ?? ()
---Type <return> to continue, or q <return> to quit---
#22 0x0000000000540d08 in ?? ()
#23 0x000000000054111b in ?? ()
#24 0x000000000051dc50 in ?? ()
#25 0x000000000049968d in PyEval_EvalFrameEx ()
#26 0x00000000004a090c in PyEval_EvalCodeEx ()
#27 0x000000000049ab45 in PyEval_EvalFrameEx ()
#28 0x0000000000499ef2 in PyEval_EvalFrameEx ()
#29 0x0000000000499ef2 in PyEval_EvalFrameEx ()
#30 0x00000000004a090c in PyEval_EvalCodeEx ()
#31 0x0000000000499a52 in PyEval_EvalFrameEx ()
#32 0x00000000004a090c in PyEval_EvalCodeEx ()
#33 0x000000000049ab45 in PyEval_EvalFrameEx ()
#34 0x00000000004a1c9a in ?? ()
#35 0x00000000004dfe94 in ?? ()
#36 0x0000000000505f96 in PyObject_Call ()
#37 0x00000000004de41a in ?? ()
#38 0x00000000005039eb in ?? ()
#39 0x0000000000499be5 in PyEval_EvalFrameEx ()
#40 0x00000000004a1c9a in ?? ()
#41 0x00000000004dfe94 in ?? ()
#42 0x0000000000505f96 in PyObject_Call ()
#43 0x00000000004de41a in ?? ()
#44 0x00000000005039eb in ?? ()
---Type <return> to continue, or q <return> to quit---
#45 0x0000000000499be5 in PyEval_EvalFrameEx ()
#46 0x00000000004a1c9a in ?? ()
#47 0x00000000004dfe94 in ?? ()
#48 0x00000000004dc9cb in PyEval_CallObjectWithKeywords ()
#49 0x00000000004b99a9 in PyInstance_New ()
#50 0x0000000000499be5 in PyEval_EvalFrameEx ()
#51 0x0000000000499ef2 in PyEval_EvalFrameEx ()
#52 0x00000000004a1634 in ?? ()
#53 0x000000000044e4a5 in PyRun_FileExFlags ()
#54 0x000000000044ec9f in PyRun_SimpleFileExFlags ()
#55 0x000000000044f904 in Py_Main ()
#56 0x00007ffff7818ec5 in __libc_start_main (main=0x44f9c2 <main>,
argc=2,
argv=0x7fffffffde98, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffde88) at
libc-start.c:287
#57 0x0000000000578c4e in _start ()
Koslowski, Sebastian (CEL)
2015-07-17 13:05:19 UTC
Permalink
Post by Jason Matusiak
Hello,
I had a nicely working GRC on an Ubuntu 14.04 VM. I then installed the
GR-CDMA module via PyBombs. I was going through the steps to build the
different packages and GRC started acting weird. I closed it down and
$ gnuradio-companion
Segmentation fault (core dumped)
$ gdb --args python $(which gnuradio-companion)
(gdb) run
Starting program: /usr/bin/python /usr/local/bin/gnuradio-companion
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffed061700 (LWP 24737)]
[New Thread 0x7fffec860700 (LWP 24738)]
File
"/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py",
line 63, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[New Thread 0x7fffde7f6700 (LWP 24739)]
[New Thread 0x7fffddff5700 (LWP 24740)]
[New Thread 0x7fffdb7f4700 (LWP 24741)]
[New Thread 0x7fffd8ff3700 (LWP 24742)]
[New Thread 0x7fffd67f2700 (LWP 24743)]
Program received signal SIGSEGV, Segmentation fault.
0x00000000000124d6 in ?? ()
What is going wrong? Is there anything I can do to narrow this down
further? I went into the gnuradio/build and did a make clean && make &&
sudo make install, but that does not fix anything.
Any tips would be appreciated!
_______________________________________________
Discuss-gnuradio mailing list
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
GRC attempts to read the doc string of each block during load. If the
import of a block seg faults, so does GRC. If all you changed is install
gr-cdma, that's probably the reason for GRC failing. Looks like your
installation of gr-cdma is broken.

FYI, moving the doc string extraction this into a separate process
shifts this problem to runtime (when you execute a flowgraph with
erroneous blocks). I hope have this merged soon.

Sebastian
Jason Matusiak
2015-07-17 13:08:31 UTC
Permalink
Post by Koslowski, Sebastian (CEL)
GRC attempts to read the doc string of each block during load. If the
import of a block seg faults, so does GRC. If all you changed is install
gr-cdma, that's probably the reason for GRC failing. Looks like your
installation of gr-cdma is broken.
OK, makes sense. I didn't have a problem until I had been trying to
build on particular *.grc in the gr-cdma project.
Post by Koslowski, Sebastian (CEL)
FYI, moving the doc string extraction this into a separate process
shifts this problem to runtime (when you execute a flowgraph with
erroneous blocks). I hope have this merged soon.
Sebastian
OK, sound like that could be very useful, thank you. In the meantime,
is there a way to open gnuradio without it reopening all the previously
opened scripts (I am wondering if that is my problem)? Maybe something
like a safemode?
Marcus Müller
2015-07-17 13:19:53 UTC
Permalink
try calling gnuradio-companion with a single filename; that one doesn't
even have to exist, iirc:

gnuradio-companion ""

Best regards,
Marcus
Post by Jason Matusiak
Post by Koslowski, Sebastian (CEL)
GRC attempts to read the doc string of each block during load. If the
import of a block seg faults, so does GRC. If all you changed is install
gr-cdma, that's probably the reason for GRC failing. Looks like your
installation of gr-cdma is broken.
OK, makes sense. I didn't have a problem until I had been trying to
build on particular *.grc in the gr-cdma project.
Post by Koslowski, Sebastian (CEL)
FYI, moving the doc string extraction this into a separate process
shifts this problem to runtime (when you execute a flowgraph with
erroneous blocks). I hope have this merged soon.
Sebastian
OK, sound like that could be very useful, thank you. In the meantime,
is there a way to open gnuradio without it reopening all the previously
opened scripts (I am wondering if that is my problem)? Maybe something
like a safemode?
_______________________________________________
Discuss-gnuradio mailing list
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Koslowski, Sebastian (CEL)
2015-07-17 14:52:07 UTC
Permalink
OK, sound like that could be very useful, thank you. In the meantime, > is there a way to open gnuradio without it reopening all the >
previously opened scripts (I am wondering if that is my problem)? >
Maybe something like a safemode?

Unfortunately, there is no safe mode. A quick fix is to patch the
function get_doc() in 'grc/python/Block.py'. Simply remove the call to
extract_docs.extract() and return the local variable 'docs' (or an empty
string)

Sebastian
Al Bolduc
2015-07-17 15:09:24 UTC
Permalink
You could try renaming ~/.grc.

Al
--
# Al Bolduc - ***@comcast.net - ***@amsat.org
Jason Matusiak
2015-07-17 13:22:47 UTC
Permalink
Post by Marcus Müller
try calling gnuradio-companion with a single filename; that one doesn't
gnuradio-companion ""
No dice. I tried gnuradio-companion "" as well as gnuradio-companion
test.grc (which does not exist), and I still seg fault.

I went into gr-cdma/build and did a make clean && sudo make uninstall,
but it still isn't working....
Koslowski, Sebastian (CEL)
2015-07-17 13:29:41 UTC
Permalink
Post by Jason Matusiak
No dice. I tried gnuradio-companion "" as well as gnuradio-companion
test.grc (which does not exist), and I still seg fault.
I went into gr-cdma/build and did a make clean && sudo make uninstall,
but it still isn't working....
_______________________________________________
Discuss-gnuradio mailing list
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Looking at the backtrace you sent I see "init_osmosdr_swig ()". That
seems to be the problem.
Jason Matusiak
2015-07-17 14:02:23 UTC
Permalink
Post by Koslowski, Sebastian (CEL)
Looking at the backtrace you sent I see "init_osmosdr_swig ()". That
seems to be the problem.
I tried to sudo make uninstall from the gr-osmosdr directory, then
deleted it, and then downloaded and rebuilt/installed it, but I still
get the same errors.

I am running out of things to uninstall and reinstall. Should I blow
away all of gnuradio next?
Marcus Müller
2015-07-17 14:15:10 UTC
Permalink
Well, rebuilding GNU Radio and all the oot modules will probably be the
least painful option. (Especially because I think that the compilation
time of GR won't be very large -- I think your machine is quite capable,
right?)
Other than that, make double sure that uninstall gr-osmosdr as well as
all other osmosdr things really removed

/usr/lib/python2.7/dist-packages/osmosdr/_osmosdr_swig.so

as that's what caused the segfault.
It might be a good idea to search for files with gnuradio in their name
(and with osmo) in /usr after you've uninstalled everything -- there
might be remnants from earlier experiments.
From here, this looks most probable that some rather central library
got updated since you used it to build gr-osmosdr, and it will bite you
sooner or later if you don't also re-build all software that linked
against it.

Best regards,
Marcus
Post by Jason Matusiak
Post by Koslowski, Sebastian (CEL)
Looking at the backtrace you sent I see "init_osmosdr_swig ()". That
seems to be the problem.
I tried to sudo make uninstall from the gr-osmosdr directory, then
deleted it, and then downloaded and rebuilt/installed it, but I still
get the same errors.
I am running out of things to uninstall and reinstall. Should I blow
away all of gnuradio next?
_______________________________________________
Discuss-gnuradio mailing list
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Jason Matusiak
2015-07-17 15:16:22 UTC
Permalink
Post by Al Bolduc
You could try renaming ~/.grc.
Interesting, I didn't realize that that file existed, thanks. Sadly, it
of course didn't help me (my luck for today). But at least that shows
that the problem isn't with a bad script causing a crash when trying to
open...
m***@ripnet.com
2015-07-17 15:19:53 UTC
Permalink
Well, no matter how "bad" a script is, it shouldn't be able to cause a
segfault....
Post by Al Bolduc
You could try renaming ~/.grc.
Interesting, I didn't realize that that file existed, thanks. Sadly, it
of course didn't help me (my luck for today). But at least that shows
that the problem isn't with a bad script causing a crash when trying to
open...
_______________________________________________
Discuss-gnuradio mailing list
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio [1]
Links:
------
[1] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Jason Matusiak
2015-07-17 17:25:14 UTC
Permalink
Well, rebuilding GNU Radio and all the oot modules will probably be the least painful option. (Especially because I
think that the compilation time of GR won't be very large -- I think your machine is quite capable, right?)
I went into pybombs and uninstalled gr-cdma from there (which I had
never got to work),

Well, I went through and sudo make uninstall && make clean && make -j4
&& sudo make install && sudo ldconfig the following:
*airspy/
*bladeRF/
*gnss-sdr/
*gr-blah/
*gr-cdma/
*gr-ettus/
*gr-iqbal/
*gr-osmosdr/
*gr-test/
*hackrf/
*osmo-sdr/software/gr-osmosdr
*osmo-sdr/software/libosmosdr
*rtl-sdr/
and finally gnuradio

And yet I still seg faults..... Is there anything to try to do before I
blow away from VM and start over from scratch?
Jason Matusiak
2015-07-17 18:29:25 UTC
Permalink
And yet I still seg faults..... Is there anything to try to do before I
blow away from VM and start over from scratch?
I am starting to wonder if me installing pybombs yesterday had something
to do with this (I sort of forgot about that....).
Jason Matusiak
2015-07-20 11:38:25 UTC
Permalink
Post by Jason Matusiak
And yet I still seg faults..... Is there anything to try to do before I
blow away from VM and start over from scratch?
I am starting to wonder if me installing pybombs yesterday had something
to do with this (I sort of forgot about that....).
Well, I was able to recover GRC, but I had to take the long route (at
least I didn't need to blow away my VM). I ended up rerunning the
script that pulls down gnuradio and all the needed packages and rebuilds
it all. Something in that process fixed things (sadly, I have no idea
what). So if someone finds themselves in a similar situation, this
//should// work.
Marcus Müller
2015-07-20 13:34:12 UTC
Permalink
General comment: using VMs is really handy once you use snapshots to conserve specific working states, and sync over your codes using git to your host machine. That way, reverting to a time when everything worked is a matter of seconds, and checking out your last state of art is a simple git clone or git pull.

Best regards,
Marcus
Post by Jason Matusiak
Post by Jason Matusiak
And yet I still seg faults..... Is there anything to try to do
before I
Post by Jason Matusiak
blow away from VM and start over from scratch?
I am starting to wonder if me installing pybombs yesterday had
something
Post by Jason Matusiak
to do with this (I sort of forgot about that....).
Well, I was able to recover GRC, but I had to take the long route (at
least I didn't need to blow away my VM). I ended up rerunning the
script that pulls down gnuradio and all the needed packages and
rebuilds
it all. Something in that process fixed things (sadly, I have no idea
what). So if someone finds themselves in a similar situation, this
//should// work.
_______________________________________________
Discuss-gnuradio mailing list
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Loading...