On Linux the 8192K aren't reserved unless the are actually used, so what is the point?
Ok, Golang will allocate green threads from its own allocator, but 104 bytes?!
41–50 of 50 posts
On Linux the 8192K aren't reserved unless the are actually used, so what is the point?
Ok, Golang will allocate green threads from its own allocator, but 104 bytes?!
(2017) Previous discussion: https://news.ycombinator.com/item?id=15845118
Ah, I remember 2017’s HN where the mere word “Go” in the title made posts skyrocket to 498 points. In 2024 the title should’ve contained “Rust” for the same outcome. Quite curious what will be required in 2031.
I'm pretty confident in my computer abilities, but when I read stuff like this I feel like I have no skills at all compared to this guy. Like I'm still a high school athlete and he's an Olympian (also he was only 26 when he wrote the article).
Comparison is the thief of joy!
I feel like I still didnt fully understand what's going on here. Is the following correct? "Threads hava a 'canonical' stack that the OS auto-grows for you as you use more of it. But you can also create your own stack by putting any value you want in RSP. This is what the Go program did, and the vDSO, assuming it ran on an auto-growing stack, tried to probe it, which lead to corruption."
The problem is that the vDSO (which is compiled as part of the kernel but runs in userspace) does a stack probe for security reasons, trying to see if it will overrun the stack. It does this by checking if at least a page’s worth of data is accessible. If not, it will (typically) fault. However, Go programs use a stack size so small that they may have other data a page away, which means the problem may mess with that…
(2017) Previous discussion: https://news.ycombinator.com/item?id=15845118
Ah, I remember 2017’s HN where the mere word “Go” in the title made posts skyrocket to 498 points. In 2024 the title should’ve contained “Rust” for the same outcome. Quite curious what will be required in 2031.
Earlier quoted context omitted.
Why should I do that? An "argument" about nothing is hilarious.
> Why should I do that? Because what you chose to do instead is exceptionally obnoxious behavior, which degrades the quality of discourse on this site.
Rather than encourage a dumbing down the content to the lowest common denominator, why not encourage those with low comprehension to not get into arguments in the first place? Dumbing down the content does not improve the quality of discourse. That is a entirely flawed notion. Hacker News is decidedly intended for a hacker audience, not an audience of high school debate team hopefuls. There should be no harm in speaking to hackers at their level.
Could someone explain why Google is obsessed with small stack sizes? The musl library also has an extremely small thread stack size, which makes many applications crash that are used to 8192K on Linux. On Linux the 8192K aren't reserved unless the are actually used, so what is the point? Ok, Golang will allocate green threads from its own allocator, but 104 bytes?!
Could someone explain why Google is obsessed with small stack sizes? The musl library also has an extremely small thread stack size, which makes many applications crash that are used to 8192K on Linux. On Linux the 8192K aren't reserved unless the are actually used, so what is the point? Ok, Golang will allocate green threads from its own allocator, but 104 bytes?!
Applications should not be assuming a hard-coded stack size, that's a bug. They should be checking the value of PTHREAD_STACK_MIN. That is what it's there for.
Earlier quoted context omitted.
The problem is that the vDSO (which is compiled as part of the kernel but runs in userspace) does a stack probe for security reasons, trying to see if it will overrun the stack. It does this by checking if at least a page’s worth of data is accessible. If not, it will (typically) fault. However, Go programs use a stack size so small that they may have other data a page away, which means the problem may mess with that…
If the orq instruction was really a noop then there would be no problem as well?
(2017) Previous discussion: https://news.ycombinator.com/item?id=15845118
Ah, I remember 2017’s HN where the mere word “Go” in the title made posts skyrocket to 498 points. In 2024 the title should’ve contained “Rust” for the same outcome. Quite curious what will be required in 2031.