-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to kill process within WSL or Task Manager #1021
Comments
Hm... Thanks @kiwidoggie for posting! Do you have a specific example of an object file that has this effect? Just speculating, but I wonder if objdump tries to create a sparse file and WSL doesn't properly support sparse files? That would explain the 0's... |
Yes, I can attach an object. It's because objcopy tries to create the entire address space and the code that I am compiling is at a high address space so it pads it with 00's until it gets there. But that still shouldn't keep the process from killing. On a Ubuntu VM it creates a ~36GB file mainly with 00's but it does it in under a second and I am able to kill the process mid-creation. |
Just curious, have you tried doing "kill -9"? Also, have you ever tried running this command on real Linux but on, for example, a FAT filesystem, or another FS that doesn't support sparse files? Just for a comparison of the behavior. In Linux in general, it's not possible to kill any process while it's in the middle of a syscall. (Though some syscalls are specified to exit early with a well-known error code in case of certain signals.). If objdump executes a single syscall that forces the disk to write gigabytes of zeroes, that may hang uninterruptibly for a while, depending on the details. WSL is aiming for bug-for-bug compatibility with Linux, so it would be interesting to know what Linux does here. |
On a Ubuntu VM, I am able to kill the process with CTRL+C at any point during the creation of the GB's of 00's. I haven't tried kill -9, but is that equivalent to htop's sigterm? I can see if where WSL gets stuck is a syscall, I'm not sure if gdb works in WSL but I will give it a shot. |
gdb unfortunately doesn't work very well under WSL, though it sometimes works for simple programs. strace works well, though, and it gathers lots of information about syscalls. |
I'm also often having the same problem with vim (under tmux, if it makes a difference). I've tried I've also tried Any idea how to solve this? |
same issues here with repo sync (git and git-remote-http), nothing works to kill the tasks properly. Ctrl + C doesn't kill the background task, so if I relaunch the command it piles up in task manager. Task manager doesn't end tasks, and other commands have failed too. so far I've only been able to kill the task by rebooting windows which is not really acceptable. looking forward to a fix |
Fixed in 1803. |
@benhillis This just happened to me on build 1803, can't SIGKILL or via Task Manager a puma ruby process. |
@onomatopellan i will try 17713. Thanks |
I have this using dd to a ttyUSB0 (USB serial) interface attached via usbipd, mostly after powersave or hibernate. usbipd 4.2.0+54.Branch.master.Sha.5b36605535dd52bc3d8a8e4bbaee7f4d480c86ad |
I am trying to run objcopy -O binary InputFile OutputFile
for some reason it bugs out and starts creating a 20+GB file of all 00's on my machine and I cannot kill the process without restarting.
When I kill the process, it should die. From windows I get the message of ERROR: The process "objcopy" with PID 12392 could not be terminated.
Reason: Access is denied.
If I use htop and send a sigterm within Bash, it does nothing.
Microsoft Windows [Version 10.0.14393]
Run objcopy and it will fail, using it for extracting single segments works fine.
No Trace, will not die.
GNU Binutils
The text was updated successfully, but these errors were encountered: