Most active commenters
  • saagarjha(11)
  • jfkebwjsbx(4)
  • pmarreck(3)
  • pjmlp(3)

←back to thread

MacOS Catalina: Slow by Design?

(sigpipe.macromates.com)
2031 points jrk | 41 comments | | HN request time: 0.828s | source | bottom
1. brendangregg ◴[] No.23277837[source]
Adding network calls to syscalls like exec() is utterly insane. This road can lead to bricked laptops where you can't run anything to fix it (imagine an unexpected network error that the code doesn't handle properly). And crackers will just use ways to overwrite running instruction text to avoid the exec().

The comments on the article are annoying: it good that there's a mini way to reproduce, but please, use some further debugging like tcpdump (it still exists on osx, right?). Last time I summarized osx debugging was https://www.slideshare.net/brendangregg/analyzing-os-x-syste...

I'd also stress test it: generate scripts in a loop that include random numbers and execute them.

replies(5): >>23278280 #>>23279465 #>>23279751 #>>23279958 #>>23303509 #
2. xvector ◴[] No.23278280[source]
There is no excuse for this except for sheer, utter incompetence. Everyone involved in writing and shipping this should be ashamed of themselves.
replies(3): >>23278582 #>>23278927 #>>23279035 #
3. will_pseudonym ◴[] No.23278582[source]
Hey, malevolence can also play into this. Don't chalk everything up automatically to incompetence. /s
4. drvdevd ◴[] No.23278927[source]
This is what I scrolled all the way down this thread for - to see if anyone thinks this is a good design/security decision on Apples part. I’m trying to understand what the reasoning is for this particular decision and if it actually makes the OS more secure in any meaningful way? Or does it actually- just degrade performance with very limited benefits? Are there any real benefits to this VS current security design in popular Desktop Linux distros at this point?
replies(2): >>23279051 #>>23279476 #
5. pmarreck ◴[] No.23279035[source]
There’s going to be a big exodus of open source developers going to Linux-powered platforms instead of the standard Mac laptop because of this ridiculousness
replies(2): >>23279254 #>>23279298 #
6. HappyDreamer ◴[] No.23279051{3}[source]
Couldn't this have been a business decision? Not about security? (just what they say?)

To make non-App-store apps annoyingly unusable, so the App store will sell more apps, instead of people downloading in other ways?

Just like Apple cripples the Safari browser and PWA apps.

Long term, maybe Apple wants to be able to remote-forbid apps if Apple is developing their own competing app?

Whilst most developers working at Apple understands this, and don't like it? Maybe the developers even feel happy about people here at HN being disappointed, and think that "now the business people here at Apple notice that this causes disappointment" ?

replies(2): >>23279486 #>>23282262 #
7. cageface ◴[] No.23279254{3}[source]
This is happening at my company already because docker performance on Macs is terrible.
replies(2): >>23279833 #>>23283187 #
8. jfkebwjsbx ◴[] No.23279298{3}[source]
> the standard Mac laptop

There is nothing standard about a Mac laptop, both technically and in market share.

replies(2): >>23279489 #>>23283109 #
9. saagarjha ◴[] No.23279465[source]
> And crackers will just use ways to overwrite running instruction text to avoid the exec().

This would require breaking your code signature and as such requires extra entitlements in the hardened runtime.

10. saagarjha ◴[] No.23279476{3}[source]
It checks that executables have been notarized by Apple? I can't say I really think notarization is great, but I think it's clear from their perspective how it would be beneficial?
replies(1): >>23279758 #
11. saagarjha ◴[] No.23279486{4}[source]
I don't think the people at Apple are actively trying to make non-App Store apps unusable because they want to make more money from the App Store or anything. It's just that they want code to pass through them, and as a by product making code that has been vetted less or does things that could potentially be abused is made more annoying to run. Such a change is divisive, as you may have guessed.
replies(1): >>23279859 #
12. saagarjha ◴[] No.23279489{4}[source]
At Silicon Valley technology companies? A Mac is generally the computer that you're likely to get.
replies(1): >>23281840 #
13. ridiculous_fish ◴[] No.23279751[source]
The kernel sources are available.

https://opensource.apple.com/source/xnu/xnu-6153.81.5/

replies(2): >>23279935 #>>23291734 #
14. drvdevd ◴[] No.23279758{4}[source]
Sure. But as Brendan Gregg pointed out in his comment - doing this at the level of exec() on a UNIX-like OS is ... a questionable technical choice to say the least.

What’s the Linux equivalent of “notarization”? I’m not sure. Of course there’s probably more than one answer to that - let’s just taking signing packages as an example.

In theory Apple could put their weight behind vetting some of the popular open source packages perhaps? Or delegate that to the maintainers of those repositories and make them trusted? Like homebrew, for example (maybe a poor example, but you see how I’m trying to compare this with Linux...)

This is after all, what actually makes macOS useful to people on the command line 99% of the time, anyway.

So anyway, I agree on the surface it seems like this might be beneficial to Apple, but it doesn’t appear to be well considered.

They could invest more time in better sandbox and/or container type features that let people define some of their own more granular security boundaries. But they aren’t I guess? What are they doing here?

replies(2): >>23280794 #>>23280841 #
15. millstone ◴[] No.23279833{4}[source]
On the one hand, of course it is, because Macs are slow at running Linux stuff in the same way that Linux is slow at running non-Linux stuff.

On the other hand, Apple should decide if they care about Docker performance. The answer seems to be "a little" (Hypervisor.framework) but much less than, say, Microsoft.

Apple doesn't talk about their future plans. Today we see stagnation, YET with spikes of exotic ideas (e.g. L4, which would permit efficient L4 Linux).

Per Apple's style, a big kernel change on the Mac side would absolutely be tied to a hardware change, to break things once and not twice. Build a new Mac with a Linux-friendly kernel (perhaps Linux, perhaps modified L4, or something new), put it on their beastly ARM CPUs, and I'm drooling.

Then again I don't work at Apple.

16. michaelmrose ◴[] No.23279859{5}[source]
That vetting will come at the cost of 30% of money paid for your software and any money earned within the software.
replies(1): >>23279967 #
17. saagarjha ◴[] No.23279935[source]
…with everything to do with the sandbox left out.
replies(1): >>23280079 #
18. millstone ◴[] No.23279958[source]
Well NFS and SMB exist, you can exec() on such mounts.
19. ◴[] No.23279967{6}[source]
20. ridiculous_fish ◴[] No.23280079{3}[source]
Fair point. These tarballs may be, err, editorialized.

If exec is blocking in the kernel on IPC to some daemon, that should be observable (e.g. Instruments with kernel traces enabled).

replies(1): >>23280157 #
21. saagarjha ◴[] No.23280157{4}[source]
Yeah, I'm sure a good spindump would be able to find what the code is blocked on. Sadly I run with SIP disabled so I can attach to things, so I probably cannot reproduce the issue…
22. john_alan ◴[] No.23280794{5}[source]
Watching the notarization video from WWDC last year they explicitly said it wouldn’t affect command line apps.
replies(1): >>23281271 #
23. pjmlp ◴[] No.23280841{5}[source]
Apple OSes never were about CLI, pre-OS X you didn't have a CLI as standard OS feature.

Selling UNIX underpinning was just a marketing move for willing to betray GNU/Linux and BSD in name of a better laptop experience, instead of helping OEMs selling their stuff.

Something that NeXT also did against the Sun workstations market.

On Linux side of the this kind of security measures never work, because the moment someone introduces something like this, the distribution gets forked.

It works on ChromeOS and Android, because it hardly matters to userspace that Linux is the actual kernel, Google could embark (and it is actually) in a kernel replacement project and most stuff would just work.

replies(1): >>23281269 #
24. saagarjha ◴[] No.23281269{6}[source]
I'm not sure I particularly appreciate your use of the word "betray" for the BSDs. Sure, macOS is not really a great adherent to the GNU philosophy, but for the BSDs it actually did fairly well for a while. (It's still true UNIX, if barely.)
replies(1): >>23281346 #
25. saagarjha ◴[] No.23281271{6}[source]
I believe that some of the problems here have actually started affecting command line apps in Catalina.
replies(1): >>23281832 #
26. pjmlp ◴[] No.23281346{7}[source]
Take as you wish, if those users were actually supportive of the BSDs, they would be giving their hard earned cash directly to OEMs selling proper FreeBSD, OpenBSD, NetBSD, DragonFly based devices.

