XTLS/Xray-core · error
customTable produced empty padding pool
Error message
customTable produced empty padding pool
What it means
Thrown inside customLayout when generating the padding-byte pool for a custom table: it enumerates candidate encodings with at least 5 of 8 bits set and collects distinct results, and the resulting pool is empty. This means the given bit layout cannot produce any valid padding byte, an internal inconsistency between the pattern and the encoder.
Solutions
- Switch to the default layout by clearing customTable (mode prefer_entropy) and retest.
- Try a known-good pattern such as "xxppvvvv".
- If a specific pattern is required, report it upstream so the padding pool rule can be adjusted for that layout.
Example fix
// before "customTable": "vvxxppvv" // after "customTable": ""
Defensive patterns
Strategy: fallback
Try / catch
layout, err := resolveLayout(mode, customTable)
if err != nil {
if strings.Contains(err.Error(), "empty padding pool") {
layout, err = resolveLayout("prefer_entropy", "") // fall back to default
}
if err != nil {
return err
}
} Prevention
- Prefer the default entropy layout unless you have verified a custom pattern end-to-end.
- Add a startup smoke test that builds the table for your exact password+pattern pair.
When it happens
Trigger: A customTable whose x/p bit positions make encodeGroupWithDropX never return a byte with popcount >= 5 across all enumerated groups. This is layout-dependent; most 2/2/4 patterns work, so hitting it indicates an exotic arrangement or a code change in the candidate enumeration.
Common situations: Experimenting with unusual permutations of the 8-slot pattern; upgrading the finalmask transport where the padding-generation rules changed while keeping an old custom pattern.
Related errors
- decode key collision for byte
- customTable has invalid char
- customTable must be 8 chars, got
- customTable must contain exactly 2 x, 2 p and 4 v
- grid has no uniquely decodable clue set
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/2e38987bf15ccb96.
Report an issue: GitHub.
Appendix: source
Thrown at transport/internet/finalmask/sudoku/table.go:341
paddingSet := make(map[byte]struct{}, 64)
padding := make([]byte, 0, 64)
for drop := range xBits {
for val := byte(0); val < 4; val++ {
for pos := byte(0); pos < 16; pos++ {
group := (val << 4) | pos
b := encodeGroupWithDropX(group, drop)
if bits.OnesCount8(b) >= 5 {
if _, exists := paddingSet[b]; !exists {
paddingSet[b] = struct{}{}
padding = append(padding, b)
}
}
}
}
}
sort.Slice(padding, func(i, j int) bool { return padding[i] < padding[j] })
if len(padding) == 0 {
return nil, fmt.Errorf("customTable produced empty padding pool")
}
decodeGroup := func(b byte) (byte, bool) {
if (b & xMask) != xMask {
return 0, false
}
var val, pos byte
if b&(1<<pBits[0]) != 0 {
val |= 0x02
}
if b&(1<<pBits[1]) != 0 {
val |= 0x01
}
for i, bit := range vBits {
if b&(1<<bit) != 0 {
pos |= 1 << (3 - uint8(i))
}View on GitHub (pinned to 7d214f8b09)