flathub / flathub/com.valvesoftware.Steam

`[Errno 16] Device or resource busy` when `steam_wrapper` tries to rename cache folder

Open
#1,240 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
421
Forks
78
PR merge metrics
No merged PRs in 30d

Description

### Flatpak version

1.15.6

### What Linux distribution are you using?

Fedora Linux

### Linux distribution version

6.6.13-200.fc39.x86_64

### What architecture are you using?

x86_64

### How to reproduce

1. Install `flatpak install com.valvesoftware.Steam`
2. Run it, login, do some stuff, maybe download some games, idk
3. Uninstall it with flatpak
4. Manually delete `~/.var/app/com.valvesoftware.Steam` with `rm -rf`
5. Do step 1 again
6. `flatpak run com.valvesoftware.Steam`

### Expected Behavior

Steam should be opened

### Actual Behavior

```python
flatpak -v run com.valvesoftware.Steam

F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/toiletsandpaper/.local/share/flatpak
F: Opening user flatpak installation at path /home/toiletsandpaper/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/toiletsandpaper/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: /var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/23.08/3c58ded6fa422d45d30b070f26e428617f6e6509d18cfa1c31f959494511da66/files/lib32 does not exist
F: Cleaning up unused container id 1749058631
F: Cleaning up per-app-ID state for com.valvesoftware.Steam
F: Allocated instance id 2258987469
F: Add defaults in dir /com/valvesoftware/Steam/
F: Add locks in dir /com/valvesoftware/Steam/
F: Not sharing "/path/to/your/Steam/Library" with sandbox: Unable to open path "/path/to/your/Steam/Library": No such file or directory
F: Allowing wayland access
F: Allowing x11 access
F: Allowing pulseaudio access
F: Pulseaudio user configuration file '/home/toiletsandpaper/.config/pulse/client.conf': Error opening file /home/toiletsandpaper/.config/pulse/client.conf: No such file or directory
F: Running '/usr/bin/bwrap --args 55 /usr/bin/xdg-dbus-proxy --args=57'
F: Running '/usr/bin/bwrap --args 55 steam'
INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
ERROR:root:~/.steam/root isn't a symlink to an existing directory, cannot determine current prefix
INFO:root:Will set XDG dirs prefix to /home/toiletsandpaper/.var/app/com.valvesoftware.Steam
INFO:migration:Copying /home/toiletsandpaper/.var/app/com.valvesoftware.Steam/cache to /home/toiletsandpaper/.var/app/com.valvesoftware.Steam/.cache, ignoring set()
INFO:migration:Renaming /home/toiletsandpaper/.var/app/com.valvesoftware.Steam/cache to /home/toiletsandpaper/.var/app/com.valvesoftware.Steam/cache.old
Traceback (most recent call last):
File "/app/bin/steam", line 8, in
sys.exit(main())
^^^^^^
File "/app/lib/python3.11/site-packages/steam_wrapper.py", line 488, in main
should_restart += migrate_cache(current_info, xdg_dirs_prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/steam_wrapper.py", line 354, in migrate_cache
should_restart = migrator.apply()
^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/steam_wrapper.py", line 291, in apply
self.do_migrate()
File "/app/lib/python3.11/site-packages/steam_wrapper.py", line 267, in do_migrate
os.rename(self.source, self.relocated_source)
OSError: [Errno 16] Device or resource busy: '/home/toiletsandpaper/.var/app/com.valvesoftware.Steam/cache' -> '/home/toiletsandpaper/.var/app/com.valvesoftware.Steam/cache.old'
```

### Additional Information

So, I've got a problem with Steam loading user info endlessly. I found out, that it was probably because I've set Steam to `beta version` and I need to clear Steam cache to reset all user related info. But when I've tried to reinstall Steam - I saw that my account info is somewhere cached (because I still was able to login without password after reinstall). And even `rm -rf ~/.local/share/Steam/ && rm -rf ~/.steam*` wasn't the case.

After that, I've started searching where do flatpak can save that Steam user-related cache and found Steam folder in `~/.var/app/com.valvesoftware.Steam` even when Steam is **not installed**. So, I've decided to just `rm -rf` it and install Steam again. But after that - I started to get those errors.
And nothing helps me - not even renaming cache folder manually.

Pasting installation logs for more info below:

`flatpak -v install` logs
flatpak -v install com.valvesoftware.Steam
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/toiletsandpaper/.local/share/flatpak
Looking for matches…
F: Calling system helper: GenerateOciSummary
F: Fetching summary index file for remote ‘flathub’
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Received 10001 bytes
F: Loaded indexed summary file 62529dfa6f3a25bcf1b2fb86fb6f109f6cbc01ddfc67656ff71e3e8d75946b1c from cache for remote ‘flathub’
F: Fetching summary index file for remote ‘flathub’
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Received 10001 bytes
F: Loaded indexed summary file 62529dfa6f3a25bcf1b2fb86fb6f109f6cbc01ddfc67656ff71e3e8d75946b1c from cache for remote ‘flathub’
F: Transaction: install flathub:app/com.valvesoftware.Steam/x86_64/stable[*]
F: Looking for remote metadata updates for flathub
F: marking op install:app/com.valvesoftware.Steam/x86_64/stable resolved to 75a2aa53fe4b99ae4c05f5af0fd0465fc2633513edb77b6406cbf930d3a7c6ed
F: Updating dependency org.freedesktop.Platform/x86_64/23.08 of com.valvesoftware.Steam/x86_64/stable
F: Transaction: update flathub:runtime/org.freedesktop.Platform/x86_64/23.08[$old]
F: marking op update:runtime/org.freedesktop.Platform/x86_64/23.08 resolved to 3c58ded6fa422d45d30b070f26e428617f6e6509d18cfa1c31f959494511da66
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08-extra[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.nvidia-545-29-06/x86_64/1.4[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.Locale/x86_64/23.08[/en, /ru]
F: Transaction: install/update flathub:runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.openh264/x86_64/2.2.0[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.Compat.i386/x86_64/23.08[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL32.default/x86_64/23.08[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL32.default/x86_64/23.08-extra[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL32.nvidia-545-29-06/x86_64/1.4[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/23.08[*]
F: marking op install/update:runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/23.08 resolved to f66c51bea6f36a82662a933e450c4e7d0a3006105e403e6d63ea0b03e1fb61ce
F: marking op install/update:runtime/org.freedesktop.Platform.GL32.nvidia-545-29-06/x86_64/1.4 resolved to b4020b6c7a1f967ab82091b139544ba98c7cf3ee89767f94dcaefe7ec6db3bf9
F: marking op install/update:runtime/org.freedesktop.Platform.GL32.default/x86_64/23.08-extra resolved to 008e1783d6fa506b261eacd1f1cf89288de53bf0ef1a2c2f1eb1252d0df55a0c
F: marking op install/update:runtime/org.freedesktop.Platform.GL32.default/x86_64/23.08 resolved to a64a8d1ba7a2ec479681d2eee6b574835eb5aa870956589fd798e3fee5b82147
F: marking op install/update:runtime/org.freedesktop.Platform.Compat.i386/x86_64/23.08 resolved to e5e54893c05845c3fbdb1557c0cc8315c8228e68368dd82bd62054e7284ccbf3
F: marking op install/update:runtime/org.freedesktop.Platform.openh264/x86_64/2.2.0 resolved to bf24f23f3ba385f6e8c9215ed94d979db99814b0b614504a23a6d0751dc5f063
F: marking op install/update:runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22 resolved to 187327b117e0371a906778babcba9fb2476ef33f5d9cb98784f47ca273af095b
F: marking op install/update:runtime/org.freedesktop.Platform.Locale/x86_64/23.08 resolved to 78121eab8bd9ba98902d41bdfea879e987a9e43f1c79c108ac642ad1be4c2a62
F: marking op install/update:runtime/org.freedesktop.Platform.GL.nvidia-545-29-06/x86_64/1.4 resolved to d0b4cc0b156aa7401981b29ad3b346040e81cb4bb28a5e8ecdb4ee23ea1b7059
F: marking op install/update:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08-extra resolved to e437b679eda2d7eb9f73f5a735a6f323c74c5f3f6758380bded07013eac64192
F: marking op install/update:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08 resolved to d095240fc8e7a7c0889cef1ab561726b0a94304292024f66771fbf1c3d6c3088
F: Checking installation ‘system’ for EOL unused refs
F: Checking installation ‘system’ by checking for dependent refs in ‘user’
F: Checking installation ‘system’ for EOL unused refs
F: Checking installation ‘system’ by checking for dependent refs in ‘user’

com.valvesoftware.Steam permissions:
ipc network pulseaudio wayland x11 devices bluetooth devel multiarch
per-app-dev-shm file access [1] dbus access [2] bus ownership [3] system dbus access [4] tags [5]

[1] xdg-music:ro, xdg-pictures:ro, xdg-run/app/com.discordapp.Discord:create
[2] org.freedesktop.Notifications, org.freedesktop.PowerManagement, org.freedesktop.ScreenSaver, org.gnome.SettingsDaemon.MediaKeys, org.kde.StatusNotifierWatcher
[3] com.steampowered.*
[4] org.freedesktop.UDisks2, org.freedesktop.UPower
[5] proprietary

1. com.valvesoftware.Steam stable i flathub < 13,4 MB

Proceed with these changes to the system installation? [Y/n]: y
Installing…
F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
F: flatpak_dir_pull: Using commit 75a2aa53fe4b99ae4c05f5af0fd0465fc2633513edb77b6406cbf930d3a7c6ed for pull of ref app/com.valvesoftware.Steam/x86_64/stable from remote flathub
Installing… 0% 0 bytes/s
Installing… █▌ 8%
Installing… ██▏ 11%
Installing… █████████▍ 47% 8,7 MB/s
Installing… ███████████ 55% 9,9 MB/s
Installing… ████████████████████ 100% 9,9 MB/s
F: Calling system helper: Deploy
F: Calling system helper: RunTriggers
Installation complete.

### Does it happens with native Steam app? (`sudo dnf install steam`)
Nope.

_p.s. accidentally created in wrong issue tracker first time https://github.com/flatpak/flatpak/issues/5671_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.