oneflow icon indicating copy to clipboard operation
oneflow copied to clipboard

Aborted (core dumped) in `flow.nn.OFRecordReader`

Open x0w3n opened this issue 1 year ago • 0 comments

Summary

A crash is triggered when processing a nonexistent path.

Code to reproduce bug

import oneflow as flow

record_reader = flow.nn.OFRecordReader(
    "/tmp/test/",
    batch_size=16,
    part_name_suffix_length=5,
)
val_record = record_reader()

output:

F20241205 09:24:57.086597 2447236 posix_file_system.cpp:97] Check failed: fd >= 0 Fail to open file /tmp/test/part-00000, errno is 2: No such file or directory [2]
*** Check failure stack trace: ***
    @     0x7fe3ddbd09ca  google::LogMessage::Fail()
    @     0x7fe3ddbd0cb2  google::LogMessage::SendToLog()
    @     0x7fe3ddbd0537  google::LogMessage::Flush()
    @     0x7fe3ddbd1b76  google::ErrnoLogMessage::~ErrnoLogMessage()
    @     0x7fe3d7b9a43d  oneflow::fs::PosixFileSystem::NewRandomAccessFile()
    @     0x7fe3d7b8f7db  oneflow::BinaryInStreamWithoutLocalCopy::BinaryInStreamWithoutLocalCopy()
    @     0x7fe3d7b97cf4  oneflow::PersistentInStream::PersistentInStream()
    @     0x7fe3d7b98163  oneflow::PersistentInStream::PersistentInStream()
    @     0x7fe3d921fbb8  oneflow::data::OFRecordDataset::OFRecordDataset()
    @     0x7fe3d9226acb  oneflow::data::OFRecordDataReader::OFRecordDataReader()
    @     0x7fe3d92273c4  oneflow::OFRecordReaderKernel::CreateOpKernelState()
    @     0x7fe3d994da49  oneflow::one::StatefulOpKernel::TryInitOpKernelStateAndCache()
    @     0x7fe3d7be8d0f  oneflow::vm::OpCallInstructionUtil::Compute()
    @     0x7fe3d7be6787  oneflow::vm::OpCallInstructionPolicy::Compute()
    @     0x7fe3d7be25bc  oneflow::vm::Instruction::Compute()
    @     0x7fe3d7be0a6f  oneflow::vm::EpStreamPolicyBase::Run()
    @     0x7fe3d7bec086  oneflow::vm::StreamPolicy::RunIf()
    @     0x7fe3d7bf36de  oneflow::vm::ThreadCtx::TryReceiveAndRun()
    @     0x7fe3d7bf5d18  oneflow::(anonymous namespace)::WorkerLoop()
    @     0x7fe3d7bf611f  _ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJPFvPN7oneflow2vm9ThreadCtxERKSt8functionIFvS6_EEES6_ZNS3_14VirtualMachine15CreateThreadCtxENS3_6SymbolINS3_6DeviceEEENS3_10StreamTypeEmEUlS6_E3_EEEEE6_M_runEv
    @     0x7fe3ddbe540f  execute_native_thread_routine
    @     0x7fe4c55a8b43  (unknown)
    @     0x7fe4c563aa00  (unknown)
Aborted (core dumped)

System Information

  • What is your OneFlow installation (pip, source, dockerhub): pip
  • OS: Ubuntu 22.04.3 LTS
  • OneFlow version (run python3 -m oneflow --doctor):
path: ['/home/miniconda3/envs/oneflow/lib/python3.9/site-packages/oneflow']
version: 0.9.0
git_commit: 381b12c
cmake_build_type: Release
rdma: True
mlir: True
  • Python version: 3.9.13
  • CUDA driver version: 12.2
  • GPU models: NVIDIA GeForce RTX 4090
  • Other info: None

x0w3n avatar Dec 05 '24 01:12 x0w3n