1

OS is Debian 12.

I copied some data to a usb drive, then ran the sync command to ensure I could remove it safely. The sync command then appeared to be stuck.

After waiting for half an hour, I tried attaching strace, which showed no changing output.

I cannot kill the sync, even with kill -9. ps shows the sync command in the "D" state.

How do I get the sync command to exit without rebooting? What is wrong with sync? Is it just not used anymore? I've never been able to run it before without something like this happening.

Can I just leave the sync stuck in "D" for now? Will it interfere with my normal desktop operation? I really do not want to reboot.

4
  • Well, AFAIK the program really just calls a system call, which is why you can't stop it. Sounds like your USB drive is problematic. You may want to check iostat and/or dmesg, or consider unplugging the drive. Commented Oct 19, 2024 at 10:11
  • It would be nice if you told us how much data you are copying? Commented Oct 19, 2024 at 16:10
  • There is no issue with the usb drive. I had the same issue happen a few weeks ago with a microsd card. Amount of data copied is 500 mb. Commented Oct 19, 2024 at 19:58
  • You can watch the progress of a sync operation in various different ways - see unix.stackexchange.com/questions/48235/… That will help you figure out if it has really hung or is just still busy. Commented Oct 20, 2024 at 9:10

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.