Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Need Urgent Help

Reply
Thread Tools

Need Urgent Help

 
 
pycraze
Guest
Posts: n/a
 
      08-16-2007
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 879]
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.

 
Reply With Quote
 
 
 
 
Robert Gamble
Guest
Posts: n/a
 
      08-16-2007
On Aug 16, 12:36 pm, pycraze <(E-Mail Removed)> wrote:
> 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 879]
> 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

 
Reply With Quote
 
 
 
 
Ivan Gotovchits
Guest
Posts: n/a
 
      08-17-2007
pycraze wrote:

> 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 879]
> 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.
 
Reply With Quote
 
srimks11@gmail.com
Guest
Posts: n/a
 
      08-17-2007
On Aug 16, 9:36 pm, pycraze <(E-Mail Removed)> wrote:
> 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 879]
> 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

 
Reply With Quote
 
Jens Thoms Toerring
Guest
Posts: n/a
 
      08-17-2007
Ivan Gotovchits <(E-Mail Removed)> wrote:
> pycraze wrote:
> > 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 879]
> > 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
--
\ Jens Thoms Toerring ___ http://www.velocityreviews.com/forums/(E-Mail Removed)
\__________________________ http://toerring.de
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
urgent help....need urgent help on say string task.. pooja Software 0 03-03-2009 06:16 AM
complex XPath help need Urgent help Amar XML 5 11-30-2007 07:34 PM
PLEASE HELP ME!!!! URGENT!!! I NEED YOUR HELP!!! Yucky Corpulent HTML 5 01-27-2006 11:15 PM
URGENT !! QUEUE STL PROBLEM URGENT!! Sachin Jagtap C++ 4 04-29-2005 12:08 PM
URGENT: Need help in setting environment variable.. pls help Rahul S. C Programming 3 11-01-2004 10:53 AM



Advertisments