Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8399603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:21:07+00:00 2026-06-09T21:21:07+00:00

In a comment on the question Automatically release mutex on crashes in Unix back

  • 0

In a comment on the question Automatically release mutex on crashes in Unix back in 2010, jilles claimed:

glibc’s robust mutexes are so fast because glibc takes dangerous shortcuts. There is no guarantee that the mutex still exists when the kernel marks it as “will cause EOWNERDEAD”. If the mutex was destroyed and the memory replaced by a memory mapped file that happens to contain the last owning thread’s ID at the right place and the last owning thread terminates just after writing the lock word (but before fully removing the mutex from its list of owned mutexes), the file is corrupted. Solaris and will-be-FreeBSD9 robust mutexes are slower because they do not want to take this risk.

I can’t make any sense of the claim, since destroying a mutex is not legal unless it’s unlocked (and thus not in any thread’s robust list). I also can’t find any references searching for such a bug/issue. Was the claim simply erroneous?

The reason I ask and that I’m interested is that this is relevant to the correctness of my own implementation built upon the same Linux robust-mutex primitive.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:21:08+00:00Added an answer on June 9, 2026 at 9:21 pm

    The description of the race by FreeBSD pthread developer David Xu: http://lists.freebsd.org/pipermail/svn-src-user/2010-November/003668.html

    I don’t think the munmap/mmap cycle is strictly required for the race. The piece of shared memory might be put to a different use as well. This is uncommon but valid.

    As also mentioned in that message, more “fun” occurs if threads with different privilege access a common robust mutex. Because the node for the list of owned robust mutexes is in the mutex itself, a thread with low privilege may corrupt a high privilege thread’s list. This could be exploited easily to make the high privilege thread crash and in rare cases this might allow the high privilege thread’s memory to be corrupted. Apparently Linux’s robust mutexes are only designed for use by threads with the same privileges. This could have been avoided easily by making the robust list an array fully in the thread’s memory instead of a linked list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, I tried to ask this question as a comment on this question, but
This question is based on this thread . Is [---] a comment in Git
I have no idea if I phrased the question right. Feel free to comment
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
Ok, I'm now very confused. After my last question had several people comment about
In previous question I got comment about Oracle statistics: Oracle doesn't know that 50M
Per this question (see comments near the bottom), I was wondering if anyone knows
(creating a separate question after comments on this: Javascript redeclared global variable overrides old
Looking at the general trend of comments in my question about Building an Aircraft
This question arose from the discussion in the comments of this answer . First,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.