When remote-debugging a multi-thread program on mips-linux, I see huge remote traffic after interrupting the remote program. My target environment is mips(el)-linux (Debian sarge) and current gdb snapshot (20050216). Here is my test program. #include pthread_mutex_t pm; static void *func(void *arg) { while (1) { pthread_mutex_lock(&pm); pthread_mutex_unlock(&pm); } } int main(int argc, char *argv[]) { int i; pthread_t tid[2]; pthread_mutex_init(&pm, NULL); for (i = 0; i < 2; i++) pthread_create(&tid[i], NULL, func, NULL); for (i = 0; i < 2; i++) pthread_join(tid[i], NULL); } When I typed Ctrl-C and 'c' (continue) on gdb, traffic between gdb and gdbserver start eating network bandwidth and gdbserver eats whole CPU power on the target. Is this a normal behavior? If I replace last 2 line in main() with following code (i.e. not use pthread_join), the traffic disappear soon. while (1) sleep(100); With gdb 6.3, the traffic disappear soon without this change. With "set debug remote 1", I got following logs after the 'c' command. (please refer hostlog-join.txt for complete log) (gdb) c Continuing. Sending packet: $m404e18,4#33...Ack Packet received: 03e00008 Sending packet: $m404e18,4#33...Ack Packet received: 03e00008 Sending packet: $m404a78,4#35...Ack Packet received: 8fbc0010 Sending packet: $M404a78,4:0005000d#08...Ack Packet received: OK Sending packet: $vCont;c#a8...Ack Packet received: T0525:00404a78;1d:7f7ff998;thread:4002; ... Sending packet: $vCont;c:4002#a8...Ack Packet received: T0525:00404a7c;1d:7f7ff998;thread:4002; ... Sending packet: $vCont;c#a8...Ack Packet received: T0525:00404a78;1d:7f5ff998;thread:8003; ... Sending packet: $vCont;c:8003#ad...Ack Packet received: T0525:00404a7c;1d:7f5ff998;thread:8003; ... Sending packet: $vCont;c#a8...Ack Packet received: T0525:00404a78;1d:7f7ff998;thread:4002; ... Sending packet: $vCont;c:4002#a8...Ack Packet received: T0525:00404a7c;1d:7f7ff998;thread:4002; ... 0x00404a78 and 0x00404a7c are within __pthread_wait_for_restart_signal(). 0x00404a70 <__pthread_wait_for_restart_signal+124>: jalr t9 # __pthread_sigsuspend() 0x00404a74 <__pthread_wait_for_restart_signal+128>: nop 0x00404a78 <__pthread_wait_for_restart_signal+132>: lw gp,16(sp) 0x00404a7c <__pthread_wait_for_restart_signal+136>: lw v1,96(s0) 0x00404a80 <__pthread_wait_for_restart_signal+140>: lw v0,-32364(gp) 0x00404a84 <__pthread_wait_for_restart_signal+144>: nop 0x00404a88 <__pthread_wait_for_restart_signal+148>: lw v0,0(v0) 0x00404a8c <__pthread_wait_for_restart_signal+152>: nop 0x00404a90 <__pthread_wait_for_restart_signal+156>: bne v1,v0,0x404a68 <__pthread_wait_for_restart_signal+116> Using sleep() instead of pthread_join(), I got any packets after '$vCont' until I type Ctrl-C again. (please refer hostlog-sleep.txt for complete log) Attached is a complete logs for both side. The test program is statically linked. This problem is same with dynamically linked program. hostlog-join.txt -- gdb log with 'set debug remote 1' (pthread_join) serverlog-join.txt -- gdbserver log with debug_threads = 1 (pthread_join) hostlog-sleep.txt -- gdb log with 'set debug remote 1' (sleep) serverlog-sleep.txt -- gdbserver log with debug_threads = 1 (sleep) Could someone look into this? Thank you. --- Atsushi Nemoto