discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] gr-audio-oss segfaults


From: Berndt Josef Wulf
Subject: Re: [Discuss-gnuradio] gr-audio-oss segfaults
Date: Fri, 7 Apr 2006 16:39:44 +0930
User-agent: KMail/1.9.1

On Friday 07 April 2006 12:41, Eric Blossom wrote:
> > The log below shows the part that does go wrong. Note that swig wasn't
> > executed in order to regenerate audio_oss.cc
>
> Note that the compile from the the tarball *does* succeed.  It does
> generate some warnings about "defined but unused", but no compile time
> errors.

Yes, I know.

> I believe the reason you're seeing the segfault (based on
> circumstantial evidence -- I don't even know *where* it's blowing up)
> is that the gnuradio-core tarball *does* run swig (which it
> shouldn't), while the other tarballs *don't* run swig.  This would
> result in gnuradio-core using "your version of swig" and all the other
> tarballs using "my version of swig".  As long as they all use the        
> same version of swig, everything should be OK.  Right now they're not.

gdb trace show:

---------------------------------------------------------8<-----------------------------------------------------
Loaded symbols for /usr/libexec/ld.elf_so
#0  0xbbb574ca in type_new () from /usr/pkg/lib/libpython2.4.so.1.0
(gdb) where
#0  0xbbb574ca in type_new () from /usr/pkg/lib/libpython2.4.so.1.0
#1  0xbbb55d10 in type_call () from /usr/pkg/lib/libpython2.4.so.1.0
#2  0xbbb25c0c in PyObject_Call () from /usr/pkg/lib/libpython2.4.so.1.0
#3  0xbb493b8b in SWIG_Python_NewShadowInstance ()
   from /usr/pkg/lib/python2.4/site-packages/gnuradio/_audio_oss.so
#4  0xbb493da6 in SWIG_Python_NewPointerObj ()
   from /usr/pkg/lib/python2.4/site-packages/gnuradio/_audio_oss.so
#5  0xbb4950c1 in _wrap_audio_oss_sink_sptr_input_signature ()
   from /usr/pkg/lib/python2.4/site-packages/gnuradio/_audio_oss.so
#6  0xbbb46672 in PyCFunction_Call () from /usr/pkg/lib/libpython2.4.so.1.0
#7  0xbbb25c0c in PyObject_Call () from /usr/pkg/lib/libpython2.4.so.1.0
#8  0xbbb790d3 in ext_do_call () from /usr/pkg/lib/libpython2.4.so.1.0
#9  0xbbb76cbf in PyEval_EvalFrame () from /usr/pkg/lib/libpython2.4.so.1.0
#10 0xbbb77336 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.4.so.1.0
[....]
---------------------------------------------------------8<-----------------------------------------------------



ktrace provides the following trace:

---------------------------------------------------------8<-----------------------------------------------------
[...] 15405      1 python2.4 CALL  open(0x812cc3c,1,0xbfbfde90)
 15405      1 python2.4 NAMI  "/dev/audio"
 15405      1 python2.4 RET   open 3
 15405      1 python2.4 CALL  ioctl(3,_IOWR('A',0x16,0x88),0xbfbfdd50)
 15405      1 python2.4 GIO   fd 3 wrote 136 bytes
       "\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\^P\0\0\0\^F\0\0\0\M^?\M^?\M^?\M^?\M^?
\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\^P\0\0\0\^F\0\0\0\M^?\M^?\M^?\M^?
\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?"
 15405      1 python2.4 GIO   fd 3 read 136 bytes
       "\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\^P\0\0\0\^F\0\0\0\M^?\M^?\M^?\M^?\M^?
\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\^P\0\0\0\^F\0\0\0\M^?\M^?\M^?\M^?
\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?"
 15405      1 python2.4 RET   ioctl 0
 15405      1 python2.4 CALL  ioctl(3,_IOR('A',0x15,0x88),0xbfbfdd50)
 15405      1 python2.4 GIO   fd 3 read 136 bytes
       "@\^_\0\0\^A\0\0\0\^P\0\0\0\^F\0\0\0\M^?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\^A\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 address@hidden
        \0\0\0\^F\0\0\0\0\0\0\0\^A\0\0\0\0\0\0\0\a\0\0\0\0\0\^A\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0 address@hidden
(\0\0\0\^^\0\0\0\0\0\0\0\^E\
        \0\0\0"
 15405      1 python2.4 RET   ioctl 0
 15405      1 python2.4 CALL  ioctl(3,_IOWR('A',0x16,0x88),0xbfbfdd50)
 15405      1 python2.4 GIO   fd 3 wrote 136 bytes
       "\M^?\M^?\M^?\M^?\^B\0\0\0\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\^B\0\0\0\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?"
 15405      1 python2.4 GIO   fd 3 read 136 bytes
       "\M^?\M^?\M^?\M^?\^B\0\0\0\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\^B\0\0\0\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?"
 15405      1 python2.4 RET   ioctl 0
 15405      1 python2.4 CALL  ioctl(3,_IOR('A',0x15,0x88),0xbfbfdd50)
 15405      1 python2.4 GIO   fd 3 read 136 bytes
       "@\^_\0\0\^B\0\0\0\^P\0\0\0\^F\0\0\0\M^?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\^A\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 address@hidden
        \0\0\0\^F\0\0\0\0\0\0\0\^A\0\0\0\0\0\0\0\a\0\0\0\0\0\^A\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0 address@hidden
(\0\0\0\^^\0\0\0\0\0\0\0\^E\
        \0\0\0"
 15405      1 python2.4 RET   ioctl 0
 15405      1 python2.4 CALL  ioctl(3,_IOWR('A',0x16,0x88),0xbfbfdd50)
 15405      1 python2.4 GIO   fd 3 wrote 136 bytes
       
"address@hidden;\0\0\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        address@hidden;\0\0\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?"
 15405      1 python2.4 GIO   fd 3 read 136 bytes
       
"address@hidden;\0\0\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        address@hidden;\0\0\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\
        \M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?"
 15405      1 python2.4 RET   ioctl 0
 15405      1 python2.4 CALL  ioctl(3,_IOR('A',0x15,0x88),0xbfbfdd50)
 15405      1 python2.4 GIO   fd 3 read 136 bytes
       
"address@hidden;\0\0\^B\0\0\0\^P\0\0\0\^F\0\0\0\M^?\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\^A\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 address@hidden;
\0\0\^B\0\
        
\0\0\^P\0\0\0\^F\0\0\0\0\0\0\0\^A\0\0\0\0\0\0\0\a\0\0\0\0\0\^A\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0 
address@hidden
        \0\0\0\^E\0\0\0"
 15405      1 python2.4 RET   ioctl 0
 15405      1 python2.4 PSIG  SIGSEGV SIG_DFL
 15405      1 python2.4 NAMI  "python2.4.core"
---------------------------------------------------------8<-----------------------------------------------------


> Let me be clear: when compiling the tarballs, swig should *not* run
> [at least that was the original intention ;) ] The fact that it is run
> when building the gnuradio-core tarball is *incorrect*, and is what I
> believe is causing the problem.
>
> So, I think there are two solutions: ensure that either all of them run
> swig, or that none of them run swig.
>

swig is executed with gr-audio-portaudio, gr-audio-oss, gr-gsm-fr-vocoder, 
gr-usrp but not with gnuradio-core and  usrp

> > > I'll continue to investigate, but not right now.
> > >
> > >
> > > If someone else wants to help sort this out, please dive in.
> > >
> > > BTW, this problem isn't new.  It's been in all the tarballs generated
> > > over the last couple of years.  I think we're seeing it now because I
> > > used swig 1.3.29 on the build machine.  The swig generated code changed
> > > for the better between 1.3.27 and 1.3.28.
> >
> > This would make sense as the version of swig used here is 1.3.27.
>
> That's good to know.
>
> > I was going to commit an update of the latest gnuradio release into
> > pkgsrc and will have to work around it if no solution comes from here.
>
> I appreciate your efforts.  Maybe you should hold off a few days and
> see if a solution materializes.
>
> > BTW: I've since create a package for gr-audio-portaudio which I hope to
> > commit soon.
>
> Good.
>
> How does gr-audio-portaudio sound under NetBSD?
> Does it work as well as gr-audio-oss?

I just finished and installed the portaudio package and run a few 
applications. The sound is choppy, something that I haven't noticed with the 
older version of portaudio support which had the *_portaudio.py applications. 
However, the test applications that come with portaudio work fine.

Will investigate it later on, it's not important at the moment since audio_oss 
works fine.

> FWIW, my impression of gr-audio-portaudio under GNU/Linux is that it's
> not ready for prime time.  I'd still choose gr-audio-alsa over
> portaudio.  It still needs some work.  Not sure if it's in our code,
> the portaudio code, or both.

Will do,

cheerio Berndt

Attachment: pgpvBQipaYgTO.pgp
Description: PGP signature


reply via email to

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