One cannot give the money instead to Apple and then come back complain that they were mislead.

NeXTSTEP was also a true UNIX, that wasn't why most business bought it, rather Renderman and other graphical based tooling.

I have used Apple platforms on and off since the LC II days, their commercial view was always quite clear to me.

replies(2): >>23281454 #>>23285252 #
27. saagarjha ◴[] No.23281454{8}[source]
I am actually curious who sells BSD hardware these days.
replies(1): >>23281536 #
28. pjmlp ◴[] No.23281536{9}[source]
Examples from Germany,

https://www.tuxedocomputers.com/

They do GNU/Linux, but BSDs should probably work on their hardware, as mentioned on this old post (sorry in German).

https://www.tuxedocomputers.com/de/Infos/News/OpenBSD-6-3-cu...

Or by getting in touch with companies like os-cillation.

https://www.os-cillation.de/en/opensourceprojekte/bsd-specia...

replies(1): >>23282018 #
29. john_alan ◴[] No.23281832{7}[source]
Only if you don't specify your terminal as a dev tool
30. jfkebwjsbx ◴[] No.23281840{5}[source]
Silicon Valley is a very small dot in the global scale.
replies(2): >>23281986 #>>23290666 #
31. saagarjha ◴[] No.23281986{6}[source]
A fairly influential one, nonetheless.
replies(1): >>23282097 #
32. saagarjha ◴[] No.23282018{10}[source]
Thanks for the links. I probably won’t be buying any of those soon, but they looked surprisingly beefy for the price point. As an aside, the immature part of me giggled a bit to see the German for product dimensions:

> max 1,65cm dick

33. jfkebwjsbx ◴[] No.23282097{7}[source]
Influential in technology output? Yeah. Influential in Mac market share? Not in the slightest.

Companies around the globe don’t care one bit about which laptops SV companies are buying.

34. fluffything ◴[] No.23282262{4}[source]
Most of the apps that sell well originate from a developer solving a need they had, on the system they were using.

If this drives developers from OSX to other OSes, chances are they will develop apps for those OSes first.

Apple is too big to fail at this point, but driving developers away from your platform isn't a very clever strategy. You never know when you are going to hit a tipping point, and after you notice and people stop using macosx for development its already too late.

It took me ~150 hours to migrate to Linux, but my user and developer experience on Linux is much better than on MacOSX (emacs daemon "just works"!!!), so after all that work I wouldn't consider switching to OSX in the next 5 years at least. I had a Macbook air 2012, and because Apple still hasn't released a laptop that isn't a downgrade from that in some sense (keyboard, magsafe, ...) I've went with a think pad instead. Tiny details, like having a webcam that doesn't suck now prevent me from going back to OSX.

35. pmarreck ◴[] No.23283109{4}[source]
Well, I'd say 90% of the computers I've seen at the last 10 confs I've attended were Macbook Pros

https://hackernoon.com/why-do-developers-run-macs-9ad81d58d1...

replies(1): >>23285228 #
36. pmarreck ◴[] No.23283187{4}[source]
Is that slowness possibly related to the OP's issue? And possibly might benefit from the same workarounds posted here?
37. jfkebwjsbx ◴[] No.23285228{5}[source]
Look outside the US.
38. trasz ◴[] No.23285252{8}[source]
The problem with BSD on the desktop isn’t the BSD, it’s the desktop. Open Source desktop environments are still ages behind OSX.
39. IshKebab ◴[] No.23290666{6}[source]
It's not just Silicon Valley. In the last two companies I've worked in in the UK everyone had Macbooks.
40. m463 ◴[] No.23291734[source]
Most of the important parts are left out.

at this point opensource and apple are sort of on life support.

41. xenadu02 ◴[] No.23303509[source]
That's not quite correct. If network access is unavailable or fails then the exec is allowed. The behavior has been improved over time, putting stricter limits on how long the check is allowed to take before giving up.

The Mac remains a Mac: if you turn off SIP it also disables this behavior. You are free to choose less security for more convenience if that is your preference.