openvenues / jpostal

Java/JNI bindings to libpostal for for fast international street address parsing/normalization
MIT License
105 stars 42 forks source link

gradlew check fail on :test #1

Closed tdicken73 closed 8 years ago

tdicken73 commented 8 years ago

I followed the steps of installing libpostal and followed it with installing jpostal. Libpostal works via command line and the jpostal built successfully but the test :test failed when running "./gradlew check" per the readme.md. Below is the following output to the console and the log file is attached.

:test FAILED

FAILURE: Build failed with an exception.

albarrentine commented 8 years ago

Hm, so I develop on a similar version of OSX with Java 8 and couldn't reproduce the issue here.

From the Native Frames section of the log, it looks like one of the on-disk files from libpostal failed to load. You mentioned libpostal works from the command-line. Did you run the address_parser program from the libpostal C checkout, and if not, does that work on the command-line?

If you run du -h on whatever datadir you used when configuring libpostal (default would be /usr/local/share/libpostal), it should read 2.2G. If not, something didn't download correctly and it's best to nuke the datadir and re-run make.

Also, is there enough free memory? The log seems to say that there's 700M free (wasn't clear if that was JVM memory or OS), whereas libpostal would need around 2G (OS memory) total. That still might not cause a malloc fail because of virtual memory, but might want to try wth > 2G free just to rule it out.

tdicken73 commented 8 years ago

Thanks the looking thru it, my ./libpostal command works but address_parser errors out to Segmentation fault:11. addressparserresult When I attempt to run thru the nosetests in the pypostal library, the tests also fail with the same segmentation fault.pythonsegmentationfault

I believe I am missing some data (data folder "libpostal" was only 1.5gb) but have make'd my libpostal multiple times. datasize

I get a decompression failed issues when running make within libpostal. decompressionfailed2 Any help is appreciated!

albarrentine commented 8 years ago

Thanks for the detailed report. That definitely seems like a half-downloaded file. I've just added set -e to the data download script so at least make will fail if everything doesn't download correctly.

It seems like the disk/partition might be full (so it only downloads part of the tarball and can't decompress it). Do you know whether there's enough space available?

tdicken73 commented 8 years ago

Thanks for pushing that update, I've pulled it down and rerun make but am getting a x geodb/geodb.spi: gzip decompression failed. I don't believe it's a storage issue as I'm running this on a newly imaged machine with 1TB Flash Storage, 940GB free. Here's the specific output when downloading the geodb data. geodb error After this, it now exits the make installation. I am able to get libpostal working thru the pypostal plugin but not the jpostal plugin. Would this issue have any effects on that?

albarrentine commented 8 years ago

Hm pypostal shouldn't be working either if geodb is not download (from postal.parser import parse_address should fail but from postal.expand import expand_address will work). The language bindings are independent of each other and can be installed side-by-side without issues.

Can you try downloading the geodb.tar.gz file (https://s3.amazonaws.com/libpostal/geodb.tar.gz) to that same directory on the command-line and decompressing it with tar -xvzf? From the log it appears that getting the installation working is contingent on getting that command to work.

Also, is the drive partitioned or anything? Try running df -h /Users/dickent/Development/open-source/libpostal/data/libpostal. Maybe there's space on the drive itself but not on that partition? Not to hammer the point, it just really sounds like a storage issue to me.

tdicken73 commented 8 years ago

I blew away my original directory and reinstalled libpostal and it seems to have fixed the issue, both jpostal ./gradlew check is working as well as nosetests in pypostal. Thanks for your help

On Mon, May 9, 2016 at 11:01 AM, Al Barrentine notifications@github.com wrote:

Hm pypostal shouldn't be working either if geodb is not download (from postal.parser import parse_address should fail but from postal.expand import expand_address will work). The language bindings are independent of each other and can be installed side-by-side without issues.

Can you try downloading the geodb.tar.gz file ( https://s3.amazonaws.com/libpostal/geodb.tar.gz) to that same directory on the command-line and decompressing it with tar -xvzf? From the log it appears that getting the installation working is contingent on getting that command to work.

Also, is the drive partitioned or anything? Try running df -h /Users/dickent/Development/open-source/libpostal/data/libpostal. Maybe there's space on the drive itself but not on that partition? Not to hammer the point, it just really sounds like a storage issue to me.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/openvenues/jpostal/issues/1#issuecomment-217907852

albarrentine commented 8 years ago

That is odd. Usually a re-install has ended up being the solution in similar issues. If you happen to encounter this again in the future or find a way to reproduce it, let me know. Glad it's working!