Segmantation fault with multithreading

Segmantation fault with multithreading

Post by Dav » Thu, 26 Jun 2003 11:04:12



I have a multithrading program(daemon server) written by c++(GCC)
under AIX4.X, I get segmentation fault problem when it runs several
hours with heavy load. I want to know which compilation option or link
option I should use when I compile/link a multithreading program with
c++(GCC) under AIX 4.3. any suggestion and help will be appreciated.
Thinks in advance.
 
 
 

1. pthreads, GDB, Segmantation fault

i have written some soft. it uses pthreads :)) Of cause, i have
checked all my pointers and all the shared data is locked with
mutex's.

This soft is very stable (72+ hours) if i compile it with 100-200
threads as thread limit, it crashes in 5 minutes if i use 400-700
threads
with "Segmentation fault". If i use 1000 threads, it crashes in 10
seconds!

i have tried GDB to find the main bug

but GDB shows some strange state:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6193909 (LWP 5185)]
0x0804ff59 in connect_socksv4 (sockid=Cannot access memory at address
0x8
) at netio.c:143
143                     } else if ((rc = recvtimeout(sockid, (void *)
&thisrep,

(gdb) where
#0  0x0804ff59 in connect_socksv4 (sockid=Cannot access memory at
address 0x8
) at netio.c:143
Cannot access memory at address 0x0

this is the command line used for compiling:
gcc -ggdb -Wall -lpthread -D_REENTRANT

so, seems GDB have some trau8bles with stack? or? how can i debug and
what can be the trauble?

2. OpenGL on linux, SGI 1600SW w/ NumberNine Revolution IV, help

3. Segmantation fault(core dumped)

4. Intel 14.4 ext/int modem

5. segmantation Fault and understanding of pointers

6. USB serial ports

7. How to fix segmantation fault and broken pipes?

8. Full install of 2.2-960612-SNAP errors out.

9. segmantation fault

10. : segmantation fault in XtString()

11. Getting the fault adress in page faults.

12. what is a micro (hat) fault and minor (as) faults

13. Compiling *** VIM 5.3 *** Segmentation Fault..what is Seg-Fault..MEM Bounds?