[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  Infinite loop at startup

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Infinite loop at startup
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  

Posted by Nick Gammon   Australia  (18,801 posts)  [Biography] bio   Forum Administrator
Date Sat 19 Dec 2009 02:56 AM (UTC)  quote  ]
Message
You can reproduce it every time, right? So don't muck around with old core files, just run the MUD under gdb the way I described earlier.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Daraku   (15 posts)  [Biography] bio
Date Sat 19 Dec 2009 02:29 AM (UTC)  quote  ]
Message
Wierd. I have a "stackdump" file in my areas folder, now. :/ Is this what I am supposed to be looking for? Heh.
[Go to top] top

Posted by Nick Gammon   Australia  (18,801 posts)  [Biography] bio   Forum Administrator
Date Fri 18 Dec 2009 06:54 PM (UTC)  quote  ]
Message
Since it is failing here:


1116 for ( i = 0; i < (int) strlen( d->host ) ; i++ )


... you need to reproduce the crash in gdb, and then get some debugging information out. My page about gdb should help.

For one thing, find out about the variables that have caused the crash, almost certainly d and d->host.

First thing to do is type:


bt


That shows a backtrace, which shows where this code was called from. Then look at the variables:


p d
p d->host


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Hanaisse   Canada  (114 posts)  [Biography] bio
Date Fri 18 Dec 2009 04:19 PM (UTC)  quote  ]
Message
I'm not so sure that line is the actual problem, as it's the same code across all the Smaug codebases. That is where the Seg Fault occurs, but it is not telling us why.

Did the seg fault dump any core files? Check in your main DBSaga dir. If so, try this;
gdb DBsaga core.11231

(change the core file # to whatever you have)

Did that seg fault occur when you tried to connect?

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
[Go to top] top

Posted by Daraku   (15 posts)  [Biography] bio
Date Fri 18 Dec 2009 12:16 PM (UTC)  quote  ]

Amended on Fri 18 Dec 2009 12:19 PM (UTC) by Daraku

Message
I guess I didn't see it. I saw a reference to it, but it wasn't actually the problem. Here's the code, I can't see what is wrong with it, and I showed it to a friend who dabbles in code, but he's almost as rusty as I am, and he said the same, that it should be working.



{
	BAN_DATA *pban;
	char new_host[MAX_STRING_LENGTH];
	int i;

	for ( i = 0; i < (int) strlen( d->host ) ; i++ )
		new_host[i] = LOWER( d->host[i] );
	new_host[i] = '\0';

	for ( pban = first_ban; pban; pban = pban->next )
	{
		if ( pban->level != LEVEL_SUPREME )
			continue;
		if ( pban->user && str_cmp( d->user, pban->user ) )
			continue;
		if ( pban->prefix && pban->suffix &&
		     strstr( pban->name, new_host ) )
		{
			if ( check_expire( pban ) )
			{
				dispose_ban( pban, BAN_SITE );
				save_banlist( );
				return FALSE;
			}
			else
				return TRUE;
		}
		/*
		 *   Bug of switched checks noticed by Cronel
		 */
		if ( pban->suffix && !str_prefix( pban->name, new_host ) )
		{
			if ( check_expire( pban ) )
			{
				dispose_ban( pban, BAN_SITE );
				save_banlist( );
				return FALSE;
			}
			else
				return TRUE;
		}
		if ( pban->prefix && !str_suffix( pban->name, new_host ) )
		{
			if ( check_expire( pban ) )
			{
				dispose_ban( pban, BAN_SITE );
				save_banlist( );
				return FALSE;
			}
			else
				return TRUE;
		}
		if ( !str_cmp( pban->name, new_host ) )
		{
			if ( check_expire( pban ) )
			{
				dispose_ban( pban, BAN_SITE );
				save_banlist( );
				return FALSE;
			}
			else
				return TRUE;
		}
	}
	return FALSE;
}
[Go to top] top

Posted by Daraku   (15 posts)  [Biography] bio
Date Thu 17 Dec 2009 01:13 PM (UTC)  quote  ]
Message
And finally, it shows me something. I've seen this problem somewhere around here before, I can prolly fix it.

Quote:

[New thread 3956.0x17d0]
[New thread 3956.0x1284]

Program received signal SIGSEGV, Segmentation fault.
0x0044c9dc in check_total_bans (d=0x10f94d0) at ban.c:1116
1116 for ( i = 0; i < (int) strlen( d->host ) ; i++ )
(gdb)

[Go to top] top

Posted by Daraku   (15 posts)  [Biography] bio
Date Thu 17 Dec 2009 01:11 PM (UTC)  quote  ]
Message
Everything looks fine, until I try to log in. Here is what it looks like at this moment, I haven't logged in through a client yet:

Quote:

(gdb) run 4000
Starting program: /home/Vengeance/dbs/src/dbsaga.exe 4000
[New thread 3956.0x1720]
[New thread 3956.0x16e4]
Thu Dec 17 09:03:45 2009 :: Booting Database
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Thu Dec 17 09:03:45 2009 :: [*****] BOOT: ---------------------[ Boot Log ]-----
---------------
Thu Dec 17 09:03:45 2009 :: Loading commands
Thu Dec 17 09:03:45 2009 :: Loading sysdata configuration...
Thu Dec 17 09:03:45 2009 :: Loading socials
Thu Dec 17 09:03:45 2009 :: Loading skill table
Thu Dec 17 09:03:45 2009 :: [*****] BUG: fread_skill: unknown skill/spell do_spl
it_form
Thu Dec 17 09:03:45 2009 :: Sorting skill table...
Thu Dec 17 09:03:45 2009 :: Remapping slots to sns
Thu Dec 17 09:03:45 2009 :: Loading classes
Thu Dec 17 09:03:45 2009 :: Loading races
Thu Dec 17 09:03:45 2009 :: Loading herb table
Thu Dec 17 09:03:45 2009 :: Loading tongues
Thu Dec 17 09:03:45 2009 :: Making wizlist
Thu Dec 17 09:03:45 2009 :: Building wizinfo
Thu Dec 17 09:03:45 2009 :: Initializing request pipe
Thu Dec 17 09:03:45 2009 :: Initializing random number generator
Thu Dec 17 09:03:45 2009 :: Setting time and weather
Thu Dec 17 09:03:45 2009 :: Assigning gsn's
ASSIGN_GSN: Skill multi-form not found.
ASSIGN_GSN: Skill tri-form not found.
ASSIGN_GSN: Skill mystic not found.
ASSIGN_GSN: Skill super kamikaze ghost attack not found.
Thu Dec 17 09:03:45 2009 :: Loading DNS cache...
Thu Dec 17 09:03:45 2009 :: Reading in area files...
(help.are)
***Areas loaded here****
***Rooms and mobs here***
Thu Dec 17 09:03:45 2009 :: Fixing exits
Thu Dec 17 09:03:45 2009 :: Initializing economy
Thu Dec 17 09:03:45 2009 :: Resetting areas
***Area resets here****
Thu Dec 17 09:03:45 2009 :: Loading buildlist
Thu Dec 17 09:03:45 2009 :: ../gods/Daraku
Thu Dec 17 09:03:45 2009 :: Loading boards
Thu Dec 17 09:03:45 2009 :: Loading Global Boards
Thu Dec 17 09:03:45 2009 :: Loading clans
Thu Dec 17 09:03:45 2009 :: Loading clans...
Thu Dec 17 09:03:45 2009 :: vesania
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: remnant
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: zfight
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: sacred
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: spf
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: icerianempire.clan
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: united
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: rra.clan
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: mystic.clan
Thu Dec 17 09:03:45 2009 :: Storeroom not found
Thu Dec 17 09:03:45 2009 :: $
Thu Dec 17 09:03:45 2009 :: Loading alliance data
Thu Dec 17 09:03:45 2009 :: Done clans
Thu Dec 17 09:03:45 2009 :: Loading deities
Thu Dec 17 09:03:45 2009 :: Loading deities...
Thu Dec 17 09:03:45 2009 :: $
Thu Dec 17 09:03:45 2009 :: Done deities
Thu Dec 17 09:03:45 2009 :: Loading councils
Thu Dec 17 09:03:45 2009 :: Loading councils...
Thu Dec 17 09:03:45 2009 :: newbie_council
Thu Dec 17 09:03:45 2009 :: hoi.council
Thu Dec 17 09:03:45 2009 :: dua.council
Thu Dec 17 09:03:45 2009 :: ac.council
Thu Dec 17 09:03:45 2009 :: $
Thu Dec 17 09:03:45 2009 :: Done councils
Thu Dec 17 09:03:45 2009 :: Loading watches
Thu Dec 17 09:03:45 2009 :: Loading bans
Thu Dec 17 09:03:45 2009 :: Done.
Thu Dec 17 09:03:45 2009 :: Loading reserved names
Thu Dec 17 09:03:45 2009 :: Loading censored words
Thu Dec 17 09:03:45 2009 :: Updating rare/unique item counts.....
Thu Dec 17 09:03:45 2009 :: Checking player files....
Thu Dec 17 09:03:45 2009 :: Checking corpses....
Thu Dec 17 09:03:45 2009 :: Loading corpses
Thu Dec 17 09:03:45 2009 :: Loading space
Thu Dec 17 09:03:45 2009 :: Loading space...
Thu Dec 17 09:03:45 2009 :: Done starsystems
Thu Dec 17 09:03:45 2009 :: Loading ships
Thu Dec 17 09:03:45 2009 :: Loading ships...
Thu Dec 17 09:03:45 2009 :: Done ships
Thu Dec 17 09:03:45 2009 :: Loading governments
Thu Dec 17 09:03:45 2009 :: Loading planets...
Thu Dec 17 09:03:45 2009 :: earth.planet
Thu Dec 17 09:03:45 2009 :: cou.planet
Thu Dec 17 09:03:45 2009 :: vegeta.planet
Thu Dec 17 09:03:45 2009 :: namek.planet
Thu Dec 17 09:03:45 2009 :: furiza.planet
Thu Dec 17 09:03:45 2009 :: fakenamek.planet
Thu Dec 17 09:03:45 2009 :: $
Thu Dec 17 09:03:45 2009 :: Done planets
Thu Dec 17 09:03:45 2009 :: Loading Immortal Hosts
Thu Dec 17 09:03:45 2009 :: Done.
Thu Dec 17 09:03:45 2009 :: Loading Projects
Thu Dec 17 09:03:45 2009 :: Loading Morphs
Thu Dec 17 09:03:45 2009 :: Optimizing Morphs.
Thu Dec 17 09:03:45 2009 :: Done.
Thu Dec 17 09:03:45 2009 :: Loading Colors
Thu Dec 17 09:03:45 2009 :: Loading Housing System, Home Accessories Data, and H
ome Auctioning System
Thu Dec 17 09:03:45 2009 :: [*****] BUG: Fread_accessories: Accessory doesn't ex
ist
Thu Dec 17 09:03:45 2009 :: [*****] BUG: Fread_accessories: Accessory doesn't ex
ist
Thu Dec 17 09:03:45 2009 :: [*****] BUG: Fread_accessories: Accessory doesn't ex
ist
Thu Dec 17 09:03:45 2009 :: Loading hiscore tables
Thu Dec 17 09:03:45 2009 :: Initializing socket
Thu Dec 17 09:03:45 2009 :: DragonBall Saga ready at address user1 on port 4000
.
Thu Dec 17 09:03:46 2009 :: Log invis card dropper: mpoload 100729
Thu Dec 17 09:03:56 2009 :: [*****] BUG: NULL ROOM: echo_to_room() The turbocar
doors close and it speeds out of the station.
Resetting: intro.are
Resetting: rabbit_gang.are
Resetting: sewers.are
Resetting: satancity.are
Resetting: intro.are
[Go to top] top

