https://gitlab.synchro.net/main/sbbs/-/commit/4fc3e1db851403db81190760
Added Files:
3rdp/build/js-map-aligned.patch
Modified Files:
3rdp/build/GNUmakefile
Log Message:
Fix egregious race/infinite loop bug for FreeBSD and NetBSD
The allocator has a loop trying to map an aligned page, and there's
an obvious (and commented-on) race condition in it. The purpose
is apparently to get an aligned allocation using mmap().
For FreeBSD and NetBSD, we can simply pass the desired alignment
to mmap() and we're good.
Other platforms are still hosed though.
This generally didn't happen, but something about FreeBSD 14.2 on
a many core (16+HT) system causes it to park in the loop and stay
there, adding new threads to to fun as it goes along.
This uses MAP_ALLOCED() if defined avoid the loop completely.
We'll see if it works soon enough.
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net