Segmentation fault when recoding in TclVoiceMail

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Segmentation fault when recoding in TclVoiceMail

Tim Miller WB0RXX
Howdy all,

Before I begin, I would like to thank SM0SVX for a very FB application.
Thank you so very much Tobias!

To continue, my installation of Svxlink server will segfault whenever I
attempt to leave a voice mail message using the new TclVoiceMail module.
  Using the default /etc/TclVoiceMail.conf file, I get the following error:

SvxLink v0.6.0 (Oct 13 2005) starting up...
Using config file: /etc/svxlink.conf

Starting logic: SimplexLogic
Loading module "ModuleHelp" into logic "SimplexLogic"
         Module Help v0.6.0 starting...
Loading module "ModuleParrot" into logic "SimplexLogic"
         Module Parrot v0.6.0 starting...
Loading module "ModuleTclVoiceMail" into logic "SimplexLogic"
         Module Tcl v0.2.0 starting...
Event handler script successfully loaded.
digit=3
digit=#
Activating module TclVoiceMail...
Tx1: Turning the transmitter ON
Tx1: Turning the transmitter OFF
digit=0
digit=0
digit=1
digit=1
digit=2
digit=3
digit=#
TclVoiceMail: User SM0AAA logged in with password 123
Tx1: Turning the transmitter ON
Tx1: Turning the transmitter OFF
digit=2
digit=#
Tx1: Turning the transmitter ON
Tx1: Turning the transmitter OFF
digit=0
digit=0
digit=2
digit=#
TclVoiceMail: Sending voice mail to SM0BBB
Tx1: Turning the transmitter ON
Tx1: Turning the transmitter OFF
Rx1: The squelch is OPEN
TclVoiceMail: Recording subject to file:
/var/spool/voice_mail/SM0BBB/20051014_105828_001.subj
Segmentation fault

The module works fine until I am asked to enter a subject.  As soon as
the squelch breaks, it crashes.  I am not all that well versed with Tcl,
but it appears that it dies when calling recordStart.

Not that it will help much, but here is the same problem as run through
strace:

gettimeofday({1129305729, 420335}, NULL) = 0
select(6, [0 4 5], [], NULL, {50, 594459}) = 1 (in [4], left {50, 532000})
ioctl(4, SNDCTL_DSP_GETISPACE, 0xbffff020) = 0
read(4, "!\2\322\1M\1\327\0\202\0\20\0\272\377\225\377\363\377\t"...,
1024) = 1024
write(1, "Rx1: The squelch is OPEN\n", 25Rx1: The squelch is OPEN) = 25
write(1, "TclVoiceMail: Recording subject "..., 96TclVoiceMail:
Recording subject to file:
/var/spool/voice_mail/SM0BBB/20051014_110155_001.subj) = 96
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

I have no idea how to debug such a problem!  I am pretty certain that
the hardware is okay, as the problem is the same on two different PCs
and all other functions are fully operational.  For the record, both PCs
are running Slackware 10.1/10.2, and the latest version of SvxLink,
complied from the source with gcc 3.3.4/3.3.6.

Any help will be most appreciated!

73 de Tim

--
Tim Miller WB0RXX [EN24dw]
SvxLink v0.6.0 (Oct 13 2005)
Slackware 10.1/P200 MHz/64 MB


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault when recoding in TclVoiceMail

Tobias Blomberg-2
On Fri, 2005-10-14 at 20:05 -0500, Tim Miller WB0RXX wrote:
> Howdy all,
>
> Before I begin, I would like to thank SM0SVX for a very FB application.
> Thank you so very much Tobias!

I'm glad you like it :-)



> To continue, my installation of Svxlink server will segfault whenever I
> attempt to leave a voice mail message using the new TclVoiceMail module.
>   Using the default /etc/TclVoiceMail.conf file, I get the following error:
>
> SvxLink v0.6.0 (Oct 13 2005) starting up...
> Using config file: /etc/svxlink.conf
>
> Starting logic: SimplexLogic
> Loading module "ModuleHelp" into logic "SimplexLogic"
>          Module Help v0.6.0 starting...
> Loading module "ModuleParrot" into logic "SimplexLogic"
>          Module Parrot v0.6.0 starting...
> Loading module "ModuleTclVoiceMail" into logic "SimplexLogic"
>          Module Tcl v0.2.0 starting...
> Event handler script successfully loaded.
> digit=3
> digit=#
> Activating module TclVoiceMail...
> Tx1: Turning the transmitter ON
> Tx1: Turning the transmitter OFF
> digit=0
> digit=0
> digit=1
> digit=1
> digit=2
> digit=3
> digit=#
> TclVoiceMail: User SM0AAA logged in with password 123
> Tx1: Turning the transmitter ON
> Tx1: Turning the transmitter OFF
> digit=2
> digit=#
> Tx1: Turning the transmitter ON
> Tx1: Turning the transmitter OFF
> digit=0
> digit=0
> digit=2
> digit=#
> TclVoiceMail: Sending voice mail to SM0BBB
> Tx1: Turning the transmitter ON
> Tx1: Turning the transmitter OFF
> Rx1: The squelch is OPEN
> TclVoiceMail: Recording subject to file:
> /var/spool/voice_mail/SM0BBB/20051014_105828_001.subj
> Segmentation fault
>
> The module works fine until I am asked to enter a subject.  As soon as
> the squelch breaks, it crashes.  I am not all that well versed with Tcl,
> but it appears that it dies when calling recordStart.

Could you give me a stack trace of that since I can't reproduce it here?
Just start it under "gdb":

        gdb /path/to/svxlink

At the gdb prompt type "run" and then make it crash using the sequence
above. Then type "bt" and you will hopefully get a nice stack trace.

73 de SM0SVX / Tobias

>
> Not that it will help much, but here is the same problem as run through
> strace:
>
> gettimeofday({1129305729, 420335}, NULL) = 0
> select(6, [0 4 5], [], NULL, {50, 594459}) = 1 (in [4], left {50, 532000})
> ioctl(4, SNDCTL_DSP_GETISPACE, 0xbffff020) = 0
> read(4, "!\2\322\1M\1\327\0\202\0\20\0\272\377\225\377\363\377\t"...,
> 1024) = 1024
> write(1, "Rx1: The squelch is OPEN\n", 25Rx1: The squelch is OPEN) = 25
> write(1, "TclVoiceMail: Recording subject "..., 96TclVoiceMail:
> Recording subject to file:
> /var/spool/voice_mail/SM0BBB/20051014_110155_001.subj) = 96
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
>
> I have no idea how to debug such a problem!  I am pretty certain that
> the hardware is okay, as the problem is the same on two different PCs
> and all other functions are fully operational.  For the record, both PCs
> are running Slackware 10.1/10.2, and the latest version of SvxLink,
> complied from the source with gcc 3.3.4/3.3.6.
>
> Any help will be most appreciated!
>
> 73 de Tim
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Segmentation fault when recoding in TclVoiceMail

Tim Miller WB0RXX
In reply to this post by Tim Miller WB0RXX
Hello Tobias,

I would like to thank you for your super fast reply!  I truly appreciate
all of your effort.

I am not too sure how to follow up on a thread as I have never used a
mailing list before.  I apologize to you and the group in advance if
this starts a new message thread.

> Could you give me a stack trace of that since I can't reproduce it here?
>  Just start it under "gdb":
>  
>   gdb /path/to/svxlink
>  
>  At the gdb prompt type "run" and then make it crash using the sequence
>  above. Then type "bt" and you will hopefully get a nice stack trace.
>  
>  73 de SM0SVX / Tobias

Here is the gdb dump from my on-line Slackware 10.1 system:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 12251)]
0x0807a7a0 in Logic::recordStop (this=0x80a7058) at Logic.cpp:425
425       delete recorder;
(gdb) bt
#0  0x0807a7a0 in Logic::recordStop (this=0x80a7058) at Logic.cpp:425
#1  0x0807a61e in Logic::recordStart (this=0x80a7058, filename=@0xbfffe500)
     at Logic.cpp:410
#2  0x080819d9 in SigC::ObjectSlot1_<void, std::string const&,
Logic>::callback (
     d=0x80b8834, p1=@0xbfffe500) at object_slot.h:153
#3  0x0808b078 in SigC::Callback1<void, std::string const&>::call
(this=0x80b8834,
     p1=@0xbfffe500) at slot.h:358
#4  0x0808ae2f in SigC::Signal1<void, std::string const&,
SigC::Marshal<void>::emit (
     this=0x80b16c0, p1=@0xbfffe500) at basic_signal.h:333
#5  0x0808acdf in SigC::Signal1<void, std::string const&,
SigC::Marshal<void>::operator() (this=0x80b16c0, p1=@0xbfffe500) at
basic_signal.h:311
#6  0x0808a923 in EventHandler::recordHandler (cdata=0x80b16b0,
irp=0x80b1d98, argc=2,
     argv=0xbfffe550) at EventHandler.cpp:303
