Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1439 closed defect (fixed)

"now" binding is required to prevent deadlocks in g++ startup code in Solaris

Reported by: dvv Owned by: dvv
Priority: medium Milestone: Sprint-20111206
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Medium
Sub-Project: DNS Feature Depending on Ticket: none
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 16 Internal?: no

Description

The functionality of the dynamic libraries is badly dependent on what the C++ compiler inlines and what it makes a resolvable symbol, and if the default "lazy" binding is in use (i.e. a code reference gets resolved at its first use), certain combinations of the compiler -O flags causes the initialization code for static objects to make an inderect recursive call to an initialization thunk and a deadlock in its guard lock, and the process won't even make it to main(). Fortunately enough, the loader in Solaris allows for forced binding of all symbols on module load, which can be controlled by an ld flag or an environ variable at runtime. It adds some cycles at startup, but I don't think it's an issue for us. I don't know if there is a problem like this in other systems tho.

Subtickets

Change History (6)

comment:1 Changed 8 years ago by dvv

  • Status changed from new to accepted

comment:2 Changed 8 years ago by dvv

  • Owner changed from dvv to UnAssigned
  • Status changed from accepted to reviewing

-z now added for Solaris in configure.ac

comment:3 Changed 8 years ago by stephen

  • Owner changed from UnAssigned to stephen

comment:4 Changed 8 years ago by stephen

  • Owner changed from stephen to dvv

Reviewed commit c789138250b33b6b08262425a08a2a0469d90433.

Seems OK; at any rate, all the unit tests on Solaris work (presumably the test programs also suffer from that potential deadlock).

Please merge.

comment:5 Changed 8 years ago by dvv

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged into master.

comment:6 Changed 8 years ago by shane

  • Feature Depending on Ticket set to none
Note: See TracTickets for help on using tickets.