Re: Bug#490588: octave-ftp: octave segfaults on clear all command

View: New views
7 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Bug#490588: octave-ftp: octave segfaults on clear all command

by Rafael Laboissiere :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

package octave-ftp
tags 490588 confirmed upstream
thanks

The following bug report has been filed against the octave-ftp package in
Debian (also in http://bugs.debian.org/490588):

* Juergen Rinas <jrinas@...> [2008-07-13 00:09]:

> Package: octave-ftp
> Version: 1.0-1
> Severity: normal
>
>
> when
>   octave-ftp 1.0-1
> package is installed,
>   octave3.0 1:3.0.1-4
> segfaults, when the command
>   "clear all"
> is entered within octave.
>
>
> octave:1> clear all
> panic: Segmentation fault -- stopping myself...
> attempting to save variables to `octave-core'...
> save to `octave-core' complete
>
>
> deinstallation of the octave-ftp package fixes this problem...

I confirm the problem and I think that it is related to the SWIG wrapping.
Package octave-ann suffers from the same problem.  The octave-ftp is
autoloaded in Debian and after running ftpobj from PKG_ADD at Octave
startup, the following variables appear in the worspace (this is an excerpt
of the output of "whos"):

*** dynamically linked functions:

  Prot Name              Size                     Bytes  Class
  ==== ====              ====                     =====  =====
   [snip]
   rwd ftpobj           -1x-1                         0  dynamically-linked function

*** globally visible user variables:

  Prot Name                  Size                     Bytes  Class
  ==== ====                  ====                     =====  =====
   rwd __SWIG_MODULE__4      1x1                          8  uint64
   rwd cvar                 -1x-1                         0  swig_ref
   rwd ftp                  -1x-1                         0  swig_ref
   rwd ftpobj               -1x-1                         0  swig_ref
   
It is curious that ftpobj appears twice, both as a dynamically linked
function and as a user variable.  By the way, the following commands also
cause a segmentation fault:

octave:1> clear ftpobj; clear ftpobj; whos

[Please, respect the Mail-Followup-To header when replying to this message.]
   
--
Rafael

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: Bug#490588: octave-ftp: octave segfaults on clear all command

by Rafael Laboissiere :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Rafael Laboissiere <rafael@...> [2008-07-13 09:15]:

> It is curious that ftpobj appears twice, both as a dynamically linked
> function and as a user variable.  By the way, the following commands also
> cause a segmentation fault:
>
> octave:1> clear ftpobj; clear ftpobj; whos

Some further information on this bug: I ran the above through gdb (with the
octave3.0-dbg pacakge installed) and got the following:

(sid) $ gdb -q octave
(no debugging symbols found)
(gdb) run -q
Starting program: /usr/bin/octave -q
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0x2b4a792d4700 (LWP 7664)]
octave:1> clear ftpobj ; clear ftpobj ; whos

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b4a792d4700 (LWP 7664)]
0x00002b4a73c1afea in symbol_table::parse_whos_line_format (this=<value
optimized out>, symbols=@0x7fff3747a200) at ov.h:785
785       std::string type_name (void) const { return rep->type_name (); }
Current language:  auto; currently c++

 
--
Rafael

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: Bug#490588: octave-ftp: octave segfaults on clear all command

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is a known problem. See the following thread
http://www.nabble.com/%22clear-all%22-problem-for-classes-defined-in-oct-files-%28Was%3A-%3A-bug%29-%28Concerns%3A-SWIG%29-td17473917.html#a17473917

Michael.


On Sun, Jul 13, 2008 at 10:13 AM, Rafael Laboissiere <rafael@...> wrote:

> * Rafael Laboissiere <rafael@...> [2008-07-13 09:15]:
>
>> It is curious that ftpobj appears twice, both as a dynamically linked
>> function and as a user variable.  By the way, the following commands also
>> cause a segmentation fault:
>>
>> octave:1> clear ftpobj; clear ftpobj; whos
>
> Some further information on this bug: I ran the above through gdb (with the
> octave3.0-dbg pacakge installed) and got the following:
>
> (sid) $ gdb -q octave
> (no debugging symbols found)
> (gdb) run -q
> Starting program: /usr/bin/octave -q
> (no debugging symbols found)
> (no debugging symbols found)
> [Thread debugging using libthread_db enabled]
> [New Thread 0x2b4a792d4700 (LWP 7664)]
> octave:1> clear ftpobj ; clear ftpobj ; whos
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x2b4a792d4700 (LWP 7664)]
> 0x00002b4a73c1afea in symbol_table::parse_whos_line_format (this=<value
> optimized out>, symbols=@0x7fff3747a200) at ov.h:785
> 785       std::string type_name (void) const { return rep->type_name (); }
> Current language:  auto; currently c++
>
>
> --
> Rafael
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Octave-dev mailing list
> Octave-dev@...
> https://lists.sourceforge.net/lists/listinfo/octave-dev
>

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: Bug#490588: octave-ftp: octave segfaults on clear all command

by Rafael Laboissiere :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Michael Goffioul <michael.goffioul@...> [2008-07-13 10:41]:

> This is a known problem. See the following thread
> http://www.nabble.com/%22clear-all%22-problem-for-classes-defined-in-oct-files-%28Was%3A-%3A-bug%29-%28Concerns%3A-SWIG%29-td17473917.html#a17473917

Thanks for the pointer.

Is this a problem in Octave or a problem in the SWIG wrapper? (I would need
this information in order to reassign the bug to another Debian package).

--
Rafael

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: Bug#490588: octave-ftp: octave segfaults on clear all command

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 13, 2008 at 12:30 PM, Rafael Laboissiere <rafael@...> wrote:
> * Michael Goffioul <michael.goffioul@...> [2008-07-13 10:41]:
>
>> This is a known problem. See the following thread
>> http://www.nabble.com/%22clear-all%22-problem-for-classes-defined-in-oct-files-%28Was%3A-%3A-bug%29-%28Concerns%3A-SWIG%29-td17473917.html#a17473917
>
> Thanks for the pointer.
>
> Is this a problem in Octave or a problem in the SWIG wrapper? (I would need
> this information in order to reassign the bug to another Debian package).

I think that a fix should go in the SWIG wrapper rather in octave.

Michael.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: Bug#490588: octave-ftp: octave segfaults on clear all command

by Rafael Laboissiere :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Michael Goffioul <michael.goffioul@...> [2008-07-13 16:02]:

> On Sun, Jul 13, 2008 at 12:30 PM, Rafael Laboissiere <rafael@...> wrote:
> > * Michael Goffioul <michael.goffioul@...> [2008-07-13 10:41]:
> >
> >> This is a known problem. See the following thread
> >> http://www.nabble.com/%22clear-all%22-problem-for-classes-defined-in-oct-files-%28Was%3A-%3A-bug%29-%28Concerns%3A-SWIG%29-td17473917.html#a17473917
>
> > Is this a problem in Octave or a problem in the SWIG wrapper? (I would need
> > this information in order to reassign the bug to another Debian package).
>
> I think that a fix should go in the SWIG wrapper rather in octave.

This means that we should reassign the bug report from octave-ftp to the
swig package.  Do you agree?  If yes, could you make a short suggestion on
what should be changed in SWIG to fix the bug?  I will then forward this to
the swig maintainer.

Thanks,

--
Rafael

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev

Re: Bug#490588: octave-ftp: octave segfaults on clear all command

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 13, 2008 at 7:03 PM, Rafael Laboissiere <rafael@...> wrote:
> This means that we should reassign the bug report from octave-ftp to the
> swig package.  Do you agree?  If yes, could you make a short suggestion on
> what should be changed in SWIG to fix the bug?  I will then forward this to
> the swig maintainer.

The thread I referred already explains what the problem is. In summary,
an oct-file that defines a new octave object class (octave_base_value
inherited) should also make sure not to be unloaded before all objects
of that class have been deleted. It should somehow lock itself to avoid
unloading.

Michael.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Octave-dev mailing list
Octave-dev@...
https://lists.sourceforge.net/lists/listinfo/octave-dev
LightInTheBox - Buy quality products at wholesale price