mkdosfs hangs forever, even when using timeout
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I'm testing massive amounts of USB flash drives using a custom bash script that's based on f3.
Before I perform f3write
and f3read
I format the drives, as my experience is some of the drives come from the factory not formatted properly - and hence cannot be used (or tested) in that such state.
When I perform the testing, some of the bad drives hang the mkdosfs -I -F32
process forver.
I've tried using timeout
with SIGKILL
to forcefully terminate the mkdosfs process after a few minutes if it doesn't finish, but that doesn't work.
I've read that processes which execute kernel calls might go into uninterruptible sleep marked with a letter 'D' in top
or htop
.
That seems to be the case - the only way to terminate the processes I have found so far is to physically disconnect the USB flash drive that is being worked on.
Right now these bad drives just never finish formatting. Here's a screenshot from htop
:
I wonder what can I do to be able to stop the process - or at least detect that it has hung so I can notify the user. Maybe there's some software way to reset the USB port?
usb usb-drive mkfs
add a comment |Â
up vote
1
down vote
favorite
I'm testing massive amounts of USB flash drives using a custom bash script that's based on f3.
Before I perform f3write
and f3read
I format the drives, as my experience is some of the drives come from the factory not formatted properly - and hence cannot be used (or tested) in that such state.
When I perform the testing, some of the bad drives hang the mkdosfs -I -F32
process forver.
I've tried using timeout
with SIGKILL
to forcefully terminate the mkdosfs process after a few minutes if it doesn't finish, but that doesn't work.
I've read that processes which execute kernel calls might go into uninterruptible sleep marked with a letter 'D' in top
or htop
.
That seems to be the case - the only way to terminate the processes I have found so far is to physically disconnect the USB flash drive that is being worked on.
Right now these bad drives just never finish formatting. Here's a screenshot from htop
:
I wonder what can I do to be able to stop the process - or at least detect that it has hung so I can notify the user. Maybe there's some software way to reset the USB port?
usb usb-drive mkfs
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm testing massive amounts of USB flash drives using a custom bash script that's based on f3.
Before I perform f3write
and f3read
I format the drives, as my experience is some of the drives come from the factory not formatted properly - and hence cannot be used (or tested) in that such state.
When I perform the testing, some of the bad drives hang the mkdosfs -I -F32
process forver.
I've tried using timeout
with SIGKILL
to forcefully terminate the mkdosfs process after a few minutes if it doesn't finish, but that doesn't work.
I've read that processes which execute kernel calls might go into uninterruptible sleep marked with a letter 'D' in top
or htop
.
That seems to be the case - the only way to terminate the processes I have found so far is to physically disconnect the USB flash drive that is being worked on.
Right now these bad drives just never finish formatting. Here's a screenshot from htop
:
I wonder what can I do to be able to stop the process - or at least detect that it has hung so I can notify the user. Maybe there's some software way to reset the USB port?
usb usb-drive mkfs
I'm testing massive amounts of USB flash drives using a custom bash script that's based on f3.
Before I perform f3write
and f3read
I format the drives, as my experience is some of the drives come from the factory not formatted properly - and hence cannot be used (or tested) in that such state.
When I perform the testing, some of the bad drives hang the mkdosfs -I -F32
process forver.
I've tried using timeout
with SIGKILL
to forcefully terminate the mkdosfs process after a few minutes if it doesn't finish, but that doesn't work.
I've read that processes which execute kernel calls might go into uninterruptible sleep marked with a letter 'D' in top
or htop
.
That seems to be the case - the only way to terminate the processes I have found so far is to physically disconnect the USB flash drive that is being worked on.
Right now these bad drives just never finish formatting. Here's a screenshot from htop
:
I wonder what can I do to be able to stop the process - or at least detect that it has hung so I can notify the user. Maybe there's some software way to reset the USB port?
usb usb-drive mkfs
edited Jul 11 at 9:31
agc
3,9991935
3,9991935
asked Jul 11 at 7:48
unfa
506212
506212
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454633%2fmkdosfs-hangs-forever-even-when-using-timeout%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password