PDA

View Full Version : Strange Shared_Memory issue


provocating
02-29-2016, 07:11 PM
Moving my server between Debian installs I am getting a new shared memory error. The directory is there, just called "shared". I have tried giving permissions as the user and even run shared_memory as root and still get the same errors. Strangest thing...

[Zone Server] Loading items
[Error] Error Loading Items: EQEmu Exception (Shared Memory) in /home/eq1/src/common/memory_mapped_file.cpp at line (112): Could not open the file to find the existing file size.
[Error] Loading items FAILED!
[Error] Failed. But ignoring error and going on...
[Zone Server] Loading npc faction lists
[Error] Error Loading npc factions: EQEmu Exception (Shared Memory) in /home/eq1/src/common/memory_mapped_file.cpp at line (112): Could not open the file to find the existing file size.
[Error] Loading npcs faction lists FAILED!

Looking at line 112 that is definitely where it is trying to open the file. I am at a loss here, unless there is something drastic between Debian versions.

joligario
02-29-2016, 07:45 PM
Where are your files and what are your permissions? Are you using symlinks? Give an ls -al on your emu root folder?

provocating
02-29-2016, 08:01 PM
-rwxr-xr-x 1 root root 319 Feb 29 13:19 1
-rwxr-xr-x 1 root root 0 Feb 29 13:19 base_data.lock
-rw------- 1 root root 1979 Feb 29 17:23 .bash_history
drwxr-xr-x 2 root root 4096 Feb 28 22:22 bin
-rwxr-xr-x 1 root root 0 Feb 29 13:22 commands.pl
drwxr-xr-x 2 root root 4096 Feb 28 22:40 db_update
-rwxr-xr-x 1 root root 1339 Feb 29 14:05 eqemu_config.xml
-rwxr-xr-x 1 root root 49427 Feb 29 13:22 eqemu_query_error_log.txt
-rwxr-xr-x 1 root root 56874 Feb 29 13:22 eqemu_update.pl
-rwxr-xr-x 1 root root 2436658 Feb 29 13:22 eqlaunch
-rwxr-xr-x 1 root root 29 Feb 29 14:55 eqtime.cfg
drwxr-xr-x 2 root root 4096 Feb 28 22:41 export
-rwxr-xr-x 1 root root 3857506 Feb 29 13:22 export_client_files
-rwxr-xr-x 1 root root 0 Feb 29 13:22 faction.lock
-rwxr-xr-x 1 root root 1774 Feb 29 13:22 guides_install
-rwxr-xr-x 1 root root 1565 Feb 29 13:22 hotzones.pl
-rwxr-xr-x 1 root root 3894495 Feb 29 13:23 import_client_files
-rwxr-xr-x 1 root root 0 Feb 29 13:23 items.lock
-rwxr-xr-x 1 root root 31514692 Feb 29 13:23 libcommon.a
-rwxr-xr-x 1 root root 4545178 Feb 29 13:23 libluabind.a
-rwxr-xr-x 1 root root 666 Feb 29 13:23 log.ini
drwxr-xr-x 3 root root 4096 Feb 28 22:44 loginserver
drwxr-xr-x 2 root root 4096 Feb 29 18:03 logs
-rwxr-xr-x 1 root root 0 Feb 29 13:27 loot.lock
drwxr-xr-x 2 root root 4096 Feb 29 05:19 lua_modules
-rwxr-xr-x 1 root root 300 Feb 29 13:27 mail_opcodes.conf
drwxr-xr-x 5 root root 28672 Feb 29 17:27 Maps
-rwxr-xr-x 1 root root 925 Feb 29 17:27 mime.types
-rwxr-xr-x 1 root root 16679 Feb 29 17:30 opcodes.conf
-rwxr-xr-x 1 root root 17703 Feb 29 17:30 patch_6.2.conf
-rwxr-xr-x 1 root root 15808 Feb 29 17:30 patch_RoF2.conf
-rwxr-xr-x 1 root root 16375 Feb 29 17:30 patch_RoF.conf
-rwxr-xr-x 1 root root 18951 Feb 29 17:30 patch_SoD.conf
-rwxr-xr-x 1 root root 22852 Feb 29 17:30 patch_SoF.conf
-rwxr-xr-x 1 root root 18860 Feb 29 17:30 patch_Titanium.conf
-rwxr-xr-x 1 root root 19469 Feb 29 17:30 patch_UF.conf
-rwxr-xr-x 1 root root 19394 Feb 29 17:30 patch_Underfoot.conf
-rwxr-xr-x 1 root root 0 Feb 29 17:30 plugin.pl
drwxr-xr-x 2 root root 4096 Feb 29 17:30 plugins
-rwxr-xr-x 1 root root 2668837 Feb 29 17:31 queryserv
drwxr-xr-x 242 root root 12288 Feb 29 17:54 quests
drwxrwxrwx 2 root root 4096 Feb 29 17:59 shared
-rwxr-xr-x 1 root root 4162668 Feb 29 18:00 shared_memory
-rwxr-xr-x 1 root root 0 Feb 29 18:00 skill_caps.lock
-rwxr-xr-x 1 root root 0 Feb 29 18:00 spells.lock
-rwxr-xr-x 1 root root 19355741 Feb 29 18:01 spells_us.txt
-rwxr-xr-x 1 root root 1371 Feb 29 18:01 start
-rwxr-xr-x 1 root root 387 Feb 29 18:01 stop
drwxr-xr-x 3 root root 4096 Feb 29 18:01 templates
-rwxr-xr-x 1 root root 5528710 Feb 29 18:01 ucs
-rwxr-xr-x 1 root root 19229645 Feb 29 18:02 world
-rwxr-xr-x 1 root root 0 Feb 29 18:02 worldui.pl
-rwxr-xr-x 1 root root 111419400 Feb 29 18:04 zone
root@con:~#

