Skip to content

bans are not forward compatible #4288

@nigoroll

Description

@nigoroll

WRONG("Wrong BAN_ARG code");

When loading a persistent storage from a later version which has a new ban format on an older version, a panic is triggered:

Wrong turn at cache/cache_ban.c:550:
Wrong BAN_ARG code
version = varnish-trunk revision 6d5aa36cc13f0d09211ffa74e68d7ca607d921d2, vrt api = 20.1
ident = Linux,6.1.0-29-amd64,x86_64,-jnone,-sfellow,-sdefault,-Elibvmod_slash.so,-hcritbit,epoll
now = 9508.824577 (mono), 1740567235.533489 (real)
Backtrace:
  ip=0x55e637bc3b05 sp=0x7f027ebfdd30 <VBT_format+0x35>
  ip=0x55e637afb063 sp=0x7f027ebfdd50 <pan_backtrace+0x33>
  ip=0x55e637afadaa sp=0x7f027ebfdd70 <pan_ic+0x37a>
  ip=0x55e637bc2d35 sp=0x7f027ebfdef0 <VAS_Fail+0x55>
  ip=0x55e637ac2ea4 sp=0x7f027ebfdf40 <ban_evaluate+0x2b4>
  ip=0x55e637ac7c90 sp=0x7f027ebfe000 <ban_lurker_test_ban+0x4b0>
  ip=0x55e637ac71be sp=0x7f027ebfe0a0 <ban_lurker_work+0x1be>
  ip=0x55e637ac6f22 sp=0x7f027ebfe100 <ban_lurker+0x162>
  ip=0x55e637b3783d sp=0x7f027ebfe160 <wrk_bgthread+0x13d>
  ip=0x7f02d648c1c4 sp=0x7f027ebfe460 <pthread_condattr_setpshared+0x4e4>
  ip=0x7f02d650c85c sp=0x7f027ebfe500 <__xmknodat+0x23c>

For this example, an obj.lru ban has been created with #4287 and then the storage loaded with 6d5aa36, which does not have obj.lru.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions