Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#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 07/26/11 at 17:31:58.
Attempt to address issue
pr1855_411.diff (10.0 KB) - added by Joel Sherrill on 07/31/11 at 21:45:57.
Patch for 4.11
pr1855_410.diff (12.2 KB) - added by Joel Sherrill on 07/31/11 at 21:46:18.
Patch for 4.10
pr1855_49.diff (13.7 KB) - added by Joel Sherrill on 07/31/11 at 21:46:46.
Patch for 4.9

Download all attachments as: .zip

Change History (8)

Changed on 07/26/11 at 17:31:58 by Joel Sherrill

Attachment: pr1855.diff added

Attempt to address issue

comment:1 Changed on 07/31/11 at 21:36:05 by Joel Sherrill

Cc: Jie Liu added

Changed on 07/31/11 at 21:45:57 by Joel Sherrill

Attachment: pr1855_411.diff added

Patch for 4.11

comment:2 Changed on 07/31/11 at 21:45:57 by Joel Sherrill

attachments.isobsolete: 01

Changed on 07/31/11 at 21:46:18 by Joel Sherrill

Attachment: pr1855_410.diff added

Patch for 4.10

Changed on 07/31/11 at 21:46:46 by Joel Sherrill

Attachment: pr1855_49.diff added

Patch for 4.9

comment:3 Changed on 07/31/11 at 21:47:10 by Joel Sherrill

Resolution: fixed
Status: newclosed

Patch merged. Closing.

comment:4 Changed on 11/24/14 at 18:58:28 by Gedare Bloom

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.