joligario
02-29-2016, 08:10 PM
So all owned by root:root. What happens when you run ./shared_memory all by itself as root?

provocating
02-29-2016, 08:14 PM
It runs as normal and fills the directory, all files have sizes


-rw------- 1 root root 88072 Feb 29 17:53 base_data
-rw------- 1 root root 244756 Feb 29 17:53 faction
-rw------- 1 root root 79878824 Feb 29 17:53 items
-rw------- 1 root root 6236788 Feb 29 17:53 loot_drop
-rw------- 1 root root 1437173 Feb 29 17:53 loot_table
-rw------- 1 root root 315400 Feb 29 17:53 skill_caps
-rw------- 1 root root 34189048 Feb 29 17:53 spells

provocating
02-29-2016, 08:15 PM
I pretty well set my debugging to max, so I am getting plenty of data back when zone runs.


[Zone Server] Loading server configuration..
[Zone Server] Connecting to MySQL...
[Status] Starting File Log 'logs/zone_3817.log'
[Zone Server] CURRENT_VERSION: 1.1.3
[Zone Server] Mapping Incoming Opcodes
[Zone Server] Loading Variables
[MySQL Query] SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= 0 (22 rows returned)
[Zone Server] Current hotfix in use: 'hotfix_'
[Zone Server] Loading zone names
[MySQL Query] SELECT zoneidnumber, short_name FROM zone (483 rows returned)
[Zone Server] Loading items
[Error] Error Loading Items: EQEmu Exception (Shared Memory) in /home/eq1/src/common/memory_mapped_file.cpp at line (112): Could not open the file to fi nd the existing file size.
[Error] Loading items FAILED!
[Error] Failed. But ignoring error and going on...
[Zone Server] Loading npc faction lists
[Error] Error Loading npc factions: EQEmu Exception (Shared Memory) in /home/eq1/src/common/memory_mapped_file.cpp at line (112): Could not open the fil e to find the existing file size.
[Error] Loading npcs faction lists FAILED!

demonstar55
02-29-2016, 08:37 PM
Eww running as root.

joligario
02-29-2016, 08:38 PM
I'm wondering if this is a nesting permissions issue. Is your original user eq1? I recommend going back and chowning everything (-R from src) back to eq1, clear locks/logs, rebuild and run everything as that user again.

EDIT: Haha, demon and I were thinking the same thing...

provocating
02-29-2016, 08:42 PM
Eww running as root.

Never, that was just for troubleshooting, I know better.

Akkadius
02-29-2016, 09:07 PM
provocating, run this and try again:

UPDATE `variables` SET `value`='' WHERE (`varname`='hotfix_name')

Let me know how this works for you

provocating
02-29-2016, 09:53 PM
That did it. Now I am completely confused why that would have any effect at all. Should this be something I include in a reboot script?

Akkadius
02-29-2016, 10:48 PM
It's kind of a "bug", it's working as intended but its an issue that folks run into when they make use of #hotfix.

I'll look into making a long term solution for it.

provocating
02-29-2016, 11:27 PM
If you can enlighten me on what is causing it, I would like to go ahead and change it in my source. I use hotfix at least a few times a day.

Akkadius
02-29-2016, 11:38 PM
If you can enlighten me on what is causing it, I would like to go ahead and change it in my source. I use hotfix at least a few times a day.

I'm working on it right now, calm your tits

Akkadius
02-29-2016, 11:58 PM
Done and tested.

Works.

https://github.com/EQEmu/Server/commit/66b62303e42f7f3125c8c6f1921ca89d83683c1b

Profit.

Love me long time

provocating
03-01-2016, 12:13 AM
Damn you work fast.

provocating
03-01-2016, 12:15 AM
I will also say #hotfix is the best feature I have seen in a long time. I have not had any naked character complaints since it was added.

Akkadius
03-01-2016, 12:16 AM
I will also say #hotfix is the best feature I have seen in a long time. I have not had any naked character complaints since it was added.

You can thank KLS for reworking shared memory to support it. It was an idea I had but KLS did all of the crazy legwork to make it happen.

provocating
03-01-2016, 12:20 AM
I saw the amount of code that it entailed, very vast. Impressive too, it is going to be a while before my C++ ninja skills hit that level.

Akkadius
03-01-2016, 12:25 AM
I saw the amount of code that it entailed, very vast. Impressive too, it is going to be a while before my C++ ninja skills hit that level.

Lol, it is a huge tool towards developing fast