Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 613142 - dev-libs/libunistring: test-lock hangs on ia64
Summary: dev-libs/libunistring: test-lock hangs on ia64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Scheme Project
URL:
Whiteboard:
Keywords:
Depends on: 674644
Blocks:
  Show dependency tree
 
Reported: 2017-03-18 19:34 UTC by Matt Turner
Modified: 2019-01-27 11:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner gentoo-dev 2017-03-18 19:34:57 UTC
# ./test-lock
Starting test_lock ... OK
Starting test_rwlock ... OK
Starting test_recursive_lock ... OK
Starting test_once ...

test_once hangs on ia64 most of the time (I have seen it pass after a few seconds)

s/#define ENABLE_DEBUGGING 0/#define ENABLE_DEBUGGING 1/ in test-lock.c gives some insight:

Contender 0x2000000005d331f0 waiting for signal for round 29451
Contender 0x2000000005d331f0 got the     signal for round 29451
Contender 0x20000000025331f0 got the     signal for round 29451
Contender 0x2000000002d331f0 got the     signal for round 29451
Contender 0x2000000001d331f0 got the     signal for round 29451
Contender 0x2000000001d331f0 waiting for signal for round 29452
Contender 0x20000000045331f0 got the     signal for round 29451
Contender 0x2000000002d331f0 waiting for signal for round 29452
Contender 0x20000000025331f0 waiting for signal for round 29452
Contender 0x20000000055331

Definitely looks like a dead lock.

Cc'ing toolchain@ since I expect this will be a glibc bug. I am using glibc-2.23-r3.
Comment 1 Matt Turner gentoo-dev 2017-03-19 00:42:52 UTC
Tried glibc-2.24-r1 with the same result.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2017-07-23 08:42:07 UTC
Poked at it a bit today. test-lock is a gnulib's test (not a libunistring-specific test).

A few facts:
- libunistring from git passes that test (seemingly consistently)
- gnulib has quite a few fixes for test-lock since unistring release cut: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=history;f=tests/test-lock.c;h=fb18dee9aa02a55c867118e1203c1e08eed79554;hb=HEAD
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2017-07-23 11:40:36 UTC
(In reply to Sergei Trofimovich from comment #2)
> Poked at it a bit today. test-lock is a gnulib's test (not a
> libunistring-specific test).
> 
> A few facts:
> - libunistring from git passes that test (seemingly consistently)
> - gnulib has quite a few fixes for test-lock since unistring release cut:
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=history;f=tests/test-lock.
> c;h=fb18dee9aa02a55c867118e1203c1e08eed79554;hb=HEAD

Managed to deadlock gnulib's test from git as well.
It's not fixed.
Comment 4 Matt Turner gentoo-dev 2019-01-06 02:46:51 UTC
Looks like after v0.9.7 test-lock passes:

Starting test_lock ... OK
Starting test_rwlock ... OK
Starting test_recursive_lock ... OK
Starting test_once ... OK

glibc is 2.27-r6.
Comment 5 Matt Turner gentoo-dev 2019-01-06 02:53:29 UTC
Looks like this was fixed by

https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=480d374e596a0ee3fed168ab42cd84c313ad3c89

and then new gnulib was imported into libunistring.

I'll file a stabilization request for a newer version.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-01-06 07:35:58 UTC
Ah, nice! I had a reproducer that was able to trigger on guppy reliably until I updated kernel there.
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-01-27 11:54:54 UTC
Newer version was marked stable on ia64.