Infinite loop at startup

Posted by Daraku on Tue 15 Dec 2009 09:37 PM — 22 posts, 84,836 views.

#0
I don't know how it happened, or where it may have happened, I had the entire thing running earlier, and now that I've tried to get it public, I get this. Since I'm really rusty on the entire coding thing, and new to Cygwin, where do I start to look for this loop?
Australia Forum Administrator #1
Do you mean CPU usage goes up to 100%? How do you know it is in a loop?
#2
You have a point, I suppose. Then my problem is a crash at login... I've been testing some, but again, not sure where to look or how. :/
Canada #3
Could you be more specific about "tried to get it public" and what, if any, errors you are getting?

Does it crash? When does it crash? What is the last command before it crashes? Have you checked your logs for bug or error messages?
Amended on Tue 15 Dec 2009 10:38 PM by Hanaisse
#4
Well, I'm running a router, and through various posts and whatnot, I found I'd have to port forward through it to my PC. That didn't work, as no-one could connect, and as soon as I was kicked, I couldn't connect again. ./startup would do nothing, no output, MUD still down. I gave up, deleted the src, and went back and started once more, doing what I did before, and even doing what you suggested with the uncommenting of the logs, Hanaisse. Make displays no errors that I can see, and when I ./startup 6000, it doesn't display anything. When I connect, I get "Connecting...", then next line is "Disconnected" in my MUD client.

Make-
Quote:

Vengeance@user1 ~/dbs/src
$ make
make dbs
make[1]: Entering directory `/home/Vengeance/dbs/src'
rm -f dbsaga
gcc -o dbsaga act_comm.o act_info.o act_move.o act_obj.o act_wiz.o ban.o board.
o boards.o bounty.o build.o clans.o colorize.o comm.o comments.o const.o db.o de
ity.o editor.o fight.o finger.o grub.o handler.o hashstr.o hiscores.o hotboot.o
house.o ibuild.o ident.o imm_host.o interp.o magic.o makeobjs.o malloc.o mapout.
o marry.o misc.o mpxset.o mud_comm.o mud_prog.o new_fun.o pfiles.o planes.o plan
et.o player.o polymorph.o rare.o requests.o reset.o save.o services.o shops.o sk
ills.o skills_android.o skills_dbs.o space.o special.o stat_obj.o tables.o track
.o update.o dns.o -lcrypt -lm -lz
chmod g+w dbsaga
chmod a+x dbsaga
chmod g+w act_comm.o act_info.o act_move.o act_obj.o act_wiz.o ban.o board.o boa
rds.o bounty.o build.o clans.o colorize.o comm.o comments.o const.o db.o deity.o
editor.o fight.o finger.o grub.o handler.o hashstr.o hiscores.o hotboot.o house
.o ibuild.o ident.o imm_host.o interp.o magic.o makeobjs.o malloc.o mapout.o mar
ry.o misc.o mpxset.o mud_comm.o mud_prog.o new_fun.o pfiles.o planes.o planet.o
player.o polymorph.o rare.o requests.o reset.o save.o services.o shops.o skills.
o skills_android.o skills_dbs.o space.o special.o stat_obj.o tables.o track.o up
date.o dns.o
make[1]: Leaving directory `/home/Vengeance/dbs/src'

Vengeance@user1 ~/dbs/src
$


and ./startup
Quote:

Vengeance@user1 ~/dbs/src
$ ./startup 6000



From my understanding, the MUD should be up, no? But when I go to connect:

Quote:

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


I've checked the logs, but there's nothing in them, just that the MUD started up as it was supposed to.
Australia Forum Administrator #5
Instead of startup, try running manually:


cd ../area
../src/dbsaga 6000


Then watch the messages fly by. If it doesn't immediately return to the command prompt with an error message, then try connecting and see what happens.
#6
This is wierd. It started up fine again, housing errors aside, and when I went to log in, kicked to the prompt and disconnected me from the MUD client, no errors that I can see in Cygwin.


Quote:

Tue Dec 15 19:11:56 2009 :: Building wizinfo
Tue Dec 15 19:11:56 2009 :: Initializing request pipe
Tue Dec 15 19:11:56 2009 :: Initializing random number generator
Tue Dec 15 19:11:56 2009 :: Setting time and weather
Tue Dec 15 19:11:56 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.
Tue Dec 15 19:11:56 2009 :: Loading DNS cache...
Tue Dec 15 19:11:56 2009 :: Reading in area files...

******AREAS here*******

Tue Dec 15 19:11:56 2009 :: Fixing exits
Tue Dec 15 19:11:56 2009 :: Initializing economy
Tue Dec 15 19:11:56 2009 :: Resetting areas

*****AREA resets here******

Tue Dec 15 19:11:56 2009 :: Loading buildlist
Tue Dec 15 19:11:56 2009 :: ../gods/Daraku
Tue Dec 15 19:11:56 2009 :: Loading boards
Tue Dec 15 19:11:56 2009 :: Loading Global Boards
Tue Dec 15 19:11:56 2009 :: Loading clans
Tue Dec 15 19:11:56 2009 :: Loading clans...
Tue Dec 15 19:11:56 2009 :: vesania
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: remnant
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: zfight
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: sacred
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: spf
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: icerianempire.clan
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: united
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: rra.clan
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: mystic.clan
Tue Dec 15 19:11:56 2009 :: Storeroom not found
Tue Dec 15 19:11:56 2009 :: $
Tue Dec 15 19:11:56 2009 :: Loading alliance data
Tue Dec 15 19:11:56 2009 :: Done clans
Tue Dec 15 19:11:56 2009 :: Loading deities
Tue Dec 15 19:11:56 2009 :: Loading deities...
Tue Dec 15 19:11:56 2009 :: $
Tue Dec 15 19:11:56 2009 :: Done deities
Tue Dec 15 19:11:56 2009 :: Loading councils
Tue Dec 15 19:11:56 2009 :: Loading councils...
Tue Dec 15 19:11:56 2009 :: newbie_council
Tue Dec 15 19:11:56 2009 :: hoi.council
Tue Dec 15 19:11:56 2009 :: dua.council
Tue Dec 15 19:11:56 2009 :: ac.council
Tue Dec 15 19:11:56 2009 :: $
Tue Dec 15 19:11:56 2009 :: Done councils
Tue Dec 15 19:11:56 2009 :: Loading watches
Tue Dec 15 19:11:56 2009 :: Loading bans
Tue Dec 15 19:11:56 2009 :: Done.
Tue Dec 15 19:11:56 2009 :: Loading reserved names
Tue Dec 15 19:11:56 2009 :: Loading censored words
Tue Dec 15 19:11:56 2009 :: Updating rare/unique item counts.....
Tue Dec 15 19:11:56 2009 :: Checking player files....
Tue Dec 15 19:11:56 2009 :: Checking corpses....
Tue Dec 15 19:11:56 2009 :: Loading corpses
Tue Dec 15 19:11:56 2009 :: Loading space
Tue Dec 15 19:11:56 2009 :: Loading space...
Tue Dec 15 19:11:56 2009 :: Done starsystems
Tue Dec 15 19:11:56 2009 :: Loading ships
Tue Dec 15 19:11:56 2009 :: Loading ships...
Tue Dec 15 19:11:56 2009 :: Done ships
Tue Dec 15 19:11:56 2009 :: Loading governments
Tue Dec 15 19:11:56 2009 :: Loading planets...
Tue Dec 15 19:11:56 2009 :: earth.planet
Tue Dec 15 19:11:56 2009 :: cou.planet
Tue Dec 15 19:11:56 2009 :: vegeta.planet
Tue Dec 15 19:11:56 2009 :: namek.planet
Tue Dec 15 19:11:56 2009 :: furiza.planet
Tue Dec 15 19:11:56 2009 :: fakenamek.planet
Tue Dec 15 19:11:56 2009 :: $
Tue Dec 15 19:11:56 2009 :: Done planets
Tue Dec 15 19:11:56 2009 :: Loading Immortal Hosts
Tue Dec 15 19:11:56 2009 :: Done.
Tue Dec 15 19:11:56 2009 :: Loading Projects
Tue Dec 15 19:11:56 2009 :: Loading Morphs
Tue Dec 15 19:11:56 2009 :: Optimizing Morphs.
Tue Dec 15 19:11:56 2009 :: Done.
Tue Dec 15 19:11:56 2009 :: Loading Colors
Tue Dec 15 19:11:56 2009 :: Loading Housing System, Home Accessories Data, and H
ome Auctioning System
Tue Dec 15 19:11:56 2009 :: [*****] BUG: Cannot load house file: Aburame



****Tons of house files go here********



Tue Dec 15 19:11:56 2009 :: [*****] BUG: Cannot load house file: Zyon
Tue Dec 15 19:11:56 2009 :: [*****] BUG: Fread_accessories: Accessory doesn't ex
ist
Tue Dec 15 19:11:56 2009 :: [*****] BUG: Fread_accessories: Accessory doesn't ex
ist
Tue Dec 15 19:11:56 2009 :: [*****] BUG: Fread_accessories: Accessory doesn't ex
ist
Tue Dec 15 19:11:56 2009 :: Loading hiscore tables
Tue Dec 15 19:11:56 2009 :: Initializing socket
Tue Dec 15 19:11:56 2009 :: DragonBall Saga ready at address user1 on port 6000
.
Tue Dec 15 19:11:58 2009 :: Log invis card dropper: mpoload 100729
Tue Dec 15 19:12:08 2009 :: [*****] BUG: NULL ROOM: echo_to_room() The turbocar
doors close and it speeds out of the station.

Vengeance@user1 ~/dbs/area
$



I don't see anything about me attempting to connect, nor do I see anything buggy when I try to connect. :/
This thing is a pain. I had it working earlier
Australia Forum Administrator #7
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

#8
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.
Canada #9
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.
#10
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.
Canada #11
Did you make clean/make?
What errors do you see on startup now?
#12
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... -.-
Canada #13
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.
Amended on Wed 16 Dec 2009 01:39 PM by Hanaisse
Australia Forum Administrator #14
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.
#15
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
#16
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)

#17
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;
}
Amended on Fri 18 Dec 2009 12:19 PM by Daraku
Canada #18
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?
Australia Forum Administrator #19
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

#20
Wierd. I have a "stackdump" file in my areas folder, now. :/ Is this what I am supposed to be looking for? Heh.
Australia Forum Administrator #21
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.