apache/hadoop · error
failed to calloc options
Error message
failed to calloc options
What it means
Error "failed to calloc options " thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/vecsum.c:171
// Type of vecsum to do
enum vecsum_type ty;
// RPC address to use for HDFS
const char *rpc_address;
};
static struct options *options_create(void)
{
struct options *opts = NULL;
const char *pass_str;
const char *ty_str;
const char *length_str;
int ty;
opts = calloc(1, sizeof(struct options));
if (!opts) {
fprintf(stderr, "failed to calloc options\n");
goto error;
}
opts->path = getenv("VECSUM_PATH");
if (!opts->path) {
fprintf(stderr, "You must set the VECSUM_PATH environment "
"variable to the path of the file to read.\n");
goto error;
}
length_str = getenv("VECSUM_LENGTH");
if (!length_str) {
length_str = "2147483648";
}
opts->length = atoll(length_str);
if (!opts->length) {
fprintf(stderr, "Can't parse VECSUM_LENGTH of '%s'.\n",
length_str);
goto error;
}View on GitHub (pinned to 2add963021)
Solutions
- Ensure adequate free memory; the options struct is small, so this signals severe memory pressure.
- Investigate earlier allocations in the process for leaks.
When it happens
Trigger: calloc for the hadoopRzOptions structure returned NULL in vecsum.
Common situations: Memory exhaustion before the zerocopy options could be allocated.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/98607c620bf441fb.
Report an issue: GitHub.