Skip to content

fix: tform: regression due to #797#813

Open
jodavies wants to merge 2 commits intoform-dev:masterfrom
jodavies:dollars-recursive-lock
Open

fix: tform: regression due to #797#813
jodavies wants to merge 2 commits intoform-dev:masterfrom
jodavies:dollars-recursive-lock

Conversation

@jodavies
Copy link
Copy Markdown
Collaborator

The fix of #797 causes deadlocks when assigned MODMAX or MODMIN
dollars appear on their RHS, inside a function argument. In that
case, another lock on the dollar is attempted.

For example: $dol = max_($dol,something);

Use PTHREAD_MUTEX_RECURSIVE for dollar variables, such that a
thread may re-lock a dollar during assignment operations.

The MODSUM case has always deadlocked for such constructions.


This also removes pthreadslockwrite, which is unused, and renames pthreadslockread as pthreadslock.


This is about a 1% performance regression for fmft, mincer, minceex benchmarks (which should be largely recovered by #807).


I added test cases for the example of #271 in both tform and parform variants, which do not behave in the same way.

This lock is initialised in a few places, but never locked/unlocked.

Rename pthreadslockread as pthreadslock, since it is (and always has
been) used for both reading and writing.
The fix of form-dev#797 causes deadlocks when assigned MODMAX or MODMIN
dollars appear on their RHS, inside a function argument. In that
case, another lock on the dollar is attempted.

For example: `$dol = max_($dol,something);`

Use PTHREAD_MUTEX_RECURSIVE for dollar variables, such that a
thread may re-lock a dollar during assignment operations.

The MODSUM case has always deadlocked for such constructions.
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 58.467% (+0.04%) from 58.43%
when pulling aab1815 on jodavies:dollars-recursive-lock
into c549571 on form-dev:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants