multi threaded program is hanging


 
Thread Tools Search this Thread
Operating Systems AIX multi threaded program is hanging
# 1  
Old 12-15-2006
multi threaded program is hanging

I have a Multithreaded program which is hanging on AIX.
OS Version: AIX 5.2 and thread library version : 5.2.0.75
We Initiate the process with 50 threads..when we are disconnecting from the process it hangs.There is lots of other stuff involved here.I am just sending the piece of the problem with information needed.

if I put it in dbx ,I see the following thread stack
Kindly help me in understanding about this stack.

dbx) thread
thread state-k wchan state-u k-tid mode held scope function
$t1 wait 0xf100008790029140 blocked 2691109 k no sys _event_sleep
>$t2 run blocked 2490517 k no sys _event_sleep
$t3 wait 0xf100008790009c40 blocked 639021 k no sys _event_sleep
$t4 wait 0xf100008790029f40 blocked 2748553 k no sys _event_sleep
$t5 wait 0xf10000879001ee40 blocked 2023521 k no sys _event_sleep
$t6 wait 0xf100008790042140 blocked 4329711 k no sys _event_sleep
$t7 wait 0xf100008790041940 blocked 4296815 k no sys _event_sleep
$t8 wait 0xf100008790058a40 blocked 5808155 k no sys _event_sleep
$t9 wait 0xf100008790041b40 blocked 4304991 k no sys _event_sleep
$t10 wait 0xf100008790032040 blocked 3276951 k no sys _event_sleep
$t11 wait 0xf100008790056f40 blocked 5697751 k no sys _event_sleep
$t12 wait 0xf100008790029d40 blocked 2740321 k no sys _event_sleep
$t13 wait 0xf100008790041e40 blocked 4317299 k no sys _event_sleep
$t14 wait 0xf100008790054040 blocked 5505113 k no sys _event_sleep
$t15 wait 0xf100008790029940 blocked 2724005 k no sys _event_sleep
$t16 wait 0xf100008790055040 blocked 5570763 k no sys _event_sleep
$t17 wait 0xf100008790009f40 blocked 651343 k no sys _event_sleep
$t18 wait 0xf100008790032340 blocked 3289171 k no sys _event_sleep
$t19 wait 0xf100008790056a40 blocked 5677133 k no sys _event_sleep
$t20 wait 0xf100008790042040 blocked 4325457 k no sys _event_sleep
$t21 wait 0xf100008790041f40 blocked 4321361 k no sys _event_sleep
$t22 wait 0xf100008790031f40 blocked 3272883 k no sys _event_sleep
$t23 wait 0xf10000879002a240 blocked 2760779 k no sys _event_sleep
$t24 wait 0xf100008790029640 blocked 2711625 k no sys _event_sleep
$t25 wait 0xf100008790041a40 blocked 4300879 k no sys _event_sleep
$t26 wait 0xf100008790041140 blocked 4264001 k no sys _event_sleep
$t27 wait 0xf100008790015240 blocked 1384659 k no sys _event_sleep
$t28 wait 0xf100008790025840 blocked 2457615 k no sys _event_sleep
$t29 wait 0xf100008790041c40 blocked 4309067 k no sys _event_sleep
$t30 wait 0xf100008790032440 blocked 3293265 k no sys _event_sleep
$t31 wait 0xf100008790041d40 blocked 4313163 k no sys _event_sleep
$t32 wait 0xf100008790057940 blocked 5738709 k no sys _event_sleep
$t33 wait 0xf100008790022c40 blocked 2277535 k no sys _event_sleep
$t34 wait 0xf100008790029840 blocked 2719849 k no sys _event_sleep
$t35 wait 0xf10000879002a840 blocked 2785419 k no sys _event_sleep
$t36 wait 0xf100008790032540 blocked 3297383 k no sys _event_sleep
$t37 wait 0xf100008790029440 blocked 2703447 k no sys _event_sleep
$t38 wait 0xf100008790042540 blocked 4345933 k no sys _event_sleep
$t39 wait 0xf100008790042640 blocked 4350031 k no sys _event_sleep
$t40 wait 0xf100008790042740 blocked 4354129 k no sys _event_sleep
$t41 wait 0xf100008790042840 blocked 4358227 k no sys _event_sleep
$t42 wait 0xf100008790042940 blocked 4362325 k no sys _event_sleep
$t43 wait 0xf100008790042a40 blocked 4366423 k no sys _event_sleep
$t44 wait 0xf100008790042b40 blocked 4370521 k no sys _event_sleep
$t45 wait 0xf100008790042c40 blocked 4374619 k no sys _event_sleep
$t46 wait 0xf100008790042d40 blocked 4378717 k no sys _event_sleep
$t47 wait 0xf100008790042e40 blocked 4382815 k no sys _event_sleep
$t48 wait 0xf100008790042f40 blocked 4386913 k no sys _event_sleep
$t49 wait 0xf100008790043040 blocked 4391011 k no sys _event_sleep
$t50 wait 0xf100008790043140 blocked 4395109 k no sys _event_sleep
$t51 wait running 4399207 k no sys select
(dbx)

(dbx) thread current 51
warning: Thread is in kernel mode, not all registers can be accessed.
(dbx) where
glink64.select() at 0x900000001db6474
OS.select(int,fd_set*,fd_set*,fd_set*,const ACE_Time_Value*)() at 0x900000001dace54
OS.select(int,fd_set*,fd_set*,fd_set*,const ACE_Time_Value*)() at 0x900000001dace54
wait_for_multiple_events__20ACE_Select_Reactor_TXT26ACE_Select_Reactor_Token_TXT9ACE_Token__FR29ACE_ Select_Reactor_Handle_SetP14ACE_Time_Value() at 0x9000000018d5c90
get_event_for_dispatching__14ACE_TP_ReactorFP14ACE_Time_Value() at 0x900000001e88db8
dispatch_i__14ACE_TP_ReactorFP14ACE_Time_ValueR18ACE_TP_Token_Guard() at 0x900000001e88c48
handle_events__14ACE_TP_ReactorFP14ACE_Time_Value() at 0x900000001e88b78
handle_events__11ACE_ReactorFP14ACE_Time_Value() at 0x900000001e1a400
run__12TAO_ORB_CoreFP14ACE_Time_Valuei() at 0x90000000173fec0
run__9CORBA_ORBFP14ACE_Time_Value() at 0x9000000017ac314
svc__6WorkerFv() at 0x100131938
svc_run__13ACE_Task_BaseFPv() at 0x900000001e31b5c
invoke_i__18ACE_Thread_AdapterFv() at 0x900000001e10e1c
invoke__18ACE_Thread_AdapterFv() at 0x900000001e10cfc
ace_thread_adapter() at 0x900000001db9d44

**********************************************

What does this glink64.select() mean ? what is it doing here.
it hangs here for a long time..some times it is coming out of that hang in a n hour and sometimes stays there indefinite time.


Thanks
Krishna
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script for multi-threaded bash processes

hey everyone, I'm having some trouble breaking down some code. It's simple a control script that takes machines meant to be backed up from a list. Then according to that will run multi-threaded processes up until the specified thread limit. for example if there are 4 machines to be backed up,... (2 Replies)
Discussion started by: terrell
2 Replies

2. Programming

Deallocating memory in multi-threaded environment.

I'm having a hard time figuring out how to manage deallocation of memory in multithreaded environments. Specifically what I'm having a hard time with is using a lock to protect a structure, but when it's time to free the structure, you have to unlock the lock to destroy the lock itself. Which will... (5 Replies)
Discussion started by: gngrwzrd
5 Replies

3. AIX

Unable to run a simple threaded program on AIX

Hi, I am unable to run a simple C++ threaded program on the AIX 5.3 platform. It says exec(): 0509-036 Cannot load program ./sendClient because of the following errors: rtld: 0712-001 Symbol __pthread was referenced from module sendClient(), but a runtime definition of the... (6 Replies)
Discussion started by: asutoshch
6 Replies

4. Programming

multi-threaded memory leak

Hello All : I write a .c program to test the exactually resource the memory leak as follows: 1 #include <stdio.h> 2 #define NUM 100000 3 void *Thread_Run(void * arg){ 4 //TODO 5 //pthread_datch(pthread_self()); 6 int socket= (int)arg; 7 ... (1 Reply)
Discussion started by: aobai
1 Replies

5. Programming

fork() and the program is hanging...

Consider the following code.. #include <unistd.h> #include <sys/types.h> #include <errno.h> #include <stdio.h> #include <sys/wait.h> #include <stdlib.h> int main() { pid_t childpid; int retval; int status; childpid = fork(); if(childpid >= 0) { ... (4 Replies)
Discussion started by: lipun4u
4 Replies

6. Linux

Multi-threaded encryption @ Fedora 11

Hello, are any of the encryption programs capable of true multi-threading ? Friend of mine tells me that he's been running some testing on Fedora 11 and that the kernel doesn't support multi-threading at that level. I've been looking into TrueCrypt, encfs and both calm to support... (1 Reply)
Discussion started by: TehOne
1 Replies

7. UNIX for Advanced & Expert Users

Multi-threaded encryption @ Fedora 11

Hello, are any of the encryption programs capable of true multi-threading ? Friend of mine tells me that he's been running some testing on Fedora 11 and that the kernel doesn't support multi-threading at that level. I've been looking into TrueCrypt, encfs and both calm to support... (0 Replies)
Discussion started by: TehOne
0 Replies

8. Shell Programming and Scripting

In need of multi threaded perl assistance

I need to write a perl script to execute external programs and grab the output and return code. Each program should be killed if it has not completed within X seconds. Imagine that the script goes something like this : @commands = &get_commands(); foreach $cmd (@commands) { $pid =... (4 Replies)
Discussion started by: SandmanCL
4 Replies

9. Programming

HOWTO: Calculate the balance of work in multi-threaded app.

I was wondering if anyone could give me a good idea how to calculate how balanced the threading is on a multi-threaded application. I want a percentage, such as "threads are 80% balanced." This is the way I am currently going about it, maybe it is good, maybe not. First, whenever a thread... (2 Replies)
Discussion started by: DreamWarrior
2 Replies

10. Programming

multi-threaded server, pthreads, sleep

I am trying to writa a multi-client & multi-threaded TCP server. There is a thread pool. Each thread in the pool will handle requests of multiple clients. But here I have a problem. I find a solution but it is not how it must be... i think. When threads working without sleep(1) I can't... (0 Replies)
Discussion started by: Parahat Melayev
0 Replies
Login or Register to Ask a Question