Opened 10 months ago

Last modified 9 months ago

#32884 merge_ready defect

set_main_thread() not called on second initialization with pthreads

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: consider-backport-after-043-stable, consider-backport-if-needed, 035-backport 040-backport? 041-backport 042-backport
Cc: Actual Points: 0
Parent ID: Points: .1
Reviewer: ahf Sponsor:


The windows thread initialization function calls set_main_thread unconditionally, but the pthreads thread initialization function only calls it the first time we're initializing Tor. That can lead to trouble with embedding.

Child Tickets

Change History (8)

comment:1 Changed 10 months ago by nickm

Branch is bug32884_035 with PR at It should merge cleanly to master.

comment:2 Changed 10 months ago by nickm

Actual Points: 0
Status: assignedneeds_review

comment:3 Changed 10 months ago by dgoulet

Reviewer: ahf

comment:4 Changed 9 months ago by ahf

Status: needs_reviewmerge_ready

Looks good!

comment:5 Changed 9 months ago by nickm

Milestone: Tor: 0.4.3.x-finalTor: 0.4.2.x-final
Parent ID: #32883

Merged to master, marking for possible backport.

comment:6 Changed 9 months ago by teor

Keywords: consider-backport-after-0431 added

comment:7 Changed 9 months ago by teor

Keywords: consider-backport-after-043-stable added; consider-backport-after-0431 removed

This is a rarely used configuration, and threading issues can be subtle. Let's test this fix for much longer, then decide if we should backport.

comment:8 Changed 9 months ago by teor

Keywords: consider-backport-if-needed added
Note: See TracTickets for help on using tickets.