#7  0xb7f41c93 in TclInvokeStringCommand () from /usr/lib/libtcl.so
#8  0xb7f42d97 in TclEvalObjvInternal () from /usr/lib/libtcl.so
#9  0xb7f66f2b in TclCompEvalObj () from /usr/lib/libtcl.so
#10 0xb7f665e3 in TclCompEvalObj () from /usr/lib/libtcl.so
#11 0xb7f95310 in TclObjInterpProc () from /usr/lib/libtcl.so
#12 0xb7f42d97 in TclEvalObjvInternal () from /usr/lib/libtcl.so
#13 0xb7f4371e in Tcl_EvalEx () from /usr/lib/libtcl.so
#14 0xb7f43b1b in Tcl_Eval () from /usr/lib/libtcl.so
#15 0x0808a585 in EventHandler::processEvent (this=0x80b16b0,
event=@0xbfffee90)
     at EventHandler.cpp:180
#16 0x0807a43b in Logic::processEvent (this=0x80a7058, event=@0xbfffef10,
     module=0x80beb88) at Logic.cpp:372
#17 0x08073f2c in Module::processEvent (this=0x80beb88, event=@0xbfffef10)
     at Module.cpp:131
#18 0xb7acd682 in ModuleTcl::squelchOpen (this=0x80beb88, is_open=true)
     at ModuleTcl.cpp:285
#19 0x08074d63 in SigC::ObjectSlot1_<void, bool, Module>::callback
(d=0x80d5a2c, p1=true)
     at object_slot.h:153
#20 0x0806b968 in SigC::Callback1<void, bool>::call (this=0x80d5a2c,
p1=@0xbffff123)
     at slot.h:358
#21 0x08069fbf in SigC::Signal1<void, bool, SigC::Marshal<void>::emit
(this=0x80a72cc,
     p1=@0xbffff123) at basic_signal.h:333
#22 0x08068351 in SigC::Signal1<void, bool,
SigC::Marshal<void>::operator() (
     this=0x80a72cc, p1=@0xbffff123) at basic_signal.h:311
#23 0x0809025b in Rx::setSquelchState (this=0x80a72c8, is_open=true) at
Rx.cpp:176
#24 0x0806796d in LocalRx::audioRead (this=0x80a72c8, samples=0x80abf28,
count=512)
     at LocalRx.cpp:333
#25 0x080691d4 in SigC::ObjectSlot2_<int, short*, int,
LocalRx>::callback (d=0x80ab504,
     p1=0x80abf28, p2=512) at object_slot.h:250
#26 0x080694e3 in SigC::Callback2<int, short*, int>::call (this=0x80ab504,
     p1=@0xbffff264, p2=@0xbffff268) at slot.h:456
#27 0x080693a2 in SigC::Signal2<int, short*, int, SigC::Marshal<int>::emit (
     this=0x80a74dc, p1=@0xbffff264, p2=@0xbffff268) at basic_signal.h:409
#28 0x0808fa89 in SigC::Signal2<int, short*, int,
SigC::Marshal<int>::callback (
     d=0x80c93e4, p1=0x80abf28, p2=512) at basic_signal.h:366
#29 0x080694e3 in SigC::Callback2<int, short*, int>::call (this=0x80c93e4,
     p1=@0xbffff330, p2=@0xbffff334) at slot.h:456
#30 0x080693a2 in SigC::Signal2<int, short*, int, SigC::Marshal<int>::emit (
     this=0x80ab48c, p1=@0xbffff330, p2=@0xbffff334) at basic_signal.h:409
#31 0x0806810e in SigC::Signal2<int, short*, int,
SigC::Marshal<int>::operator() (
     this=0x80ab48c, p1=@0xbffff330, p2=@0xbffff334) at basic_signal.h:386
#32 0xb7d112c6 in Async::AudioDevice::audioReadHandler (this=0x80ab488,
watch=0x80c1100)
     at AsyncAudioDevice.cpp:493
#33 0xb7d12b05 in SigC::ObjectSlot1_<void, Async::FdWatch*,
Async::AudioDevice>::callback
     (d=0x81506e4, p1=0x80c1100) at object_slot.h:153
#34 0xb7fdf70c in SigC::Callback1<void, Async::FdWatch*>::call
(this=0x81506e4,
     p1=@0x80a67ec) at slot.h:358
#35 0xb7fde86b in SigC::Signal1<void, Async::FdWatch*,
SigC::Marshal<void>::emit (
     this=0x80c1104, p1=@0x80a67ec) at basic_signal.h:333
#36 0xb7fdd21f in SigC::Signal1<void, Async::FdWatch*,
SigC::Marshal<void>::operator()
     (this=0x80c1104, p1=@0x80a67ec) at basic_signal.h:311
#37 0xb7fdc6de in Async::CppApplication::exec (this=0xbffff710)
     at AsyncCppApplication.cpp:218
#38 0x08064db5 in main (argc=1, argv=0xbffff8d4) at svxlink.cpp:261
(gdb)

Thanks again Tobias for all of your help.

73 de Tim

--
Tim Miller WB0RXX [EN24dw]
SvxLink v0.6.0 (Oct 13 2005)
Slackware 10.1/P200 MHz/64 MB


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: Segmentation fault when recoding in TclVoiceMail

Tobias Blomberg-3
On Sat, 2005-10-15 at 09:50 -0500, Tim Miller WB0RXX wrote:
> Hello Tobias,
>
> I would like to thank you for your super fast reply!  I truly appreciate
> all of your effort.
>
> I am not too sure how to follow up on a thread as I have never used a
> mailing list before.  I apologize to you and the group in advance if
> this starts a new message thread.

Yes, I think you started a new thread. Not a problem for me since I
don't use a threaded view in my mailer. It might bother other people
though.


>
> > Could you give me a stack trace of that since I can't reproduce it here?
> >  Just start it under "gdb":
> >  
> >   gdb /path/to/svxlink
> >  
> >  At the gdb prompt type "run" and then make it crash using the sequence
> >  above. Then type "bt" and you will hopefully get a nice stack trace.
> >  
> >  73 de SM0SVX / Tobias
>
> Here is the gdb dump from my on-line Slackware 10.1 system:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 12251)]
> 0x0807a7a0 in Logic::recordStop (this=0x80a7058) at Logic.cpp:425
> 425       delete recorder;
> (gdb) bt
> #0  0x0807a7a0 in Logic::recordStop (this=0x80a7058) at Logic.cpp:425
> #1  0x0807a61e in Logic::recordStart (this=0x80a7058, filename=@0xbfffe500)
>      at Logic.cpp:410
> #2  0x080819d9 in SigC::ObjectSlot1_<void, std::string const&,
> Logic>::callback (
>      d=0x80b8834, p1=@0xbfffe500) at object_slot.h:153
> #3  0x0808b078 in SigC::Callback1<void, std::string const&>::call
> (this=0x80b8834,
>      p1=@0xbfffe500) at slot.h:358
> #4  0x0808ae2f in SigC::Signal1<void, std::string const&,
> SigC::Marshal<void>::emit (
>      this=0x80b16c0, p1=@0xbfffe500) at basic_signal.h:333
> #5  0x0808acdf in SigC::Signal1<void, std::string const&,
> SigC::Marshal<void>::operator() (this=0x80b16c0, p1=@0xbfffe500) at
> basic_signal.h:311
> #6  0x0808a923 in EventHandler::recordHandler (cdata=0x80b16b0,
> irp=0x80b1d98, argc=2,
>      argv=0xbfffe550) at EventHandler.cpp:303
> #7  0xb7f41c93 in TclInvokeStringCommand () from /usr/lib/libtcl.so
> #8  0xb7f42d97 in TclEvalObjvInternal () from /usr/lib/libtcl.so
> #9  0xb7f66f2b in TclCompEvalObj () from /usr/lib/libtcl.so
> #10 0xb7f665e3 in TclCompEvalObj () from /usr/lib/libtcl.so
> #11 0xb7f95310 in TclObjInterpProc () from /usr/lib/libtcl.so
> #12 0xb7f42d97 in TclEvalObjvInternal () from /usr/lib/libtcl.so
> #13 0xb7f4371e in Tcl_EvalEx () from /usr/lib/libtcl.so
> #14 0xb7f43b1b in Tcl_Eval () from /usr/lib/libtcl.so
> #15 0x0808a585 in EventHandler::processEvent (this=0x80b16b0,
> event=@0xbfffee90)
>      at EventHandler.cpp:180
> #16 0x0807a43b in Logic::processEvent (this=0x80a7058, event=@0xbfffef10,
>      module=0x80beb88) at Logic.cpp:372
> #17 0x08073f2c in Module::processEvent (this=0x80beb88, event=@0xbfffef10)
>      at Module.cpp:131
> #18 0xb7acd682 in ModuleTcl::squelchOpen (this=0x80beb88, is_open=true)
>      at ModuleTcl.cpp:285
> #19 0x08074d63 in SigC::ObjectSlot1_<void, bool, Module>::callback
> (d=0x80d5a2c, p1=true)
>      at object_slot.h:153
> #20 0x0806b968 in SigC::Callback1<void, bool>::call (this=0x80d5a2c,
> p1=@0xbffff123)
>      at slot.h:358
> #21 0x08069fbf in SigC::Signal1<void, bool, SigC::Marshal<void>::emit
> (this=0x80a72cc,
>      p1=@0xbffff123) at basic_signal.h:333
> #22 0x08068351 in SigC::Signal1<void, bool,
> SigC::Marshal<void>::operator() (
>      this=0x80a72cc, p1=@0xbffff123) at basic_signal.h:311
> #23 0x0809025b in Rx::setSquelchState (this=0x80a72c8, is_open=true) at
> Rx.cpp:176
> #24 0x0806796d in LocalRx::audioRead (this=0x80a72c8, samples=0x80abf28,
> count=512)
>      at LocalRx.cpp:333
> #25 0x080691d4 in SigC::ObjectSlot2_<int, short*, int,
> LocalRx>::callback (d=0x80ab504,
>      p1=0x80abf28, p2=512) at object_slot.h:250
> #26 0x080694e3 in SigC::Callback2<int, short*, int>::call (this=0x80ab504,
>      p1=@0xbffff264, p2=@0xbffff268) at slot.h:456
> #27 0x080693a2 in SigC::Signal2<int, short*, int, SigC::Marshal<int>::emit (
>      this=0x80a74dc, p1=@0xbffff264, p2=@0xbffff268) at basic_signal.h:409
> #28 0x0808fa89 in SigC::Signal2<int, short*, int,
> SigC::Marshal<int>::callback (
>      d=0x80c93e4, p1=0x80abf28, p2=512) at basic_signal.h:366
> #29 0x080694e3 in SigC::Callback2<int, short*, int>::call (this=0x80c93e4,
>      p1=@0xbffff330, p2=@0xbffff334) at slot.h:456
> #30 0x080693a2 in SigC::Signal2<int, short*, int, SigC::Marshal<int>::emit (
>      this=0x80ab48c, p1=@0xbffff330, p2=@0xbffff334) at basic_signal.h:409
> #31 0x0806810e in SigC::Signal2<int, short*, int,
> SigC::Marshal<int>::operator() (
>      this=0x80ab48c, p1=@0xbffff330, p2=@0xbffff334) at basic_signal.h:386
> #32 0xb7d112c6 in Async::AudioDevice::audioReadHandler (this=0x80ab488,
> watch=0x80c1100)
>      at AsyncAudioDevice.cpp:493
> #33 0xb7d12b05 in SigC::ObjectSlot1_<void, Async::FdWatch*,
> Async::AudioDevice>::callback
>      (d=0x81506e4, p1=0x80c1100) at object_slot.h:153
> #34 0xb7fdf70c in SigC::Callback1<void, Async::FdWatch*>::call
> (this=0x81506e4,
>      p1=@0x80a67ec) at slot.h:358
> #35 0xb7fde86b in SigC::Signal1<void, Async::FdWatch*,
> SigC::Marshal<void>::emit (
>      this=0x80c1104, p1=@0x80a67ec) at basic_signal.h:333
> #36 0xb7fdd21f in SigC::Signal1<void, Async::FdWatch*,
> SigC::Marshal<void>::operator()
>      (this=0x80c1104, p1=@0x80a67ec) at basic_signal.h:311
> #37 0xb7fdc6de in Async::CppApplication::exec (this=0xbffff710)
>      at AsyncCppApplication.cpp:218
> #38 0x08064db5 in main (argc=1, argv=0xbffff8d4) at svxlink.cpp:261
> (gdb)
>
> Thanks again Tobias for all of your help.

A perfect stack trace that show what the problem is: an uninitialized
variable. It is now fixed in CVS. You can also go to the download area:

http://sourceforge.net/project/showfiles.php?
group_id=84813&package_id=114319&release_id=362318

and download svxlink-051009-pl2.patch and patch your existing source
tree. Go to the root of the svxlink source tree and type:

patch -p1 < /path/to/svxlink-051009-pl2.patch

Compile it and try it.

73 de SM0SVX / Tobias


>
> 73 de Tim
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Loading...