Seg Fault

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Seg Fault

Thomas D. Dean-2
 > /usr/local/bin/octave
GNU Octave, version 6.2.1
Copyright (C) 2021 The Octave Project Developers.
<snip>
octave:1> ver
----------------------------------------------------------------------
GNU Octave Version: 6.2.1 (hg id: 69b6b783a8ab)
GNU Octave License: GNU General Public License
Operating System: Linux 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr
12 21:46:35 UTC 2021 x86_64
----------------------------------------------------------------------
Package Name        | Version | Installation directory
--------------------+---------+-----------------------
            control  |   3.2.0 | /home/tomdean/octave/control-3.2.0
     data-smoothing  |   1.3.0 | /home/tomdean/octave/data-smoothing-1.3.0
          financial  |   0.5.3 | /home/tomdean/octave/financial-0.5.3
           geometry  |   4.0.0 | /home/tomdean/octave/geometry-4.0.0
  image-acquisition  |   0.2.2 |
/home/tomdean/octave/image-acquisition-0.2.2
instrument-control  |   0.7.0 |
/home/tomdean/octave/instrument-control-0.7.0
                 io  |   2.6.3 | /home/tomdean/octave/io-2.6.3
     linear-algebra  |   2.2.3 | /home/tomdean/octave/linear-algebra-2.2.3
            mapping  |   1.4.1 | /home/tomdean/octave/mapping-1.4.1
            matgeom  |   1.2.2 | /home/tomdean/octave/matgeom-1.2.2
                ocs  |   0.1.5 | /home/tomdean/octave/ocs-0.1.5
             odebvp  |   1.0.6 | /home/tomdean/octave/odebvp-1.0.6
             odepkg  |   0.9.1 | /home/tomdean/octave/odepkg-0.9.1
              optim  |   1.6.1 | /home/tomdean/octave/optim-1.6.1
             signal  |   1.4.1 | /home/tomdean/octave/signal-1.4.1
            sockets  |   1.2.1 | /home/tomdean/octave/sockets-1.2.1
            specfun  |   1.1.0 | /home/tomdean/octave/specfun-1.1.0
         statistics  |   1.4.2 | /home/tomdean/octave/statistics-1.4.2
             struct  |  1.0.17 | /home/tomdean/octave/struct-1.0.17
           symbolic  |   2.9.0 | /home/tomdean/octave/symbolic-2.9.0
            tomdean  |   1.0.0 | /home/tomdean/octave/tomdean-1.0.0
octave:2> pkg load control
octave:3> s=tf('s')
fatal: caught signal Segmentation fault -- stopping myself...
Segmentation fault (core dumped)

Tom Dean


Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

Thomas D. Dean-2
Uninstall and install -forge may provide removed the seg fault, but,
shows another problem.

I will post under a proper subject.

Tom Dean


Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

mmuetzel
Am 14. Mai 2021 um 23:45 Uhr schrieb "Thomas D. Dean":
> Uninstall and install -forge may provide removed the seg fault, but,
> shows another problem.
>
> I will post under a proper subject.

Did you recently update to a newer Octave version?
In that case, it's necessary to re-compile the binaries that are part of any installed package. That might explain why it is no longer crashing after "pkg uninstall" and "pkg install -forge".

Markus




Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

Octave - General mailing list
On Sat, 2021-05-15 at 11:11 +0200, Markus Mützel wrote:

> Am 14. Mai 2021 um 23:45 Uhr schrieb "Thomas D. Dean":
> > Uninstall and install -forge may provide removed the seg fault, but,
> > shows another problem.
> >
> > I will post under a proper subject.
>
> Did you recently update to a newer Octave version?
> In that case, it's necessary to re-compile the binaries that are part
> of any installed package. That might explain why it is no longer
> crashing after "pkg uninstall" and "pkg install -forge".
>
> Markus


Exactly. I had the same problem with 6.2.1. I had to install it and
afterwards reinstall the control package for making it work again.

Thomas, what the other, new problem that you were mentioning in your
last mail?

Torsten



Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

Thomas D. Dean-2
On 5/15/21 2:25 AM, Torsten Lilge wrote:
> Thomas, what the other, new problem that you were mentioning in your
> last mail?
>
> Torsten
>

I was seeing the Fortran warnings about array index out-of-bounds in
MA02ID.f.

This was reported upstream earlier and noted as not possible because of
the loop not being executed if the limit was 1.  Bug #56171

