Skip to content

fix(kf2): create the KFGame/Cache map-load directory on install - #5108

Merged
dgibbs64 merged 2 commits into
GameServerManagers:developfrom
heyvaldemar:fix/kf2-cache-directory
Oct 31, 2026
Merged

dgibbs64 merged 2 commits into
GameServerManagers:developfrom
heyvaldemar:fix/kf2-cache-directory

Conversation

@heyvaldemar

@heyvaldemar heyvaldemar commented Oct 27, 2026 •

Copy link
Copy Markdown

Description

The Killing Floor 2 Linux dedicated server does not create KFGame/Cache, the
directory it uses when loading maps, including Steam Workshop maps. The KF2 wiki
lists this as a known Linux issue and gives the remedy as mkdir -p KFGame/Cache
inside the server install directory. fix_kf2.sh already runs post-install for
KF2, so it creates the directory there, only once KFGame exists, matching the
mkdir pattern fix_cmw.sh already uses.

Fixes the missing-cache-folder step server admins currently have to do by hand.

Affected servers: kf2

Type of change

  • Bug fix (a change which fixes an issue).

Testing

  • Source: KF2 wiki, Dedicated Server page, "Known issue on Linux servers":
    "Linux servers currently do not create the proper cache folder, you must
    create it inside your server install directory: mkdir -p KFGame/Cache".
  • I have not run a full LinuxGSM KF2 install for this change; the evidence is the
    wiki above and the production observation below, and the guard (KFGame must
    already exist) means it is a no-op on an un-installed server. Happy to add an
    install-time check if you'd like one before merge.
  • In a containerised KF2 deployment I run, the equivalent directory creation has
    been in place since 2026-10-22; across the map changes in the 75 hours after,
    the map-load segfault that had preceded it did not recur. A documented gap
    closed, not a claimed cure.
  • shellcheck: the new block follows the module's existing idiom (fixname +
    fn_fix_msg_start/fn_fix_msg_end, as in fix_cmw.sh).

Risk and rollback

  • Risk level: low
  • Rollback plan: revert the commit; the only effect is one mkdir -p on install.

Breaking changes

  • No breaking changes.

Documentation

  • No documentation update required.

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue ("Fixes", or "Related to" for a partial fix).
  • This pull request uses the develop branch as its base.
  • This pull request subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have provided a detailed enough description of this PR.

This change was prepared with AI assistance and reviewed before submitting.

@github-actions github-actions Bot added the type: bugfix Pull request that fixes a bug label Oct 27, 2026
@dgibbs64 dgibbs64 added this to the v26.5.0 milestone Oct 31, 2026
@github-actions github-actions Bot added engine: unreal3 Issues related to unreal3 engine game: Killing Floor 2 Issues related to Killing Floor 2 game: Chivalry: Medieval Warfare Issues related to Chivalry: Medieval Warfare labels Oct 31, 2026
@dgibbs64
dgibbs64 merged commit bd08aff into GameServerManagers:develop Oct 31, 2026
23 of 24 checks passed
dgibbs64 added a commit that referenced this pull request Oct 31, 2026
…ll (#5108)

This reverts commit bd08aff.

On the current KF2 server build (10897) the server creates KFGame/Cache
itself when it first downloads a Workshop item, so the directory is not
missing. The map-load crash comes from starting directly on a Workshop
map that has not been downloaded yet, which this change does not affect.
@dgibbs64

Copy link
Copy Markdown
Member

Thanks for the PR and for the clear write-up. I merged this a little early, then finished testing it on a test server with a fresh kf2server install, and I've reverted it in c763125.

On the current server build (10897), the game creates KFGame/Cache itself the first time it downloads a Workshop item. With the folder deleted, the server downloaded the item into KFGame/Cache/<id>/0/BrewedPC/Maps/ and then loaded the Workshop map from there without problems, so the wiki note looks like it dates from an older build.

The crash I could reproduce comes from setting a Workshop map as the starting map before the server has downloaded it. In that case it aborts at LoadMap whether or not Cache exists. Starting on a stock map first, so the server can fetch the item, avoids it. That's likely what you were seeing.

We'll add the "start on a stock map first" tip to the docs instead. Thanks again for looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine: unreal3 Issues related to unreal3 engine game: Chivalry: Medieval Warfare Issues related to Chivalry: Medieval Warfare game: Killing Floor 2 Issues related to Killing Floor 2 type: bugfix Pull request that fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants