This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Drop dmlc-core commits that break MXNet build #12189
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anirudh2290
approved these changes
Aug 15, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine as a temporary solution but we should move back to dmlc-core master branch instead of mxnet-stable once the issues are fixed.
haojin2
approved these changes
Aug 15, 2018
This reverts commit a6ecb59.
XinYao1994
pushed a commit
to XinYao1994/incubator-mxnet
that referenced
this pull request
Aug 29, 2018
* Drop dmlc-core commits that break MXNet build * Revert "Disable test_io.test_CSVIter (apache#12146)" This reverts commit a6ecb59.
16 tasks
@anirudh2290 I found the bug. It was actually the threaded parser in dmlc-core, not MXNet's CSVIter: dmlc/dmlc-core#505. Investigating now. |
Output from Thread Sanitizer: log.txt |
Minimal reproduction of data race, with combination of MXNet CSVIter and dmlc-core: /* mxnet_integ.cc */
#include <mxnet/c_api.h>
#include <mxnet/io.h>
#include <dmlc/registry.h>
#include <type_traits>
#include <cstring>
int main(void) {
const char* keys[] = {
"data_csv", "data_shape", "label_csv", "batch_size", "dtype"
};
const char* vals[] = {
"./incubator-mxnet/data.t", "(8, 8)", "./incubator-mxnet/label.t", "100", "float32"
};
static_assert(std::extent<decltype(keys)>::value == std::extent<decltype(vals)>::value,
"keys[] and vals[] must be of same length");
DataIterHandle csv_iter_handle;
unsigned int size;
DataIterCreator* handle;
CHECK_EQ(MXListDataIters(&size, &handle), 0);
LOG(INFO) << "size = " << size;
for (unsigned int i = 0; i < size; ++i) {
const char *name, *desc;
unsigned int num_args;
const char **arg_names, **arg_types, **arg_descs;
CHECK(handle[i]);
CHECK_EQ(MXDataIterGetIterInfo(handle[i], &name, &desc, &num_args, &arg_names, &arg_types, &arg_descs), 0);
if (std::strcmp(name, "CSVIter") == 0) {
LOG(INFO) << "Creating CSVIter";
CHECK_EQ(MXDataIterCreateIter(handle[i], std::extent<decltype(keys)>::value, keys, vals, &csv_iter_handle), 0);
}
}
CHECK_EQ(MXDataIterBeforeFirst(csv_iter_handle), 0);
int next_res;
CHECK_EQ(MXDataIterNext(csv_iter_handle, &next_res), 0);
while (next_res) {
LOG(INFO) << "Got a batch from the iterator";
void* hdl;
CHECK_EQ(MXDataIterGetData(csv_iter_handle, &hdl), 0);
CHECK_EQ(MXDataIterGetLabel(csv_iter_handle, &hdl), 0);
int pad;
CHECK_EQ(MXDataIterGetPadNum(csv_iter_handle, &pad), 0);
uint64_t index_size;
uint64_t* index_data;
CHECK_EQ(MXDataIterGetIndex(csv_iter_handle, &index_data, &index_size), 0);
CHECK_EQ(MXDataIterNext(csv_iter_handle, &next_res), 0);
}
CHECK_EQ(MXDataIterFree(csv_iter_handle), 0);
return 0;
} Compile this example with
Make sure that |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Partially reverts #12129 by dropping commits dmlc/dmlc-core#409 and dmlc/dmlc-core#399.
These commits by themselves are fine, but they tigger double free memory error inside CSVIter. In #12139, the CSVIter test crashed on CentOS. The memory error has been inside CSVIter but remained undetected until dmlc/dmlc-core#409 and dmlc/dmlc-core#399 were added. See address_sanitizer_log.txt for a detailed log of double-free error.
Note that the dmlc-core submodule will now track the
mxnet-stable
branch of dmlc/dmlc-core.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments