• src/sbbs3/getnode.cpp

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Thu Aug 22 21:26:25 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/e93b6dfa682e792f39c548dd
    Modified Files:
    src/sbbs3/getnode.cpp
    Log Message:
    Don't call utime() on the node.dab file for every read

    ... this was the cause of some observed unnecessarily high disk/file server (Samba) utilization, as we call getnodedat() a lot. utime() opens and closes the file, which was already open - and we're not modifying the file, so updating the 'modification time' here is wrong anyway.

    Disabling this 21-year old bit of logic resulted in a pretty dramatic
    reduction in Samba (smbd) CPU utilization on Vertrauen.

    If a BBS actually needes this hack (e.g. for NFS compatibility, as Deuce
    eluded in the comment), they'd be better off just setting the "Keep Node File Open" node setting (in SCFG->Nodes) to "No".

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on macOS)@VERT to Git commit to main/sbbs/master on Sat Nov 23 16:05:40 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/15e40a45a990d2a6d786ef22
    Modified Files:
    src/sbbs3/getnode.cpp
    Log Message:
    Fix potential deadlock in getnodedat(), observed on macOS

    Upon any node.dab lock or read failure, this code would cause errormsg() which would often/usually end up claling getnodedat() which would block forever trying
    to acquire the ndoefile_mutex (introduced in commit b9633069, I'm not clear why).

    Unlock/release the mutex *before* calling errormsg().

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net