Hotboot crash - stumped again

Posted by Syriac on Wed 10 Jun 2009 05:15 PM — 3 posts, 17,636 views.

#0
Program received signal SIGSEGV, Segmentation fault.
0x000000000047e33c in accept_new (ctrl=-1) at comm.c:534
534 FD_SET( ctrl, &in_set );
Missing separate debuginfos, use: debuginfo-install glibc-2.9-3.x86_64
(gdb) bt
#0 0x000000000047e33c in accept_new (ctrl=-1) at comm.c:534
#1 0x000000000047e5f0 in game_loop () at comm.c:592
#2 0x000000000047de8e in main (argc=6, argv=0x7fffffffe748) at comm.c:331

Where crash originates:
---------------------------------------------------
void accept_new( int ctrl )
{
static struct timeval null_time;
DESCRIPTOR_DATA *d;
/* int maxdesc; Moved up for use with id.c as extern */

#if defined(MALLOC_DEBUG)
if ( malloc_verify( ) != 1 )
abort( );
#endif

/*
* Poll all active descriptors.
*/
FD_ZERO( &in_set );
FD_ZERO( &out_set );
FD_ZERO( &exc_set );
--> line 534 FD_SET( ctrl, &in_set );
maxdesc = ctrl;
newdesc = 0;
for ( d = first_descriptor; d; d = d->next )
{


where backtrace takes it---
/* signal( SIGSEGV, SegVio ); */
gettimeofday( &last_time, NULL );
current_time = (time_t) last_time.tv_sec;

/* Main loop */
while ( !mud_down )
{
accept_new( control );
accept_new( control2 );
accept_new( conclient);
// accept_new( conjava );


and of course it goes into game_loop


I'm not sure where to begin with this one at all :(
USA #1
Quote:
#0 0x000000000047e33c in accept_new (ctrl=-1) at comm.c:534

You don't want ctrl to be -1. You need to find out which of the control sockets is -1, and then either fix its creation or remove it from the checking logic.

Also, it's generally helpful if you use the 'code' forum tag to make things easier to read.
#2
You got it! Fixed, thanks a lot!