[GRASS-dev] [GRASS GIS] #2024: r.li.setup generates incomplete r.li conf file
GRASS GIS
trac at osgeo.org
Fri Feb 7 11:07:50 PST 2014
#2024: r.li.setup generates incomplete r.li conf file
------------------------+---------------------------------------------------
Reporter: matmar | Owner: rashadkm
Type: defect | Status: assigned
Priority: normal | Milestone: 6.4.4
Component: Raster | Version: svn-releasebranch64
Keywords: r.li.setup | Platform: Linux
Cpu: x86-64 |
------------------------+---------------------------------------------------
Comment(by rashadkm):
I am not able to reproduce this bug
{{{
export WORKERS=1
r.li.edgedensity map=geology conf=cf1 output=edege_out
}}}
cf1 contents:
{{{
SAMPLINGFRAME 0|0|1|1
SAMPLEAREA -1|-1|0.03571428571428571|0.02631578947368421
MOVINGWINDOW
}}}
svn revision : 58937
devbr6
geology map from spearfish60
moving window configuration
Replying to [comment:27 hamish]:
> with @PERMANENT issues fixed/avoided in devbr6, and testing a moving
window sample with r.li.edgedensity and WORKERS=1, I'm now getting as far
as a broken pipe error:
>
> {{{
> *** glibc detected *** r.li.edgedensity: free(): invalid next size
(normal): 0x000000000265e980 ***
>
> ...
>
> (gdb) bt
> #0 0x00007ffff702a8d0 in __write_nocancel () at ../sysdeps/unix
/syscall-template.S:82
> #1 0x00007ffff755061d in send (pipe=5, m=0x7fffffffa970) at ipc.c:31
> #2 0x00007ffff754e05b in calculateIndex (file=0x604630
"test_mov_windows", f=0x401401 <edgedensity>, parameters=0x0,
raster=0x604270 "landuse96_28m",
> output=0x604650 "rli.mov_wind") at daemon.c:208
> #3 0x00000000004013fa in main (argc=4, argv=0x7fffffffdec8) at
edgedensity.c:70
>
> ...
>
> G65:history > valgrind --tool=memcheck $CMD
> ==14113== Memcheck, a memory error detector
> ==14113== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et
al.
> ==14113== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for
copyright info
> ==14113== Command: r.li.edgedensity map=landuse96_28m
conf=test_mov_windows output=rli.mov_wind
> ==14113==
> ==14113== Syscall param write(buf) points to uninitialised byte(s)
> ==14113== at 0x5A028D0: __write_nocancel (syscall-template.S:82)
> ==14113== by 0x54B861C: send (ipc.c:31)
> ==14113== by 0x54B5EEA: calculateIndex (daemon.c:167)
> ==14113== by 0x4013F9: main (edgedensity.c:70)
> ==14113== Address 0x7feffc8d4 is on thread 1's stack
> ==14113==
> ==14118== Conditional jump or move depends on uninitialised value(s)
> ==14118== at 0x54B9214: RLI_get_cell_raster_row (worker.c:286)
> ==14118== by 0x4017D1: calculate (edgedensity.c:189)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118==
> ==14118== Syscall param write(buf) points to uninitialised byte(s)
> ==14118== at 0x5A028D0: __write_nocancel (syscall-template.S:82)
> ==14118== by 0x54B861C: send (ipc.c:31)
> ==14118== by 0x54B8EA5: worker (worker.c:206)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118== Address 0x7feffb364 is on thread 1's stack
> ==14118==
> ==14113== Syscall param write(buf) points to uninitialised byte(s)
> ==14113== at 0x5A028D0: __write_nocancel (syscall-template.S:82)
> ==14113== by 0x54B861C: send (ipc.c:31)
> ==14113== by 0x54B605A: calculateIndex (daemon.c:208)
> ==14113== by 0x4013F9: main (edgedensity.c:70)
> ==14113== Address 0x7feffc8d4 is on thread 1's stack
> ==14113==
> ==14118== Invalid write of size 4
> ==14118== at 0x4E5D630: G_set_c_null_value (null_val.c:147)
> ==14118== by 0x401726: calculate (edgedensity.c:176)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118== Address 0x6278f04 is 0 bytes after a block of size 2,004
alloc'd
> ==14118== at 0x4C2380C: calloc (vg_replace_malloc.c:467)
> ==14118== by 0x4E3D66C: G__calloc (alloc.c:77)
> ==14118== by 0x4E3D843: G_allocate_cell_buf (alloc_cell.c:66)
> ==14118== by 0x4016DC: calculate (edgedensity.c:169)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118==
> ==14118== Invalid read of size 4
> ==14118== at 0x401A72: calculate (edgedensity.c:242)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118== Address 0x5eb8d64 is 0 bytes after a block of size 2,004
alloc'd
> ==14118== at 0x4C2380C: calloc (vg_replace_malloc.c:467)
> ==14118== by 0x4E3D66C: G__calloc (alloc.c:77)
> ==14118== by 0x4E3D843: G_allocate_cell_buf (alloc_cell.c:66)
> ==14118== by 0x54B8D51: worker (worker.c:167)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118==
> ==14118== Invalid read of size 4
> ==14118== at 0x401975: calculate (edgedensity.c:228)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118== Address 0x5eb8d64 is 0 bytes after a block of size 2,004
alloc'd
> ==14118== at 0x4C2380C: calloc (vg_replace_malloc.c:467)
> ==14118== by 0x4E3D66C: G__calloc (alloc.c:77)
> ==14118== by 0x4E3D843: G_allocate_cell_buf (alloc_cell.c:66)
> ==14118== by 0x54B8D51: worker (worker.c:167)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118==
> ==14118== Invalid read of size 4
> ==14118== at 0x401A93: calculate (edgedensity.c:244)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118== Address 0x6278f04 is 0 bytes after a block of size 2,004
alloc'd
> ==14118== at 0x4C2380C: calloc (vg_replace_malloc.c:467)
> ==14118== by 0x4E3D66C: G__calloc (alloc.c:77)
> ==14118== by 0x4E3D843: G_allocate_cell_buf (alloc_cell.c:66)
> ==14118== by 0x4016DC: calculate (edgedensity.c:169)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118==
> ==14118== Invalid read of size 4
> ==14118== at 0x401AEC: calculate (edgedensity.c:250)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118== Address 0x5eb9584 is 0 bytes after a block of size 2,004
alloc'd
> ==14118== at 0x4C2380C: calloc (vg_replace_malloc.c:467)
> ==14118== by 0x4E3D66C: G__calloc (alloc.c:77)
> ==14118== by 0x4E3D843: G_allocate_cell_buf (alloc_cell.c:66)
> ==14118== by 0x54B8D51: worker (worker.c:167)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118==
> ==14118== Invalid read of size 4
> ==14118== at 0x401C87: calculate (edgedensity.c:316)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118== Address 0x5eb8d64 is 0 bytes after a block of size 2,004
alloc'd
> ==14118== at 0x4C2380C: calloc (vg_replace_malloc.c:467)
> ==14118== by 0x4E3D66C: G__calloc (alloc.c:77)
> ==14118== by 0x4E3D843: G_allocate_cell_buf (alloc_cell.c:66)
> ==14118== by 0x54B8D51: worker (worker.c:167)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118==
> ==14118== Invalid write of size 4
> ==14118== at 0x4E5D630: G_set_c_null_value (null_val.c:147)
> ==14118== by 0x401829: calculate (edgedensity.c:197)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118== Address 0x6279b14 is 0 bytes after a block of size 2,004
alloc'd
> ==14118== at 0x4C2380C: calloc (vg_replace_malloc.c:467)
> ==14118== by 0x4E3D66C: G__calloc (alloc.c:77)
> ==14118== by 0x4E3D843: G_allocate_cell_buf (alloc_cell.c:66)
> ==14118== by 0x4017DF: calculate (edgedensity.c:192)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> ==14118==
> --14118-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11
(SIGSEGV) - exiting
> --14118-- si_code=1; Faulting address: 0x86291FA8; sp: 0x40327be10
>
> valgrind: the 'impossible' happened:
> Killed by fatal signal
> ==14118== at 0x380362F9: vgPlain_arena_malloc (m_mallocfree.c:245)
>
> sched status:
> running_tid=1
>
> Thread 1: status = VgTs_Runnable
> ==14118== at 0x4C244E8: malloc (vg_replace_malloc.c:236)
> ==14118== by 0x4E3D59E: G__malloc (alloc.c:37)
> ==14118== by 0x54B9641: avl_make (avl.c:43)
> ==14118== by 0x401BD6: calculate (edgedensity.c:279)
> ==14118== by 0x4014C3: edgedensity (edgedensity.c:95)
> ==14118== by 0x54B8E40: worker (worker.c:192)
> ==14118== by 0x54B5BEA: calculateIndex (daemon.c:102)
> ==14118== by 0x4013F9: main (edgedensity.c:70)
> }}}
>
> ...
>
> r.li.daemon/ipc.c:
> {{{
> int send(int pipe, msg *m)
> {
> int check;
>
> /* write on pipe */
> check = write(pipe, m, sizeof(msg));
>
> if (check > 0)
> return 1;
> else
> return 0;
> }
> }}}
>
>
> Hamish
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2024#comment:28>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list