upvote
I tried switching a buildroot based CI server to the 26.04

One Makefile statement triggered a bug in rust ln:

src/%: @ln -sfn $(DIR)/foo src

In parallel build, we would get random failure: > ln: Already exists

Rewrote that Makefile to work-around it, and ended up with the same kind of bugs with parallel $(INSTALL) -D ...

Tried latest ubuntu 26.10 which supposedly fixes a lot of TOCTOU races in rust coreutils, but no better.

Gave up and switched back to original coreutils.

reply
but it segfaulted in a memory safe way.
reply
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.
reply
The bug report I filed several months ago hasn't been looked at. Many of these utilities were released and made the default for Ubuntu 26.04 LTS!

There's a whole load of basic bugs reported and ignored:

https://bugs.launchpad.net/ubuntu/+source/rust-coreutils

reply
They eventually fixed the one where it didn't sort properly, but it tooks months: https://github.com/uutils/coreutils/issues/12253 https://github.com/uutils/coreutils/issues/12912
reply
This is certainly not just affecting interim releases. Ubuntu 26.04.1 has been released but is currently held back from do-release-upgrade for the LTS channel (which IIRC is unusual for a LTS's .1 release) due to rust-coreutils issue:

> Users of Ubuntu 24.04 LTS will be offered an automatic upgrade to 26.04.1 LTS via Update Manager a couple of weeks following this release after some planned backports to address regressions in a recent version of rust-coreutils.

https://discourse.ubuntu.com/t/ubuntu-26-04-1-lts-released/8...

reply
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.

The fix is still sitting unmerged many months later.

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.

reply
Fork Ubuntu and threaten their business model, that’ll get their attention.

Only half joking.

reply
There's very little incentive to switch. When people release for Linux they almost always first/only test it works on Ubuntu - hence it's going to be the least buggy. (ex: GOG only seemingly tested games on Ubuntu)

So the switching cost is buggy software. You'd need something radically different that brings enough new features to the table to make it worth it the switch and dealing with bad/non-existant support.

I think something like Nix/Guix but with stable library versions that matches Ubuntu/Debian LTS ones 1-to-1 could get traction

reply
Then you would have to embrace their bad decisions, such as this one, and if you do, what’s the point?

Everything just needs to run from a container with their expected runtime environment.

reply
Ubuntu is the fork; just use Debian.
reply
There are plenty of Ubuntu forks?
reply
I have. It has been an open bug upstream for years as well.
reply
ok, that's concerning, if you post it here I'll vote for it (after confirming).
reply
The Launchpad bug is https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bu... .

The apparently related bug in the origin project is https://github.com/uutils/coreutils/issues/2949, filed back in 2022 and which sat unmoved for several years until, probably not coincidentally, almost the same time yesterday that this appeared on Hacker News.

reply
My experience is that filing bug reports to ubuntu is a complete waste of time. Not sure if it's different for paying users.
reply
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.
reply
Glad to hear that I am not alone. I feel like launchpad is totally ignored most of the time.

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...

[1] https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/215...

reply
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.

Maybe the bugs get traction if you have a service contract?

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.

reply
And that’s why i keep ubuntu far from my computers…
reply
Let them first fix Snap.
reply
There is no reason for anyone on any distro to use snap.

It will die so just leave it alone.

reply
They need to kill snap ...
reply
I think ubuntu wants to kill desktop linux. No other explaination of why they push firefox inside snap, which then proceeds to constantly crash, when firefox used normally works completely fine.

I haven't tried chromium but I presume it's the same issue.

At work I'm forced to use ubuntu and I placed snapd on hold and added mozilla's own apt repository to my configuration to get firefox.

At least in the past few months the dbus crashes (been using systemd on debian for several years just fine, this never happened) that render the system unusable and un-rebootable have stopped… I guess when my company will decide to upgrade to 26.04 there will be more instability and problems.

reply
sandboxing a browser makes total sense. my firefox and chromium running as snaps never crashed a single time for as long as I can remember, and I use both every day, at the same time.
reply
Firefox installed as a snap feels sluggish to me. When I install a Ubuntu system, the first thing I do is to uninstall any snap and install the apt versions of things, possibly adding official PPAs or using Guix to install software.
reply
why bother with ubuntu at all ? If you want ubuntu but without snap out of the box, Zorin is 1 option. Or if you also hate gnome, linux mint.
reply
deleted
reply
Yes, please. Linux distros is better with macos approach. And making appimage first class makes a lot of sense.
reply
AppImages do not work anywhere close to how macOSs .apps do, and even if they did the approach isn't correct for how things work on Linux.
reply
Appimages are bloated and unreliable. You can't guarantee that your app will run on any machine because it might depend on different system libraries.

Flatpak uses shared stable runtimes that are the same everywhere and don't take up space more than once. It also comes with a native update system and sandboxing. Snap is the same thing but worse.

reply
My problem with flatpak is that the underlying runtime has a limited lifespan. I used the Sublime Text 3 flatpak for many years, and it was deprecated a few months ago because the runtime it was using was no longer supported. This caused people to update the flatpak to Sublime 4, which is good, but I only have a license for 3. In the end I just downloaded the binary for 3 from their website, and it still just worked. Flatpak still doesn't save you from bitrot.
reply
> Snap is the same thing but worse

IIRC Snap relies heavily on AppArmor for sandboxing, so on anything non-Ubuntu the sandboxing is non-existent.

reply
I'll avoid it at this point anyway. The Rust coreutils is another reason for that. Snap, monetizing updates, telemetry, enough is enough.
reply
Yup. After almost 20 years, I have had enough of their crap. All of my new machines are getting Debian. Can’t wait until I am free of Ubuntu.
reply
Hi, this is not a one bug.when the change app flags not working or not happening. I was measured with bsd and busybox.
reply
to enable GPL free embedded Ubuntu, field tested on all platforms (because it happens to be the default).
reply
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?
reply
It's less about the specific issue and more indicative of bad/insufficient test coverage
reply
What programmer or programming language can't iterate a loop more than 32000 times?!
reply
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:

https://lwn.net/Articles/1035727/

reply
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.

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!

reply
OIC. Rust doesn't guarantee optimizing tail recursion. How unfortunate for a language that's getting widespread adoption.
reply
I don't think that's related? The bug alluded to looks something like

    function rm(node) {
        for (const child of ls(node))
            rm(child);
        unlink(node);
    }
and no amount of tail call optimization will save you here, because this isn't tail recursion. Of course you could rewrite it using an explicit stack + tail recursion, but then you might as well be using a while loop.
reply
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]).

[1] https://github.com/rust-lang/rust/issues/112788

[2] https://github.com/rust-lang/rust/issues/153827

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 can't allocate a new stack frame you should have to say it.

reply
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.

But I can understand the preference for an explicit opt-in, to make clear that it is enforced and not assumed.

reply
> implicitly creating new stacks

I'd argue that it's explicit - that's what a function call does and you don't have implicit function calls in rust.

> 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.

What you're asking for here already exists. Tail calls might 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).

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.

reply
I see it, certain algorithms need 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.
reply
No algorithm requires tail-call elimination in a general-purpose language with imperative mutability. It's just another way to express iteration.
reply
Sure, but mutual recursion might require `goto` for example. Or an explicit state machine.
reply
> because it means subtle changes (introducing a destructor, re-ordering code, etc) can change semantics without you realizing it.

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.

reply
Incorrect. `become` does change drop order - https://play.rust-lang.org/?version=nightly&mode=debug&editi....
reply
That's not implementing tail calls breaks things, that's bad design of implementing tail calls breaking things.

The whole idea of "let's change semantics to make it easier" is dumb.

If you want guaranteed tail calls, change your code until it works.

reply
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
reply
It's not a change in semantics of compiled code. It is only a change of whether or not the code will compile.
reply
Do any widely used languages guarantee tail call optimization? It's a pretty niche feature.
reply
Scala, ocaml, racket, clojure, zig.

For recursion only kotlin.

(For most of these only with syntax specifying it)

reply
When triaging an issue you have to prioritise. Do you fix a problem that affects 2-3 people or one that may affect thousands?
reply
The point is that such bugs shouldn't exist in the first place.

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.

Every time you call something recursively you should be thinking "how deep is this?".

reply
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?
reply
Rust ? Because of ... memory safety. /s
reply
That way of thinking just means it'll never be fixed
reply
"The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it." Linus Torvalds
reply
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.
reply
It's complicated to do it yourself when upstream won't accept your code.
reply
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.

Incidentally someone submitted a PR for this issue about 3 hours before the first comment about it in this thread - https://github.com/uutils/coreutils/pull/14554 (and 2 hours before this link was submitted to HN)

reply
What approach would you suggest for priorisation of tickets?
reply
Ideally there should have been no tickets at all if all that's happening is a program being ported to another language.
reply
This isn't a port - it's a re-implementation without any use of the original source.

That's also not all that's happening. It's also making improvements like better internalization support, better error messages, and a small handful of other extensions.

reply
I have had to tell them repeatedly to stop copying tests verbatim, including the original comments from GNU coreutils. So I doubt this is true, which is frustrating.
reply
What's wrong with them using the coreutils tests?
reply
If they followed the license nothing. My uninformed knowledge is that the rust based rewrite is MIT, the originals are GPL, and you can't include GPL code in a MIT licensed project without making it GPL.
reply
> and you can't include GPL code in a MIT licensed project without making it GPL.

Why is that? The tests are not linked to the distributed binaries. You can also distribute project sources with mixed licenses.

reply
Capitalism.
reply
I mean, that should work... but you can see why that would be considered low priority right?
reply
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."
reply