{"record":{"id":"ace4b5d72c696513","repo":"apache/hadoop","slug":"testlibhdfs-some-threads-failed","errorCode":null,"errorMessage":"testLibHdfs: some threads failed: [","messagePattern":"testLibHdfs: some threads failed: \\[","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c","lineNumber":387,"sourceCode":"    int ret = testHdfsOperationsImpl(ti);\n    ti->success = ret;\n}\n\nstatic int checkFailures(struct tlhThreadInfo *ti, int tlhNumThreads)\n{\n    int i, threadsFailed = 0;\n    const char *sep = \"\";\n\n    for (i = 0; i < tlhNumThreads; i++) {\n        if (ti[i].success != 0) {\n            threadsFailed = 1;\n        }\n    }\n    if (!threadsFailed) {\n        fprintf(stderr, \"testLibHdfs: all threads succeeded.  SUCCESS.\\n\");\n        return EXIT_SUCCESS;\n    }\n    fprintf(stderr, \"testLibHdfs: some threads failed: [\");\n    for (i = 0; i < tlhNumThreads; i++) {\n        if (ti[i].success != 0) {\n            fprintf(stderr, \"%s%d\", sep, i);\n            sep = \", \";\n        }\n    }\n    fprintf(stderr, \"].  FAILURE.\\n\");\n    return EXIT_FAILURE;\n}\n\nint testRecursiveJvmMutex() {\n    jthrowable jthr;\n    JNIEnv *env = getJNIEnv();\n    if (!env) {\n        fprintf(stderr, \"testRecursiveJvmMutex: getJNIEnv failed\\n\");\n        return -EIO;\n    }\n    jthr = newRuntimeError(env, \"Dummy error to print for testing\");","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c#L369-L405","documentation":"Error \"testLibHdfs: some threads failed: [\" thrown in apache/hadoop.","triggerScenarios":"Printed when one or more worker threads in testLibHdfs reported a failure after joining.","commonSituations":"Happens when any of hdfsRead, hdfsPread, hdfsSeek, or hdfsClose failed inside a worker thread during the threaded read test.","solutions":["Inspect the per-thread error lines printed before this summary; each failing thread logs its own hdfsRead/hdfsPread errno.","Run the test with a single thread (-t 1) to isolate whether the failure is thread-related or a plain HDFS error.","Confirm the test file size and read length arguments match what was written by the setup phase."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}