Re: [OSM-dev] Issue with way id 742619958 / changeset 76711047 from 2019-11-06T15:32:03Z (Invalid layer value)

2019-11-20 Thread Sarah Hoffmann
On Fri, Nov 08, 2019 at 05:04:34PM +0100, Bart Smienk wrote:
> Hi,
> 
> I've found out my OSM Tile Server has stopped updating and osm2pgsql (v1.2)
> gives off the following error:
> 
> DB writer thread failed due to ERROR: result COPY_END for planet_osm_line
> failed: ERROR:  invalid input syntax for integer: "-"
> CONTEXT:  COPY planet_osm_line, line 1437, column layer: "-"
> 
> Looking through its changefile, the following entry can be found:
> 
>  uid="978786" user="padvinder" changeset="76711047">
>   
>   
>   
>   
>   
> 
> 
> This seems to be malformed, as the layer should've never been "-", as this
> is not a valid integer.
> You can see this for yourself at:
> https://planet.openstreetmap.org/replication/minute/003/747/729.osc.gz
> Also more information on the layer key is over here:
> https://wiki.openstreetmap.org/wiki/Key:layer
> 
> Not sure where to make the actual bug report, so I'm mailing the dev
> mailgroup, does anyone of you know where this issue should be posted so this
> issue won't present itself again in future replication files?

Looks like a potential bug in osm2pgsql's int parsing. I've opened an issue:
https://github.com/openstreetmap/osm2pgsql/issues/988

Please follow there for further updates.

Kind regards

Sarah

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Issue with way id 742619958 / changeset 76711047 from 2019-11-06T15:32:03Z (Invalid layer value)

2019-11-08 Thread Simon Poole

Am 08.11.2019 um 17:41 schrieb Michael Reichert:
>
> strings (up to 256 characters). 
255



signature.asc
Description: OpenPGP digital signature
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Issue with way id 742619958 / changeset 76711047 from 2019-11-06T15:32:03Z (Invalid layer value)

2019-11-08 Thread Michael Reichert
Hi Bart,

Am 08.11.19 um 17:04 schrieb Bart Smienk:
> I've found out my OSM Tile Server has stopped updating and osm2pgsql
> (v1.2) gives off the following error:
> 
> DB writer thread failed due to ERROR: result COPY_END for
> planet_osm_line failed: ERROR:  invalid input syntax for integer: "-"
> CONTEXT:  COPY planet_osm_line, line 1437, column layer: "-"
> 
> Looking through its changefile, the following entry can be found:
> 
>      uid="978786" user="padvinder" changeset="76711047">
>   
>   
>   
>   
>   
>     
> 
> This seems to be malformed, as the layer should've never been "-", as
> this is not a valid integer.

It is valid from API point of view as any tags are just a pair of
strings (up to 256 characters). The OSM API is living freedom of
tagging, it does care how your keys and values look like except some
basic checks such as length of the strings.

> You can see this for yourself at:
> https://planet.openstreetmap.org/replication/minute/003/747/729.osc.gz
> Also more information on the layer key is over here:
> https://wiki.openstreetmap.org/wiki/Key:layer
> 
> Not sure where to make the actual bug report, so I'm mailing the dev
> mailgroup, does anyone of you know where this issue should be posted so
> this issue won't present itself again in future replication files?

It is an Osm2pgsql bug which should check that valid integers are
written via PostgreSQL COPY into a integer column. The bug tracker is at
https://github.com/openstreetmap/osm2pgsql/issues

I cannot reproduce your bug. I tried the master branch (currently equal
to 1.2.0 release).

This does not lead to the bug you observed:
./osm2pgsql -d osm2pgsqldev \
--style ~/git/openstreetmap-carto/openstreetmap-carto.style \
--tag-transform ~/git/openstreetmap-carto/openstreetmap-carto.lua \
--cache 10 w742619958.osm

And even using C tag transform works:
./osm2pgsql -d osm2pgsqldev \
--style ~/git/openstreetmap-carto/openstreetmap-carto.style \
--cache 10 w742619958.osm

Using the Osm2pgsql style file (and C tag transforms) works as well:
./osm2pgsql -d osm2pgsqldev --style ../default.style --cache 10
/tmp/w742619958.osm

The input file is (without personal metadata which does not change
anything here):

http://www.openstreetmap.org/copyright;
license="http://opendatacommons.org/licenses/odbl/1-0/;>
 
 
 
  
  
  
  
  
 


All three commands import the way into the database but the layer column
is empty as expected for the first and the second one.

How can your bug be reproduced?

Best regards

Michael



-- 
Michael Reichert  www.geofabrik.de
Geofabrik GmbHHandelsregister: HRB Mannheim 703657
Amalienstr. 44Geschaeftsfuehrung: C. Karch, F. Ramm
76133 Karlsruhe   Tel: 0721-1803560-3
reich...@geofabrik.de Fax: 0721-1803560-9



signature.asc
Description: OpenPGP digital signature
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Issue with way id 742619958 / changeset 76711047 from 2019-11-06T15:32:03Z (Invalid layer value)

2019-11-08 Thread Maarten Deen

On 2019-11-08 17:04, Bart Smienk wrote:

Hi,

I've found out my OSM Tile Server has stopped updating and osm2pgsql
(v1.2) gives off the following error:

DB writer thread failed due to ERROR: result COPY_END for
planet_osm_line failed: ERROR:  invalid input syntax for integer: "-"
CONTEXT:  COPY planet_osm_line, line 1437, column layer: "-"

Looking through its changefile, the following entry can be found:


  
  
  
  
  


This seems to be malformed, as the layer should've never been "-", as
this is not a valid integer.
You can see this for yourself at:
https://planet.openstreetmap.org/replication/minute/003/747/729.osc.gz
Also more information on the layer key is over here:
https://wiki.openstreetmap.org/wiki/Key:layer

Not sure where to make the actual bug report, so I'm mailing the dev
mailgroup, does anyone of you know where this issue should be posted
so this issue won't present itself again in future replication files?


The changeset data gives Go Map!! as editor which can be found on 
GitHub: https://github.com/bryceco/GoMap


But as you can see on taginfo there are lots of non-integer values in 
OSM.

https://taginfo.openstreetmap.org/keys/?key=layer#values
So the tile server software should also do some checking and error 
handling if it requires an integer. I'm surprised that osm2pgsql 
apparently has a check on key/value pairs and sees this as an error.


Regards,
Maarten

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Issue with way id 742619958 / changeset 76711047 from 2019-11-06T15:32:03Z (Invalid layer value)

2019-11-08 Thread Pierre Béland via dev
I corrected the layer from (-) to (-1).  Such values should probably be spotted 
by the API and rejected as errors.

 
Pierre 
 

Le vendredi 8 novembre 2019 11 h 11 min 03 s UTC−5, Bart Smienk 
 a écrit :  
 
 Hi,

I've found out my OSM Tile Server has stopped updating and osm2pgsql 
(v1.2) gives off the following error:

DB writer thread failed due to ERROR: result COPY_END for 
planet_osm_line failed: ERROR:  invalid input syntax for integer: "-"
CONTEXT:  COPY planet_osm_line, line 1437, column layer: "-"

Looking through its changefile, the following entry can be found:

    
      
      
      
      
      
    

This seems to be malformed, as the layer should've never been "-", as 
this is not a valid integer.
You can see this for yourself at: 
https://planet.openstreetmap.org/replication/minute/003/747/729.osc.gz
Also more information on the layer key is over here: 
https://wiki.openstreetmap.org/wiki/Key:layer

Not sure where to make the actual bug report, so I'm mailing the dev 
mailgroup, does anyone of you know where this issue should be posted so 
this issue won't present itself again in future replication files?

Let me know.

Kind regards,
Bart Smienk

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev
  ___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Issue with way id 742619958 / changeset 76711047 from 2019-11-06T15:32:03Z (Invalid layer value)

2019-11-08 Thread Bart Smienk

Hi,

I've found out my OSM Tile Server has stopped updating and osm2pgsql 
(v1.2) gives off the following error:


DB writer thread failed due to ERROR: result COPY_END for 
planet_osm_line failed: ERROR:  invalid input syntax for integer: "-"

CONTEXT:  COPY planet_osm_line, line 1437, column layer: "-"

Looking through its changefile, the following entry can be found:

uid="978786" user="padvinder" changeset="76711047">

  
  
  
  
  


This seems to be malformed, as the layer should've never been "-", as 
this is not a valid integer.
You can see this for yourself at: 
https://planet.openstreetmap.org/replication/minute/003/747/729.osc.gz
Also more information on the layer key is over here: 
https://wiki.openstreetmap.org/wiki/Key:layer


Not sure where to make the actual bug report, so I'm mailing the dev 
mailgroup, does anyone of you know where this issue should be posted so 
this issue won't present itself again in future replication files?


Let me know.

Kind regards,
Bart Smienk

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev