Blender on Linux saves autosave and session files to /tmp, resulting in data loss on a system crash #93843

Open
opened 2021-12-08 01:19:23 +01:00 by Blender User · 16 comments

System Information
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="19.04 (Disco Dingo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.04"
VERSION_ID="19.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco

$ uname -r
5.1.15-surface-linux-surface

Also occurs on Debian Stable and Testing, and Devuan Stable and Testing

Blender Version
2.93.5

Short description of error
Blender on Linux saves autosave files and session restore files to /tmp, which is a temporary filesystem whose persistence cannot be relied upon. In the event of a system crash or power outage, a reboot occurs, which very often and unpredictably clears /tmp. This misconfiguration results data loss for Linux users.

Exact steps for others to reproduce the error

  1. Open a Blender file
  2. Do work for long enough that an autosave file is generated
  3. Recreate or simulate a system crash or power outage
  4. Reboot
  5. Open Blender
  6. Attempt to recover the last session or open an autosave file
**System Information** $ cat /etc/os-release NAME="Ubuntu" VERSION="19.04 (Disco Dingo)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 19.04" VERSION_ID="19.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=disco UBUNTU_CODENAME=disco $ uname -r 5.1.15-surface-linux-surface Also occurs on Debian Stable and Testing, and Devuan Stable and Testing **Blender Version** 2.93.5 **Short description of error** Blender on Linux saves autosave files and session restore files to /tmp, which is a temporary filesystem whose persistence cannot be relied upon. In the event of a system crash or power outage, a reboot occurs, which very often and unpredictably clears /tmp. This misconfiguration results data loss for Linux users. **Exact steps for others to reproduce the error** 1. Open a Blender file 2. Do work for long enough that an autosave file is generated 3. Recreate or simulate a system crash or power outage 4. Reboot 5. Open Blender 6. Attempt to recover the last session or open an autosave file
Author

Added subscriber: @User-user

Added subscriber: @User-user
Author

Please see this thread where other users have lost work due to this bug: https://devtalk.blender.org/t/move-autosave-out-of-tmp/10328/

Please see this thread where other users have lost work due to this bug: https://devtalk.blender.org/t/move-autosave-out-of-tmp/10328/
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

And what is your recommended default location for this?

And what is your recommended default location for this?
Author

Similar programs store the autosave version alongside the normal save

Similar programs store the autosave version alongside the normal save

Added subscriber: @iss

Added subscriber: @iss

@Harley do you think this could be confirmed? Personally I think this could be known issue at least.

@Harley do you think this could be confirmed? Personally I think this could be known issue at least.
Member

@iss - I’m honestly not sure. I don’t use Linux but had hoped that thread could reach a consensus, but could not. I remember this issue coming up multiple times in the past without a clear improved solution that works for everyone that is worth replacing an easily-changed default.

@iss - I’m honestly not sure. I don’t use Linux but had hoped that thread could reach a consensus, but could not. I remember this issue coming up multiple times in the past without a clear improved solution that works for everyone that is worth replacing an easily-changed default.

Added subscriber: @YAFU

Added subscriber: @YAFU

Hi.
I don't think this is a bug, but surely a bad design that we have on Linux.

Having a volatile /tmp folder that is cleaned on every system reboot (because the computer crashed, or power failure, kernel panic, etc) to contain "recovery files" is a bad decision. This is as bad as trying to save someone who is drowning in the sea by throwing a life buoy made of material that melts in water :)p
One thing is clear, the volatile /tmp folder should not be used. The discussion would be which folder should be used then. My vote is for the Linux Trash system, whose user location is "~/.local/share/Trash/files". The problem is that I am not sure that this is the location in all Linux distros, but I suppose that Blender when starting could look for the existing folders and then it would be chosen as the folder for Temporary Files. Linux Trash system has some advantages, an icon/widget is visible on the desktop or panels in most distros, so the user can quickly detect if the folder has content or is empty. In some distros Trash systems have more configuration options, such as the possibility of warning the user if the folder has reached a certain size capacity, or the possibility of configuring file auto cleaning according to their age.

I hope that Blender developers can discuss about this old problem and find a solution.

Hi. I don't think this is a bug, but surely a bad design that we have on Linux. Having a volatile /tmp folder that is cleaned on every system reboot (because the computer crashed, or power failure, kernel panic, etc) to contain "recovery files" is a bad decision. This is as bad as trying to save someone who is drowning in the sea by throwing a life buoy made of material that melts in water :)p One thing is clear, the volatile /tmp folder should not be used. The discussion would be which folder should be used then. My vote is for the Linux Trash system, whose user location is "~/.local/share/Trash/files". The problem is that I am not sure that this is the location in all Linux distros, but I suppose that Blender when starting could look for the existing folders and then it would be chosen as the folder for Temporary Files. Linux Trash system has some advantages, an icon/widget is visible on the desktop or panels in most distros, so the user can quickly detect if the folder has content or is empty. In some distros Trash systems have more configuration options, such as the possibility of warning the user if the folder has reached a certain size capacity, or the possibility of configuring file auto cleaning according to their age. I hope that Blender developers can discuss about this old problem and find a solution.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

Hm, not sure here. It is not really a bug, we can already set it to save elsewhere, so we are talking about a design decision [which probably #user_interface devs need to make at some point -- even if consensus is apparently hard to reach here].
To me it even sounds like a request for improved behavior [which would not be handled on this bugtracker].

Changing report status to reflect that.

Hm, not sure here. It is not really a bug, we can already set it to save elsewhere, so we are talking about a design decision [which probably #user_interface devs need to make at some point -- even if consensus is apparently hard to reach here]. To me it even sounds like a request for improved behavior [which would not be handled on this bugtracker]. Changing report status to reflect that.

Added subscriber: @ale54x3

Added subscriber: @ale54x3

I've lost some work to this too. I think as a bare minimum, /var/tmp should be used instead of /tmp. According to the file-hierarchy(7) this directory is typically storage-backed and persists across reboots, while still automatically removing old files so as to not allow the entire disk space to be eaten: https://www.freedesktop.org/software/systemd/man/file-hierarchy.html#/var/tmp/

As this directory is defined in the Filesystem Hierarchy Standard it should be available in all Linux distros: https://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE

I've lost some work to this too. I think as a bare minimum, /var/tmp should be used instead of /tmp. According to the file-hierarchy(7) this directory is typically storage-backed and persists across reboots, while still automatically removing old files so as to not allow the entire disk space to be eaten: https://www.freedesktop.org/software/systemd/man/file-hierarchy.html#/var/tmp/ As this directory is defined in the Filesystem Hierarchy Standard it should be available in all Linux distros: https://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:22:39 +01:00

Just lost my work over this as well.

On most UNIX systems /tmp is always cleaned on reboots. That's because it's designed for storing files necessary for current program run, it's not suitable for storing backups of work.

There are several ways you can fix this issue:

  1. Store backups inside of a .blend file
  2. use /var/tmp instead

But please, for the love of god, no saving important stuff to /tmp by default.

Just lost my work over this as well. On most UNIX systems /tmp is always cleaned on reboots. That's because it's designed for storing files necessary for current program run, it's not suitable for storing backups of work. There are several ways you can fix this issue: 1. Store backups inside of a .blend file 2. use /var/tmp instead But please, for the love of god, no saving important stuff to /tmp by default.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#93843
No description provided.