MantisBT - CDash
View Issue Details
0011737CDash(No Category)public2011-01-20 18:452011-12-22 16:36
Peter Colberg 
Julien Jomier 
normalmajoralways
resolvedfixed 
Linux (x86)Debian GNU/Linuxsqueeze
 
2.0 
0011737: CDash submission fails due to wrong parsing of geolocation info
On some hosts, submission of test reports reproducibly fails, leaving these errors in the CDash log:

[2011-01-20T17:31:12][ERROR][pid=2391](Site Insert): SQL error: ERROR: value too long for type character varying(10)
[2011-01-20T17:31:12][ERROR][pid=2391](GetIdFromName): SQL error: ERROR: value too long for type character varying(10)
[2011-01-20T17:31:12][ERROR][pid=2391](Build:UpdateTestNumbers): SQL error: ERROR: value too long for type character varying(10)
[2011-01-20T17:31:12][ERROR][pid=2391](Build::ComputeTestTiming): BuildId is not set

Upon closer inspection, this error seems to be caused by erroneous parsing in
function get_geolocation. For a particular client host, api.hostip.info returns
the following data (IP blanked):

Country: GERMANY (DE)
City: Munich

Latitude: 48.1333
Longitude: 11.5833
IP: ***.***.***.***

The location data is translated into this SQL command:

INSERT INTO site (name,ip,latitude,longitude)
                  VALUES ('hostname','***.***.***.***','48.1333','11.5833
IP: ***.***.***.***
'

As seen above, the longitude field also includes the IP address.
This is fixed by limiting the substr range to the end of the "Longitude:" line.
1. Create pristine build tree of project using CMake.
2. Run "ctest -D Experimental" in build tree.
3. Submission fails if (public) host IP is known to api.host.info with latitude/longitude.
CDash 1.8.2, PHP 5.3.3, PostgresQL 8.4.5
No tags attached.
patch cdash_fix_geo_location_longitude.patch (491) 2011-01-20 18:45
https://public.kitware.com/Bug/file/3649/cdash_fix_geo_location_longitude.patch
Issue History
2011-01-20 18:45Peter ColbergNew Issue
2011-01-20 18:45Peter ColbergFile Added: cdash_fix_geo_location_longitude.patch
2011-12-22 16:35Julien JomierAssigned To => Julien Jomier
2011-12-22 16:35Julien JomierStatusnew => assigned
2011-12-22 16:36Julien JomierNote Added: 0028052
2011-12-22 16:36Julien JomierStatusassigned => resolved
2011-12-22 16:36Julien JomierFixed in Version => 2.0
2011-12-22 16:36Julien JomierResolutionopen => fixed

Notes
(0028052)
Julien Jomier   
2011-12-22 16:36   
Thanks for the report and the patch!