Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2020-03-12 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:  closed
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:  fixed
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  diagnostics, 042-should, 041-backport-maybe,   |
  regression, BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by teor):

 * keywords:
 consider-backport-after-042-stable, consider-backport-if-needed,
 diagnostics, 042-should, 035-backport-maybe, 040-backport-maybe, 041
 -backport-maybe, regression, BugSmashFund
 =>
 consider-backport-after-042-stable, diagnostics, 042-should, 041
 -backport-maybe, regression, BugSmashFund
 * status:  merge_ready => closed
 * resolution:   => fixed
 * milestone:  Tor: 0.4.0.x-final => Tor: 0.4.1.x-final


Comment:

 Similar code has caused some bugs, and 0.4.0 is obsolete, so I'm going to
 close these tickets without backport.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2020-01-15 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.0.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by teor):

 * parent:   => #31614


Comment:

 This change doesn't seem to make much of a difference, still thinking "no
 backport".

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-10-22 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.0.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-

Comment (by teor):

 I'm leaning towards "no backport" on this ticket, unless we discover a
 specific bug.
 Leaving open, so we check again after 042-stable.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-10-22 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.0.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by nickm):

 * milestone:  Tor: 0.4.1.x-final => Tor: 0.4.0.x-final


Comment:

 Backported to 0.4.1. Marking for 0.3.5 and 0.4.0.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-30 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by teor):

 * parent:  #31614 =>


Comment:

 This ticket can be merged independently of its parent.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-30 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.1.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by asn):

 * milestone:  Tor: 0.4.2.x-final => Tor: 0.4.1.x-final


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-30 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by asn):

 * keywords:
 consider-backport-after-042-stable, consider-backport-if-needed,
 diagnostics, 042-should, 035-backport-maybe, 040-backport-maybe, 041
 -backport-maybe, regression, BugSmashFund, asn-merge
 =>
 consider-backport-after-042-stable, consider-backport-if-needed,
 diagnostics, 042-should, 035-backport-maybe, 040-backport-maybe, 041
 -backport-maybe, regression, BugSmashFund


Comment:

 Merged. Leaving open for backports.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-26 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund, asn-merge|
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by nickm):

 * status:  needs_review => merge_ready


Comment:

 I like the sentinel-variable fix; this branch seems okay to merge at this
 point.  I'll comment more in #31735.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-25 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.5
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund, asn-merge|
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by teor):

 * status:  merge_ready => needs_review
 * actualpoints:  0.4 => 0.5


Comment:

 I found another fix that might be much safer: using a sentinel variable to
 only initialise global mutexes once, regardless of the number of times
 that tor is re-initialised. (We already do this with the logs, so that we
 can keep seeing logs during shutdown.)

 I updated the usage comments in this branch, and added a note to #31735.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-25 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.4
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund, asn-merge|
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-

Comment (by teor):

 We should keep this ticket open and consider-backport-if-needed.

 I think #31735 covers all the follow-up we need to do, please feel free to
 open another ticket if it doesn't.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-25 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  merge_ready
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.4
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund, asn-merge|
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by nickm):

 * keywords:
 consider-backport-after-042-stable, consider-backport-if-needed,
 diagnostics, 042-should, 035-backport-maybe, 040-backport-maybe, 041
 -backport-maybe, regression, BugSmashFund
 =>
 consider-backport-after-042-stable, consider-backport-if-needed,
 diagnostics, 042-should, 035-backport-maybe, 040-backport-maybe, 041
 -backport-maybe, regression, BugSmashFund, asn-merge
 * status:  needs_review => merge_ready


Comment:

 Seems okay.  Should we keep this ticket open after we merge this and/or
 open a new one?  I vote for "yes".

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-23 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.4
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:  nickm|Sponsor:
-+-
Changes (by teor):

 * reviewer:   => nickm


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-23 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.4
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:   |Sponsor:
-+-
Changes (by teor):

 * status:  assigned => needs_review
 * actualpoints:  0.2 => 0.4


