Hi there,
I have a flask application which uses convertbng to convert some OSGB36 eastings northings returned from a sqlite query into WGS84 coordinates. I just experimentally redeployed the production code running fine on Ubuntu 14.04 64bit (E3-1225 v2) onto a Ubuntu 16.04 64bit environment (i5-3570S).
The version of Python is 2.7.12, the version of convertbng is 0.5.5. The kernel is Linux 4.4.0-64-generic #85-Ubuntu.
Everything works fine, except this conversion:
Feb 26 22:28:28 (hostname) kernel: [180221.207469] traps: uwsgi[22644] trap invalid opcode ip:7f32a27968f2 sp:7fff2f6a6bc8 error:0 in liblonlat_bng-783571af.so[7f32a272d000+1d2a000]
This in turn causes an Illegal instruction (core dumped) by Python, and in turn causes a remote host closing connection prematurely by NGINX which is running reverse proxy of the flask application.
While I don't speak Rust, it appears that this is something to do with the Rust binary called by the library?
For reference, the Python code that can reproduce this error is:
from convertbng.util import convert_lonlat
def bng_to_longlat(bng):
""" Given a pair of BNG coordinates return its long and lat coordinates. """
try:
easting = [int(bng[0])]
northing = [int(bng[1])]
coordinates = convert_lonlat(easting, northing)
coordinate_long = coordinates[0][0]
coordinate_lat = coordinates[1][0]
if isnan(coordinate_long) or isnan(coordinate_lat):
return False
return (coordinate_long, coordinate_lat)
except ValueError:
return False
bng_to_longlat((20000,20000))
Thanks.
Hi there,
I have a flask application which uses convertbng to convert some OSGB36 eastings northings returned from a sqlite query into WGS84 coordinates. I just experimentally redeployed the production code running fine on Ubuntu 14.04 64bit (E3-1225 v2) onto a Ubuntu 16.04 64bit environment (i5-3570S).
The version of Python is 2.7.12, the version of convertbng is 0.5.5. The kernel is Linux 4.4.0-64-generic #85-Ubuntu.
Everything works fine, except this conversion:
This in turn causes an
Illegal instruction (core dumped)by Python, and in turn causes a remote host closing connection prematurely by NGINX which is running reverse proxy of the flask application.While I don't speak Rust, it appears that this is something to do with the Rust binary called by the library?
For reference, the Python code that can reproduce this error is:
Thanks.