-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
realloc failed during char_array_push #132
Comments
Sorry for the very late reply, I have never seen this error myself, I suspect it's due to either insufficient RAM or insufficient disk space. |
That may have been the case. I haven't worked on this for a couple months so I'll close this. |
This happens to me too.. After 5 hours approx the exact same command exits with the same error. Data came from your S3, @missinglink. But I guess it's not a data corruption problem. 140 GB free on If anyone has any idea, I'd appreciate a hint on this one. |
reopening issue, I will run a planet build and see if I can reproduce the error. |
I got the same error when running a full planet import yesterday. The issue is due to Steps to reproduce: $ node
> var postal = require('node-postal');
undefined
> postal.expand.expand_address('улица 40 лет Победы'); ... hangs indefinately I'll file an upstream bug and will also look at implementing some sort of timeout if possible on our end to abort long-running calls to libpostal. |
Issue opened openvenues/libpostal#378 |
There doesn't seem to be an easy way to abort long-running calls to the C code, the libpostal API uses synchronous function calls, if it were async then it might be easier to do. The bug itself is quite nasty in nodejs because it blocks the event loop, there is a It's probably possible to write an abort logic into the node binding but might require reworking the function interface, it would require getting into the C binding code which I don't have any experience with, nor the time for learning it right now. Let's wait a week or so to see what Al says, it might be a simple enough thing for him to patch it and fix it in libpostal core. |
Would it be worth trying the libpostal-service PR in #146? It has been tested and works on smaller builds, and even if there was an issue in the underlying libpostal service, the network calls between services would be an ideal way to isolate that problem. |
hmm.. interestingly the $ curl -s -X GET 'http://localhost:8080/expand?address=улица+40+лет+Победы' | jq .
[
"улица 40 лет победы",
"ulitsa 40 let pobedy"
] maybe because the code is quite old now and built off a prior version. [edit] yes, it's running this commit openvenues/libpostal@5f0e394 |
Would like to report having the same issue, all up to date production branches, January 2017 planet polylines file. |
{comment deleted to avoid confusion} |
today I published a development docker image I will be doing some more testing over the next few days, I'm currently running a full planet cc/ @kylebarron @nilsnolde @jpan127 [edit] the build completed successfully, please consider this as a fix until we can resolve the issue in |
the patch I applied is not the same as the one posted above, here is the code I'm using: # clone libpostal repo
cd /code
git clone https://github.com/openvenues/libpostal
cd /code/libpostal
git log -1
# generate libpostal patch file
# https://github.com/openvenues/libpostal/issues/378
cat > /tmp/libpostal.patch <<-EOF
diff --git a/src/transliterate.c b/src/transliterate.c
index 7f5fff7..83e502b 100644
--- a/src/transliterate.c
+++ b/src/transliterate.c
@@ -938,7 +938,9 @@ char *transliterate(char *trans_name, char *str, size_t len) {
if (context_no_match && !prev_state.empty_transition && prev_state.phrase_len > 0) {
log_debug("Previous phrase stays as is %.*s\n", (int)prev_state.phrase_len, str+prev_state.phrase_start);
char_array_cat_len(new_str, str + prev_state.phrase_start, prev_state.phrase_len);
- state = start_state;
+ if (match_candidate_state.state != TRANS_STATE_PARTIAL_MATCH) {
+ state = start_state;
+ }
}
if (state.state == TRANS_STATE_BEGIN && !prev_state.empty_transition) {
EOF
# patch libpostal
git apply /tmp/libpostal.patch
git log -1 |
@missinglink You saved my endless failed imports, thanks! |
I have patched our docker images with the C patch above and released them under the Specifically, the patched versions are:
for more info:
I'm going to mark this issue as resolved. Please pull from dockerhub to update the tags above and re-test. If you encounter the error again, please post a hash of the docker image you are using and the error message and I will re-open the issue. |
also worth noting the |
I get the error
I'm using the
road_network.polylines
file linked to from the Polylines README. This error occurred 15 hours after starting the command. I'm using the Production branch of the interpolation repository.The text was updated successfully, but these errors were encountered: