-
Notifications
You must be signed in to change notification settings - Fork 514
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
Memory error on program closing with C++ example #430
Comments
Platform? I see the |
Sorry for the confusion, platform is Ubuntu 20.04 in docker, using the latest master branch.
|
I'm confused by this, but if you delete the |
Deleting the line gives me another error:
There seems to be an issue with the And deleting this line as well gives me this error (I think this is an expected one):
Yes, host is Ubuntu 22.04 |
what is the underlying filesystem? kenlm needs to memory map the file which is not be supported by some fs. You may need to move the file to the temp directory before opening it |
The host has |
the only other thing i can think of is that the server doesn't have enough
mem and doesn't allow mmap to virutal mem
https://bobcares.com/blog/mmap-failed-cannot-allocate-memory/
Hieu Hoang
https://hieuhoang.github.io/
…On Wed, 31 May 2023 at 12:11, DanBmh ***@***.***> wrote:
The host has ext4 and docker is using it's default one.
—
Reply to this email directly, view it on GitHub
<#430 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFI4FD27NXKE5PF7HJSLZDXI6JWJANCNFSM6AAAAAAYGOI5UY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
It's got corrupt values in |
And there really shouldn't be a file number 32573. This all sounds like memory corruption. |
@hieuhoang memory amount shouldn't be the issue, I'm using the example arpa file with a size of 3KB @kpu can you replicate the issue on your own computer?
How do I activate it? |
Default |
Thanks for your help, with |
Now it's also matching the scores from the python example (which would have been my next question otherwise) , the new scores are:
I'm not an expert in this, but shouldn't the scores be the same for the same arpa file, or is this just a side-effect from the wrong MAX_ORDER size? |
You had random memory corruption due to the structs not having the same definition in the compiled library and executable. All bets are off. |
Hi, I'm currently trying to use kenlm in a C++ program and started out with a minimal example (following the official example), but while the scoring seems to work, it can't be correctly ended. It always fails with:
My program looks as follows:
I compiled it with:
Full output:
Any idea how to fix this?
The text was updated successfully, but these errors were encountered: