Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#50022 - [coreutils] dd doesn't exit when device full
Attached to Project:
Arch Linux
Opened by Eivind (mokkurkalve) - Monday, 11 July 2016, 17:51 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 12 July 2016, 20:33 GMT
Opened by Eivind (mokkurkalve) - Monday, 11 July 2016, 17:51 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 12 July 2016, 20:33 GMT
|
DetailsDescription:
Trying to zero out a usb device, running `sudo dd if=/dev/zero of=/dev/sdc bs=4096' then, when device is full dd gives an expected error notice of no more space on unit but it does not exit. AFAIK or remember, previously when I've done this, dd gives the error message then exits. Now I cannot even terminate the process by `sudo kill -9 $PID'. Only when physically removing the usb device, dd exits. I reckon this is not expected behaviour...? Additional info: * package version(s) 8.25-2 * config and/or log files etc. Steps to reproduce: Described above. |
This task depends upon
Closed by Dave Reisner (falconindy)
Tuesday, 12 July 2016, 20:33 GMT
Reason for closing: Not a bug
Additional comments about closing: Nothing wrong here in userspace -- just evidence of buffering.
Tuesday, 12 July 2016, 20:33 GMT
Reason for closing: Not a bug
Additional comments about closing: Nothing wrong here in userspace -- just evidence of buffering.
Don't know how to proceed from here.... Kernel:
uname -a
Linux audhumla 4.6.3-1-ARCH #1 SMP PREEMPT Fri Jun 24 21:19:13 CEST 2016 x86_64 GNU/Linux
kernel: blk_update_request: I/O error, dev sdc, sector 13102920
kernel: Buffer I/O error on dev sdc, logical block 1637865, lost async page write
kernel: Buffer I/O error on dev sdc, logical block 1637866, lost async page write
kernel: Buffer I/O error on dev sdc, logical block 1637867, lost async page write
(....)
sdc 7:0:0:0 disk SanDisk Cruzer Fit 1.27 usb
But having to yank it to get dd to exit feels a bit akward....
No sign of exit from dd. But I agree whatever caused it it's likely not a bug in coreutils, so this bug can probably be closed.
I'll use dd on an OpenBSD box instead.
FYI: You should be able to check the progress by sending SIGUSR1 to the dd process.
http://usbspeed.nirsoft.net/?pdesc=SanDisk+Cruzer+Fit&vname=SanDisk+Corp.&vid=1921&pid=21873
Sorry, but the misunderstanding is on your side. The device *appears* full, but the data hasn't been physically written yet -- it's still buffered. Had it *actually* been full, the kernel wouldn't have complained when you yanked the device from the port (and dd would have exited).
You can probably change this behavior by forcing dd not to buffer (see the 'sync' option).
# dd if=/dev/zero of=/dev/sdc bs=4096 status=progress iflag=sync oflag=sync
It took like half an hour longer and this time dd returned after reporting device full.
I have never experienced this before, even having used dd quite a bit for different stuff. Have gnu dd changed in the use of buffer? The async buffer between read and write here in normal operation must be quite large...?