#1855 closed defect (fixed)

Processing of signal during pthread_join()

Reported by: Joel Sherrill Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: normal Keywords:
Cc: lj8175@… Blocked By:
Blocking:

Description

It appears that Linux unblocks a thread waiting on a pthread_join(), dispatches the signal handler, and then has the thread reblock. This was detected in the GCJ porting effort.

This appears to be the expected behaviour of pthread_mutex_lock(). From http://pubs.opengroup.org/onlinepubs/007908799/xsh/pthread_mutex_lock.html

"If a signal is delivered to a thread waiting for a mutex, upon return from the signal handler the thread resumes waiting for the mutex as if it was not interrupted. "

It is unclear how many POSIX calls we consider "non-interruptible" actually have this behaviour.

Attachments (4)

pr1855.diff (8.3 KB) - added by Joel Sherrill on Jul 26, 2011 at 5:31:58 PM.
Attempt to address issue
pr1855_411.diff (10.0 KB) - added by Joel Sherrill on Jul 31, 2011 at 9:45:57 PM.
Patch for 4.11
pr1855_410.diff (12.2 KB) - added by Joel Sherrill on Jul 31, 2011 at 9:46:18 PM.
Patch for 4.10
pr1855_49.diff (13.7 KB) - added by Joel Sherrill on Jul 31, 2011 at 9:46:46 PM.
Patch for 4.9

Download all attachments as: .zip

Change History (8)

Changed on Jul 26, 2011 at 5:31:58 PM by Joel Sherrill

Attachment: pr1855.diff added

Attempt to address issue

comment:1 Changed on Jul 31, 2011 at 9:36:05 PM by Joel Sherrill

Cc: Jie Liu added

Changed on Jul 31, 2011 at 9:45:57 PM by Joel Sherrill

Attachment: pr1855_411.diff added

Patch for 4.11

comment:2 Changed on Jul 31, 2011 at 9:45:57 PM by Joel Sherrill

attachments.isobsolete: 01

Changed on Jul 31, 2011 at 9:46:18 PM by Joel Sherrill

Attachment: pr1855_410.diff added

Patch for 4.10

Changed on Jul 31, 2011 at 9:46:46 PM by Joel Sherrill

Attachment: pr1855_49.diff added

Patch for 4.9

comment:3 Changed on Jul 31, 2011 at 9:47:10 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Patch merged. Closing.

comment:4 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.