ogrinfo assert failure: *** buffer overflow detected ***: ogrinfo terminated

Bug #459178 reported by Russell McOrmond
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdal (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Source of shape file is:

http://geogratis.cgdi.gc.ca/geogratis/en/option/select.do?id=1169

I will continue to investigate with OSGeo folks if they have any ideas.

ProblemType: Crash
Architecture: i386
AssertionMessage: *** buffer overflow detected ***: ogrinfo terminated
CheckboxSubmission: 02cc59152aab0e0c61f881a2d8a31db6
CheckboxSystem: e9607098f9cbddf809aa141c262b8861
CrashCounter: 1
Date: Fri Oct 23 11:35:11 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/ogrinfo
NonfreeKernelModules: fglrx
Package: gdal-bin 1.5.4-4
ProcCmdline: ogrinfo -al fed308_a.shp
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_CA.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
Signal: 6
SourcePackage: gdal
StacktraceTop:
 __kernel_vsyscall ()
 raise () from /lib/tls/i686/cmov/libc.so.6
 abort () from /lib/tls/i686/cmov/libc.so.6
 ?? () from /lib/tls/i686/cmov/libc.so.6
 __fortify_fail () from /lib/tls/i686/cmov/libc.so.6
Title: ogrinfo assert failure: *** buffer overflow detected ***: ogrinfo terminated
Uname: Linux 2.6.31-14-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
XsessionErrors:
 (gnome-settings-daemon:16268): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:16268): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:16291): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:16298): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Revision history for this message
Russell McOrmond (russell-flora) wrote :
Revision history for this message
Russell McOrmond (russell-flora) wrote :

At http://geogratis.cgdi.gc.ca/geogratis/en/option/select.do?id=1169 there are shapefiles which represent the electoral districts of Canada, for election years 2000, 2004, 2006 and 2008.

In 2000 it was not the same boundaries as they are now (they changed in
2003 -- and will again in 2013).

In 2004 it is the right boundaries, with only the electoral ID as data: FED_NUM: Integer (9.0)

This worked:
ogr2ogr -s_srs "ESRI::fed308.2004/fed308_a.prj" -t_srs WGS84 -f KML fed308.2004_a.kml fed308.2004/fed308_a.shp -dsco NameField=FED_NUM -dsco DescriptionField=FED_NUM
  The output KML can be browsed with Google Earth (too big for Google Maps)

In 2006 they added more information, and now ogr tools core dump with a buffer overflow.
AREA: Real (20.5)
PERIMETER: Real (20.5)
FED308_A_: Real (11.0)
FED308_A_I: Real (11.0)
FED_NUM: Real (11.0)
ED_NAMEE: String (100.0)
ED_NAMEF: String (100.0)

In 2008 they added even more information:
AREA: Real (19.5)
PERIMETER: Real (19.5)
FED_NUM: Integer (9.0)
FED_TYPE: String (4.0)
ED_ID: Integer (7.0)
ED_NAMEE: String (100.0)
ED_NAMEF: String (100.0)
ELCT_CNT: Integer (6.0)
OBJECTID: Integer (10.0)
SHAPE_AREA: Real (19.11)
SHAPE_LEN: Real (19.11)
PARTY_WIN: String (1.0)

Here is what happens with the 2008 data:

$ ogr2ogr -s_srs "ESRI::fed308.2008/fed308_a.prj" -t_srs WGS84 -f KML fed308.2008_a.kml fed308.2008/fed308_a.shp -dsco NameField=FED_NUM -dsco DescriptionField=FED_NUM
*** buffer overflow detected ***: ogr2ogr terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x80ede8]
/lib/tls/i686/cmov/libc.so.6[0x80de20]
/lib/tls/i686/cmov/libc.so.6[0x80d779]
/lib/tls/i686/cmov/libc.so.6(__snprintf_chk+0x34)[0x80d664]
/usr/lib/libgdal1.5.0.so.1(_ZN10OGRFeature16GetFieldAsStringEi+0x34e)[0x4d93be]
/usr/lib/libgdal1.5.0.so.1(_ZN11OGRKMLLayer13CreateFeatureEP10OGRFeature+0x2ec)[0x46cffc]
ogr2ogr[0x80496d2]
ogr2ogr[0x804a541]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x744b56]
ogr2ogr[0x80491b1]

visibility: private → public
Revision history for this message
Alan Boudreault (aboudreault) wrote :

Did you tested with gdal 1.6.2 ? You can do a simple test somewhere with those gdal packages: https://launchpad.net/~ubuntugis/+archive/ppa

Revision history for this message
Russell McOrmond (russell-flora) wrote :

Alan,

I haven't tested yet. The Ubuntu machine I have here is already running Ubuntu 9.10 (karmic), which doesn't have packages yet http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/dists/ . Looking forward to adding this to my repositories as I'll likely want to follow the latest on this desktop.

Thank you.

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt (retraced)

StacktraceTop:__kernel_vsyscall ()
*__GI_raise (sig=6)
*__GI_abort () at abort.c:92
__libc_message (do_abort=2,
*__GI___fortify_fail (

Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt (retraced)
Changed in gdal (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
Even Rouault (even-rouault) wrote :
Revision history for this message
Bas Couwenberg (sebastic) wrote :

This should be fixed in precise and later.

Changed in gdal (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.