{"record":{"id":"008e9867a5fdc0dc","repo":"seaweedfs/seaweedfs","slug":"diridleevictsec-s","errorCode":null,"errorMessage":"dirIdleEvictSec: %s","messagePattern":"dirIdleEvictSec: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"weed/command/fuse_std.go","lineNumber":165,"sourceCode":"\t\t\tif parsed, err := strconv.ParseInt(parameter.value, 0, 32); err == nil {\n\t\t\t\tintValue := int(parsed)\n\t\t\t\tmountOptions.chunkSizeLimitMB = &intValue\n\t\t\t} else {\n\t\t\t\tpanic(fmt.Errorf(\"chunkSizeLimitMB: %s\", err))\n\t\t\t}\n\t\tcase \"cacheMetaTtlSec\":\n\t\t\tif parsed, err := strconv.ParseInt(parameter.value, 0, 32); err == nil {\n\t\t\t\tintValue := int(parsed)\n\t\t\t\tmountOptions.cacheMetaTtlSec = &intValue\n\t\t\t} else {\n\t\t\t\tpanic(fmt.Errorf(\"cacheMetaTtlSec: %s\", err))\n\t\t\t}\n\t\tcase \"dirIdleEvictSec\":\n\t\t\tif parsed, err := strconv.ParseInt(parameter.value, 0, 32); err == nil {\n\t\t\t\tintValue := int(parsed)\n\t\t\t\tmountOptions.dirIdleEvictSec = &intValue\n\t\t\t} else {\n\t\t\t\tpanic(fmt.Errorf(\"dirIdleEvictSec: %s\", err))\n\t\t\t}\n\t\tcase \"concurrentWriters\":\n\t\t\tif parsed, err := strconv.ParseInt(parameter.value, 0, 32); err == nil {\n\t\t\t\tintValue := int(parsed)\n\t\t\t\tmountOptions.concurrentWriters = &intValue\n\t\t\t} else {\n\t\t\t\tpanic(fmt.Errorf(\"concurrentWriters: %s\", err))\n\t\t\t}\n\t\tcase \"concurrentReaders\":\n\t\t\tif parsed, err := strconv.ParseInt(parameter.value, 0, 32); err == nil {\n\t\t\t\tintValue := int(parsed)\n\t\t\t\tmountOptions.concurrentReaders = &intValue\n\t\t\t} else {\n\t\t\t\tpanic(fmt.Errorf(\"concurrentReaders: %s\", err))\n\t\t\t}\n\t\tcase \"cacheDir\":\n\t\t\tmountOptions.cacheDirForRead = &parameter.value\n\t\tcase \"cacheCapacityMB\":","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/seaweedfs/seaweedfs/blob/1c926e8fac8e8001ce25efa1027c90b02b4a1804/weed/command/fuse_std.go#L147-L183","documentation":"runFuse in weed/command/fuse_std.go parses FUSE helper-style options (space/dash/comma separated name=value pairs, e.g. `weed fuse /mnt/sw -o filer=localhost:8888,readOnly=true`) before daemonizing into a master/child pair and calling runMount. dirIdleEvictSec (seconds an idle directory entry stays cached before eviction) is parsed with strconv.ParseInt(value, 0, 32): base 0 also accepts 0x/0o/0b prefixes; the value must be a whole number within int32 range. The panic fires on duration strings like '30m', floats, or a bare flag (a bare flag without '=' is assigned the literal value \"true\" by the tokenizer (fuse_std.go:46,57,102), which then fails numeric parsing).","triggerScenarios":"-o dirIdleEvictSec=30m; dirIdleEvictSec=1.5; bare -o dirIdleEvictSec.","commonSituations":"Tuning copied from blog posts that show human-readable durations; options migrated from yaml config keys that accept durations.","solutions":["Pass whole seconds: dirIdleEvictSec=1800 for 30 minutes","Strip unit suffixes and decimal points","Keep the value within int32 range","Use name=value form, not a bare flag"],"exampleFix":"// before\nweed fuse /mnt/sw -o \"filer=localhost:8888,dirIdleEvictSec=30m\"\n\n// after\nweed fuse /mnt/sw -o \"filer=localhost:8888,dirIdleEvictSec=1800\"","handlingStrategy":"validation","validationCode":"if v, ok := opts[\"dirIdleEvictSec\"]; ok {\n\tif _, err := strconv.ParseInt(v, 0, 32); err != nil {\n\t\treturn fmt.Errorf(\"dirIdleEvictSec must be int32 seconds (no units): %w\", err)\n\t}\n}","typeGuard":"func isInt32Option(v string) bool {\n\t_, err := strconv.ParseInt(v, 0, 32)\n\treturn err == nil\n}","tryCatchPattern":null,"preventionTips":["Treat all cache-TTL options as unitless seconds","Keep a unit-conversion note beside tuned options in runbooks","Validate the full option string before systemd/fstab consumes it"],"tags":["fuse","mount","options","integer","cache","validation"],"backgroundTag":null,"analyzedSha":"1c926e8fac8e8001ce25efa1027c90b02b4a1804","analyzedAt":"2026-08-15T15:37:02.018Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}