diff --git a/src/linux_aligned_file_reader.cpp b/src/linux_aligned_file_reader.cpp index 47c7cb1fb..31bf5f827 100644 --- a/src/linux_aligned_file_reader.cpp +++ b/src/linux_aligned_file_reader.cpp @@ -147,10 +147,14 @@ void LinuxAlignedFileReader::register_thread() if (ret != 0) { lk.unlock(); - assert(errno != EAGAIN); - assert(errno != ENOMEM); - std::cerr << "io_setup() failed; returned " << ret << ", errno=" << errno << ":" << ::strerror(errno) - << std::endl; + if (ret == -EAGAIN) + { + std::cerr << "io_setup() failed with EAGAIN: Consider increasing /proc/sys/fs/aio-max-nr" << std::endl; + } + else + { + std::cerr << "io_setup() failed; returned " << ret << ": " << ::strerror(-ret) << std::endl; + } } else {