Overview
| Artifact ID: | 4cd497f45931ac5b90a23b1154e5bdcc606e3af7 |
|---|---|
| Ticket: | 2005794fffffffffffffffffffffffffffffffff
tpool::create freezes when using minworkers |
| User & Date: | nathanjett on 2008-10-22 04:41:33 |
Changes
- icomment:
I've also experienced this issue with the following code: package require Thread set workers 10 set poolId [tpool::create -minworkers $workers -maxworkers $workers] This code works fine on Windows XP but on my Gentoo Linux install and a co-workers Ubuntu install the last line hangs indefinitely. If I set workers to 2 it works fine, as I increase the number it fails more frequently and when I get to 10 it fails every time. If I don't specify the minworkers the command finished fine, but then when I assign a large number of jobs to the pool, only 7 or 8 threads end up working them. I'm using Tcl 8.5.1 with thread 2.6.5. I have tried the ActiveState binaries and had the same trouble, also tried with Tcl 8.4.18 and still no luck. Below is are strace and gdb output for the script noted above. nathan@NJPC ~ $ strace -p 6315 -t -tt Process 6315 attached - interrupt to quit 1224606735.015121 futex(0x8094d1c, FUTEX_WAIT, 34, NULL) = -1 EAGAIN (Resource temporarily unavailable) 1224606735.015288 futex(0x8094d1c, FUTEX_WAIT, 36, NULL^C <unfinished ...> Process 6315 detached nathan@NJPC ~ $ gdb GNU gdb 6.7.1 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". (gdb) attach 6315 Attaching to process 6315 Reading symbols from /usr/bin/tclsh8.5...(no debugging symbols found)...done. Using host libthread_db library "/lib/libthread_db.so.1". Reading symbols from /usr/lib/libtcl8.5.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libtcl8.5.so Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. [Thread debugging using libthread_db enabled] [New Thread 0xb7c8d6c0 (LWP 6315)] [New Thread 0xb4c53b90 (LWP 6322)] [New Thread 0xb5454b90 (LWP 6321)] [New Thread 0xb5c55b90 (LWP 6320)] [New Thread 0xb6456b90 (LWP 6319)] [New Thread 0xb6c57b90 (LWP 6318)] [New Thread 0xb7458b90 (LWP 6317)] [New Thread 0xb7c8cb90 (LWP 6316)] Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libm.so.6... (no debugging symbols found)...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/libnss_compat.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libnss_compat.so.2 Reading symbols from /lib/libnsl.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libnss_nis.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libnss_nis.so.2 Reading symbols from /lib/libnss_files.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /usr/lib/thread2.6.5/libthread2.6.5.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/thread2.6.5/libthread2.6.5.so (no debugging symbols found) 0xffffe424 in __kernel_vsyscall () (gdb) thread apply all bt Thread 8 (Thread 0xb7c8cb90 (LWP 6316)): #0 0xffffe424 in __kernel_vsyscall () #1 0xb7d497d1 in select () from /lib/libc.so.6 #2 0xb7ef7dbd in ?? () from /usr/lib/libtcl8.5.so Thread 7 (Thread 0xb7458b90 (LWP 6317)): #0 0xffffe424 in __kernel_vsyscall () #1 0xb7dee576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7ef6bb3 in Tcl_ConditionWait () from /usr/lib/libtcl8.5.so Thread 6 (Thread 0xb6c57b90 (LWP 6318)): #0 0xffffe424 in __kernel_vsyscall () #1 0xb7dee576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7ef6bb3 in Tcl_ConditionWait () from /usr/lib/libtcl8.5.so Thread 5 (Thread 0xb6456b90 (LWP 6319)): #0 0xffffe424 in __kernel_vsyscall () #1 0xb7dee576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7ef6bb3 in Tcl_ConditionWait () from /usr/lib/libtcl8.5.so Thread 4 (Thread 0xb5c55b90 (LWP 6320)): #0 0xffffe424 in __kernel_vsyscall () #1 0xb7dee576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7ef6bb3 in Tcl_ConditionWait () from /usr/lib/libtcl8.5.so Thread 3 (Thread 0xb5454b90 (LWP 6321)): #0 0xffffe424 in __kernel_vsyscall () #1 0xb7dee576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7ef6bb3 in Tcl_ConditionWait () from /usr/lib/libtcl8.5.so Thread 2 (Thread 0xb4c53b90 (LWP 6322)): #0 0xffffe424 in __kernel_vsyscall () #1 0xb7df0c2e in __lll_mutex_lock_wait () from /lib/libpthread.so.0 #2 0xb7deca93 in _L_mutex_lock_50 () from /lib/libpthread.so.0 #3 0xb7dec47d in pthread_mutex_lock () from /lib/libpthread.so.0 #4 0xb7ef6c42 in Tcl_MutexLock () from /usr/lib/libtcl8.5.so #5 0x080ad3a0 in ?? () #6 0x080c3ff0 in ?? () #7 0xb4c534b8 in ?? () #8 0xb7e1dff4 in ?? () from /usr/lib/thread2.6.5/libthread2.6.5.so #9 0xbf832758 in ?? () #10 0xbf832758 in ?? () #11 0x080a8518 in ?? () #12 0xb7e171b4 in TpoolWorker () from /usr/lib/thread2.6.5/libthread2.6.5.so #13 0xb7f14ff4 in ?? () from /usr/lib/libtcl8.5.so #14 0xbf832758 in ?? () #15 0xb7e1e1ec in listMutex () from /usr/lib/thread2.6.5/libthread2.6.5.so #16 0xb7f14ff4 in ?? () from /usr/lib/libtcl8.5.so #17 0xb7f14ff4 in ?? () from /usr/lib/libtcl8.5.so #18 0x08129400 in ?? () #19 0x080c3ff0 in ?? () #20 0xb7edbe38 in TclpFree () from /usr/lib/libtcl8.5.so #21 0x00000000 in ?? () Thread 1 (Thread 0xb7c8d6c0 (LWP 6315)): #0 0xffffe424 in __kernel_vsyscall () #1 0xb7dee576 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7ef6bb3 in Tcl_ConditionWait () from /usr/lib/libtcl8.5.so #0 0xffffe424 in __kernel_vsyscall () Thanks for your help on this issue. Nathan
- login: "nathanjett"
- mimetype: "text/plain"
- username: "nathanjett"