Opened 8 years ago

Last modified 22 months ago

#2967 new defect

bad pidfile handling on ENOSPC

Reported by: intrigeri Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor:
Severity: Normal Keywords: tor-client easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


The Tor daemon was reported two years ago, as Debian bug #514616, to behave quite badly when it does not manage to write its pidfile because of a full filesystem.

Some discussion between the bug reporter and Peter happened there and is probably a good starting point to fix this bug.

Child Tickets

Change History (7)

comment:1 Changed 8 years ago by nickm

Milestone: Tor: 0.2.3.x-final

Marking this for 0.2.3, though if somebody gets to it sooner with a nondestablizing fix, that would be fine too.

comment:2 Changed 8 years ago by mikey

So what's the preferred solution to this?

  1. Kill the daemon (using the getpid()/_getpid())
  2. log_warn(LD_FS) like is done for a failed fopen()
  3. write a syslog ERROR or WARNING for non-Windows

comment:3 Changed 8 years ago by nickm

Sorry for the delay -- I don't have a great sense of what the right fix here is. I'd say that dying immediately is fine: if we don't have enough disk space to write our PID, we'll probably fail soon because of the low space anyway.

If daemonizing, it might be nice to be able to report this kind of failure to the parent process in a sane way, but we don't have a good means to do so right now. We'd need to add one.

comment:4 Changed 7 years ago by nickm

Milestone: Tor: 0.2.3.x-finalTor: unspecified

comment:5 Changed 6 years ago by nickm

Keywords: tor-client added

comment:6 Changed 6 years ago by nickm

Component: Tor ClientTor

comment:7 Changed 22 months ago by nickm

Keywords: easy added
Severity: Normal
Note: See TracTickets for help on using tickets.