PDA

View Full Version : Migration from FC5 32-bit to Debian 64-bit


ndnet
05-27-2009, 12:59 PM
Making a thread to harvest suggestions. Any help is appreciated. :)

Original system is a 32-bit Fedora Core 5 box. New system is a 64-bit Debian install. It's an Intel Core2Duo running kernel 2.6.18-6-amd64, x86_64.

Our code is somewhat custom but primarily the same as project-eqemu trunk, last changelog March 23rd 09.

Old gcc version is 4.1.2 (20070502), new gcc version is gcc 4.1.2 (20061115, prerelease, fair enough debian is cautious).

We brought our source tree over to the new machine and immediately tackled these issues:

../common/TCPConnection.cpp: In member function `bool TCPConnection::GetSockName(char*, uint16*)':
../common/TCPConnection.cpp:148: error: cannot convert `size_t*' to `socklen_t*' for argument `3' to `int getsockname(int, sockaddr*, socklen_t*)'
- Had to modify common/TCPConnection.cpp to force addrlen variable to type of socklen_t* instead of size_t*

- Modifying makefiles to use -march=nocona instead of -march=i686, removed compile flags -DI386. ( gcc <= 4.3 doesn't have the core2 arch and nocona was suggested here (http://www.thinkwiki.org/wiki/Intel_Core_2_Duo_(Merom)#Compiler_optimisation_fla gs) )




Behavior:

./zone - Segfaults.
GDB:

GNU gdb 6.4.90-debian
This GDB was configured as "x86_64-linux-gnu".
(gdb) file zone
Reading symbols from /home/eqemu/eqemu/zone...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /home/eqemu/eqemu/zone
[Thread debugging using libthread_db enabled]
[New Thread 47341244287360 (LWP 28527)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47341244287360 (LWP 28527)]
0x00002b0e7d77f580 in strlen () from /lib/libc.so.6
(gdb) bt
#0 0x00002b0e7d77f580 in strlen () from /lib/libc.so.6
#1 0x00002b0e7d751560 in vfprintf () from /lib/libc.so.6
#2 0x0000000000519f57 in EQEMuLog::write (this=0x837de0, id=Debug, fmt=0x6ac522 "Starting Log: %s")
at ../common/debug.cpp:160
#3 0x00000000005197b4 in EQEMuLog::open (this=0x837de0, id=Debug) at ../common/debug.cpp:111
#4 0x0000000000519ab8 in EQEMuLog::writePVA (this=0x2d2d2d2d2d2d2d2d, id=Debug, prefix=0x7fff2df9a8c0 "[RULES__CHANGE] ",
fmt=0x6e0fb8 "Resetting running rules to default values", argptr=0x7fff2df9a9e0) at ../common/debug.cpp:190
#5 0x000000000065451e in log_messageVA (type=<value optimized out>,
fmt=0x6e0fb8 "Resetting running rules to default values", args=0x7fff2df9a9e0) at ../common/logsys_eqemu.cpp:37
#6 0x00000000006545b2 in log_message (type=757935405, fmt=0x6ac522 "Starting Log: %s") at ../common/logsys_eqemu.cpp:28
#7 0x0000000000652b97 in RuleManager::ResetRules (this=0x8aab50) at ../common/rulesys.cpp:170
#8 0x0000000000653653 in RuleManager (this=0x8aab50) at ../common/rulesys.cpp:96
#9 0x00000000004b57d6 in __static_initialization_and_destruction_0 (__initialize_p=<value optimized out>,
__priority=<value optimized out>) at net.cpp:120
#10 0x00000000004b5810 in global constructors keyed to spells_loaded () at net.cpp:1370
#11 0x0000000000694696 in __do_global_ctors_aux ()
#12 0x00000000004672bb in _init ()
#13 0x0000000000693a60 in Raid::DisbandRaid ()
Previous frame inner to this frame (corrupt stack?)

Juicy bit in frame #2, EQEMuLog::write():160

(gdb) list 140,165
140 fprintf(fp[id], "[%02d.%02d. - %02d:%02d:%02d] ", newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
141 #else
142 fprintf(fp[id], "%04i [%02d.%02d. - %02d:%02d:%02d] ", getpid(), newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
143 #endif
144
145 va_list argptr;
146 va_start(argptr, fmt);
147 if (dofile)
148 vfprintf( fp[id], fmt, argptr );
149 if(logCallbackFmt[id]) {
150 msgCallbackFmt p = logCallbackFmt[id];
151 p(id, fmt, argptr );
152 }
153 if (pLogStatus[id] & 2) {
154 if (pLogStatus[id] & 8) {
155 fprintf(stderr, "[%s] ", LogNames[id]);
156 vfprintf( stderr, fmt, argptr );
157 }
158 else {
159 fprintf(stdout, "[%s] ", LogNames[id]);
160 vfprintf( stdout, fmt, argptr );
161 }
162 }
163 va_end(argptr);
164 if (dofile)
165 fprintf(fp[id], "\n");


Segfault in vprintf(), doh. This (http://www.mail-archive.com/debian-glibc@lists.debian.org/msg34551.html) bug report for Debian suggests:
You are missing a #include <string.h>. And don't forget to always build with -Wall.

However, debug.cpp where EQEMuLog::write() is located already includes string.h (line 6).

Going ahead and posting this for assistance, but still researching the issue with vprintf and whatnot. Might be a dead-end or not, we'll see.

Thanks for any help, all.

KingMort
05-27-2009, 01:03 PM
He forgot to say

HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELP !!!!!!!!!!!!!!!!!!!!!!

So there I said it...

Derision
05-27-2009, 01:23 PM
There is a patch in the last post of this thread that may help you:

http://www.projecteq.net/phpBB2/viewtopic.php?t=7153&highlight=valist

I've not tried to compile on 64-Bit Linux myself.

ndnet
05-27-2009, 02:18 PM
That's gotten zone to boot and supporting players (at least one) so far. Thanks so much.

For future reference, the link posted above contains a diff of common/MiscFunctions.cpp and common/debug.cpp, copied below:

Code:
diff -up EQEmuServer/common/MiscFunctions.cpp.orig EQEmuServer/common/MiscFunctions.cpp
--- EQEmuServer/common/MiscFunctions.cpp.orig 2009-04-19 18:48:46.000000000 -0700
+++ EQEmuServer/common/MiscFunctions.cpp 2009-04-19 18:49:59.000000000 -0700
@@ -148,7 +148,6 @@ int MakeAnyLenString(char** ret, const c
int buf_len = 128;
int chars = -1;
va_list argptr;
- va_start(argptr, format);
while (chars == -1 || chars >= buf_len) {
safe_delete_array(*ret);
if (chars == -1)
@@ -156,9 +155,10 @@ int MakeAnyLenString(char** ret, const c
else
buf_len = chars + 1;
*ret = new char[buf_len];
+ va_start(argptr, format);
chars = vsnprintf(*ret, buf_len, format, argptr);
+ va_end(argptr);
}
- va_end(argptr);
return chars;
}

@@ -170,7 +170,6 @@ int32 AppendAnyLenString(char** ret, int
int chars = -1;
char* oldret = 0;
va_list argptr;
- va_start(argptr, format);
while (chars == -1 || chars >= (sint32)(*bufsize-*strlen)) {
if (chars == -1)
*bufsize += 256;
@@ -183,7 +182,9 @@ int32 AppendAnyLenString(char** ret, int
memcpy(*ret, oldret, *strlen);
safe_delete_array(oldret);
}
+ va_start(argptr, format);
chars = vsnprintf(&(*ret)[*strlen], (*bufsize-*strlen), format, argptr);
+ va_end(argptr);
}
va_end(argptr);
*strlen += chars;
diff -up EQEmuServer/common/debug.cpp.orig EQEmuServer/common/debug.cpp
--- EQEmuServer/common/debug.cpp.orig 2009-04-19 18:48:46.000000000 -0700
+++ EQEmuServer/common/debug.cpp 2009-04-19 18:49:59.000000000 -0700
@@ -144,11 +144,16 @@ bool EQEMuLog::write(LogIDs id, const ch

va_list argptr;
va_start(argptr, fmt);
- if (dofile)
+ if (dofile) {
vfprintf( fp[id], fmt, argptr );
+ va_end(argptr);
+ va_start(argptr, fmt);
+ }
if(logCallbackFmt[id]) {
msgCallbackFmt p = logCallbackFmt[id];
p(id, fmt, argptr );
+ va_end(argptr);
+ va_start(argptr, fmt);
}
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8) {
@@ -202,17 +207,21 @@ bool EQEMuLog::writePVA(LogIDs id, const
time( &aclock ); /* Get time in seconds */
newtime = localtime( &aclock ); /* Convert time to struct */

+ va_list tmpargptr;
+
if (dofile) {
#ifndef NO_PIDLOG
fprintf(fp[id], "[%02d.%02d. - %02d:%02d:%02d] %s", newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec, prefix);
#else
fprintf(fp[id], "%04i [%02d.%02d. - %02d:%02d:%02d] %s", getpid(), newtime->tm_mon+1, newtime->tm_mday, newtime->tm_hour, newtime->tm_min, newtime->tm_sec, prefix);
#endif
- vfprintf( fp[id], fmt, argptr );
+ va_copy(tmpargptr, argptr);
+ vfprintf( fp[id], fmt, tmpargptr );
}
if(logCallbackPva[id]) {
msgCallbackPva p = logCallbackPva[id];
- p(id, prefix, fmt, argptr );
+ va_copy(tmpargptr, argptr);
+ p(id, prefix, fmt, tmpargptr );
}
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8) {
@@ -295,8 +304,11 @@ bool EQEMuLog::writebuf(LogIDs id, const
bool EQEMuLog::writeNTS(LogIDs id, bool dofile, const char *fmt, ...) {
va_list argptr;
va_start(argptr, fmt);
- if (dofile)
+ if (dofile) {
vfprintf( fp[id], fmt, argptr );
+ va_end(argptr);
+ va_start(argptr, fmt);
+ }
if (pLogStatus[id] & 2) {
if (pLogStatus[id] & 8)
vfprintf( stderr, fmt, argptr );


Thanks gaeorn for posting your fix.

Continuing on...

ndnet
05-27-2009, 02:46 PM
Zone is now crashing on ZoneDatabase::LoadAAs()

Zone init appears normal and happy:

(gdb) r
Starting program: /home/eqemu/eqemu/zone
[Thread debugging using libthread_db enabled]
[New Thread 47806244264320 (LWP 31479)]
[Debug] Starting Log: logs/eqemu_debug_zone.log
[Debug] [RULES__CHANGE] Resetting running rules to default values
[Debug] [ZONE__INIT] Loading server configuration..
[Debug] [ZONE__INIT] Warning: Unable to read log.ini
[Debug] [ZONE__INIT] Connecting to MySQL...
[Status] Starting Log: logs/eqemu_zone.log
[Status] Using database 'kmra' at localhost:3306
[New Thread 1082132832 (LWP 31482)]
[Debug] [ZONE__INIT] CURRENT_ZONE_VERSION: EQEMu 0.7.0
[Debug] [ZONE__INIT] Warning: Unable to read ./log.ini
[Debug] [ZONE__INIT] Mapping Incoming Opcodes
[Debug] [ZONE__INIT] Loading Variables
[Debug] [COMMON__THREADS] Starting DBAsyncLoop with thread ID 1082132832
[Debug] [ZONE__INIT] Loading zone names
[Debug] [ZONE__INIT] Loading items
[Status] libEMuShareMem.so loaded
[Debug] [ZONE__INIT] Loading npc faction lists
[Debug] [ZONE__INIT] Loading loot tables
[Debug] [ZONE__INIT] Loading skill caps
[Debug] [ZONE__INIT] Loading spells
[Debug] [ZONE__INIT] Loading guilds
[Debug] [ZONE__INIT] Loading factions
[Debug] [ZONE__INIT] Loading titles
[Debug] [ZONE__INIT] Loading AA effects
[Debug] [ZONE__INIT] Loading tributes
[Debug] [ZONE__INIT] Loading corpse timers
[Debug] [ZONE__INIT] Loading commands
[Debug] command_init(): - Command 'advnpcspawn' set to access level 200.
[Debug] command_init(): - Command 'aggrozone' set to access level 100.
[Debug] command_init(): - Command 'altactivate' set to access level 200.
[Debug] command_init(): - Command 'damage' set to access level 255.
[Debug] command_init(): - Command 'equipitem' set to access level 255.
[Debug] command_init(): - Command 'finditem' set to access level 50.
[Debug] command_init(): - Command 'flag' set to access level 255.
[Debug] command_init(): - Command 'gi' set to access level 255.
[Debug] command_init(): - Command 'giveitem' set to access level 255.
[Debug] command_init(): - Command 'gm' set to access level 100.
[Debug] command_init(): - Command 'gmhideme' set to access level 100.
[Debug] command_init(): - Command 'goon' set to access level 0.
[Debug] command_init(): - Command 'goto' set to access level 50.
[Debug] command_init(): - Command 'guildapprove' set to access level 50.
[Debug] command_init(): - Command 'guildcreate' set to access level 200.
[Debug] command_init(): - Command 'guilds' set to access level 200.
[Debug] command_init(): - Command 'heal' set to access level 255.
[Debug] command_init(): - Command 'hideme' set to access level 50.
[Debug] command_init(): - Command 'hp' set to access level 200.
[Debug] command_init(): - Command 'iplookup' set to access level 50.
[Debug] command_init(): - Command 'iteminfo' set to access level 50.
[Debug] command_init(): - Command 'kill' set to access level 255.
[Debug] command_init(): - Command 'level' set to access level 255.
[Debug] command_init(): - Command 'listnpcs' set to access level 50.
[Debug] command_init(): - Command 'mana' set to access level 200.
[Debug] command_init(): - Command 'manaburn' set to access level 50.
[Debug] command_init(): - Command 'melody' set to access level 0.
[Debug] command_init(): - Command 'movechar' set to access level 150.
[Debug] command_init(): - Command 'npcedit' set to access level 150.
[Debug] command_init(): - Command 'npcloot' set to access level 200.
[Debug] command_init(): - Command 'npcspawn' set to access level 200.
[Debug] command_init(): - Command 'npctypespawn' set to access level 150.
[Debug] command_init(): - Command 'oocmute' set to access level 255.
[Debug] command_init(): - Command 'peekinv' set to access level 10.
[Debug] command_init(): - Command 'peqzone' set to access level 200.
[Debug] command_init(): - Command 'pf' set to access level 50.
[Debug] command_init(): - Command 'save' set to access level 0.
[Debug] command_init(): - Command 'scribespells' set to access level 255.
[Debug] command_init(): - Command 'setallskill' set to access level 255.
[Debug] command_init(): - Command 'setexp' set to access level 200.
[Debug] command_init(): - Command 'setskill' set to access level 255.
[Debug] command_init(): - Command 'setskillall' set to access level 255.
[Debug] command_init(): - Command 'showbuffs' set to access level 10.
[Debug] command_init(): - Command 'showstats' set to access level 50.
[Debug] command_init(): - Command 'si' set to access level 200.
[Debug] command_init(): - Command 'spawn' set to access level 150.
[Debug] command_init(): - Command 'spawnfix' set to access level 150.
[Debug] command_init(): - Command 'spellinfo' set to access level 50.
[Debug] command_init(): - Command 'task' set to access level 100.
[Debug] command_init(): - Command 'title' set to access level 250.
[Debug] command_init(): - Command 'undyeme' set to access level 0.
[Debug] command_init(): - Command 'zone' set to access level 50.
[Debug] [ZONE__INIT] 213 commands loaded
[Debug] [ZONE__INIT] Loading rule set 'default'
[Debug] [RULES__CHANGE] Loading rule set 'default' (1)
[Debug] [RULES__CHANGE] Set rule Character:MaxLevel to value 87
[Debug] [RULES__CHANGE] Set rule Combat:WarBerBaseCritChance to value 0.3799999952316
[Debug] [RULES__CHANGE] Set rule Character:DeathExpLossLevel to value 10
[Debug] [RULES__CHANGE] Set rule Combat:NPCBashKickLevel to value 40
[Debug] [RULES__ERROR] Unable to find rule 'Spells:SpellAggroModifier'
[Debug] [RULES__ERROR] Unable to interpret rule record for Spells:SpellAggroModifier
[Debug] [RULES__CHANGE] Set rule Character:EnduranceRegenMultiplier to value -1
[Debug] [RULES__CHANGE] Set rule Character:LeaveCorpses to value true
[Debug] [RULES__CHANGE] Set rule Character:LeaveNakedCorpses to value true
[Debug] [RULES__CHANGE] Set rule Character:CorpseDecayTimeMS to value 357000
[Debug] [RULES__CHANGE] Set rule Combat:BaseCritChance to value 0.0500000007451
[Debug] [RULES__CHANGE] Set rule Zone:EnableShadowrest to value true
[Debug] [RULES__CHANGE] Set rule Character:HealOnLevel to value true
[Debug] [RULES__CHANGE] Set rule Character:FeignKillsPet to value false
[Debug] [RULES__CHANGE] Set rule Combat:UseIntervalAC to value true
[Debug] [RULES__CHANGE] Set rule Combat:PetAttackMagicLevel to value 30
[Debug] [RULES__CHANGE] Set rule NPC:SayPauseTimeInSec to value 5
[Debug] [RULES__CHANGE] Set rule NPC:OOCRegen to value 10
[Debug] [RULES__CHANGE] Set rule Watermap:CheckWaypointsInWaterWhenLoading to value false
[Debug] [RULES__CHANGE] Set rule Watermap:CheckForWaterWhenMoving to value false
[Debug] [RULES__CHANGE] Set rule Watermap:CheckForWaterOnSendTo to value false
[Debug] [RULES__CHANGE] Set rule Watermap:CheckForWaterWhenFishing to value false
[Debug] [RULES__CHANGE] Set rule Watermap:FishingRodLength to value 30.0000000000000
[Debug] [RULES__CHANGE] Set rule Watermap:FishingLineLength to value 40.0000000000000
[Debug] [RULES__CHANGE] Set rule Aggro:SmartAggroList to value true
[Debug] [RULES__CHANGE] Set rule Aggro:SittingAggroMod to value 35
[Debug] [RULES__CHANGE] Set rule Aggro:MeleeRangeAggroMod to value 30
[Debug] [RULES__CHANGE] Set rule Aggro:CurrentTargetAggroMod to value 0
[Debug] [RULES__CHANGE] Set rule Aggro:CriticallyWoundedAggroMod to value 100
[Debug] [RULES__CHANGE] Set rule Aggro:SlowAggroMod to value 450
[Debug] [RULES__CHANGE] Set rule Aggro:IncapacitateAggroMod to value 500
[Debug] [RULES__CHANGE] Set rule Aggro:MovementImpairAggroMod to value 175
[Debug] [RULES__CHANGE] Set rule Aggro:SpellAggroMod to value 28
[Debug] [RULES__CHANGE] Set rule Aggro:SongAggroMod to value 33
[Debug] [RULES__CHANGE] Set rule Aggro:PetSpellAggroMod to value 15
[Debug] [RULES__CHANGE] Set rule NPC:BuffFriends to value false
[Debug] [RULES__CHANGE] Set rule Character:DeathItemLossLevel to value 90
[Debug] [RULES__CHANGE] Set rule Map:FixPathingZWhenLoading to value false
[Debug] [RULES__CHANGE] Set rule Map:FixPathingZAtWaypoints to value false
[Debug] [RULES__CHANGE] Set rule Map:FixPathingZWhenMoving to value false
[Debug] [RULES__CHANGE] Set rule Map:FixPathingZOnSendTo to value false
[Debug] [RULES__CHANGE] Set rule Character:ItemDamageShieldCap to value 35
[Debug] [RULES__CHANGE] Set rule Watermap:CheckForWaterAtWaypoints to value false
[Debug] [RULES__CHANGE] Set rule Character:ItemHealthRegenCap to value 50
[Debug] [RULES__CHANGE] Set rule Character:ItemManaRegenCap to value 25
[Debug] [RULES__ERROR] Unable to find rule 'Merchant:SellSoldItems'
[Debug] [RULES__ERROR] Unable to interpret rule record for Merchant:SellSoldItems
[Debug] [RULES__CHANGE] Set rule Character:ExpMultiplier to value 0.6000000238419
[Debug] [RULES__CHANGE] Set rule Zone:EnableMQWarpDetector to value true
[Debug] [RULES__CHANGE] Set rule Zone:EnableMQZoneDetector to value true
[Debug] [RULES__CHANGE] Set rule Zone:EnableMQGateDetector to value true
[Debug] [RULES__CHANGE] Set rule Zone:EnableMQGhostDetector to value true
[Debug] [RULES__CHANGE] Set rule Zone:MQWarpExemptStatus to value 256
[Debug] [RULES__CHANGE] Set rule Zone:MQGateExemptStatus to value 256
[Debug] [RULES__CHANGE] Set rule Zone:MQZoneExemptStatus to value 256
[Debug] [RULES__CHANGE] Set rule Zone:MQGhostExemptStatus to value 256
[Debug] [RULES__CHANGE] Set rule Zone:MQWarpDetectorDistance to value 50.0000000000000
[Debug] [RULES__CHANGE] Set rule Zone:MQWarpLagThreshold to value 140.0000000000000
[Debug] [RULES__CHANGE] Set rule Zone:MQWarpThresholdTimer to value 90000.0000000000000
[Debug] [RULES__ERROR] Unable to find rule 'Zone:MQWarpDetectionSpellID'
[Debug] [RULES__ERROR] Unable to interpret rule record for Zone:MQWarpDetectionSpellID
[Debug] [RULES__ERROR] Unable to find rule 'Zone:MQGateDetectionSpellID'
[Debug] [RULES__ERROR] Unable to interpret rule record for Zone:MQGateDetectionSpellID
[Debug] [RULES__ERROR] Unable to find rule 'Zone:MQZoneDetectionSpellID'
[Debug] [RULES__ERROR] Unable to interpret rule record for Zone:MQZoneDetectionSpellID
[Debug] [RULES__ERROR] Unable to find rule 'Zone:MQGhostDetectionSpellID'
[Debug] [RULES__ERROR] Unable to interpret rule record for Zone:MQGhostDetectionSpellID
[Debug] [RULES__CHANGE] Set rule Character:ItemAccuracyCap to value 250
[Debug] [RULES__CHANGE] Set rule Character:ItemAvoidanceCap to value 65
[Debug] [RULES__CHANGE] Set rule Character:ItemCombatEffectsCap to value 50
[Debug] [RULES__CHANGE] Set rule Character:ItemShieldingCap to value 20
[Debug] [RULES__CHANGE] Set rule Character:ItemSpellShieldingCap to value 40
[Debug] [RULES__ERROR] Unable to find rule 'Character:ItemDotShieldingCap'
[Debug] [RULES__ERROR] Unable to interpret rule record for Character:ItemDotShieldingCap
[Debug] [RULES__CHANGE] Set rule Character:ItemStunResistCap to value 40
[Debug] [RULES__CHANGE] Set rule Character:ItemStrikethroughCap to value 235
[Debug] [RULES__CHANGE] Set rule Combat:FleeHPRatio to value 15
[Debug] [RULES__CHANGE] Set rule Chat:ServerWideOOC to value true
[Debug] [RULES__CHANGE] Set rule Chat:ServerWideAuction to value false
[Debug] [RULES__CHANGE] Set rule Zone:AutoShutdownDelay to value 5000
[Debug] [RULES__CHANGE] Set rule TaskSystem:EnableTaskSystem to value true
[Debug] [RULES__CHANGE] Set rule TaskSystem:PeriodicCheckTimer to value 5
[Debug] [RULES__CHANGE] Set rule TaskSystem:RecordCompletedTasks to value true
[Debug] [RULES__CHANGE] Set rule TaskSystem:RecordCompletedOptionalActivities to value true
[Debug] [RULES__CHANGE] Set rule TaskSystem:KeepOneRecordPerCompletedTask to value true
[Debug] [RULES__CHANGE] Set rule TaskSystem:EnableTaskProximity to value true
[Debug] [RULES__CHANGE] Set rule World:EnableTutorialButton to value false
[Debug] [RULES__CHANGE] Set rule World:EnableReturnHomeButton to value false
[Debug] [RULES__CHANGE] Set rule World:MaxLevelForTutorial to value 87
[Debug] [RULES__CHANGE] Set rule World:MinOfflineTimeToReturnHome to value 21600
[Debug] [RULES__CHANGE] Set rule World:AddMaxClientsPerIP to value -1
[Debug] [RULES__CHANGE] Set rule World:AddMaxClientsStatus to value -1
[Debug] [RULES__ERROR] Unable to find rule 'World:TutorialZoneIdNumber'
[Debug] [RULES__ERROR] Unable to interpret rule record for World:TutorialZoneIdNumber
[Debug] [RULES__CHANGE] Set rule Combat:ClientBaseCritChance to value 0.1000000014901
[Debug] [RULES__CHANGE] Set rule Combat:ClientChanceToHitMod to value 1.1000000238419
[Debug] [RULES__CHANGE] Set rule Combat:NPCChanceToHitMod to value 1.0000000000000
[Debug] [RULES__CHANGE] Set rule World:AccountSessionLimit to value 1
[Debug] [RULES__CHANGE] Set rule World:ExemptAccountLimitStatus to value 100
[Debug] [RULES__ERROR] Unable to find rule 'Guild::MaxMembers'
[Debug] [RULES__ERROR] Unable to interpret rule record for Guild::MaxMembers
[Debug] [RULES__CHANGE] Set rule Pets:AttackCommandRange to value 150.0000000000000
[Debug] [RULES__CHANGE] Set rule GM:MinStatusToZoneAnywhere to value 200
[Debug] [RULES__CHANGE] Set rule Spells:BaseCritChance to value 5
[Debug] [RULES__CHANGE] Set rule Spells:BaseCritRatio to value 85
[Debug] [RULES__CHANGE] Set rule Spells:WizCritLevel to value 0
[Debug] [RULES__CHANGE] Set rule Spells:WizCritChance to value 3
[Debug] [RULES__CHANGE] Set rule Spells:WizCritRatio to value 15
[Debug] [RULES__CHANGE] Set rule Spells:ResistPerLevelDiff to value 85
[Debug] [RULES__ERROR] Unable to find rule 'Combat:BaseHitChance'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:BaseHitChance
[Debug] [RULES__ERROR] Unable to find rule 'Combat:HitPerLevelDiff'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:HitPerLevelDiff
[Debug] [RULES__ERROR] Unable to find rule 'Combat:AgiHitFactor'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:AgiHitFactor
[Debug] [RULES__CHANGE] Set rule Character:DeathExpLossMultiplier to value 3
[Debug] [RULES__ERROR] Unable to find rule 'Combat:ChanceToHitDivideBy'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:ChanceToHitDivideBy
[Debug] [RULES__CHANGE] Set rule EQOffline:CreateBotCount to value 150
[Debug] [RULES__CHANGE] Set rule EQOffline:SpawnBotCount to value 2
[Debug] [RULES__CHANGE] Set rule EQOffline:BotQuest to value false
[Debug] [RULES__CHANGE] Set rule World:GMAccountIPList to value false
[Debug] [RULES__CHANGE] Set rule Chat:EnableAntiSpam to value true
[Debug] [RULES__CHANGE] Set rule Chat:MinStatusToBypassAntiSpam to value 100
[Debug] [RULES__CHANGE] Set rule Chat:MinimumMessagesPerInterval to value 4
[Debug] [RULES__CHANGE] Set rule Chat:MaximumMessagesPerInterval to value 16
[Debug] [RULES__CHANGE] Set rule Chat:MaxMessagesBeforeKick to value 20
[Debug] [RULES__CHANGE] Set rule Chat:IntervalDurationMS to value 60000
[Debug] [RULES__CHANGE] Set rule Chat:KarmaUpdateIntervalMS to value 1200000
[Debug] [RULES__CHANGE] Set rule Merchant:UsePriceMod to value true
[Debug] [RULES__CHANGE] Set rule Merchant:SellCostMod to value 1.0499999523163
[Debug] [RULES__CHANGE] Set rule Merchant:BuyCostMod to value 0.9499999880791
[Debug] [RULES__CHANGE] Set rule Merchant:PriceBonusPct to value 4
[Debug] [RULES__CHANGE] Set rule Merchant:PricePenaltyPct to value 4
[Debug] [RULES__CHANGE] Set rule Merchant:ChaBonusMod to value 3.4500000476837
[Debug] [RULES__CHANGE] Set rule Merchant:ChaPenaltyMod to value 1.5199999809265
[Debug] [RULES__CHANGE] Set rule EventLog:RecordSellToMerchant to value false
[Debug] [RULES__ERROR] Unable to find rule 'Combat:HitFalloffMinor'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:HitFalloffMinor
[Debug] [RULES__ERROR] Unable to find rule 'Combat:HitFalloffModerate'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:HitFalloffModerate
[Debug] [RULES__ERROR] Unable to find rule 'Combat:HitFalloffMajor'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:HitFalloffMajor
[Debug] [RULES__ERROR] Unable to find rule 'Combat:HitBonusPerLevel'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:HitBonusPerLevel
[Debug] [RULES__ERROR] Unable to find rule 'Combat:WeaponSkillFalloff'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:WeaponSkillFalloff
[Debug] [RULES__ERROR] Unable to find rule 'Combat:ArcheryHitPenalty'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:ArcheryHitPenalty
[Debug] [RULES__ERROR] Unable to find rule 'Combat:MeleeHitChanceMod'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:MeleeHitChanceMod
[Debug] [RULES__ERROR] Unable to find rule 'Combat:PriestHitChanceMod'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:PriestHitChanceMod
[Debug] [RULES__ERROR] Unable to find rule 'Combat:CasterHitChanceMod'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:CasterHitChanceMod
[Debug] [RULES__ERROR] Unable to find rule 'Combat:HeavyAvoidChanceMod'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:HeavyAvoidChanceMod
[Debug] [RULES__ERROR] Unable to find rule 'Combat:ModerateAvoidChanceMod'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:ModerateAvoidChanceMod
[Debug] [RULES__ERROR] Unable to find rule 'Combat:LightAvoidChanceMod'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:LightAvoidChanceMod
[Debug] [RULES__ERROR] Unable to find rule 'Combat:UnarmoredAvoidChanceMod'
[Debug] [RULES__ERROR] Unable to interpret rule record for Combat:UnarmoredAvoidChanceMod
[Debug] [RULES__CHANGE] Set rule Character:BindAnywhere to value true
[Debug] [RULES__CHANGE] Set rule Character:RestRegenPercent to value 35
[Debug] [RULES__CHANGE] Set rule Character:RestRegenTimeToActivate to value 30
[Debug] [RULES__CHANGE] Set rule Character:AAExpMultiplier to value 0.6999999880791
[Debug] [RULES__CHANGE] Set rule Character:GroupExpMultiplier to value 0.8000000119209
[Debug] [RULES__CHANGE] Set rule Character:RaidExpMultiplier to value 0.4499999880791
[Debug] [RULES__CHANGE] Set rule World:SoFStartZoneID to value -1
[Debug] [RULES__ERROR] Unable to find rule 'MaxClientsPerIP'
[Debug] [RULES__ERROR] Unable to interpret rule record for MaxClientsPerIP
[Debug] [ZONE__INIT] Loading Tasks
[Debug] [ZONE__INIT] Loading embedded perl XS
[Debug] [ZONE__INIT] Loading quests
[Quest] Starting Log: logs/eqemu_quest_zone.log
[Quest] Tying perl output to eqemu logs
[Quest] Creating EQEmuIO=HASH(0x9679c0)
[Quest] Creating EQEmuIO=HASH(0x967e20)
[Quest] Loading perlemb plugins.
[Quest] Unable to read perl file 'plugin.pl'
[Quest] Subroutine EVENT_SAY redefined at plugins/soulbinder.pl line 2.
[Quest] Subroutine EVENT_SAY redefined at plugins/teleporter.pl line 1.
[Quest] Subroutine EVENT_ITEM redefined at plugins/teleporter.pl line 9.
[Quest] Loading perl commands...
[Quest] Unable to read perl file 'commands.pl'
[New Thread 1090525536 (LWP 31483)]
[Debug] [ZONE__INIT] Entering sleep mode
[Debug] [NET__IDENTIFY] Registered patch 6.2
[Debug] [NET__IDENTIFY] Registered patch Titanium
[Debug] [NET__IDENTIFY] Registered patch SoF
[Debug] [COMMON__THREADS] Main thread running with thread id -1036707456
[Debug] [NET__WORLD] Connected to World: 127.0.0.1:9000
[Debug] [COMMON__THREADS] Starting TCPConnectionLoop with thread ID 1090525536
[Debug] [ZONE__WORLD] World indicated port 7002 for this zone.
[Debug] [ZONE__INIT] Starting EQ Network server on port 7002
[New Thread 1098918240 (LWP 31484)]
[Debug] [COMMON__THREADS] Starting EQStreamFactoryReaderLoop with thread ID 1098918240
[New Thread 1107310944 (LWP 31485)]
[Debug] [COMMON__THREADS] Starting EQStreamFactoryWriterLoop with thread ID 1107310944

However upon hitting "Enter World" we get a spam of errors like the following:


Error in SpawngroupID: 3362960
Error in SpawngroupID: 3363106
Error in SpawngroupID: 3363165
Error in SpawngroupID: 3363166
Error in SpawngroupID: 3363167
Error in SpawngroupID: 3364796
Error in SpawngroupID: 3364798
Error in SpawngroupID: 3364806
Error in SpawngroupID: 3364884


ultimately followed by


[Status] Loading spawn2 points...
[Status] Loading player corpses...
[Status] Loading traps...
[Status] Loading ground spawns...
[Status] Loading Ground Spawns from DB...
[Status] Loading World Objects from DB...
[Status] Loading Objects from DB...
[Status] Loading doors for kerraridge ...
[Status] Loading Doors from database...
[Status] Loading AA information...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47753471871360 (LWP 31486)]
ZoneDatabase::LoadAAs (this=0x8824c0, load=0xae15e0) at AA.cpp:1289
1289 load[ndx]->seq = ndx+1;
(gdb)


Backtrace has:

#0 ZoneDatabase::LoadAAs (this=0x8824c0, load=0xae15e0) at AA.cpp:1289
#1 0x000000000055d555 in Zone::LoadAAs (this=0xadd7a0) at AA.cpp:1108
#2 0x000000000047f874 in Zone::Init (this=0xadd7a0, iStaticZone=<value optimized out>) at zone.cpp:864
#3 0x0000000000482640 in Zone::Bootup (iZoneID=74, iStaticZone=false) at zone.cpp:103
#4 0x00000000004cc3ba in WorldServer::Process (this=0x837960) at worldserver.cpp:478
#5 0x00000000004b6a71 in main (argc=<value optimized out>, argv=<value optimized out>) at net.cpp:412


(gdb) list
1283 MYSQL_ROW row;
1284 if (RunQuery(query, MakeAnyLenString(&query, "SELECT skill_id from altadv_vars order by skill_id"), errbuf, &result)) {
1285 int skill=0,ndx=0;
1286 while((row = mysql_fetch_row(result))!=NULL) {
1287 skill=atoi(row[0]);
1288 load[ndx] = GetAASkillVars(skill);
1289 load[ndx]->seq = ndx+1;
1290 ndx++;
1291 }
1292 mysql_free_result(result);
(gdb) print load
$5 = (SendAA_Struct **) 0xae15e0
(gdb) print *load
$6 = (SendAA_Struct *) 0x0


Poking through it myself at the moment.

gaeorn
05-27-2009, 05:31 PM
Have you tried a vanilla installation? eg: a PEQ DB and an appropriate version of EQEmu code. This could show you if you have an underlying problem with the system or if the problem is in your custom code.

I know that PEQ DB 1129Rev535 and EQEmu instance branch rev 585 works for me. I'm using Fedora 8 x86_64 on a Pentium D. I did not set -march at all during compile time.

ndnet
05-27-2009, 05:59 PM
Had to do actual work for awhile :(

Went down into GetAASkillVars() and found that it isn't returning rows. Query is at line 1310 roughly, next if() block checks row count and fails at 0. skill_id is apparently '2', Innate Strength.

Running the actual query on the database from the mysql CLI client produces the expected results:


SELECT a.cost, a.max_level, a.hotkey_sid, a.hotkey_sid2, a.title_sid, a.desc_sid, a.type, COALESCE((
SELECT p.prereq_index_num FROM (SELECT a2.skill_id, @row := @row + 1 AS prereq_index_num FROM altadv_vars a2) AS p WHERE p.skill_id = a.prereq_skill), 0) AS prereq_skill_index, a.prereq_minpoints,a.spell_type,a.spell_refresh,a. classes,a.berserker,a.spellid,a.class_type,a.name, a.cost_inc FROM altadv_vars a WHERE skill_id=2


+------+-----------+------------+-------------+-----------+----------+------+--------------------+------------------+------------+---------------+---------+-----------+------------+------------+-----------------+----------+
| cost | max_level | hotkey_sid | hotkey_sid2 | title_sid | desc_sid | type | prereq_skill_index | prereq_minpoints | spell_type | spell_refresh | classes | berserker | spellid | class_type | name | cost_inc |
+------+-----------+------------+-------------+-----------+----------+------+--------------------+------------------+------------+---------------+---------+-----------+------------+------------+-----------------+----------+
| 1 | 5 | 4294967295 | 4294967295 | 13500 | 13501 | 1 | 0 | 0 | 0 | 0 | 65534 | 1 | 4294967295 | 51 | Innate Strength | 0 |
+------+-----------+------------+-------------+-----------+----------+------+--------------------+------------------+------------+---------------+---------+-----------+------------+------------+-----------------+----------+
1 row in set (0.00 sec)


errbuf is empty, result.fields is populated with the expected field names. Not sure why it's not matching anything... I might not have the mysql libs linked in properly... Gonna have to take a look at it again in awhile.

gaeorn
05-27-2009, 06:10 PM
I also modified my zone makefile:

diff -up EQEmuServer/zone/makefile.dan EQEmuServer/zone/makefile
--- EQEmuServer/zone/makefile.dan 2009-04-30 21:10:03.000000000 -0700
+++ EQEmuServer/zone/makefile 2009-04-30 21:14:18.000000000 -0700
@@ -10,8 +10,8 @@ OUT=-o
LINKOUT=-o
NOLINK=-c
LINKER=gcc
-MYSQL_FLAGS=-I/usr/include/mysql
-MYSQL_LIB=-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns -lresolv
+MYSQL_FLAGS=$(shell mysql_config --cflags)
+MYSQL_LIB=$(shell mysql_config --libs)
DFLAGS=-DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386
#try commenting out the following three lines to disable embedded perl
PERL_FLAGS=perl -MExtUtils::Embed -e ccopts


Since under Fedora, the 64 bit libs are in within different paths (lib64 rather than lib), I had to make that change. I can't remember if Debian does this or not. In any case, the above should give the proper compile and linking flags for mysql.

ndnet
05-28-2009, 02:47 PM
I pulled a clean trunk down from the googlecode svn. Made the changes above, including modifying the makefiles.

Unfortunately the server still crashed on LoadAAs().

Pulled down a fresh version of PEQ and got it updated. Our custom bins can get into zone without a crash with the fresh PEQ db.

Gonna double-check our dump and ensure everything came down properly.

gaeorn
05-28-2009, 05:02 PM
Well, at least you have narrowed down the problem. Let me know if there is anything else you need.

KingMort
05-28-2009, 05:33 PM
Yup just something whacked out with that particular copy of the database...