[Top][All Lists]

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

Re: [Discuss-gnuradio] GNURadio segmentation fault

From: Marcus Müller
Subject: Re: [Discuss-gnuradio] GNURadio segmentation fault
Date: Sun, 22 May 2016 11:19:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Hi John,

I don't really know about the memory usage you see, but:
Did you rebuild GNU Radio (and UHD and basically everything you did not
install directly through Ubuntu's apt-get)? Upgrading a distro often
changes the libc version used, and that might mean that the ABI of the
very core functionality has changed, and your program is calling
functions with the wrong parameters or functions that don't exist.

That would be my first guess.
Now, you said you upgraded in an attempt to remedy those failures, so
I'm fully aware that might not be the /right/ guess, but segfaults in
libc usually only happen if you call some system functionality with a
non-existing / too short buffer or invalid pointer to a structure or
something like that, and the most common cause for that (aside from
actual bugs, but I'm not aware of anything currently, but I haven't
really used simple_ra much) would be an ABI mismatch. Now, this isn't
going to fix if something in simple_ra actually segfaults:

So, my first attempt would really be a make clean; make; (sudo) make
install .
If that fails, run your simple_ra application through GDB. The trick
here would probably be (Marcus L., you shout if I say something stupid,
right?) to modify the simple_ra script; at the very end, replace

simple_ra_receiver.py --frequency ...


gdb -ex run --args python2 simple_ra_receiver --frequency ...

to let gdb run the python flow graph for you. Then, at some point gdb
should catch the segfault and drop you to a command prompt; "bt" or
"backtrace" is the command you want to do to see the cascade of calls
going on (it might be helpful to have installed the "xyz-dbg" packages
for Ubuntu's python and libc packages, and build your GNU Radio with
debug symbols enabled, i.e. using -DCMAKE_BUILD_TYPE=RelWithDebInfo when
calling cmake) when the segfault happened. Often, that's already
sufficient to narrow down the bug. If it isn't: the lines of the
backtrace start with a #number; that number is the frame number, and you
can change into each frame, do a "list" (if debug symbols are present)
and get the source code where the program currently is, use "print" to
print variables (really invaluable if you've e.g. got a "for" loop that
keeps on writing past the end of a buffer and you don't know why).

Best regards,

On 22.05.2016 09:18, John Shields wrote:
> Dear All,
>              I have been running GNURadio fairly constantly for a
> couple of weeks now using simple_ra although, I don't believe it is a
> problem with that application as HTOP doesn't indicate memory issues etc.
>              I run GNURadio version on an Intel® Core™ i7-2600
> CPU @ 3.40GHz × 8.
>              I have been running Ubuntu 14.04 LTS for years now but on
> encountering the issue recently with continuous GNURadio use, I
> upgraded to 15.10 but the problem still occurs.
>              Here is what they syslog(s) say:
>              previous (for years!) 14.04LTS
>     May  7 15:01:34 i7Ubuntu kernel: [59309.794629] python2[3772]:
> segfault at 0 ip 00007f8e53be91c0 sp 00007ffe66518cc8 error 6 in
> libc-2.19.so[7f8e53b51000+1bb000]
>     May 11 02:06:54 i7Ubuntu kernel: [97164.418968] python2[2735]:
> segfault at 0 ip 00007fbc2dce61c0 sp 00007ffdd22fa0a8 error 6 in
> libc-2.19.so[7fbc2dc4e000+1bb000]
> upgraded to 15.10
>     May 21 22:22:12 i7Ubuntu kernel: [643331.441347] python2[24419]:
> segfault at 0 ip 00007faee89160e0 sp 00007ffc3857e748 error 6 in
> libc-2.21.so[7faee8876000+1c0000]
>     May 22 05:36:28 i7Ubuntu kernel: [21018.530748] python2[2408]:
> segfault at 0 ip 00007ff267bcb882 sp 00007ffdfe2d0b90 error 6 in
> i965_dri.so[7ff267814000+5b2000]
>              I get no other symptoms i.e. no D's or anything bad
> reported by UHD.
>              I also don't get problems with any other applications to
> indicate some memory issue though I wouldn't expect the regular apps
> to use as much memory - mind you when running simple_ra uses less than
> 10% of the memory.
>              Any ideas on how I can narrow the cause down?
>                    Kind Regards,
>                            John
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

reply via email to

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