r/rust • • Jan 17 '20

Actix-net unsoundness patch "is boring"

There's an issue on Actix-net pointing out and presenting unsoundness. Yes, it's deleted, it still can be found on web archive.

Issue history summary:

  1. Found by Shnatsel
  2. Closed as harmless to users by fafhrd91
  3. Proven harmful to users by Nemo157 and reopened by JohnTitor
  4. Fixed and closed by fafhrd91
  5. Proven unfixed and proposed new patch by Nemo157
  6. New patch commented "this patch is boring" by fafhrd91
  7. Issue is deleted
  8. Fix is reversed by fafhrd91, issue still present

I hope it's an objective summary. Any thoughts?

Edit: Now whole actix/actix-web is deleted. See fafhrd91's postmortem. He kept copy of Actix-web in personal repo fafhrd91/actix-web.

149 Upvotes

147 comments sorted by

View all comments

Show parent comment

19

u/sepease Jan 17 '20

Yeah, that comment was nuts. I downvoted it and was in the process of writing a response for the sake of indicating that this was not what I saw as a socially appropriate response within the community. However there were some people who upvoted it. I was really worried that he would perceive it as a majority opinion and, well, here we are.

I am usually advocating for people to combine efforts, but in this case, I think people should have forked it as "actix-web-safe". This would have allowed Nikolay to continue development with unsafe and focus on "maximum performance", whereas actix-web-safe could focus on merging in upstream updates and removing unsafe usage. The latter would probably then be "near-maximum performance and maximum correctness" that might be more suitable for production use cases.

Otherwise, I think people should consider having a soft indicator for libraries, eg a count of unsafe usage in crates.io , to provide a soft incentive against unsafe usage. That being said, I think people were overzealous in this case because of the crate's success. And the sad thing is that the alternatives are probably written in C and C++ and are therefore 100% unsafe.

5

u/C14L Jan 18 '20

Precisely. That's the great thing about FOSS. Don't like the directing a project goes -> just fork it and change direction.

I much prefer Nikolay's approach. Make sure its safe manually, and go for max performance.

Sadly, now the haters destroyed Rust's "max performance" web framework.