Comment:

 Replying to [comment:4 nickm]:
 > Hi!  This all looks plausible to me at first glance. Here's another
 question to check on, however:
 >
 >  * Have you thought about what happens on re-initialization?

 We must destroy the mutexes, or re-initialising them triggers undefined
 behaviour. (On both pthreads and Windows threads.) And there is no way to
 determine if the mutex has already been initialised.

 Therefore, we should continue to use the old code, but:
 * avoid freeing some locked mutexes by acquiring and releasing the lock in
 tor_mutex_uninit(), and
 * add comments explaining the issue, so we can diagnose any crashes or
 deadlocks more easily.

 Here is my PR:
 * 0.3.5: https://github.com/torproject/tor/pull/1346

 I think we should leave restart debugging for #31735, because I am out of
 time on this issue.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-23 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  assigned
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.2
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 There's some code that could be used for an integration test, but it would
 need work.  See the configure option --enable-restart-debugging and the
 corresponding environment variable TOR_DEBUG_RESTART, both added in
 97d9ba2380e0c894a1b611bdb4f35d0fe98a837a.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-23 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  assigned
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.2
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:   |Sponsor:
-+-

Comment (by teor):

 Is there a unit test for re-initialisation?
 Or should I write one?

 I can try to reason about the behaviour, but tests are much more reliable
 :-)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-22 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  teor
 Type:  defect   | Status:
 |  assigned
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.2
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * owner:  (none) => teor
 * status:  needs_review => assigned


Comment:

 Hi!  This all looks plausible to me at first glance. Here's another
 question to check on, however:

  * Have you thought about what happens on re-initialization?

 (Ideally, if Tor finishes, and then is re-initialized in the same process,
 we would reuse the existing mutexes rather than creating new ones.  Is
 that achievable?)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-19 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:  0.2
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:  0.2
 Reviewer:   |Sponsor:
-+-
Changes (by teor):

 * points:   => 0.2
 * actualpoints:   => 0.2


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-19 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by teor):

 * cc: nickm, dgoulet (added)
 * status:  new => needs_review


Comment:

 Here is a draft pull request, I'd like a quick review before continuing:
 * 0.3.5: https://github.com/torproject/tor/pull/1346

 Here are my questions:
 * Are the comments correct?
 * Have I missed any calls?
 * I skipped some calls that looked local, am I correct?

 I still need to:
 * write a changes file
 * split into multiple commits
 * check for any extra uses of these functions after 0.3.5:
   * pthread_mutex_destroy()
   * tor_mutex_uninit() - non-Windows
   * tor_mutex_free() - non-Windows
   * atomic_counter_destroy() - non-Windows, but with our atomic counter
 compat implementation

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-18 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  0.4.2.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.5.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  consider-backport-after-042-stable,  |  Actual Points:
  consider-backport-if-needed, diagnostics,  |
  042-should, 035-backport-maybe, 040-backport-  |
  maybe, 041-backport-maybe, regression, |
  BugSmashFund   |
Parent ID:  #31614   | Points:
 Reviewer:   |Sponsor:
-+-

Comment (by teor):

 I spoke with nickm on IRC, and he agreed:
 * we will stop calling mutex destroy on static pthread mutexes
   * need to check the windows rules
 * we'll have to make sure asan and valgrind don't think it's a leak
 * we should leave a comment on the functions that still need to call mutex
 destroy, and the places where we remove the mutex destroys

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

[tor-bugs] #31736 [Core Tor/Tor]: Stop using mutex_destroy(), when multiple threads can still access the mutex

2019-09-13 Thread Tor Bug Tracker & Wiki
#31736: Stop using mutex_destroy(), when multiple threads can still access the
mutex
-+-
 Reporter:  teor |  Owner:  (none)
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor: 0.4.2.x-final
Component:  Core |Version:  Tor: 0.3.5.1-alpha
  Tor/Tor|   Keywords:  consider-backport-after-042-stable,
 Severity:  Normal   |  consider-backport-if-needed, diagnostics,
 |  042-should, 035-backport-maybe, 040-backport-
 |  maybe, 041-backport-maybe, regression,
 |  BugSmashFund
Actual Points:   |  Parent ID:  #31614
   Points:   |   Reviewer:
  Sponsor:   |
-+-
 Part of #31614, alternative to #31735.

 If we can't join all the threads before destroying a mutex (#31735), and
 we can't otherwise prevent multiple thread access, we should stop
 destroying that mutex. (Because destroying a locked thread invokes
 undefined behaviour.)

 There may be some other pattern that helps us destroy all but one mutex.
 But that involves a "mutex-destruction" mutex. Which is terribly complex.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs