Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Posted Jun 4, 2024 9:18 UTC (Tue) by smurf (subscriber, #17840)In reply to: Debian's /tmpest in a teapot by epa
Parent article: Debian's /tmpest in a teapot
The correct place for transient stuff that shouldn't be cleaned (and also doesn't need to survive a reboot), these days, is /run/user/‹uid›/.
Posted Jun 4, 2024 9:30 UTC (Tue)
by bluca (subscriber, #118303)
[Link] (28 responses)
Posted Jun 4, 2024 11:36 UTC (Tue)
by epa (subscriber, #39769)
[Link] (27 responses)
Posted Jun 4, 2024 11:41 UTC (Tue)
by bluca (subscriber, #118303)
[Link] (26 responses)
Posted Jun 4, 2024 12:24 UTC (Tue)
by epa (subscriber, #39769)
[Link] (3 responses)
This is speculation, of course, but a generation ago the idea of deliberate hash collisions would have been seen as a straw man, or many similar “don’t do that” or “will never happen” scenarios.
Since the reaping period is defined to be at least 10 days (and not purely site-dependent) that takes away a lot of the worry in practice.
Posted Jun 4, 2024 14:34 UTC (Tue)
by bluca (subscriber, #118303)
[Link] (2 responses)
All these tortured strawmen are exactly what I meant when I said "I am not really looking for philosophical discussions or lists of personal preferences or hypotheticals". If the new defaults do not work for you, just do the trivial one-line configuration change. Arguing about why your preferred configuration is the one true default and everything else is wrong is a waste of time and is not going to achieve anything at all.
Posted Jun 4, 2024 14:51 UTC (Tue)
by epa (subscriber, #39769)
[Link] (1 responses)
If you're saying that is never safe, not even when done with great care and exclusive mode opening and all the rest, then our positions are not so far apart. The safe uses of /tmp are a lot fewer than is common practice.
Posted Jun 4, 2024 14:58 UTC (Tue)
by bluca (subscriber, #118303)
[Link]
For sockets - just don't. It is honestly baffling that there are still programs doing that, like tmux.
Posted Jun 4, 2024 15:51 UTC (Tue)
by mb (subscriber, #50428)
[Link] (21 responses)
No, it's not broken. It worked just fine until you started deleting files.
> It can be fixed in a number of ways
Yeah. But you are breaking existing userspace here.
I'm really annoyed by this.
If we are talking about megabytes or gigabytes. Yeah. Fine. Establish a cleanup strategy, because it actually does help.
Posted Jun 4, 2024 16:10 UTC (Tue)
by bluca (subscriber, #118303)
[Link] (20 responses)
Yes, it is, and no, it didn't, as the article says at the very top this has been the norm on other distros for a decade.
> But you are breaking existing userspace here.
Nothing is broken, this is made-up nonsense. Just stop wasting time and write the one line config file to customize your machine as you want it. Complaining is not going to change anything.
> But deleting small files and sockets? Just don't. There is no way this is going to help anybody, but plenty of room for breakage.
Size limit is not the only problem, especially on a tmpfs there is also an inode limit, and saturating a tmpfs with zero size files is very much possible and DOSes other uses of /tmp. So it's just as important to remove unused small files as it is large files to ensure the shared resource remains usable.
Posted Jun 4, 2024 16:31 UTC (Tue)
by mb (subscriber, #50428)
[Link] (19 responses)
Ok. Can you give us some numbers and show how that is not "made-up nonsense" (quoting yourself), please?
How many files must be created to exhaust the available space?
>write the one line config file to customize your machine as you want it
My machine _is_ configured the way I want and you are changing it. And I didn't read a plausible explanation for why this is needed, yet.
You are changing user interfaces. You are doing the very same thing that you constantly complain about.
Posted Jun 4, 2024 16:51 UTC (Tue)
by bluca (subscriber, #118303)
[Link] (18 responses)
Depends on the system, just check it out - df -hi /tmp
> But there surely have been decades of Linux that don't delete files from /tmp at random times.
Sure there have - tmpfiles.d has been deleting files in /tmp, in Debian too, for the past ~15 years, and before that there were things like tmpreaper. Other OSes like Solaris also delete stuff there by default. You are pretending this is some sort of new, last minute development - it isn't, it's ancient history.
> You are changing user interfaces. You are doing the very same thing that you constantly complain about.
Nonsense. Major version of distributions change things all the time, that's why we publish this thing called "release notes" where changes are noted. If you don't want changes, stay on the same stable LTS version forever. Distributions, including Debian, never, ever said "we won't break compatibility across major version upgrades", quite the opposite, every new release changes something - that's the entire point of doing a new Debian release. The parallel you are trying to draw makes no sense, as the kernel _does_ say " we do not break compatibility". That makes all the difference, and pretending it doesn't is just silly.
Posted Jun 4, 2024 17:28 UTC (Tue)
by mb (subscriber, #50428)
[Link] (17 responses)
Ok.
>$ df -hi /tmp
>$ for i in $(seq 0 100000); do touch /tmp/x/$i; done
>$ df -hi /tmp
So it takes ~4.5 million empty files to fill up the available inode space.
It doesn't convince me that this limit can be used to argue that possibly used files must be deleted after 10 days.
Is that limit hit more frequently than applications breaking due to deleted files?
Posted Jun 4, 2024 17:38 UTC (Tue)
by bluca (subscriber, #118303)
[Link] (16 responses)
There must be some misunderstanding here - I am not arguing for anything, not trying to convince you of anything. I'm simply explaining how things work and why. If you don't like how they work, that's too bad - feel free to configure your machine differently as already explained, you are free to configure your laptop or your desktop or your server as you see fit, it really doesn't make any difference to me, these settings are all configurable by design
Posted Jun 4, 2024 18:37 UTC (Tue)
by mb (subscriber, #50428)
[Link] (15 responses)
Well, but you should. You are changing the Debian world here.
>feel free to configure your machine differently
Keep in mind that you are changing my machine behavior here. You change how the Debian system works and I have to revert back to the old behavior.
It's the responsibility of you as a maintainer to have actual good reasons for a change. And you should be able to explain them. Yet, I did not see more than basically that you'd like it better if the files were deleted and "somebody else does it, too".
There is a huge responsibility with being a maintainer.
Posted Jun 4, 2024 18:43 UTC (Tue)
by pizza (subscriber, #46)
[Link] (6 responses)
No, he (nor the other systemd developers) is doing nothing of the sort. *DEBIAN* is changing its own world.
Posted Jun 4, 2024 19:28 UTC (Tue)
by mb (subscriber, #50428)
[Link] (5 responses)
Posted Jun 4, 2024 20:46 UTC (Tue)
by pizza (subscriber, #46)
[Link] (4 responses)
Sounds like you need to file a release blocker bug with Debian, but since this is fundamentally about overruling a Debian packager's decision, you'll probably need to escalate this to the TC or to a full project-wide vote.
Either way, you'll need a better technical argument than "I don't like it and I can't be arsed to make a one-liner configuration change"
Posted Jun 4, 2024 20:50 UTC (Tue)
by bluca (subscriber, #118303)
[Link]
Posted Jun 4, 2024 21:25 UTC (Tue)
by mb (subscriber, #50428)
[Link] (2 responses)
Yes. Changes don't require technical argument. "Only one reason is needed: I have decided as such." (bluca). And the users require technical argument against it. I got it and I will respect it.
I will certainly remember that rule.
Posted Jun 4, 2024 21:57 UTC (Tue)
by pizza (subscriber, #46)
[Link] (1 responses)
Except for the numerous times the technical merit of the "new" default has been explained, even in this thread. And then there's also the little detail where where the rest of the Linux world has been doing it this "new" way for about a decade. Those discussions (including technical arguments) are all part of their public record.
> "Only one reason is needed: I have decided as such."
Hate to break this to you, but the overwhelming majority of Debian packages also fall under this category - Both the packager and the upstream authors make countless such decisions every single day.
And again, if you (or whomever) doesn't like these decisions, feel free to invoke the Debian process for overruling a packager and/or upstream.
Posted Jun 4, 2024 21:59 UTC (Tue)
by corbet (editor, #1)
[Link]
Posted Jun 4, 2024 19:11 UTC (Tue)
by bluca (subscriber, #118303)
[Link] (7 responses)
No. The next Debian release, due next year, will change your machine's behaviour in many ways, as it will be documented in the (lengthy) release notes. If you like it - good. If you don't - too bad, either reconfigure appropriately or stay on the current version until it goes EOL, and then start paying somebody to give you support beyond that.
> There should be a *good* reason for these changes.
Only one reason is needed: I have decided as such. Don't like it? Don't worry, you can have your money back, give me an address and I'll post you a cheque for £0.
Posted Jun 4, 2024 19:13 UTC (Tue)
by bluca (subscriber, #118303)
[Link]
Posted Jun 4, 2024 19:26 UTC (Tue)
by mb (subscriber, #50428)
[Link] (1 responses)
Ok. That's the rule and I will also apply it to you.
Posted Jun 4, 2024 19:33 UTC (Tue)
by corbet (editor, #1)
[Link]
Posted Jun 6, 2024 1:49 UTC (Thu)
by jccleaver (guest, #127418)
[Link] (3 responses)
Yep, that's bluca's and systemd's philosophy in a nutshell, right there.
Posted Jun 6, 2024 9:13 UTC (Thu)
by bluca (subscriber, #118303)
[Link] (1 responses)
Posted Jun 6, 2024 12:16 UTC (Thu)
by Wol (subscriber, #4433)
[Link]
If it's just Debian deciding to adopt systemd's defaults, that's not down to systemd.
bluca can be a pain in the arse - can't we all - but unless he's responsible for Debian policy I fail to see how this has anything to do with him.
(Or is this the transition where now-stable is SysVInit, and next-stable is systemd, but even there I fail to see how this is down to systemd at all ...)
Cheers,
Posted Jun 6, 2024 10:40 UTC (Thu)
by smurf (subscriber, #17840)
[Link]
It's a freakin' default. You don't like it, change it. Other systems have been using the same default settings for literally decades.
If your argument boils down to "it's a change and I don't like it", well, open your window, there's way worse changes than putting /tmp into RAM looming on the horizon. Doing something about these would be a more productive use of everybody's time.
Posted Jun 4, 2024 11:34 UTC (Tue)
by epa (subscriber, #39769)
[Link] (2 responses)
Posted Jun 4, 2024 11:39 UTC (Tue)
by bluca (subscriber, #118303)
[Link] (1 responses)
Posted Jun 4, 2024 12:02 UTC (Tue)
by epa (subscriber, #39769)
[Link]
While in general I dislike timing-dependent effects, such as timeouts after inactivity on a socket connection, they are a fact of life.
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
I'm not sure it actually exists though, it really sounds like a strawman.
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Thanks, sorry I didn't realize it was you. I didn't intend to waylay your work with hypotheticals -- it looks like a good improvement and certainly the status quo ante wasn't perfect either.
Debian's /tmpest in a teapot
If "attacker takes over filename" is part of the threat model, _DO NOT USE /tmp_ for that data
Perhaps I am not understanding, but that seems to rule out /tmp for almost anything on a multiuser system. Many programs expect to create a file in /tmp and then reference it by name later. I know that the best way is to create the file in a single atomic action and get back the file *handle*, no longer caring about the name, but there are plenty of times when you want to run an external program and pass it the name of the temp file you created. For example running an external diff command to print the differences between two strings. I think that these cases outnumber those when you're content to use an anonymous file handle.
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Is there a difference, if the kernel breaks userspace or if systemd breaks userspace?
Can you please give one valid reason, why you absolutely have to delete a couple of bytes from /tmp after it was sitting there without a problem for 10 days?
But deleting small files and sockets? Just don't. There is no way this is going to help anybody, but plenty of room for breakage.
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Which real world application is affected?
Traditional disk based /tmp surely has the same problem, right? So there has never been a version of Linux without this "problem". But there surely have been decades of Linux that don't delete files from /tmp at random times.
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
>Filesystem Inodes IUsed IFree IUse% Mounted on
>tmpfs 4.4M 37 4.4M 1% /tmp
>Filesystem Inodes IUsed IFree IUse% Mounted on
>tmpfs 4.4M 98K 4.3M 3% /tmp
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
If you make a change that requires millions of people to change just one configuration line to get the old behavior back, you are wasting millions of hours of work time.
There should be a *good* reason for these changes.
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
I repeat: this has all been said, no more minds will be changed (if any ever were). I think we can stop this back-and-forth now.
Second request
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
So ... once again we would appear to have reached a point where everybody has said their piece — several times — and any minds that might conceivably be changed will have been changed. This seems like a good place to stop this back-and-forth, please.
A place to stop
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Wol
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot
Debian's /tmpest in a teapot