Skip to content

Question about the file /tmp/blobfuse2.pid #1662

@yangchengs

Description

@yangchengs

A cx reported one issue that one file /tmp/blobfuse2.pid(xxxxx) took 10GB size and it caused the /tmp folder out of space.

In mount.go,

	log.Info("mount: Mounting blobfuse2 on %s", options.MountPath)
	if !options.Foreground {
		pidFile := strings.Replace(options.MountPath, "/", "_", -1) + ".pid"
		pidFileName := filepath.Join(os.ExpandEnv(common.DefaultWorkDir), pidFile)

		pid := os.Getpid()
		fname := fmt.Sprintf("/tmp/blobfuse2.%v", pid)

		dmnCtx := &daemon.Context{
			PidFileName: pidFileName,
			PidFilePerm: 0644,
			Umask:       022,
			LogFileName: fname, // this will redirect stderr of child to given file
		}

Can anyone explain how can I generate a /tmp/blobfuse2.pid with an error?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions