-
Notifications
You must be signed in to change notification settings - Fork 33
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
HARD CRASH when loading latest version of the cmip6 tables #543
Comments
@sterlingbaldwin This is a problem I mentioned in PCMDI/cmip6-cmor-tables#259. New entries in CMIP6_CV.json have strings with a length greater than 1024, the maximum length of strings in CMOR. Shortening the strings to 1024 characters seems to get rid of this bug. I will see why long strings in the table are causing this problem. |
Thanks @sterlingbaldwin this is a dupe of #530 as defined in PCMDI/cmip6-cmor-tables#259 |
Looks like you can just bump the CMOR_MAX_STRING value defined here: Line 11 in 10716a2
|
@sterlingbaldwin I tried increasing that number to 2048 but it caused errors. There must be other variables that rely on it being 1024. |
@mauzey1 @sterlingbaldwin it would be nice to fix this 1024 char issue, alongside the proposed solution catching issues with PCMDI/cmip6-cmor-tables#261 |
As noted above, this is also discussed in #530 |
I think that simply increasing 1024 to 2048 is unacceptable (even if you could make it work). The size of the internal table is doubled by doing this, and it's already huge. |
I think CMOR2 loaded the table on the Stack memory and not the Heap. In CMOR3 the CV files is loaded on the Heap memory, so you can make it has big as you want. You might be able to find some Compiler flag to increase the Stack memory. You can also load the table dynamically on the Heap memory using "malloc", but it involves a change in CMOR architecture. |
This issue has been resolved and can be closed. Although the underlying issue of the hard coded max character limit is still there, it shouldnt cause any problems as long as a) requests to add super long strings to the table data are rejected and, b) things arent automatically merged into master when the tests are failing. |
I updated my cmip6 tables directory, and now get a buffer overflow crash anytime I call cmor.load_table(TABLE_PATH).
The text was updated successfully, but these errors were encountered: