The invalid system call issue is likely due to a recent Mac OS update. It turned out redbean was depending on a Mach system call when the intent was to only use the UNIX APIs which I believe will be stable since they're much more public. https://github.com/jart/cosmopolitan/issues/426 New 2.0.2 release available on https://redbean.dev which includes the fix.
Wow. Could you please open a GitHub issue with a `./redbean.com --ftrace` log? I only need the fifty or so lines of the log. Since that tells me which system call is likely the culprit. https://github.com/jart/cosmopolitan/issues Alternatively you could email it to me: jtunney@gmail.com Thanks!
It's an instant `Segmentation fault: 11` - although this might be because I'm on M1 (although it still happens under `arch -x86_64 bash` which forces it directly through Rosetta 2.) Seems I can't run `dtruss` or anything useful either to track it down further because of the new stringent SIP protections, sorry!
Anyway, tried bash now, and I got another error:
▶ bash ./redbean-2.0.1.com -v --strace SYS 0 22'227 bell system five system call support 383 magnums loaded on xnu's not unix! SYS 93828 36'725 mprotect(0x700000000000, 4'096, 0) → 0 SYS 93828 345'630 mmap(0x700000000000, 262'144, PROT_READ|PROT_WRITE, MAP_STACK|MAP_ANONYMOUS, -1, 0) → 0x700000000000 (262'144 bytes total) SYS 93828 567'580 mmap(0, 65'536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) → 0x100080000000 (327'680 bytes total) SYS 93828 607'673 close(3) → 0 SYS 93828 610'080 getcwd(0x5ee720, 1'024) → "/Users/renato/programming/apps" SYS 93828 611'532 getenv("MAKEFLAGS") → NULL SYS 93828 613'435 getenv("TERM") → "xterm-256color" SYS 93828 637'803 openat(AT_FDCWD, "/Users/renato/programming/apps/redbean-2.0.1.com", 0, 0) → 3 SYS 93828 640'621 getfiledescriptorsize(3) → 1'999'386 SYS 93828 645'979 mmap(0, 1'999'386, PROT_READ, MAP_SHARED, 3, 0) → 0x100080100000 (2'359'296 bytes total) SYS 93828 657'750 munmap(0x100080100000, 1'703'936) → 0 (655'360 bytes total) SYS 93828 660'467 __zipos_get("/Users/renato/programming/apps/redbean-2.0.1.com") SYS 93828 662'273 close(3) → 0 SYS 93828 663'503 openat(AT_FDCWD, "/zip/.args", 0, 0) → -1 ENOENT/2/No such file or directory SYS 93828 668'744 mmap(0, 262'144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) → 0x100080040000 (917'504 bytes total) SYS 93828 671'865 sigaltstack({.ss_sp=0x100080040000, .ss_flags=0, .ss_size=262'144}, [{.ss_sp=0x100080040000, .ss_flags=0, .ss_size=262'144}]) → 0 SYS 93828 678'266 sigaction(SIGQUIT, {.sa_handler=0x52c737, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0, .sa_mask={}}]) → 0 SYS 93828 680'693 sigaction(SIGFPE, {.sa_handler=0x52c742, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 682'732 sigaction(SIGILL, {.sa_handler=0x52c74d, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 685'823 sigaction(SIGSEGV, {.sa_handler=0x52c758, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 687'845 sigaction(SIGTRAP, {.sa_handler=0x52c763, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 689'841 sigaction(SIGABRT, {.sa_handler=0x52c76e, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 691'881 sigaction(SIGBUS, {.sa_handler=0x52c779, .sa_flags=0x51, .sa_mask=~{}}, [{.sa_handler=0, .sa_flags=0x2, .sa_mask={}}]) → 0 SYS 93828 696'779 mmap(0, 262'144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) → 0x100080080000 (1'179'648 bytes total) SYS 93828 1'392'442 inflate([u"SYMT ↨ ♦ ♦ @ "...], 262'144, u"lⁿuÿV╒× ⁿ»↓bå£Ç↓RAѶ♣JQRÑ♦ò♫âûÉ♫üí╒♥ét"..., 103'922) → 0 SYS 93828 1'647'413 GetSymbolTableFromZip() → 0x100080080000 [1] 93828 invalid system call bash ./redbean-2.0.1.com -v --strace