Date: Sat, 30 May 1998 19:54:35 -0700 From: Amancio Hasty <hasty@rah.star-gate.com> To: John Birrell <jb@cimlogic.com.au> Cc: current@FreeBSD.ORG Subject: Re: pthreads and thread-specific? Message-ID: <199805310254.TAA18874@rah.star-gate.com> In-Reply-To: Your message of "Sun, 31 May 1998 11:39:35 %2B1000." <199805310139.LAA13018@cimlogic.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi John, It looks like the threads are waiting on a dead thread... I stuck this in uthread_info: for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) { /* Find the state: */ for (j = 0; j < (sizeof(thread_info) / sizeof(struct s_thread_info)) - 1; j++) if (thread_info[j].state == pthread->state) break; /* Output a record for the current thread: */ sprintf(s, "--------------------\nThread %p (%s) prio %3d state %s [%s:%d]\n", pthread, (pthread->name == NULL) ? "":pthread->name, pthread-> pthread_priority, thread_info[j].name,pthread->fname,pthread->lineno); _thread_sys_write(fd, s, strlen(s)); ------------------------ for (itr = 0; itr < PTHREAD_DESTRUCTOR_ITERATIONS; itr++) { for (key = 0; key < PTHREAD_KEYS_MAX; key++) { if (_thread_run->specific_data_count ) { if (_thread_run->specific_data[key]) { sprintf(s, " key %d lock %x \n", key, key_table[key].access_lock); _thread_sys_write(fd, s, strlen(s)); } } } } ------------------------ ============= ACTIVE THREADS -------------------- Thread 0x8050a00 () prio 64 state Running [/usr/src/lib/libc_r/uthread/uthread _cond.c:331] key 2 lock 8050800 key 2 lock 8050800 key 2 lock 8050800 key 2 lock 8050800 -------------------- Thread 0x8050600 () prio 64 state Running [/usr/src/lib/libc_r/uthread/uthread _cond.c:331] key 2 lock 8050800 key 2 lock 8050800 key 2 lock 8050800 key 2 lock 8050800 This is the running thread -------------------- Thread 0x8050400 () prio 64 state Running [/usr/src/lib/libc_r/uthread/uthread _cond.c:331] key 2 lock 8050800 key 2 lock 8050800 key 2 lock 8050800 key 2 lock 8050800 -------------------- Thread 0x8050200 () prio 64 state Waiting on a condition variable [/usr/src/lib/libc_r/uthread/uthread_cond.c:163] key 2 lock 8050800 key 2 lock 8050800 key 2 lock 8050800 key 2 lock 8050800 This is the initial thread DEAD THREADS Thread 0x8050800 prio 64 [/usr/src/lib/libc_r/uthread/uthread_exit.c:176] ============= FILE DESCRIPTOR TABLE fd[ 5] read owner 0x0 count 0 [/usr/src/lib/libc_r/uthread/uthread_fstat.c:49] write owner 0x0 count 0 [/usr/src/lib/libc_r/uthread/uthread_write.c:55 ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805310254.TAA18874>