Skip to content
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

failure to delete temporary files on rustup update #1351

Closed
steveklabnik opened this issue Feb 1, 2018 · 6 comments
Closed

failure to delete temporary files on rustup update #1351

steveklabnik opened this issue Feb 1, 2018 · 6 comments

Comments

@steveklabnik
Copy link
Member

steveklabnik commented Feb 1, 2018

I just updated to the latest nightly, and was greeted with this:

warning: could not delete temp file: C:\Users\steve\.rustup\tmp\s07jf7ls4d414ksx_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\apzv3klfma_bh2bl_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\kcp8riecwg7kzpbl_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\jizhclcpjst8h_ph_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\uos_airnv4511cq8_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\hghrh5lkwc8ol3_i_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\mv2gkrqu1jitf4bp_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\sh4ekxnbepstm8o3_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\a2m21mzu8w52tysn_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\h9it002kv7faxsz1_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\n8myrz8ztnv39rae_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\t6lq9754r50zbw3j_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\3sagf63t6e9unnbs_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\n1sa64fu9bkjmr_i_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\_4tampejoi4tlnzf_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\vbd48xh_pz50lunp_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\pjwps6_pls866a27_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\m1x4z_7wlll_rlot_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\r0ebde1xlehzqrp2_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\alj4f6cpwsfh_r7k_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\acekqw9sef54pcbi_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\pq5h1dzufixm02bo_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\0b40fl1_4qktpwn6_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\z4apu6e0h3flypcc_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\hj2l_hrc63lecwns_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\0oo7kzkiuwewsal0_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\0yk0ebsxs9ktz_ah_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\v25d_pehxd9_l2x__file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\55t_nnm_ovvgavao_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\0lvlcddexhrgy8pg_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\v_xd06vnfo2zeik__file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\0az_atztb5ct3zhs_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\3qp35q62bat0s3yj_file
warning: could not delete temp file: C:\Users\steve\.rustup\tmp\ixlxjko4u7pynucv_file

it did successfully update though.

apparently they require administrator access?

m : Cannot remove item C:\Users\steve\.rustup\tmp\0az_atztb5ct3zhs_file: Access to the path '0az_atztb5ct3zhs_file' is denied.
At line:1 char:1
+ rm -r -Fo C:\Users\steve\.rustup\tmp\
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (0az_atztb5ct3zhs_file:FileInfo) [Remove-Item], UnauthorizedAccessException
    + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Cannot remove item C:\Users\steve\.rustup\tmp\0b40fl1_4qktpwn6_file: Access to the path '0b40fl1_4qktpwn6_file' is denied.

even typing rm in an adminstrative shell won't delete them...

@Diggsey Diggsey added this to Toolchains & components in Issue Categorisation May 28, 2018
@DanielKeep
Copy link
Contributor

DanielKeep commented Jun 22, 2018

I've just run into this, but it's really weird. When I try to delete the files in Explorer, I get:

If I try to delete the file mentioned, I get:

So, I fire up Process Explorer as admin, and...

It's not there. I also tried searching for the process holding the files open with handle, but it came up empty.

So, as a last resort, I shut down VS Code to terminate the RLS process which, to be clear, was running before I updated through rustup. Doing this allowed me to delete all of those temp files.

I have no idea how any of this makes any damn sense. Sadly, I can't do any further testing on this, since my tmp folder is now empty.

@jthile
Copy link

jthile commented Jun 22, 2018

I had the exact same experience yesterday, actually. Temp files kept mysteriously open, very difficult to track down. I was just about to restart, when I thought to try closing VS Code, which allowed me to delete the files.

I'd started rustup update from a fresh Powershell window, to be clear, not from the console within VS Code.

@PvdBerg1998
Copy link

Recently started having the same problem. My guess is that is could be related to RLS, since this issue only seems to occur whenever I have Sublime Text 3 with RLS open.

@GitIncus
Copy link

I can confirm it was solved when i closed Visual Studio Code with a Rust Project active and it is probably RLS that keep the files in tmp open.

@kinnison
Copy link
Contributor

Particularly in Windows, running rustup update when anything could be using a toolchain is risky. That means any rls or rust-analyzer instances, or anything running cargo rustc rustdoc rustfmt etc.

@rbtcollins
Copy link
Contributor

I'm closing this in favour of #2441, which although not an exact match is aiming at the systematic problem of how we tackle updates on windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Issue Categorisation
Toolchains & components
Development

No branches or pull requests

7 participants