Need Urgent Help

P

pycraze

Hello ,

i am working on NetBSD 3.0.2 with gcc version 3.3.3 .


While debugging with gdb, i am getting a segmentation fault with
accept system call and gdb is showing following traceback.


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1229071456 (LWP 8798)]
0x00766402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00766402 in __kernel_vsyscall ()
#1 0x00df4d88 in accept () from /lib/libpthread.so.0
#2 0x08057799 in run_server () at server.c:150
#3 0x08057f82 in main (argc=1, argv=0xbfbf5064) at main.c:160

Could anyone please suggest us what could have caused this
segmentation fault.
 
R

Robert Gamble

Hello ,

i am working on NetBSD 3.0.2 with gcc version 3.3.3 .

While debugging with gdb, i am getting a segmentation fault with
accept system call and gdb is showing following traceback.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1229071456 (LWP 8798)]
0x00766402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00766402 in __kernel_vsyscall ()
#1 0x00df4d88 in accept () from /lib/libpthread.so.0
#2 0x08057799 in run_server () at server.c:150
#3 0x08057f82 in main (argc=1, argv=0xbfbf5064) at main.c:160

Could anyone please suggest us what could have caused this
segmentation fault.

The same thing that always causes a segmentation fault: trying to use
memory that isn't yours or in a way that isn't allowed. Without
seeing the code it's impossible to give any more detail. Since you
mentioned BSD and are using system-specific functions your question
might be more appropriate for comp.unix.programmer where they
specialize in such systems.

Robert Gamble
 
I

Ivan Gotovchits

pycraze said:
Hello ,

i am working on NetBSD 3.0.2 with gcc version 3.3.3 .


While debugging with gdb, i am getting a segmentation fault with
accept system call and gdb is showing following traceback.


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1229071456 (LWP 8798)]
0x00766402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00766402 in __kernel_vsyscall ()
#1 0x00df4d88 in accept () from /lib/libpthread.so.0
#2 0x08057799 in run_server () at server.c:150
#3 0x08057f82 in main (argc=1, argv=0xbfbf5064) at main.c:160

Could anyone please suggest us what could have caused this
segmentation fault.
I think that you use not a thread-safe library.
Please, provide more info.
 
S

srimks11

Hello ,

i am working on NetBSD 3.0.2 with gcc version 3.3.3 .

While debugging with gdb, i am getting a segmentation fault with
accept system call and gdb is showing following traceback.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1229071456 (LWP 8798)]
0x00766402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00766402 in __kernel_vsyscall ()
#1 0x00df4d88 in accept () from /lib/libpthread.so.0
#2 0x08057799 in run_server () at server.c:150
#3 0x08057f82 in main (argc=1, argv=0xbfbf5064) at main.c:160

Could anyone please suggest us what could have caused this
segmentation fault.

Hi.

(a) Could you send the complete command line options including flags,
target, etc. what you are using to generate the exe.?

OR

Could you check (a) is being used properly with required library(s)
calls and flags during compilation.

I don't think you need to have any other big reasons of having SEGSEGV
error message..relax!!!!

BR
Mukesh K Srivastava
 
J

Jens Thoms Toerring

Ivan Gotovchits said:
pycraze said:
i am working on NetBSD 3.0.2 with gcc version 3.3.3 .

While debugging with gdb, i am getting a segmentation fault with
accept system call and gdb is showing following traceback.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1229071456 (LWP 8798)]
0x00766402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00766402 in __kernel_vsyscall ()
#1 0x00df4d88 in accept () from /lib/libpthread.so.0
#2 0x08057799 in run_server () at server.c:150
#3 0x08057f82 in main (argc=1, argv=0xbfbf5064) at main.c:160

Could anyone please suggest us what could have caused this
segmentation fault.
I think that you use not a thread-safe library.

You don't need threads to get a segmentation fault (and there's
nothing here to indicate that the OP uses threads at all), it's
enough to have either memory corruption in your program or call
some library functions with wrong arguments (e.g. in another
thread somebody got a segmentation fault because he was passing
a NULL pointer to fclose()).
Please, provide more info.

That's definitely required to make any reasonable statements
beyond listing the "usual suspects".
Regards, Jens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top