l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2003 Feb 10 21:12

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] glibc and socket()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] glibc and socket()



begin Nicole the Wonder Nerd <ana.ng@tmbg.org> 
> Hi guys
> 
> I'm trying to track down a kernel bug.  I've compiled my programs and
> the kernel with -g, and I'm stepping through the executable with gdb.
> A call to sockaddr_check() goes through OK, but a subsequent call to
> socket() triggers a kernel panic.  Control never even gets to the
> first line of socket().

> Breakpoint 1, initialize_listen_socket (saP=0xbfffea78) at libhttpd.c:384
> 384         if ( ! sockaddr_check( saP ) )
> (gdb) n
> 390         listen_fd = socket( saP->sa.sa_family, SOCK_STREAM, 0 );
> (gdb) s
> At this point, the system goes supine.  

> According to http://www.skyfree.org/linux/kernel_network/socket.html ,
> socket() is actually a glibc function; it sets things [1] up and then
> calls the system call sys_socketcall().  But I don't know where the
> kernel panic is triggered, and I also don't know how to recompile
> glibc or even if that would be a useful course of action.
>
> Anyone have any ideas?  I've even tried compiling the target binary
> with -static; still no information on time/place of death.
 
hate to talk about poor coding practises, but i've never used anything
like kgdb, so i can't really suggest them.

if you get really desperate, you can trace execution using printk().
just don't forget to set the loglevel to <1>, ie

printk("<1>foo!\n");

to make sure you see it.  also, make sure you're working on a console.


also, you might want to post to kernelnewbies.org or even
linux-kernel@vger.kernel.org.  you have to subscribe to kernelnewbies to
post to it (you don't have to subscribe to linux-kernel to post to it,
brave souls).


just out of curiosity, is your kernel oopsing?  are you getting the
"aieee" interrupt handler killed message?   or is the kernel just
locking hard?  you may not see these messages if you're working in an X
environment.

pete
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!