On 64-bit Linux condition-wait and condition-notify use 64 bit pointers as 32 bit unique futex values

Bug #1876825 reported by Ilya Perminov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

In Linux futex values are 32 bit. sb-futex version of conditon-wait/notify uses *current-thread* and a waitqueue as unique futex values. On a system with 64 bit pointers, only lower 32 bits are used possibly resulting in identical futex values and lost wakeups.

Revision history for this message
Douglas Katzman (dougk) wrote :

This problem could manifest only if 2 thread (or waitqueue) structures had addresses exactly 4 GB apart *and* were involved in an operation on the same futex word address at the same time.
So as a practical concern, it can't happen at all using the default heap size. I guess we'll have to map threads and waitqueues to "small" (32-bit) unique identifiers

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.