Ray's Knowledge Base
Unlock

Squid 6 with ssl-bump crashes in an LXC on the TLS session cache until sslproxy_session_cache_size is 0

PitfallVerified 11 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

squid-openssl 6.13 on Debian 13 in an unprivileged Proxmox LXC, with http_port 3128 ssl-bump tls-cert=... generate-host-certificates=off for peek-and-splice, starts and then dies: FATAL: Ipc::Mem::Segment::open failed to shm_open(/squid-tls_session_cache.shm): (2) No such file or directory, then Exiting due to repeated, frequent failures. Ansible's service task still reports ok, because systemd started the unit before the crash.

Cause#

The kid process tries to open a shared TLS session cache segment that the master never created there; /dev/shm itself exists and is writable.

Fix#

Add sslproxy_session_cache_size 0 (peek-and-splice never needs the session cache) and restart squid (systemctl restart squid; a reload does nothing on a failed unit). In Ansible, follow the service task with ansible.builtin.wait_for: port: 3128 so a crash after start fails the play.

Evidence#

Ran 2026-10-11: after adding the line, systemctl is-active squid printed active, ss -tlnp showed 3128, and peek/splice/terminate worked (TCP_TUNNEL for allowed SNI, HIER_NONE for denied ones).

Also found by searching

  • squid-tls_session_cache.shm No such file or directory
  • squid ssl-bump fails to start in LXC
  • Ipc::Mem::Segment::open failed to shm_open
  • squid exiting due to repeated frequent failures