Displaying 20 results from an estimated 135 matches for "pthread_join".
2005 Mar 16
1
openssh-3.8.1p1, with pthreads enabled, hung in pthread_join.
...4)
And the sshd will be in this state:
Attaching to program: `/private/tmp/OpenSSH.roots/OpenSSH~obj/sshd',
process 26589.
Reading symbols for shared libraries ...................... done
0x9002cf88 in semaphore_wait_trap ()
(gdb) bt
#0 0x9002cf88 in semaphore_wait_trap ()
#1 0x9006153c in pthread_join ()
#2 0x00028a50 in sshpam_thread_cleanup () at
/tmp/OpenSSH.roots/OpenSSH/openssh/auth-pam.c:417
#3 0x00017110 in do_cleanup (authctxt=0x4034e0) at
/tmp/OpenSSH.roots/OpenSSH/openssh/session.c:2273
#4 0x00007044 in cleanup_exit (i=255) at
/tmp/OpenSSH.roots/OpenSSH/openssh/sshd.c:1923
#5 0x...
2012 Sep 06
1
nut-scanner pthread issue
...snmp = 0;
}
#else
dev[TYPE_SNMP] = nutscan_scan_snmp(start_ip,end_ip,timeout,&snmp_sec);
#endif /* HAVE_PTHREAD */
}
}
==============================
if start_ip==NULL, pthread is not created, but later...
if( allow_snmp && nutscan_avail_snmp && thread[TYPE_SNMP]) {
pthread_join(thread[TYPE_SNMP],NULL);
}
it calls pthread_join with threan[TYPE_SNMP]==0,
pthread_join(0, ?) behaviour is undefined, on my system undefined=crashes.
I used attached patch to get rid of it.
Cheers,
Michal
/me is back from vacation and going to another one tmrw, so I won't be
reachable fo...
2013 Nov 20
3
[LLVMdev] Curiosity about transform changes under Sanitizers (Was: [PATCH] Disable branch folding with MemorySanitizer)
...ndif
void *Thread(void *p) {
for (long i = 0; i < N; i++)
foo(0);
return 0;
}
int main() {
pthread_t t[3];
pthread_create(&t[0], 0, Thread, 0);
pthread_create(&t[1], 0, Thread, 0);
pthread_create(&t[2], 0, Thread, 0);
for (long i = 0; i < N; i++)
bar(i);
pthread_join(t[0], 0);
pthread_join(t[1], 0);
pthread_join(t[2], 0);
}
==> g.cc <==
int g;
int foo(int cond) {
if (cond)
return g;
// If we replace 'g' with g*g*g*g, the benchmark becomes 4x faster.
return 0;
}
void bar(int i) { g = i; }
% clang if-bench.cc g.cc -lpthread -O1...
2018 Jun 08
4
vanilla build of 7.7p1 release on linux/4.17 fails with gcc8 @ "/usr/bin/ld: unrecognized option '-Wl,-z,retpolineplt'"
On 8 June 2018 at 11:21, PGNet Dev <pgnet.dev at gmail.com> wrote:
> fyi
>
> add'l -- and looks unrelated -- issue
> /usr/include/pthread.h:251:12: note: previous declaration of ?pthread_join? was here
> extern int pthread_join (pthread_t __th, void **__thread_return);
What included pthread.h? That's explicitly not supported by sshd:
$ grep THREAD auth-pam.c
#ifdef USE_POSIX_THREADS
# error "USE_POSIX_THREADS replaced by UNSUPPORTED_POSIX_THREADS_HACK"
* Fo...
2020 Mar 28
0
[nbdkit PATCH v2] nbd: Avoid stuck poll() in nbdplug_close_handle()
...n test-nbd-tls-psk.sh and
test-nbd-tls.sh (on my machine, running those two in a loop with
commits 0a76cae4 and 09e34ba2 reverted would fail within 100
attempts), where even though the client to the 'nbdkit nbd' process
has cleanly exited, things are stalled in .close where nbd is trying
to pthread_join() the reader thread, while the reader thread is itself
blocked on a poll() that will never make additional progress. In
hindsight, the problem is obvious: we used the wrong libnbd API
(synchronous instead of async), which often results in:
nbd .close nbd reader server
nbd_s...
2018 Jun 08
4
vanilla build of 7.7p1 release on linux/4.17 fails with gcc8 @ "/usr/bin/ld: unrecognized option '-Wl,-z,retpolineplt'"
On 8 June 2018 at 10:52, PGNet Dev <pgnet.dev at gmail.com> wrote:
[...]
> So, there's a problem for OpenSSH build with spec'ing LD=/usr/bin/ld ?
in this particular case, apparently yes. not generally, though.
[...]
> What's *intended* re: openssh? Support for LD=ld or only =gcc, or undef'd ?
Well the intent is you should be able to set CC and LD to whatever you
2013 Nov 21
0
[LLVMdev] Curiosity about transform changes under Sanitizers (Was: [PATCH] Disable branch folding with MemorySanitizer)
...= 0; i < N; i++)
> foo(0);
> return 0;
> }
>
>
> int main() {
> pthread_t t[3];
> pthread_create(&t[0], 0, Thread, 0);
> pthread_create(&t[1], 0, Thread, 0);
> pthread_create(&t[2], 0, Thread, 0);
> for (long i = 0; i < N; i++)
> bar(i);
> pthread_join(t[0], 0);
> pthread_join(t[1], 0);
> pthread_join(t[2], 0);
> }
>
>
> ==> g.cc <==
> int g;
>
>
> int foo(int cond) {
> if (cond)
> return g;
> // If we replace 'g' with g*g*g*g, the benchmark becomes 4x faster.
> return 0;
> }
>
&g...
2018 Nov 08
1
[nbdkit PATCH] nbd: Fix race during close
...with disastrous results on the
second connection.
[1] ./configure CXFLAGS=-fsanitize=thread LDFLAGS=-fsanitize=thread
Commits c70616f8 and 430f8141 tried to clean up deadlock during
shutdown, but missed that without some sort of locking, a
close-before-read was still possible. Swap lines so that pthread_join()
now serves as the locking to ensure close is not attempted while
another thread may be about to use the fd.
Thanks: Richard W.M. Jones
Signed-off-by: Eric Blake <eblake@redhat.com>
---
It took me a while to decipher how ThreadSanitizer actually tests
this race, which gets reported as a Wr...
2014 Nov 09
0
taskprocessor fails to allocate memory
I keep getting this error
[Nov 8 22:51:31] ERROR[8192]: taskprocessor.c:614
__allocate_taskprocessor: Unable to start taskprocessor listener for
taskprocessor bbe08c34-9d1c-4e5f-8ae0-0cc75289caca
[Nov 8 22:51:31] ERROR[8192]: taskprocessor.c:245
default_listener_shutdown: pthread_join(): Cannot allocate memory
[Nov 8 22:51:31] ERROR[8192]: taskprocessor.c:614
__allocate_taskprocessor: Unable to start taskprocessor listener for
taskprocessor f30fcb95-d290-4bb1-8008-290b79342c01
[Nov 8 22:51:31] ERROR[8192]: taskprocessor.c:245
default_listener_shutdown: pthread_join(): Cannot a...
2020 Mar 27
4
[nbdkit PATCH 0/2] Improve shutdown race in nbd plugin
I still need more soak time on testing, to see whether I can:
a) reproduce the hang with patch 2 not applied
b) feel confident that patch 2 is sufficient to fix the race, or else
determine that I also need to augment the loop condition in the reader
thread to additionally break out of the loop when the pipe-to-self
sees EOF even when nbd_aio_is_dead() has not yet been satisfied
I'm also
2009 Mar 08
3
Thread creation in Wine
...SS);
std::cout << "first thread: " << pthread_create(&pthread_id, &attr, my_th, 0) << std::endl;
std::cout << "second thread: " << pthread_create(&pthread_id2, &attr, my_th, 0) << std::endl;
pthread_attr_destroy(&attr);
pthread_join(pthread_id, 0);
pthread_join(pthread_id2, 0);
}
Compile with g++ -o test -pthread test.cpp.
Cheers,
2013 Feb 13
1
vorbis-tools 1.4.0, ogg123 and MinGW
...configure, doesn't look like it does
anything.
On MinGW a pthread_t is defined as a struct not an int:
typedef struct {
void * p;
unsigned int x;
} ptw32_handle_t;
typedef ptw32_handle_t pthread_t;
The configure test to check if pthreads is available is:
int
main ()
{
pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0);
pthread_cancel(0); pthread_cleanup_pop(0);
;
return 0;
}
It's assuming a pthread_t could be equal to 0 (an int) which fails
when building with M...
2013 Nov 15
1
[LLVMdev] an annoying runtime bug of lldb on redhat enterprise linux 6.3 with gcc 4.8.2
...command string.
2. if situation mentioned above appears and I type "quit" to exit lldb, a
segmentation fault (core dumped) happen. I debug lldb with gdb-7.6.1, and
track the segmentation fault source to a message "Program received signal
SIGSEGV, segmentation fault. 0x3b55c07fc3 in pthread_join () from
/lib64/libpthread.so.0".
Since I am not familiar with multi-thread programming, I can not dig any
further. Do you guys have Any clue?
Thanks beforehand.
--
æšćć (Yang Yong-Yong)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org...
2020 Mar 27
0
[nbdkit PATCH 2/2] nbd: Reorder cleanup to avoid getting stuck in poll()
We have been seeing sporadic hangs on test-nbd-tls-psk.sh, where even
though the client to the 'nbdkit nbd' process has cleanly exited,
things are stalled in .close where nbd is trying to pthread_join() the
reader thread, while the reader thread is itself blocked on a poll()
that will never make additional progress. Tracing the race is
difficult: nbd_shutdown() sends NBD_CMD_DISC to the server, and the
NBD protocol does not require the server to send a response but does
not forbid the server fr...
2013 Mar 20
0
[LLVMdev] Problems with parallelizing lli
...iled to create thread " << strerror(errno) << "\n";
+ return 66;
+ }
+
+ if(0 != pthread_create(&t2, NULL, &run, aa)) {
+ errs() << "Failed to create thread " << strerror(errno) << "\n";
+ return 67;
+ }
+
+ pthread_join(t1, &r1);
+ pthread_join(t2, &r2);
+ return (long) r1 | (long) r2;
+}
2014 Apr 25
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...i < 100000000; i++)
>> bar();
>> return 0;
>> }
>>
>> int main() {
>> static const int kNumThreads = 16;
>> pthread_t t[kNumThreads];
>> pthread_create(&t[0], 0, Thread1, 0);
>> pthread_create(&t[1], 0, Thread2, 0);
>> pthread_join(t[0], 0);
>> pthread_join(t[1], 0);
>> return 0;
>> }
>>
>>
>>
>>
>> On Fri, Apr 18, 2014 at 11:45 PM, Xinliang David Li <xinliangli at gmail.com>
>> wrote:
>>>
>>>
>>>
>>>
>>> On Fri,...
2013 Jan 07
2
[LLVMdev] Build failure when building single threaded LLVM with CMake
...pp.o: In function `(anonymous
namespace)::Initialize_MultipleThreads_Test::TestBody()':
ManagedStatic.cpp:(.text+0x9a): undefined reference to `pthread_create'
ManagedStatic.cpp:(.text+0xb7): undefined reference to `pthread_create'
ManagedStatic.cpp:(.text+0xc8): undefined reference to `pthread_join'
ManagedStatic.cpp:(.text+0xd9): undefined reference to `pthread_join'
I am attaching a patch which fixes the above mentioned failures. Could you
please review the patch?
Thanks,
Manish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.o...
2013 Oct 03
2
[LLVMdev] question about -coverage
...d *Thread(void *) {
for (int i = 0; i < 100000000; i++)
foo();
return 0;
}
int main() {
static const int kNumThreads = 16;
pthread_t t[kNumThreads];
for (int i = 0; i < kNumThreads; i++)
pthread_create(&t[i], 0, Thread, 0);
for (int i = 0; i < kNumThreads; i++)
pthread_join(t[i], 0);
return 0;
}
% clang -O2 ~/tmp/coverage_mt.cc -lpthread ; time ./a.out
TIME: real: 0.284; user: 3.560; system: 0.000
% clang -O2 ~/tmp/coverage_mt.cc -lpthread -coverage ; time ./a.out
TIME: real: 13.327; user: 174.510; system: 0.000
Any principal objections against making __llvm_gco...
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
nouveau/nouveau.c | 29 ++++++++++++++++++++++++++++-
nouveau/private.h | 3 ++-
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index ee7893b..72c31cf 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -85,6 +85,12 @@ nouveau_device_wrap(int fd, int close, struct
2018 Apr 12
3
[PATCH nbdkit 0/2] connections: Protect open and close callbacks with the request lock.
I'm fairly sure that these bugs which appear in the Python plugin:
https://bugzilla.redhat.com/show_bug.cgi?id=1566516
https://bugzilla.redhat.com/show_bug.cgi?id=1566522
are really bugs in the SERIALIZE_ALL_REQUESTS thread model. See
the first patch for the full explanation.
The second patch is a fix for a race condition which is probably
nudged into being by the first patch.
Now this