Closed ifd3f closed 5 months ago
This issue has been split off from #105 .
Steps to reproduce the behavior:
./caligula-x86_64-darwin burn caligula-x86_64-darwin
See the following error logs: 1714950829848.child.log 1714950829848.main.log
2024-05-05T23:14:00.846797Z DEBUG caligula::writer_process::child: Opening file caligula-x86_64-darwin 2024-05-05T23:14:00.846821Z DEBUG caligula::writer_process::child: Got input file size size=3998608 2024-05-05T23:14:00.846829Z DEBUG caligula::writer_process::child: Opening /dev/rdisk2 for writing 2024-05-05T23:14:00.916385Z ERROR caligula::writer_process::child: PanicInfo { payload: Any { .. }, message: Some(Failed to write block to disk: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }), location: Location { file: "src/writer_process/child.rs", line: 185, col: 14 }, can_unwind: true, force_no_backtrace: false }
Since it's at this specific line, that implies we opened it correctly, but the first block isn't even being written.
#[inline] fn on_block(&mut self, block: &[u8], _scratch: &mut [u8]) -> Result<(), ErrorType> { trace!(block_len = block.len(), "Writing block"); let written = self .file .write(block) .expect("Failed to write block to disk"); // line 185 if written != block.len() { return Err(ErrorType::EndOfOutput); } Ok(()) }
Originally posted by @ifd3f in https://github.com/ifd3f/caligula/issues/105#issuecomment-2094989965
Actually, this works on inputs with sizes aligned to block size. So it's most definitely a block alignment problem.
This issue has been split off from #105 .
To Reproduce
Steps to reproduce the behavior:
./caligula-x86_64-darwin burn caligula-x86_64-darwin
See the following error logs: 1714950829848.child.log 1714950829848.main.log
Since it's at this specific line, that implies we opened it correctly, but the first block isn't even being written.
Originally posted by @ifd3f in https://github.com/ifd3f/caligula/issues/105#issuecomment-2094989965