segfault in tests
Ben Abbott
bpabbott at mac.com
Fri Feb 20 08:49:30 CST 2009
On Feb 20, 2009, at 1:08 AM, Jaroslav Hajek wrote:
> On Fri, Feb 20, 2009 at 3:06 AM, Ben Abbott <bpabbott at mac.com> wrote:
>>
>> On Feb 19, 2009, at 1:04 PM, John W. Eaton wrote:
>>
>>> On 19-Feb-2009, Jaroslav Hajek wrote:
>>>
>>> | On Thu, Feb 19, 2009 at 6:49 PM, John W. Eaton <jwe at octave.org>
>>> wrote:
>>> | > After updating today, I see this crash when running tests:
>>> | >
>>> | > scripts/general/accumarray.m ...........................panic:
>>> Segmentation fault -- stopping myself...
>>> | > make[2]: *** [check] Segmentation fault
>>> | > make[2]: Leaving directory `/scratch/jwe/build/octave/test'
>>> | > make[1]: *** [check] Error 2
>>> | > make[1]: Leaving directory `/scratch/jwe/build/octave'
>>> | > make: *** [check] Error 2
>>> | >
>>> | > Does this happen for anyone else, or is it just me?
>>> | >
>>> | > jwe
>>> | >
>>> |
>>> | Hmm,
>>> | I now see it too. Strangely enough, running just "test sortrows"
>>> seems
>>> | to run fine. I'll try to investigate what is wrong.
>>>
>>> I just did
>>>
>>> ./run-octave -g
>>>
>>> and "test accumarray" and it crashes here:
>>>
>>> (gdb) where
>>> #0 0x00007f3e1aeaeed5 in raise () from /lib/libc.so.6
>>> #1 0x00007f3e1aeb03f3 in abort () from /lib/libc.so.6
>>> #2 0x00007f3e1aeeb3a8 in ?? () from /lib/libc.so.6
>>> #3 0x00007f3e1aef0948 in ?? () from /lib/libc.so.6
>>> #4 0x00007f3e1aef2a56 in free () from /lib/libc.so.6
>>> #5 0x00007f3e21701422 in ~ArrayRep (this=0x11bc7d0) at
>>> /home/jwe/src/octave/liboctave/Array.h:86
>>> #6 0x00007f3e217014fd in ~Array (this=0x7fff2a513be0) at
>>> /home/jwe/src/octave/liboctave/Array.cc:84
>>> #7 0x00007f3e21466b7f in F__sort_rows_idx__ (args=@0x11c1f40) at
>>> /home/jwe/src/octave/src/data.cc:5672
>>> #8 0x00007f3e218d3a7a in octave_builtin::do_multi_index_op
>>> (this=0x9253b8, nargout=1, args=@0x11c1f40)
>>> at /home/jwe/src/octave/src/ov-builtin.cc:107
>>> #9 0x00007f3e218d3d56 in octave_builtin::subsref (this=0x9253b8,
>>> type=@0x7fff2a514400, idx=@0x7fff2a5141f0,
>>> nargout=1) at /home/jwe/src/octave/src/ov-builtin.cc:55
>>>
>>> But test sortrows succeeds. I guess the sortrow tests don't include
>>> the same kind of call that accumarray is doing.
>>>
>>> jwe
>>
>> I also encountered the seg-fault during "make check".
>>
>> Running from the command line, I first get a failure (no seg-
>> fault). Running
>> a second time produces the seg-fault.
>>
>> Perhaps there is some hint as to what is wrong in the failure?
>>
>> octave:1> test accumarray
>> ***** assert (accumarray
>> ([1,1;2,1;2,3;2,1;2,3],101:105,[2,4], at max,NaN),[101,NaN,NaN,NaN;
>> 104,NaN,105,NaN])
>> !!!!! test failed
>> assert (accumarray ([1, 1; 2, 1; 2, 3; 2, 1; 2, 3], 101:105, [2,
>> 4], @max,
>> NaN),[101, NaN, NaN, NaN; 104, NaN, 105, NaN]) expected
>> 101 NaN NaN NaN
>> 104 NaN 105 NaN
>> but got
>> 101 NaN NaN NaN
>> 104 NaN NaN NaN
>> NaNs don't matchoctave:2> test accumarray
>> panic: Segmentation fault -- stopping myself...
>> /usr/local/bin/octave-3.1.51+: line 2: 56349 Segmentation fault
>> /Users/bpabbott/Development/mercurial/octave-3.1.51/run-octave
>>
>> Ben
>
> As it happens,
> in the morning the problem was suddenly crystally clear. Fixing things
> up yesterday, I broke something else :(
> I checked in a fix and slightly simplified and ooized the design.
>
> http://hg.savannah.gnu.org/hgweb/octave/rev/89b95972e178
>
> cheers
I just pulled and built. No seg-fault for me!
Ben
More information about the Octave-maintainers
mailing list