Opened 4 years ago

Last modified 8 days ago

#16709 new bug

THR: Test FAILED - conformance/interfaces/pthread_rwlock_rdlock/2-3.test

Reported by: cocobean Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/POSIX Version: R1/Development
Keywords: POSIX, pthreads, pthread_rwlock_rdlock Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by cocobean)

pthread_rwlock_rdlock implementation in Haiku R1b5 must pass this OpenPOSIX test for POSIX.1-2008 conformance.

https://github.com/haiku/open_posix_testsuite/blob/from_haiku_trunk/conformance/interfaces/pthread_rwlock_rdlock/2-3.c

Expected result: Test passed Actual result: Test failed. rd_thread blocked on read lock

Tested on: Haiku hrev58305 x86 with Open POSIX Test Suite 1.5.2

Change History (4)

comment:1 by cocobean, 2 years ago

Last edited 2 years ago by cocobean (previous) (diff)

comment:2 by waddlesplash, 2 months ago

This looks intentional. The test creates a rwlock, read-locks it, creates a thread that calls wrlock, and creates another thread that calls rdlock. The last thread blocks because a writer is waiting to acquire the lock. Anything else would let reader threads starve out writer threads.

comment:3 by cocobean, 2 months ago

Using hrev58072 source:

Note old commit: https://github.com/haiku/haiku/commit/298314fe4b1f592c5b2caf3f06a1e8a452329396

Technically, test reads that main thread and writer uses SCHED_FIFO - which isn't implemented yet??

Version 1, edited 2 months ago by cocobean (previous) (next) (diff)

comment:4 by cocobean, 8 days ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.