[Bug 1450355] [NEW] statically linking libpthread is problematic

2015-04-30 Thread junyer
Public bug reported: While investigating https://github.com/google/re2/issues/22, we discovered that statically linking libpthread is problematic since Ubuntu 14.10. I suspect that the TLS (Thread-Local Storage) is not initialised properly, which results in hangs or crashes. junyer@whalre

[Bug 1450355] Re: statically linking libpthread is problematic

2015-04-30 Thread junyer
Note that the third case worked because the use of `-Wl,--whole-archive -lpthread -Wl,--no-whole-archive' is a workaround that evidently results in the TLS (Thread-Local Storage) being initialised properly. The root cause of this bug is currently uncertain, but

[Bug 1450355] Re: statically linking libpthread is problematic

2015-04-30 Thread junyer
junyer@whalre:~$ g++ -Wall -Werror foo.cc -o foo -lpthread junyer@whalre:~$ ./foo foo: pthread_rwlock_init(lock, NULL): 0 foo: pthread_rwlock_wrlock(lock): 0 foo: pthread_rwlock_unlock(lock): 0 foo: pthread_rwlock_wrlock(lock): 0 foo: pthread_rwlock_unlock(lock): 0 foo: pthread_rwlock_destroy

[Bug 1450355] Re: statically linking libpthread is problematic

2015-04-30 Thread junyer
Note that the second case hung and thus required me to hit Ctrl-C. The proximate cause seems to be that the TID (Thread ID) in the TLS (Thread-Local Storage) is not initialised properly: 1. The first pthread_rwlock_wrlock() call sets __writer to the TID, which is 0. 2. The first

[Bug 537637] Re: Outdated version 4.2.0 in Lucid

2010-03-23 Thread junyer
Subject: FFe: Sync rsyslog 4.6.1-1 (main) from Debian testing (main) affects ubuntu/rsyslog status new importance wishlist subscribe ubuntu-release done Please sync rsyslog 4.6.1-1 (main) from Debian testing (main) Explanation of the Ubuntu delta and why it can be dropped: Sorry, I'm