News for hackers. Stuff that matters.
Re:Rust concurrency: the archetype of a message-passing bug by jojobas on Monday June 22, 2020 @08:52AM (#23599598)
Rust docs never claimed to prevent race conditions (which he doesn't call by name).

https://doc.rust-lang.org/nomicon/races.html

Re:Rust concurrency: the archetype of a message-passing bug by pjmlp on Monday June 22, 2020 @09:08AM (#23599731)
True, but that is something that many miss a lot when discussing Rust virtues.

Yes the type system is a great help when dealing with thread based concurrency/paralellism, but not so much for the scenarios where we are already using type safe managed languages in distributed computing across multiple processes, most likely not even written in the same language.

Which by the way, given the recent security exploits, is much preferable to go back to, instead of relying on threads for parallelism.

Re:Rust concurrency: the archetype of a message-passing bug by fluffything on Monday June 22, 2020 @09:29AM (#23599919)
> True, but that is something that many miss a lot when discussing Rust virtues.

The large majority of comments I read about Rust safety claims are very explicit that Rust provides memory safety and data-race freedom.

You seem to be arguing that these comments are leaving out important information by not clarifying that "This does not mean that Rust prevents all bugs, e.g., you can still write programs with logic bugs, race conditions, dead locks, DDoS, ... and the list goes on and on... in Rust".

If somebody does not know what that "memory safety" and "data-race freedom" is, they should just ask, but if they don't, and they make an incorrect assumption, then its kind of their fault, not the fault of whoever wrote such a comment for not mentioning all the things that these two properties do not guarantee.

Also, it is actually trivial to build Rust programs that prevent some race-conditions, like deadlocks (just a cargo flag away), so if anything, I'd complain that people being "too correct" by restricting themselves to "data-race freedom" are leaving out some important advantages of Rust.

Re:Rust concurrency: the archetype of a message-passing bug by ashtonkem on Monday June 22, 2020 @10:33AM (#23600608)
My experience is that Rust advocates often go well out of their way to specify the limits of Rust’s protection, and will even rush in to correct someone who over promises what Rust can give you.
Re:Rust concurrency: the archetype of a message-passing bug by htfy96 on Monday June 22, 2020 @11:00AM (#23600964)
r/rust and users.rust-lang.org are informative and sensible when it comes to limitations. Twitter and, well, random programming discords are often full of cults
Re:Rust concurrency: the archetype of a message-passing bug by lostcolony on Monday June 22, 2020 @01:31PM (#23603030)
Yeah, I've never criticized Rust advocates for not talking enough about Rust. :P

But seriously, yeah, the seasoned Rustaceans I've known have been pretty thorough in giving downsides/limitations as well. It's something I love about a language; when the voices in it are aggressive in talking about things it does poorly, or use cases it's not optimal (I still love that Erlang's official website has a section for when _not_ to use it).

Re:Rust concurrency: the archetype of a message-passing bug by yencabulator on Tuesday June 23, 2020 @06:19PM (#23621096)
That doesn't sound like "fearless concurrency", though.
Re:Rust concurrency: the archetype of a message-passing bug by loopz on Monday June 22, 2020 @10:31AM (#23600585)
It's really hard to envision exactly all the problems parallellization might enable in a given system, as it'll all depend on exact implementation and execution details. The safe assumption is whenever you introduce concurrency or even event-handling, stuff might implicitly FUBAR, unless explicitly designed not to. This is a tough pill to swallow when people can't envision exactly all the problems parallellization might enable in a given system (circular argument).
Re:Rust concurrency: the archetype of a message-passing bug by vasilakisfil on Monday June 22, 2020 @02:45PM (#23604039)
I ll leave that here http://graydon2.dreamwidth.org/247406.html

Edit: in the link, rust creator argues that we should watch out how we market rust.

Re:Rust concurrency: the archetype of a message-passing bug by bluejekyll on Monday June 22, 2020 @09:24AM (#23599878)
> but that is something that many miss a lot when discussing Rust virtues.

When someone says “Rust is thread-safe”, Rustaceans in one common voice reply, “Rust is data-race-safe”. After that, folks get into a good conversation about what the difference is, and learn about deadlocks and other issue in threads.

Generally speaking though, it does mean that multi-threaded programming in Rust is memory-safe, and won’t introduce a significant class of bugs that you see in C and C++, where so many exploits come from.

Re:Rust concurrency: the archetype of a message-passing bug by fluffything on Monday June 22, 2020 @09:35AM (#23599994)
Thread-safety is defined as "the absence of data-races", so technically speaking, saying that Rust is "thread-safe" and saying that it provides "data-race freedom", is just two different forms of saying the exact same thing.

The problem is that some people don't know what these mean. I'm not sure why though. Like, I could understand that somebody coming to Rust from Java wouldn't know what "memory safety" means since it is essentially a solution to a problem that Java does not have. But most high-level languages do not protect you from data-races, so this is a problem that Rust does solve and one can run into in most widely-used programming languages (e.g. in Java they are also called data-races).

Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Monday June 22, 2020 @09:46AM (#23600106)
This is not what thread safety means:

> Thread safety is a computer programming concept applicable to multi-threaded code. Thread-safe code only manipulates shared data structures in a manner that ensures that all threads behave properly and fulfill their design specifications without unintended interaction. There are various strategies for making thread-safe data structures.

(Wikipedia)

Data races is only part of the problem. Thread-safe also means that your design is bug-free and you don't have livelocks for example because of how you state machines interact there is a way for them to loop forever in an unexpected way (example, dining philosophers).

Similarly, data-race-freedom as provided by Rust is helpful for end users but not for library developers. Developers of concurrent data structures or threading primitives are on their own to sail in the complexities of the C++11 Memory Model (i.e. Acquire/Release) and the compiler cannot verify that you didn't introduce a synchronization bug in your new concurrent queue or event bus.

Re:Rust concurrency: the archetype of a message-passing bug by fluffything on Monday June 22, 2020 @03:07PM (#23604558)
> This is not what thread safety means: > > Thread safety is a computer programming concept applicable to multi-threaded code.

Woah woah, hold your horses.

Thread-safety is a definition in the specification of the operational semantics of programming languages. It is a precise mathematical term used in proofs.

The C, C++, and Rust memory models precisely define thread-safety as "the absence of data-races".

Whatever the wikipedia says just does not apply (and if the wikipedia does not mention this, it is just incomplete in its treatment of thread safety).

Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Monday June 22, 2020 @05:26PM (#23606931)
How does Rust prove that you are correctly using relaxed, acquire and release atomics?
Re:Rust concurrency: the archetype of a message-passing bug by fluffything on Tuesday June 23, 2020 @02:52PM (#23618475)
It doesn't.

What Rust proves for safe Rust is that even if you were to use these incorrectly, your program is still data-race free and memory safe.

That is, if you use relaxed where you actually wanted to use sequential consistency, your program might do many sorts of incorrect things (e.g. a counter is incremented in the wrong order), but it will not have undefined behavior (it won't dereference a null pointer, doing an access out of bound, double free, or having a data-race).

To write atomic code that creates a data-race, you'd need to use unsafe Rust, and then your program would have UB.

Rust proves this for safe Rust using ownership + borrowing, and `Sync`+`Send`. Ownership and borrowing deal with "aliasing xor mutability" which essentially eliminates all data-races, because a data-race requires a conflicting access involving two aliases where one is a write, and these two features prevent that from happening. `Sync` and `Send` provide proofs that some concurrent accesses are ok, e.g., an atomic relaxed write that conflicts with an atomic relaxed read is ok (what's not ok is unsynchronized conflicting accesses).

As mentioned this does not proves that your program has no logic bugs, only that it has no data-races and UB. It is possible to write programs in safe Rust that do not do what you intend.

Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Tuesday June 23, 2020 @05:03PM (#23620233)
Well if you misuse atomics you have a data race and undefined behaviors.
Re:Rust concurrency: the archetype of a message-passing bug by fluffything on Tuesday June 23, 2020 @05:46PM (#23620760)
As explained above, if you do that in safe Rust, your program does not compile.

So no, you don't have data races or undefined behaviors.

If you mix safe Rust with unsafe Rust, and your unsafe Rust has a bug that causes a data-race, then you only have to search for the bug in the 0.00001% of your code base that uses unsafe Rust. Which is many orders of magnitude better than even "safe" languages like Java.

Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Thursday June 25, 2020 @05:22AM (#23638603)
Then if I'm writing a concurrent queue or concurrent hash-table I'm on my own since 100% of my codebase is unsafe Rust.

Which was exactly my point. Rust provides no support for fearless concurrency because actual concurrent code, the code that deals with synchronization, is considered unsafe.

I.e. fearless concurrency is a misleading statement and should not be trusted if you write concurrent code.

Also, I suppose you didn't try to write any concurrent data structure. Even a hundred of lines of concurrent code is incredibly hard to debug without tools when it involves multiple threads synchronizing with each other.

Re:Rust concurrency: the archetype of a message-passing bug by fluffything on Friday June 26, 2020 @06:24AM (#23650449)
> Then if I'm writing a concurrent queue or concurrent hash-table I'm on my own since 100% of my codebase is unsafe Rust.

Sure. And if you are writing a concurrent application with 500k LOC , 99.99999999% of your code will be safe Rust.

Safe Rust that you can refactor at will - at least, in my anecdotal experience of working 3 years full-time on a concurrent >100kLOC Rust application, I have yet to see a big refactor that introduces a concurrency or memory safety bug. In my previous 15 years of doing the same in C++, I actually have to see a refactor by myself or others that did not introduce multiple bugs.

> Then if I'm writing a concurrent queue or concurrent hash-table I'm on my own since 100% of my codebase is unsafe Rust.

You can write a concurrent queue using safe Rust (e.g. it is trivial to write a spinlock using safe Rust that you can use for that). You are choosing not to do that, and provide your own instead.

Your job is not to write the unsafe code, but to _prove_ that it is safe to use from safe Rust.

Once you do that, the other 99.999999999% of your application can just use it without issues.

If you don't want to do that, Rust belt has soundness proofs for most concurrency primitives in the standard library. Aaron Turon's thesis has similar proofs for the ones in crossbeam. Etc.

> I suppose you didn't try to write any concurrent data structure.

You suppose wrong.

> Even a hundred of lines of concurrent code is incredibly hard to debug without tools when it involves multiple threads synchronizing with each other.

So don't do it? I've done it a couple of times, and the first thing I do is set up the fuzzer and thread-sanitizer for the build. That catches most bugs early.

I've never proven my implementations to be sound, but they were always good enough for my use cases. I've hitted bugs in my application when using them, but finding those bugs was always trivial, since they are only located in the 100 LOC of unsafe code.

---

I think you are fully misunderstanding the claim fearless concurrency. It is a claim about safe Rust, and you can write huge, complex, and extremely efficient concurrent applications using safe Rust without having to write one line of unsafe Rust yourself, and using only unsafe Rust code that has been proved correct.

If the only thing you use Rust for is writing concurrent data-structures, Rust is very specific that these claims do not apply there. You seem to not have understood this yet, and without having understood that, the chances that your implementations are correct are very thin. I hope you are not using them for anything important.

Re:Rust concurrency: the archetype of a message-passing bug by TheNorthman on Monday June 22, 2020 @10:28AM (#23600544)
Continuing from the same Wikipedia page, it mentions three levels of thread safety. Rust support all of them, and can guarantee them at compile time:

> _Thread safe_: Implementation is guaranteed to be free of race conditions when accessed by multiple threads simultaneously.

> _Conditionally safe_: Different threads can access different objects simultaneously, and access to shared data is protected from race conditions.

> _Not thread safe_: Data structures should not be accessed simultaneously by different threads.

Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Monday June 22, 2020 @11:42AM (#23601451)
It does not though? How does Rust proves that your implementation of a Peterson's lock algorithm[1] or Lamport's Bakery algorithm[2] is:

- Deadlock-free

- Live-lock free

- Free of data races

Second, how does Rust proves that you are correctly using the relaxed, acquire and release atomics so that your channel implementation is free of data races?

You can use Loom[3] but this is guarantee is certainly not provided by the compiler.

In short, Rust compiler only addresses memory issues by flat out preventing memory sharing. However, someone has to write those sharing/synchronizing data structures (Channels, Event Bus, Concurrent Hash-Table, ...) and those people have no tools that help them navigate the significant complexity of multithreading that go beyond memory and lifetime bugs.

[1]: https://en.wikipedia.org/wiki/Peterson%27s_algorithm#The_alg...

[2]: https://en.wikipedia.org/wiki/Lamport%27s_bakery_algorithm

[3]: https://github.com/tokio-rs/loom

Re:Rust concurrency: the archetype of a message-passing bug by TheNorthman on Monday June 22, 2020 @01:04PM (#23602652)
That's my mistake. I confused data races and general race conditions, sorry about that :).
Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Monday June 22, 2020 @09:20AM (#23599845)
That's my main grip with Rust "Fearless Concurrency", fearing concurrency and dipping into it with your toes is a good thing.

Claiming "Fearless Concurrency" but ignoring synchronization bugs, at a low-level in concurrent data structures or at a high-level in concurrent systems is misleading. People will be fearlessly introducing livelocks.

Re:Rust concurrency: the archetype of a message-passing bug by ragnese on Monday June 22, 2020 @10:55AM (#23600896)
I agree that "fearless concurrency" isn't the best tagline. While I'm definitely less fearful with concurrency in Rust, I'm still pretty fearful... I'm very good at writing deadlocks.
Re:Rust concurrency: the archetype of a message-passing bug by jstrong on Monday June 22, 2020 @10:47AM (#23600790)
Have you written a lot of concurrent code in rust? Did your experience doing so convince you that it's something you should "fear" doing?
Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Monday June 22, 2020 @11:34AM (#23601341)
I've written a multithreading runtime from the ground up in Nim.[1]

And yes, writing that taught me that current programming languages are not sufficiently equipped to deal with concurrency bugs, including Rust. The bugs that I had where of the dining philosophers kind (deadlocks or livelocks when trying to put a thread to sleep for example or resolving data dependencies between multiple threads), some were due to a bug in glibc where only formal verification allowed me to ensure that I was doing the correct thing and it was the lower-level layers that was incorrect.[2]

Similarly, state machine formal verification to prevent design bugs is something that hardware engineers are deeply aware of but would also be extremely useful to ensure "correct-by-construction" event driven code in software engineering.

In comparison, we have many more tools to address memory bugs (Address Sanitizer, Valgrind and fuzzers in particular) but synchronization and communicating state machine bugs are still impractically addressed at the moment. This is something I'd really want Nim to explore and I'm really excited about the Z3 integration[3] to enable new formally verified use-cases[4].

Unfortunately, when I express concerns about those bugs to people from the Rust community, they tend to dismiss those as if the borrow checker was the panacea to all multithreading problems.

[1]: https://github.com/mratsim/weave

[2]: https://github.com/mratsim/weave/issues/56

[3]: https://nim-lang.org/docs/drnim.html

[4]: https://github.com/nim-lang/RFCs/issues/222

Re:Rust concurrency: the archetype of a message-passing bug by staticassertion on Monday June 22, 2020 @01:06PM (#23602678)
Sorry that I see your post is downvoted, I'm generally in agreement, as an avid rust programmer. Rust can express a lot of safety guarantees, but there's a massive amount of room for improvements, and I'm sorry that the community hasn't been accepting of that in your interactions.

> Similarly, state machine formal verification to prevent design bugs are something that hardware engineers are deeply aware of but would also be extremely useful to ensure "correct-by-construction" event driven code.

This reminds me a lot of P. Rust has a crate that I wouldn't necessarily recommend, but it might be similar to what you want:

https://github.com/fitzgen/state_machine_future

Of course, in this case the code is the model, there is no verification here.

The Z3 integration with Nim is super cool, would love to see something like that for Rust. I know of some existing research that reminds me of this but I don't have time to dig up the paper - it was implemented in macros, and looked a lot like what you've got there, with pre/post conditions, ensures, etc. If someone has that paper, please link it! I would love to reread.

edit: Here's one rust crate leveraging Z3, but not the one I was thinking of https://github.com/Rust-Proof/rustproof

Re:Rust concurrency: the archetype of a message-passing bug by ibotty on Tuesday June 23, 2020 @03:20AM (#23610807)
Did you write a bug report to glibc? I'd love to read about how the bug is happening.
Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Tuesday June 23, 2020 @06:04AM (#23611881)
I didn't, however you can read my writeup and investigation attempts here:

- https://github.com/mratsim/weave/issues/56

And the fix was directly using Linux futexes:

- https://github.com/mratsim/weave/pull/58/files

Re:Rust concurrency: the archetype of a message-passing bug by skohan on Monday June 22, 2020 @09:38AM (#23600030)
Yes I can't tell you how many rust talks and articles I have seen which prominently state: "no data races". You never hear the caveat that general race conditions are still possible, and I think your average programming news consumer could be forgiven for not knowing the distinction.
Re:Rust concurrency: the archetype of a message-passing bug by lubesGordi on Monday June 22, 2020 @11:05AM (#23601022)
Obviously no language can prevent race conditions. Race conditions are usually a flaw of protocol or api design. The whole point of 'fearless concurrency' is that you won't crash because of shared state.
Re:Rust concurrency: the archetype of a message-passing bug by johnisgood on Monday June 22, 2020 @10:59PM (#23609499)
I think Ada/SPARK comes pretty close in my opinion. How come it does not get as much attention as Rust when it comes to safety?

To stay on topic: https://docs.adacore.com/spark2014-docs/html/ug/en/source/co... and https://blog.adacore.com/gnat-community-2020-is-here are worth a read.

Additionally:

> The Ada concurrency model is based on the notion of task, a unit of concurrency that represents an independent thread of control. All, the tasks and the mechanisms for inter-task communication and synchronization, are introduced at language level in order to allow building safer programs. As an illustration, Ada 95 introduced protected objects to allow controlling how data is accessed, thus eliminating race conditions. Additionally, in 1997, Burns et al. introduced the Ravenscar profile, a subset of the Ada programming language that allows high integrity applications to be analyzed for their timing properties by pursuing three main goals: (1) ensuring predictable execution, (2) simplifying the runtime support, and (3) eliminating constructs with high overhead. The limitations imposed by the Ravenscar profile have an inevitable impact in the complexity of correctness analyses, e.g. tasks can only communicate through shared objects (tasks entries are not allowed, so the rendezvous mechanism cannot be used), tasks are assumed to be non-terminating, and tasks and protected objects cannot be dynamically allocated.

> Along the same lines, SPARK, a language that subsets Ada to enable the formal verification of programs, eliminates race conditions by forcing any global object referenced from a task to be marked as Part Of that task, or be a synchronized object.

I think I have a comment about Ada's concurrency where I get into it in more detail (IIRC).

Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Tuesday June 23, 2020 @06:08AM (#23611905)
> How come it does not get as much attention as Rust when it comes to safety?

Community building.

That said, Nim is very much inspired by Ada for the future safety features, in particular Z3 integration to enable Spark-like use-cases

- https://nim-lang.org/docs/drnim.html

AFAIK Ada was also inspired by Rust for memory-related safety. I find the cross-pollination between languages fascinating.

WHat's the multithreading story of Ada like? I didn't find that much code or article or papers when I was searching for multithreading runtime in other languages.

Re:Rust concurrency: the archetype of a message-passing bug by micronian2 on Wednesday June 24, 2020 @11:04PM (#23636467)
Hi,

Actually, it is the pointer support in the SPARK variant of Ada that was inspired by Rust's ownership/borrower semantic. Originally, SPARK didn't allow any pointer usage, but with the new ownership/borrower semantics, SPARK allows limited usage of Ada pointers.

As for more literature about using Ada's tasking features, I recommend the wonderful books and papers by Alan Burns and/or Andy Wellings, such as "Concurrent and Real-Time Programming In Ada (3rd Edition)." AdaCore has an old presentation on using Ravenscar with multi-core processors (https://people.cs.kuleuven.be/~dirk.craeynest/ada-belgium/ev...). There are more articles on the internet on Ada Ravenscar tasking profile and full Ada tasking.

Recently AdaCore announced they are adding support for CUDA applications in SPARK (https://developer.nvidia.com/gtc/2020/video/s21122-vid)

Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Thursday June 25, 2020 @05:19AM (#23638571)
Ah yes, I watched that talk at FOSDEM 2019, it was very nice.
Re:Rust concurrency: the archetype of a message-passing bug by micronian2 on Wednesday June 24, 2020 @11:30PM (#23636608)
The link you provided to the SPARK user manual is a great reference. It explains how using the Ravenscar tasking profile in SPARK helps to avoid data-races and race-conditions. That, along with the ability to formally prove the absence of runtime errors and that your program satisfies various program properties and requirements are good reasons for people to seriously consider looking into using SPARK for critical parts of their software.
Re:Rust concurrency: the archetype of a message-passing bug by pjmlp on Tuesday June 23, 2020 @05:24AM (#23611620)
Because GNAT is the only free compiler out of surviving 5 or so, and even it has had some controversy in the past regarding GCC and Pro version, on a day and age, where many don't want to pay for compilers, which unfortunately are on corporate price levels in what concerns Ada offerings.

Then Pascal/Algol syntax is not cool, so you always get a bit of push back on a world that now breaths curly brackets.

However NVidia has recently chosen Ada/SPARK for their security critical firmware, so there's that.

Re:Rust concurrency: the archetype of a message-passing bug by pjmlp on Monday June 22, 2020 @12:29PM (#23602109)
If the shared state is via shared memory IPC, you can only protect the Rust side, and have zero guarantees about its current state.

It requires the use of unsafe on the Rust side, and you better code it very carefully.

Re:Rust concurrency: the archetype of a message-passing bug by ajross on Monday June 22, 2020 @11:12AM (#23601100)
Yes, but there's a cost for that, which is something that's sort of at odds with Rust's design philosophy in other areas. Outlawing concurrent shared state means that every communication between two threads needs to be formatted as a "message" in whatever abstraction is in use. It needs to be copied, it needs to snapshot whatever data is needed to interpret it. You can't just set a flag and release the lock.

And that's... a problem. Because a lot of code that actually wants concurrency in the same memory space is code that also wants high performance. And Rust serves these applications well in other areas, where "Just as fast as C" is true.

But Rust isn't as fast as "C" here. It's demonstrably slower. Is that a good thing? I honestly don't know.

It's just a hard problem. But you can't eliminate the idea of "shared locked memory" by fiat. It's a real requirement, and Rust has little to say about it in its standard library or (IIRC, though I'd have to go check) its memory model and locking primitives. It's sort of a no-mans land of "super unsafe outside the box" code. And that's a pity.

Re:Rust concurrency: the archetype of a message-passing bug by justinpombrio on Monday June 22, 2020 @11:35AM (#23601359)
> Outlawing concurrent shared state means that every communication between two threads needs to be formatted as a "message" in whatever abstraction is in use.

> It's a real requirement, and Rust has little to say about it in its standard library

So, I don't know much about concurrency, but you're looking for like, a Mutex, right? They're in the standard library and used all the time.

https://doc.rust-lang.org/stable/std/sync/struct.Mutex.html

And RwLock, a variant on Mutex that allows either one writer or multiple concurrent readers:

https://doc.rust-lang.org/stable/std/sync/struct.RwLock.html

Re:Rust concurrency: the archetype of a message-passing bug by lubesGordi on Monday June 22, 2020 @01:11PM (#23602740)
Yes! There's nothing weird about rust's synchronization on shared state. If you have a mutex, you can do what you want just like in c++. The mpsc::channel thing that gpp might be talking about is just a nice to have tool for sending data between threads. No one is forcing its use.
Re:Rust concurrency: the archetype of a message-passing bug by pcwalton on Monday June 22, 2020 @08:52PM (#23608823)
> Outlawing concurrent shared state means that every communication between two threads needs to be formatted as a "message" in whatever abstraction is in use. It needs to be copied, it needs to snapshot whatever data is needed to interpret it. You can't just set a flag and release the lock.

That isn't how Rust works. There are mutexes, condvars, atomics, etc. in the standard library. You don't need the unsafe keyword; go nuts with them.

Re:Rust concurrency: the archetype of a message-passing bug by hinkley on Monday June 22, 2020 @02:10PM (#23603584)
In particular, locks or ownership do not protect against re-entrancy errors.

Recursive state change calls can end up applying multiple changes either in the wrong order or not at all.

Re:Rust concurrency: the archetype of a message-passing bug by JTenerife on Monday June 22, 2020 @09:33AM (#23599966)
"Therefore, rather than making you spend lots of time trying to reproduce the exact circumstances under which a runtime concurrency bug occurs, incorrect code will refuse to compile and present an error explaining the problem. As a result, you can fix your code while you’re working on it rather than potentially after it has been shipped to production. We’ve nicknamed this aspect of Rust fearless concurrency. Fearless concurrency allows you to write code that is free of subtle bugs and is easy to refactor without introducing new bugs."

https://doc.rust-lang.org/1.30.0/book/second-edition/ch16-00...

These sound like quite bold claims to me.

Re:Rust concurrency: the archetype of a message-passing bug by remram on Monday June 22, 2020 @12:24PM (#23602034)
Previous sentence in this paragraph:

> By leveraging ownership and type checking, __many__ concurrency errors are compile-time errors in Rust rather than runtime errors.

Re:Rust concurrency: the archetype of a message-passing bug by mratsim on Monday June 22, 2020 @01:21PM (#23602876)
I'm pretty sure the OP meant that concurrency introduces many subtle bugs that are not related to memory safety and so cannot be prevented by the Rust compiler hence fearless is a bold claim.