Posted by Nick Gammon   Australia  (18,801 posts)  [Biography] bio   Forum Administrator
Date Wed 16 Dec 2009 07:24 PM (UTC)  quote  ]
Message
I added a bit to my gdb posting, on this page:

http://www.mushclient.com/gdb

It mentions you can put a breakpoint on "exit" in case the MUD is choosing to exit. Then you can see why.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Hanaisse   Canada  (114 posts)  [Biography] bio
Date Wed 16 Dec 2009 01:32 PM (UTC)  quote  ]

Amended on Wed 16 Dec 2009 01:39 PM (UTC) by Hanaisse

Message
Is there a reason you're using port 6000 instead of typical 4000? A quick google search brings up many pages that basically say..
Quote:
This is pretty much an obvious sign of a firewall or other security program getting in the way. You might have gotten a pop-up window warning that a program (either XWin.exe or ssh.exe) was trying to make or accept a connection on port 6000. If you told the firewall to block it, that's the problem.
If your firewall or security program is set to block unexpected connections without even asking you, that could be the problem.
The easiest way to check this would be to teporarily turn off your firewall and security software, then try launching an X client again.


Change to port 4000 in your startup file and try again.

If that doesn't work, gdb it is then.
Instead of going into your src directory and using the startup go to your area directory and type;
gdb ../src/DBSaga

and then;
run 6000

Post the results.

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
[Go to top] top

Posted by Daraku   (15 posts)  [Biography] bio
Date Wed 16 Dec 2009 11:26 AM (UTC)  quote  ]
Message
Alright, cleaned it up, did 'make' again. I'm seeing all the same things in startup as before, minus the house problems. And same as before, it seems to start, syslog shows it starting up, but the second I try to log into the game from my MUD client, I get the

Quote:

%%% Connecting to <localhost ip> on port 6000
%%% Connected to localhost on port 6000.
%%% Disconnected from server.


All I can say is, there's gotta be something wrong in one of the files associated with people logging in... I don't know... -.-
[Go to top] top

Posted by Hanaisse   Canada  (114 posts)  [Biography] bio
Date Wed 16 Dec 2009 12:32 AM (UTC)  quote  ]
Message
Did you make clean/make?
What errors do you see on startup now?

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
[Go to top] top

Posted by Daraku   (15 posts)  [Biography] bio
Date Wed 16 Dec 2009 12:22 AM (UTC)  quote  ]
Message
Removed the house files, still can't get passed the "disconnected" from MUD client upon connecting. I'm just going to take a break from this for now, I've been working on it all day.
[Go to top] top

Posted by Hanaisse   Canada  (114 posts)  [Biography] bio
Date Tue 15 Dec 2009 11:52 PM (UTC)  quote  ]
Message
Was this an existing MUD you're restarting? A clean copy of DBSC doesn't contain houses. What I would do is go to the /houses folder and remove all the files, except for the required ones;

homeaccessories.dat
homebuy.dat
house.lst

Save the actual house files to another folder on your HD if you want to keep them. Then update house.lst so it looks like this;
$



It appears to me to be something wrong with the house files. Removing them from startup may allow you to at least connect to your mud and debug from there.

aka: Hana
Owner in Training of: Fury of the Gods
alm-dev.org:4000
[Go to top] top

Posted by Daraku   (15 posts)  [Biography] bio
Date Tue 15 Dec 2009 11:46 PM (UTC)  quote  ]
Message
All I can say is those bugs were already there when I had it running before. I'll clean them up, but I'm more focused on getting the MUD back up and running right now, so gdb it is.
[Go to top] top

Posted by Nick Gammon   Australia  (18,801 posts)  [Biography] bio   Forum Administrator
Date Tue 15 Dec 2009 11:41 PM (UTC)  quote  ]
Message
It looks to me like the bug re echo_to_room() is a fatal error, causing the server to exit, since that was the last thing you saw.

I would be a bit worried about the bugs like "BUG: Cannot load house file: Aburame" - sounds like some files aren't there.

Try and get rid of all those loading bug errors. If that doesn't help you may have to fire up gdb and work out exactly what is happening:

http://mushclient.com/gdb


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


4,783 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]