Tom Dean


Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

Mike Miller-4
In reply to this post by mmuetzel
Markus Mützel:
> Did you recently update to a newer Octave version?
> In that case, it's necessary to re-compile the binaries that are part of any installed package. That might explain why it is no longer crashing after "pkg uninstall" and "pkg install -forge".

That seems like a problem for a stable bug fix update. It's usually
expected that oct files compiled for Octave version 6.1 will still
work with version 6.x without recompiling.

--
mike


Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

mmuetzel
Am 15. Mai 2021 um 19:20 Uhr schrieb "Mike Miller":
> Markus Mützel:
> > Did you recently update to a newer Octave version?
> > In that case, it's necessary to re-compile the binaries that are part of any installed package. That might explain why it is no longer crashing after "pkg uninstall" and "pkg install -forge".
>
> That seems like a problem for a stable bug fix update. It's usually
> expected that oct files compiled for Octave version 6.1 will still
> work with version 6.x without recompiling.

I agree.
It's not clear to me which version the OP updated from (or if they updated at all). I was assuming they updated from a version prior to Octave 6.x.
Binaries compiled with an older major version of Octave are probably not expected to work in a newer (major) version (and vice versa). Is a segfault the expected behavior though?

IIRC, starting with Octave 7, package binaries will be installed in paths that depend on the major version number by default. So that error might be somewhat mitigated in the future.

Markus





Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

Thomas D. Dean-2
On 5/15/21 10:33 AM, Markus Mützel wrote:

> Am 15. Mai 2021 um 19:20 Uhr schrieb "Mike Miller":
>> Markus Mützel:
>>> Did you recently update to a newer Octave version?
>>> In that case, it's necessary to re-compile the binaries that are part of any installed package. That might explain why it is no longer crashing after "pkg uninstall" and "pkg install -forge".
>>
>> That seems like a problem for a stable bug fix update. It's usually
>> expected that oct files compiled for Octave version 6.1 will still
>> work with version 6.x without recompiling.
>
> I agree > It's not clear to me which version the OP updated from (or if they
updated at all). I was assuming they updated from a version prior to
Octave 6.x.

I just did a new install of Ubuntu 20.04 after replacing a disk.  I
cloned the repository on May 5.  The octave directory was restored from
backup along with /home.  This is where the mismatch happened.

> Binaries compiled with an older major version of Octave are probably not expected to work in a newer (major) version (and vice versa). Is a segfault the expected behavior though?
>
> IIRC, starting with Octave 7, package binaries will be installed in paths that depend on the major version number by default. So that error might be somewhat mitigated in the future.
>
> Markus
>
>
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

sshah
In reply to this post by Mike Miller-4
On homebrew (3.1.7) installed octave 6.2.x, I need to recompile packages
after every minor (6.2.0_2 to 6.2.0_3) update. I am running both Rosetta2
and arm64 versions of octave on my M1 machine under Big Sur 11.3.1.   Once
recompiled, the respective versions run fine.

Is this behavior expected?



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Seg Fault

apjanke-floss


On 5/15/21 7:04 PM, sshah wrote:
> On homebrew (3.1.7) installed octave 6.2.x, I need to recompile packages
> after every minor (6.2.0_2 to 6.2.0_3) update. I am running both Rosetta2
> and arm64 versions of octave on my M1 machine under Big Sur 11.3.1.   Once
> recompiled, the respective versions run fine.
>
> Is this behavior expected?
>

Maybe: Compiled Octave packages have linkage that depends on the exact
path to the Octave installation they were compiled against. Homebrewed
packages like Octave are available at two paths:
 * /usr/local/Cellar/<package>/<exactversion>
 * /usr/local/opt/<package>

So that would be:
 * /usr/local/Cellar/octave/6.2.0_2
 * /usr/local/opt/octave

If the compilation happened against /usr/local/Cellar/octave/6.2.0_2,
then yes, it would require a recompile of all packages on any version
update, including minor or build revisions.

I'm not sure how the path discovery for mkoctfile under Homebrewed
Octave is working these days.

Can you give us an example of a package you needed to recompile? I can
install it under my brewed Octave and try to reproduce.

Also, you can use the otool command to dump out the linkages for your
compiled oct-files and see what paths are baked in there. If the
/usr/local/Cellar/octave/<version> path is in there, that means they're
compiled in a way that will require a recompile on any version change.

Cheers,
Andrew