[GRASS-dev] [grass-code I][484] v.clen tool=rmdupl segfaults

grass-dev at grass.itc.it grass-dev at grass.itc.it
Tue Sep 18 07:25:15 EDT 2007


code I item #484, was opened at 2007-09-18 13:25
Status: Open
Priority: 4
Submitted By: Maciej Sieczka (msieczka)
Assigned to: Nobody (None)
Summary: v.clen tool=rmdupl segfaults 
Issue type: library bug
Issue status: None
GRASS version: None
GRASS component: vector
Operating system: Linux
Operating system version: Ubuntu Dapper
GRASS CVS checkout date, if applies (YYMMDD): 070918


Initial Comment:
On a 64bit Ubuntu Dapper v.clean tool=rmdupl segfaults on some input vectors. Below is full gdb information, with unrelevant parts stripped off.

$ gdb v.clean
GNU gdb 6.4-debian
This GDB was configured as "x86_64-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run input=nmt_pt_delc1_delc2 at nmt output=nmt_pt_delc1_delc2_nodupl type=point tool=rmdupl --o

Starting program: /usr/local/grass-6.3.cvs/bin/v.clean input=nmt_pt_delc1_delc2 at nmt output=nmt_pt_delc1_delc2_nodupl type=point tool=rmdupl --o
[Thread debugging using libthread_db enabled]
[New Thread 46912562427840 (LWP 12133)]
warning: Lowest section in /usr/lib/libicudata.so.34 is .hash at 00000000000000e8
--------------------------------------------------
Tool: Threshold
Remove duplicates: 0.000000e+00
--------------------------------------------------
WARNING: The vector 'nmt_pt_delc1_delc2_nodupl' already exists and will be
         overwritten.
Copying vector lines...
Rebuilding parts of topology...
Building topology ...
7691256 primitives registered
Topology was built.
Number of nodes     :   6202882
Number of primitives:   7691256
Number of points    :   7691256
Number of lines     :   0
Number of boundaries:   0
Number of centroids :   0
Number of areas     :   -
Number of isles     :   -
--------------------------------------------------
Tool: Remove duplicates
Duplicates:   530
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912562427840 (LWP 12133)]
0x00002aaaab4f8a2f in RTreeInsertRect2 (r=0xb00610, tid=37936,
    n=0xffffffff9dc7e450, new_node=0x7fffffb59068, level=0) at index.c:96
96              assert(level >= 0 && level <= n->level);

(gdb) bt
#0  0x00002aaaab4f8a2f in RTreeInsertRect2 (r=0xb00610, tid=37936,
    n=0xffffffff9dc7e450, new_node=0x7fffffb59068, level=0) at index.c:96
#1  0x00002aaaab4f8ac1 in RTreeInsertRect2 (r=0xb00610, tid=37936,
    n=0x9eaeda80, new_node=0x7fffffb59148, level=0) at index.c:102
#2  0x00002aaaab4f8ac1 in RTreeInsertRect2 (r=0xb00610, tid=37936,
    n=0x1e79ee0, new_node=0x7fffffb59228, level=0) at index.c:102
#3  0x00002aaaab4f8ac1 in RTreeInsertRect2 (r=0xb00610, tid=37936,
    n=0x1b712f0, new_node=0x7fffffb59308, level=0) at index.c:102
#4  0x00002aaaab4f8ac1 in RTreeInsertRect2 (r=0xb00610, tid=37936, n=0x5f2a10,
    new_node=0x7fffffb593e8, level=0) at index.c:102
#5  0x00002aaaab4f8ac1 in RTreeInsertRect2 (r=0xb00610, tid=37936, n=0xb678b0,
    new_node=0x7fffffb594c8, level=0) at index.c:102
#6  0x00002aaaab4f8ac1 in RTreeInsertRect2 (r=0xb00610, tid=37936,
    n=0x2df4a70, new_node=0x7fffffb595a8, level=0) at index.c:102
#7  0x00002aaaab4f8ac1 in RTreeInsertRect2 (r=0xb00610, tid=37936,
    n=0xd9b8000, new_node=0x7fffffb59688, level=0) at index.c:102
#8  0x00002aaaab4f8ac1 in RTreeInsertRect2 (r=0xb00610, tid=37936,
    n=0x502819b0, new_node=0x7fffffb597a0, level=0) at index.c:102
#9  0x00002aaaab4f8e5b in RTreeInsertRect (R=0xb00610, Tid=37936,
    Root=0x7fffffb5a480, Level=0) at index.c:160
#10 0x00002aaaab4f94b2 in RTreeDeleteRect (R=0x7fffffb59860, Tid=5751,
    Nn=0x7fffffb5a480) at index.c:299
#11 0x00002aaaab3f0bbf in dig_spidx_del_line (Plus=0x7fffffb5a270, line=5751)
    at spindex.c:227
#12 0x00002aaaab3eb54c in dig_del_line (plus=0x7fffffb5a270, line=5751)
    at plus_line.c:166
#13 0x00002aaaaabf72ad in V2_delete_line_nat (Map=0x7fffffb5a260, line=5751)
    at write_nat.c:606
#14 0x00002aaaaabf5e1a in Vect_delete_line (Map=0x7fffffb5a260, line=5751)
    at write.c:210
#15 0x00002aaaaabf2a05 in Vect_remove_duplicates (Map=0x7fffffb5a260, type=1,
    Err=0x0, msgout=0x2aaaac0958c0) at remove_duplicates.c:109
#16 0x0000000000403337 in main (argc=6, argv=0x7fffffb5b008) at main.c:301
(gdb) q

The input vector information:

$ v.info -t nmt_pt_delc1_delc2
nodes=6202882
points=7691256
lines=0
boundaries=0
centroids=0
areas=0
islands=0
faces=0
kernels=0
primitives=7691256
map3d=1

As you can see the vector is quite big and is 3D.

The same procedure leads to a segfault from /usr/local/grass-6.2.2cvs/lib/libgrass_rtree.so in current GRASS 6.2 CVS too.

Please let me know if more information is required.

Maciek


----------------------------------------------------------------------

You can respond by visiting: 
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=484&group_id=21




More information about the grass-dev mailing list