Fil-C[0] can compile GNU coreutils, it has stronger* memory safety guarantees than rust, none of the compatibility issues that a wholesale rewrite has, and performance that seems to be within about a factor of two[1] compared to the normally compiled code..<p>[0]: <a href="https://fil-c.org/" rel="nofollow">https://fil-c.org/</a>.<p>[1]: <a href="https://bannalia.blogspot.com/2025/11/comparing-run-time-performance-of-fil-c.html" rel="nofollow">https://bannalia.blogspot.com/2025/11/comparing-run-time-per...</a><p>* Guaranteed to crash rather than potentially grant arbitrary code execution.
I really don't understand why Canonical rushes this. If 'rm' can't remove all possible directory entries, that is a big issue:<p><pre><code> $ podman run --rm -it ubuntu:26.10
$ apt update -y; apt upgrade -y
$ rm --version
rm (uutils coreutils) 0.10.0
$ gnumkdir -p $(yes a/ | head -n $((32 * 1024)) | tr -d '\n')
$ rm -rf a
Segmentation fault (core dumped) rm -rf a
$ ls a
a
$ gnurm -rf a
$ ls a
ls: cannot access 'a': No such file or directory</code></pre>
to enable GPL free embedded Ubuntu, field tested on all platforms (because it happens to be the default).
Rush? This is an interim release (95% or so only tracks LTS's) that is not even out yet... Go file a bug reports if you have some time.
The bug report I filed several months ago hasn't been looked at.<p>There's a whole load of basic bugs reported and ignored:<p><a href="https://bugs.launchpad.net/ubuntu/+source/rust-coreutils" rel="nofollow">https://bugs.launchpad.net/ubuntu/+source/rust-coreutils</a>
I did, and the original dev of the component fixed it within a few days. It was straightforward, a backwards reading of a spec, reordered.<p>The fix is still sitting unmerged many months later.<p>This surprised me since I thought the project was in heavy bugfix/compat mode. I won’t touch it until I see some velocity on open bugs.
I have. It has been an open bug upstream for years as well.
My experience is that filing bug reports to ubuntu is a complete waste of time. Not sure if it's different for paying users.
Reporting bugs before Ubuntu releases has never worked for me. They always land a bunch of major changes after the supposed "freeze" then they ignore all feedback because of the freeze. It's infuriating.
Glad to hear that I am not alone. I feel like launchpad is totally ignored most of the time.<p>To get a response on a buggy GNU coreutils patch of theirs [1], I had to mention it in a rust-coreutils bug months later...<p>[1] <a href="https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/2150305" rel="nofollow">https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/215...</a>
I've been a Ubuntu user for about 20 years, and I file bugs every now and then on launchpad. I don't recall any of them ever being fixed.<p>Maybe the bugs get traction if you have a service contract?<p>Best to file bugs directly to upstream, but that of course means you should try it on the latest upstream version and not whatever version ubuntu ships, so it's more friction.
Let them first fix Snap.
yeah, this is a bug. And yes, it should be fixed. But I don't think it will affect many users, I mean who has a 32000 -evels deep directory on their system?
It's less about the specific issue and more indicative of bad/insufficient test coverage
What programmer or programming language can't iterate a loop more than 32000 times?!
It's a stack overflow which means it's using recursion and for historical reasons that don't make sense any more, stacks are teeny tiny on 64-bit Linux - apparently only 8 MB on Linux! I'm not sure why they don't raise it to something reasonable like 4 GB. I guess because they want consistency with 32-bit? Maybe we can finally change it if/when they phase out support for 32-bit Linux. Apparently it might not be that far away:<p><a href="https://lwn.net/Articles/1035727/" rel="nofollow">https://lwn.net/Articles/1035727/</a>
8MB is the default per-thread stack size from glibc, also seems to be the default "ulimit" from pam or the kernel, I'm not sure. So for the main/default thread (or if not using threads) the process can use setrlimit() and for threads it can use pthread_attr_setstacksize() to get bigger stacks if it knows it may need them.<p>8MB is pretty huge though; musl libc is famous for defaulting to much smaller per-thread stack size of 128KB (to avoid over-committing lots of memory when there are many threads - the main dev is really principled/opinionated on this topic, but again there are a few ways for applications to explicitly size their stacks as large as they need). Linux kernel threads get a bit less than 16KB!
OIC. Rust doesn't guarantee optimizing tail recursion. How unfortunate for a language that's getting widespread adoption.
For what it's worth there's reasonably active [1] work on implementing opt-in guaranteed tail calls - but it's not particularly fast going. LLVM (the backend rust uses) needs better support for musttail (e.g. some architectures just don't support it [2]).<p>[1] <a href="https://github.com/rust-lang/rust/issues/112788" rel="nofollow">https://github.com/rust-lang/rust/issues/112788</a><p>[2] <a href="https://github.com/rust-lang/rust/issues/153827" rel="nofollow">https://github.com/rust-lang/rust/issues/153827</a><p>By-default guaranteed tail calls really isn't rust's style, because it means subtle changes (introducing a destructor, re-ordering code, etc) can change semantics without you realizing it. If you want to guarantee that a call <i>can't</i> allocate a new stack frame you should have to say it.
Not so familiar with this area, but isn't the existing behavior of implicitly creating new stacks more of a problem than implicit tail-call elimination? Seems the latter is a kind of compiler-level optimization, of which there are already many (I think) that change the semantics internally but guarantee the outward behavior stays the same.<p>But I can understand the preference for an explicit opt-in, to make clear that it is enforced and not assumed.
> implicitly creating new stacks<p>I'd argue that it's explicit - that's what a function call does and you don't have implicit function calls in rust.<p>> Seems the latter is a kind of compiler-level optimization, of which there are already many (I think) that change the semantics internally but guarantee the outward behavior stays the same.<p>What you're asking for here already exists. Tail calls <i>might</i> be optimized into not allocating extra stack frames, the rust compiler just doesn't guarantee that it will perform that optimization (and almost certainly won't when code is compiled without optimizations... for instance).<p>What people want is the semantic guarantee that the stack frame won't be allocated. Not just a compiler that often performs the optimization. Otherwise you can't be sure that your code will keep working with new compiler flags/versions/architectures/... You could say "whenever the code is the right shape we'll guarantee the optimization" (C++ famously did this for things like copy elision)... but now the shape of code comes with non-obvious semantic guarantees and that's not rust's style. Hence the proposal for a keyword instead.
I see it, certain algorithms <i>need</i> guaranteed tail-call elimination, otherwise they are too inefficient and must be manually unrolled or rewritten to avoid blowing the stack. So a compiler optimization that is "nice to have" is not good enough.
> because it means subtle changes (introducing a destructor, re-ordering code, etc) can change semantics without you realizing it.<p>No, it won't change semantics - if you say @musttail or similar, it will simply fail to compile if you, say, introduce a destructor - the semantics will not subtly change.
Incorrect. `become` does change drop order - <a href="https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=fc0fccce5f43ff4605e08b351e4d98a9" rel="nofollow">https://play.rust-lang.org/?version=nightly&mode=debug&editi...</a>.
That's not implementing tail calls breaks things, that's bad design of implementing tail calls breaking things.<p>The whole idea of "let's change semantics to make it easier" is dumb.<p>If you want guaranteed tail calls, change your code until it works.
Uh, yes, if you guarantee the semantics only when the code explicitly opts in and not by default then semantics will not subtly change, that is the point of my comment
Do <i>any</i> widely used languages guarantee tail call optimization? It's a pretty niche feature.
Scala, ocaml, racket, clojure, zig.<p>For recursion only kotlin.<p>(For most of these only with syntax specifying it)
Rust ? Because of ... memory safety. /s
When triaging an issue you have to prioritise. Do you fix a problem that affects 2-3 people or one that may affect thousands?
The point is that such bugs shouldn't exist in the first place.<p>Using recursion on unbounded inputs on a programming language that doesn't support that (which are most) is an extremely classical mistake that really should be known to all programmers, especially those of low level languages that care about safety.<p>Every time you call something recursively you should be thinking "how deep is this?".
By that logic, why even spend effort migrating from a known-working implementation to one which is known to have outstanding bugs that there isn't enough bandwidth to fix?
That way of thinking just means it'll never be fixed
"The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it."
Linus Torvalds
It's complicated to do it yourself when upstream won't accept your code.
The problem there is that this is exactly the class of bug that does not exist in GNU coreutils because of philosophy of that project. Non-existence of such bugs proves that the impementation is not copied from AT&T code.
Nah, people should (and do) fix small issues as well as big issues. Lying about the scale of issues and calling them "big" when they aren't just leads to no ability to prioritize or evaluate.<p>Incidentally someone submitted a PR for this issue about 3 hours before the first comment about it in this thread - <a href="https://github.com/uutils/coreutils/pull/14554" rel="nofollow">https://github.com/uutils/coreutils/pull/14554</a> (and 2 hours before this link was submitted to HN)
What approach would you suggest for priorisation of tickets?
I mean, that should work... but you can see why that would be considered low priority right?
Wow! Memory safety and such... Reminds me when a friend of mine wrote in IRC long time ago: "Hmm, tail just segfaulted." When I asked "Are you on Hurd?" he just replied "Yes."
Whether you like Rust or not, it's questionable as to why Canonical would push this so much and do it in such a cavalier way.<p>Will this really make coreutils more secure? I doubt it, if anything there will be a river of new bugs.<p>So, again, why are they pushing Rust so much? Having Microsoft make Rust a 'Tier-1' language also doesn't bode well.
You can use coreutils-from-gnu instead uutils. However since 26.04 build-essential depends on coreutils-from-uutils, it cannot be upgraded while coreutils-from-gnu is installed.<p><a href="https://bugs.launchpad.net/ubuntu/+source/build-essential/+bug/2148691" rel="nofollow">https://bugs.launchpad.net/ubuntu/+source/build-essential/+b...</a>
For now you can list dependent packages manually in apt-get install: <a href="https://packages.ubuntu.com/resolute/build-essential" rel="nofollow">https://packages.ubuntu.com/resolute/build-essential</a><p>But it's clear that Ubuntu will remove coreutils, genuine sudo and other tools from the future versions. It's the direction, it's ideological and thus nor merit nor our feedback will change anything here.
You can use equivs to create a dummy coreutils-from-uutils package, as mentioned in the responses to that report.<p>It is frustrating that Canonical has no interest in fixing it, though. It makes it hard to take their claims seriously that you can still use GNU coreutils if you want.
You're specifically frustrated about unbounded stack recursion exhausting the stack, triggered by multiple thousands of directories? It doesn't sound like this is about multi-thousand-deep directory structures, it sounds like it's about something else.<p>Because even diving into it, I would agree with a prioritisation decision that puts this bug down the bottom of a priority list.
People still use ubuntu when Debian and Mint exist?
If you ask their motivation? "We want to make them safer"<p>They worked pretty fine for decades, now, who needs these rewrites?
Not saying it's useless, but in practice, what benefits did this bring?
Has the code quality in that repo gotten to a good point then? I haven't followed it much, but last I looked[1] (which was a few years ago) almost every tool I looked at in detail had pretty bad performance or correctness issues.<p>[1] <a href="https://jackson.dev/post/rust-coreutils-dd/" rel="nofollow">https://jackson.dev/post/rust-coreutils-dd/</a>
The reason for existence of uutils is ideological, not technical. Thus code quality is of no use for the objective.
I’m a huge proponent of Rust and generally lean a lot closer to the RIIR mentality than most, but this effort seems to be such a waste of effort and resources.<p>There have been a dozen CVEs reported against all of coreutils in the past twenty years. The most recent audit of uutils-coreutils turned up <i>forty-four</i> CVEs.<p>By all appearances they’re replacing battle-tested and fundamental tooling which <i>hasn’t been a problem</i> with extremely amateurish Rust. The threading highlighted in the linked post above seems pretty egregious.
I bet you don't know the reason for existence
> last I looked[1] (which was a few years ago)<p>You weren't kidding: it was exactly 4 years ago ("September 13, 2022").
I was bummed when I came across this: <a href="https://github.com/trifectatechfoundation/sudo-rs/issues/1299" rel="nofollow">https://github.com/trifectatechfoundation/sudo-rs/issues/129...</a>
So what is the way forward for Linux to have sandboxi g as strong as Android? Appimage everything? I know it's possible now hacking together things, but I mean by default and integrated.
Amutable. Building an immutable and image based system which even the installer can't modify, a-la macOS.<p>One systemd patch at a time.
Maybe we could develop trustworthy free-software applications again, instead of trying to establish a commercial apps ecosystem on top of Linux?
Everything online reminds of when Ubuntu switched to dash for init scripts or something. Good times.
Other distros are based of ununtu. Will the all ship with crippled coreutils from now on?
Can’t wait for the whole Rust rewrite of Linux!
Was there something wrong with how they are currently written or do they just want the badge that says they converted to Rust?
Neither. They basically see Rust as the future. They want to be able to attract young contributors and to hire young employees who are excited about Rust and who want the safety features. Bear in mind, the average age of the Linux developer is increasing. They also see technical benefits in Rust. And they are increasing test coverage of both the Rust tools and the tools written in C, IIRC.<p>My source is this interview with the VP of Engineering at Canonical on this topic: <a href="https://corrode.dev/podcast/s05e05-canonical/" rel="nofollow">https://corrode.dev/podcast/s05e05-canonical/</a>
License. GNU is copyleft and the new thing is permissive.<p>We might see a fracture open slowly. For me, even AGPL is not enough
Hmm, this doesn’t make sense. You simply don’t replace utilities with many decades of maturity and that “just work” with something that is not as mature. It will open all users of the distro to all sorts of subtle and not so subtle bugs. I for one don’t want to find myself staring at a mysterious segfault when I want to build the latest version of nodejs or flash a microcontroller. It’s such a pity; I have used Ubuntu for close to 23 years.
[flagged]
[flagged]
Ubuntu started out with a slogan claiming "linux for human beings", and it kept that reputation for well over a decade, with a heavy focus on the desktop.<p>You can split hairs however you want, but this created a legacy, and is why Ubuntu is still one of the top recommended distributions for beginners.
Cool aspirations but I don't think it has significant enterprise deployments compared to RHEL or SLES.
[flagged]
[flagged]
[flagged]
I went upstream and started using Debian instead. Don't listen to the haters: it updates at about the same frequency as Ubuntu LTS.
Or just use Arch, and skip the pointless hype squad
you are being sarcastic right?
[flagged]
[flagged]
There have been twelve CVEs reported against coreutils in the past twenty years.<p>There were <i>forty-four</i> against this project in just the last audit.<p>I am all for RIIR in cases where it makes sense. This does not even remotely appear to be one of them. By all appearances the quality of the code is extremely amateurish at best. coreutils has not been a significant source of vulnerabilities in the past, and they’re replacing it with code written by amateurs that performs worse and <i>already</i> has a worse security track record.
From the company that distributed Amazon spyware (<a href="https://www.fsf.org/blogs/rms/ubuntu-spyware-what-to-do" rel="nofollow">https://www.fsf.org/blogs/rms/ubuntu-spyware-what-to-do</a>) and now turns Debian into Slopian. No thanks.