Opened 4 years ago

Last modified 3 years ago

#19669 new defect

`log_prefix_` maybe getting weird output from strftime

Reported by: dcf Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Minor Keywords: easy, logging, vsprintf, 032-unreached
Cc: Actual Points:
Parent ID: Points: .2
Reviewer: Sponsor:


#19408 purports to show tor log lines. The date format in them is really strange:

6/13/2016 23:53:24 PM.700
6/13/2016 23:53:26 PM.200
6/14/2016 0:07:45 AM.200
6/14/2016 0:07:45 AM.200

There's a date string followed by a dot and three digits' worth of fractional seconds. The format doesn't match what's specified in log_prefix_, which is "%b %d %H:%M:%S".

I don't see how this can happen, but I thought some one in core tor might want to take a look. Maybe the user has some kind of smart copy-paste that's mangling dates.

Child Tickets

Change History (6)

comment:1 Changed 4 years ago by nickm

Keywords: easy added
Milestone: Tor: 0.3.0.x-final
Priority: MediumLow
Status: newneeds_information

I bet that log_prefix_ is miscounting the number of characters in the prefix, because of a system vsnprintf implementation that returns 0 rather than the number of characters emitted.

I'd take a patch for this if somebody writes one.

comment:2 Changed 4 years ago by dgoulet

Keywords: triage-out-030-201612 added
Milestone: Tor: 0.3.0.x-finalTor: 0.3.1.x-final

Triaged out on December 2016 from 030 to 031.

comment:3 Changed 4 years ago by nickm

Milestone: Tor: 0.3.1.x-finalTor: unspecified
Status: needs_informationnew

comment:4 Changed 3 years ago by nickm

Keywords: triage-out-030-201612 removed

comment:5 Changed 3 years ago by nickm

Keywords: logging vsprintf added
Milestone: Tor: unspecifiedTor: 0.3.2.x-final
Points: .2

comment:6 Changed 3 years ago by nickm

Keywords: 032-unreached added
Milestone: Tor: 0.3.2.x-finalTor: unspecified

Mark a large number of tickets that I do not think we will do for 0.3.2.

Note: See TracTickets for help on using tickets.