Opened 18 months ago

Last modified 18 months ago

#24216 reopened defect

Make p global in the sigterm handler

Reported by: teor Owned by: tom
Priority: Medium Milestone:
Component: Core Tor/Torflow Version:
Severity: Normal Keywords:
Cc: tom Actual Points:
Parent ID: #4079 Points:
Reviewer: Sponsor:

Description

This causes errors like:

./bwauthority.py:71: SyntaxWarning: name 'p' is assigned to before global declaration
  global p

in some recent python versions.

It appears to be one of those lovely python hiesenbugs that appears and disappears depending on python version, OS, and other code changes.

Child Tickets

Change History (6)

comment:1 Changed 18 months ago by teor

Status: newneeds_review

See my branch bug24216 on github.

comment:2 Changed 18 months ago by teor

Resolution: fixed
Status: needs_reviewclosed

Merged as trivial to master as 704f1a8 with a better commit message.

comment:3 Changed 18 months ago by teor

Cc: tom added
Resolution: fixed
Status: closedreopened

tom, do you still see errors like this with this patch applied?

./bwauthority.py:71: SyntaxWarning: name 'p' is assigned to before global declaration
  global p

Maybe it's a signal handler issue, or maybe we need to sprinkle another global p somewhere.

comment:4 Changed 18 months ago by teor

(The errors happen on scanner launch.)

comment:5 Changed 18 months ago by Sebastian

I do still see it on a small test network on Debian stretch

comment:6 Changed 18 months ago by teor

Parent ID: #4079

Parent to the master logging ticket.

Note: See TracTickets for help on using tickets.