EQEmu / Server

Open Source Fan-Based EverQuest Emulator Server project
https://docs.eqemu.io/
GNU General Public License v3.0
448 stars 415 forks source link

#scribespells crash related to spell buckets #2033

Closed catapultam-habeo closed 2 years ago

catapultam-habeo commented 2 years ago

commit 9f0989e is causing a zone crash when (auto) scribing (some?) spells. Reverting this commit allows for scribing w\ use of spell buckets to omit to work successfully.

This does seem to be somewhat related to the contents of the spell buckets table (emptying the table prevents the crash), but removing the spell mentioned in the below stack trace (2112) does not correct the issue (it is just the alphabetical top of the spell list, I think, this was shaman 1-60), nor does removing all spells with non-alphanumeric characters in their names.


[03-06-2022 :: 00:39:49] [Zone] [Crash] [New LWP 283711]
[03-06-2022 :: 00:39:49] [Zone] [Crash] [New LWP 283712]
[03-06-2022 :: 00:39:49] [Zone] [Crash] [New LWP 283713]
[03-06-2022 :: 00:39:49] [Zone] [Crash] [New LWP 283714]
[03-06-2022 :: 00:39:49] [Zone] [Crash] [Thread debugging using libthread_db enabled]
[03-06-2022 :: 00:39:49] [Zone] [Crash] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[03-06-2022 :: 00:39:49] [Zone] [Crash] 0x00007efc092950ca in __waitpid (pid=286987, stat_loc=stat_loc@entry=0x0, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
[03-06-2022 :: 00:39:49] [Zone] [Crash] [Current thread is 1 (Thread 0x7efc085ba140 (LWP 283710))]
[03-06-2022 :: 00:39:49] [Zone] [Crash] #0  0x00007efc092950ca in __waitpid (pid=286987, stat_loc=stat_loc@entry=0x0, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
[03-06-2022 :: 00:39:49] [Zone] [Crash] #1  0x0000561e24f8635e in print_trace () at /home/eqemu/code/common/crash.cpp:154
[03-06-2022 :: 00:39:49] [Zone] [Crash] #2  <signal handler called>
[03-06-2022 :: 00:39:49] [Zone] [Crash] #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[03-06-2022 :: 00:39:49] [Zone] [Crash] #4  0x00007efc08dae535 in __GI_abort () at abort.c:79
[03-06-2022 :: 00:39:49] [Zone] [Crash] #5  0x00007efc09178983 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[03-06-2022 :: 00:39:49] [Zone] [Crash] #6  0x00007efc0917e8c6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[03-06-2022 :: 00:39:49] [Zone] [Crash] #7  0x00007efc0917e901 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[03-06-2022 :: 00:39:49] [Zone] [Crash] #8  0x00007efc0917eb34 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[03-06-2022 :: 00:39:49] [Zone] [Crash] #9  0x00007efc0917a81f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
[03-06-2022 :: 00:39:49] [Zone] [Crash] #10 0x0000561e248a2407 in __gnu_cxx::__stoa<long, int, char, int> (__convf=0x7efc08dc7c20 <__strtol>, __name=__name@entry=0x561e251640d1 "stoi", __str=0x7ffee64171a0 "enabled", __idx=__idx@entry=0x0, __base#0=__base#0@entry=10) at /usr/include/c++/8/ext/string_conversions.h:64
[03-06-2022 :: 00:39:49] [Zone] [Crash] #11 0x0000561e24e2e320 in std::__cxx11::stoi (__base=10, __idx=0x0, __str="enabled") at /usr/include/c++/8/bits/basic_string.h:6411
[03-06-2022 :: 00:39:49] [Zone] [Crash] #12 Client::SpellBucketCheck (this=this@entry=0x561e28affa40, spell_id=4261, char_id=345) at /home/eqemu/code/zone/spells.cpp:5581
[03-06-2022 :: 00:39:49] [Zone] [Crash] #13 0x0000561e248890a7 in Client::GetScribeableSpells (this=0x561e28affa40, min_level=1 '\001', max_level=60 '<') at /home/eqemu/code/zone/client.h:702
[03-06-2022 :: 00:39:49] [Zone] [Crash] #14 0x0000561e248a0786 in Client::ScribeSpells (this=this@entry=0x561e28affa40, min_level=min_level@entry=1 '\001', max_level=max_level@entry=60 '<') at /home/eqemu/code/zone/client.cpp:10772
[03-06-2022 :: 00:39:49] [Zone] [Crash] #15 0x0000561e24f5a460 in command_scribespells (c=0x561e28affa40, sep=<optimized out>) at /home/eqemu/code/zone/gm_commands/scribespells.cpp:43
[03-06-2022 :: 00:39:49] [Zone] [Crash] #16 0x0000561e248f9fdc in command_realdispatch (c=0x561e28affa40, message=0x7ffee6417750 "#scribespells 60 1") at /home/eqemu/code/zone/command.cpp:628
[03-06-2022 :: 00:39:49] [Zone] [Crash] #17 0x0000561e2489a0f4 in Client::ChannelMessageReceived (this=0x561e28affa40, chan_num=8 '\b', language=<optimized out>, lang_skill=<optimized out>, orig_message=<optimized out>, targetname=<optimized out>) at /home/eqemu/code/zone/client.cpp:1112
[03-06-2022 :: 00:39:49] [Zone] [Crash] #18 0x0000561e248ca256 in Client::HandlePacket (this=this@entry=0x561e28affa40, app=app@entry=0x561e28041d60) at /home/eqemu/code/zone/client_packet.cpp:511
[03-06-2022 :: 00:39:49] [Zone] [Crash] #19 0x0000561e248f5436 in Client::Process (this=0x561e28affa40) at /home/eqemu/code/zone/client_process.cpp:582
[03-06-2022 :: 00:39:49] [Zone] [Crash] #20 0x0000561e24a13780 in EntityList::MobProcess (this=this@entry=0x561e254e3a80 <entity_list>) at /home/eqemu/code/zone/entity.cpp:530
[03-06-2022 :: 00:39:49] [Zone] [Crash] #21 0x0000561e24c65760 in <lambda(EQ::Timer*)>::operator()(EQ::Timer *) const (__closure=0x561e27b00bd0, t=<optimized out>) at /home/eqemu/code/zone/main.cpp:553
[03-06-2022 :: 00:39:49] [Zone] [Crash] #22 0x0000561e24c65b9f in std::function<void (EQ::Timer*)>::operator()(EQ::Timer*) const (__args#0=<optimized out>, this=<optimized out>) at /usr/include/c++/8/bits/std_function.h:682
[03-06-2022 :: 00:39:49] [Zone] [Crash] #23 EQ::Timer::Execute (this=<optimized out>) at /home/eqemu/code/zone/../common/net/../event/timer.h:61
[03-06-2022 :: 00:39:49] [Zone] [Crash] #24 EQ::Timer::Start(unsigned long, bool)::{lambda(uv_timer_s*)#1}::operator()(uv_timer_s*) const (handle=<optimized out>, __closure=0x0) at /home/eqemu/code/zone/../common/net/../event/timer.h:38
[03-06-2022 :: 00:39:49] [Zone] [Crash] #25 EQ::Timer::Start(unsigned long, bool)::{lambda(uv_timer_s*)#1}::_FUN(uv_timer_s*) () at /home/eqemu/code/zone/../common/net/../event/timer.h:39
[03-06-2022 :: 00:39:49] [Zone] [Crash] #26 0x0000561e2511cdf5 in uv__run_timers (loop=loop@entry=0x7efc085b9df0) at /home/eqemu/code/submodules/libuv/src/timer.c:174
[03-06-2022 :: 00:39:49] [Zone] [Crash] #27 0x0000561e25120b85 in uv_run (loop=0x7efc085b9df0, mode=mode@entry=UV_RUN_DEFAULT) at /home/eqemu/code/submodules/libuv/src/unix/core.c:352
[03-06-2022 :: 00:39:49] [Zone] [Crash] #28 0x0000561e24740145 in EQ::EventLoop::Run (this=<optimized out>) at /home/eqemu/code/zone/../common/net/../event/event_loop.h:25
[03-06-2022 :: 00:39:49] [Zone] [Crash] #29 main (argc=<optimized out>, argv=<optimized out>) at /home/eqemu/code/zone/main.cpp:582
[03-06-2022 :: 00:39:49] [Zone] [Crash] [Inferior 1 (process 283710) detached]```
Kinglykrab commented 2 years ago

Unable to replicate this crash.

Have tried multiple different spell bucket names such as Skeleton, Skeleton123, Skeleton Stuff, and Skeleton12''''4234523fsafsdfz__21321~!@#@#!#$%.

Not getting any crashes at all with #scribespells.

catapultam-habeo commented 2 years ago
-- version 5.1.2
-- https://www.phpmyadmin.net/
--
-- Host: mariadb
-- Generation Time: Mar 07, 2022 at 09:42 PM
-- Server version: 10.6.5-MariaDB-1:10.6.5+maria~focal
-- PHP Version: 8.0.15

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";

--
-- Database: `peq`
--

--
-- Dumping data for table `spell_buckets`
--

INSERT INTO `spell_buckets` (`spellid`, `key`, `value`) VALUES
(666, 'Alter Plane: Hate', 'enabled'),
(1196, 'Ancient: Lcea\\\'s Lament', 'enabled'),
(1197, 'Ancient: Lullaby of Shadow', 'enabled'),
(1326, 'Ring of the Combines', 'enabled'),
(1517, 'Circle of the Combines', 'enabled'),
(1936, 'Manifest Elements', 'enabled'),
(1944, 'Summon Orb', 'enabled'),
(2109, 'Ancient: High Priest\\\'s Bulwark', 'enabled'),
(2112, 'Ancient: Feral Avatar', 'enabled'),
(2113, 'Ancient: Scourge of Nife', 'enabled'),
(2114, 'Ancient: Master of Death', 'enabled'),
(2115, 'Ancient: Lifebane', 'enabled'),
(2116, 'Ancient: Destruction of Ice', 'enabled'),
(2117, 'Ancient: Greater Concussion', 'enabled'),
(2118, 'Ancient: Shock of Sun', 'enabled'),
(2119, 'Ancient: Burnout Blaze', 'enabled'),
(2120, 'Ancient: Eternal Rapture', 'enabled'),
(2121, 'Ancient: Chaotic Visions', 'enabled'),
(2122, 'Ancient: Gift of Aegolism', 'enabled'),
(2125, 'Ancient: Legacy of Blades', 'enabled'),
(2126, 'Ancient: Starfire of Ro', 'enabled'),
(3497, 'Ancient: MGB True South', 'enabled'),
(4252, 'Xalirilan\\\'s Lesser Appraisal', 'enabled'),
(4253, 'Xalirilan\\\'s Appraisal', 'enabled'),
(4254, 'Xalirilan\\\'s Greater Appraisal', 'enabled'),
(4255, 'Wuggan\\\'s Lesser Appraisal', 'enabled'),
(4256, 'Wuggan\\\'s Appraisal', 'enabled'),
(4257, 'Wuggan\\\'s Greater Appraisal', 'enabled'),
(4258, 'Iony\\\'s Lesser Augury', 'enabled'),
(4259, 'Iony\\\'s Augury', 'enabled'),
(4260, 'Iony\\\'s Greater Augury', 'enabled'),
(4261, 'Reebo\\\'s Lesser Augury', 'enabled'),
(4262, 'Reebo\\\'s Augury', 'enabled'),
(4263, 'Reebo\\\'s Greater Augury', 'enabled'),
(4264, 'Xalirilan\\\'s Lesser Discombobulation', 'enabled'),
(4265, 'Xalirilan\\\'s Discombobulation', 'enabled'),
(4266, 'Xalirilan\\\'s Greater Discombobulation', 'enabled'),
(4267, 'Wuggan\\\'s Lesser Discombobulation', 'enabled'),
(4268, 'Wuggan\\\'s Discombobulation', 'enabled'),
(4269, 'Wuggan\\\'s Greater Discombobulation', 'enabled'),
(4270, 'Iony\\\'s Lesser Exorcism', 'enabled'),
(4271, 'Iony\\\'s Exorcism', 'enabled'),
(4272, 'Iony\\\'s Greater Exorcism', 'enabled'),
(4273, 'Reebo\\\'s Lesser Exorcism', 'enabled'),
(4274, 'Reebo\\\'s Exorcism', 'enabled'),
(4275, 'Reebo\\\'s Greater Exorcism', 'enabled'),
(4276, 'Xalirilan\\\'s Lesser Extrication', 'enabled'),
(4277, 'Xalirilan\\\'s Extrication', 'enabled'),
(4278, 'Xalirilan\\\'s Greater Extrication', 'enabled'),
(4279, 'Wuggan\\\'s Lesser Extrication', 'enabled'),
(4280, 'Wuggan\\\'s Extrication', 'enabled'),
(4281, 'Wuggan\\\'s Greater Extrication', 'enabled'),
(4282, 'Iony\\\'s Lesser Cleansing', 'enabled'),
(4283, 'Iony\\\'s Cleansing', 'enabled'),
(4284, 'Iony\\\'s Greater Cleansing', 'enabled'),
(4285, 'Reebo\\\'s Lesser Cleansing', 'enabled'),
(4286, 'Reebo\\\'s Cleansing', 'enabled'),
(4287, 'Reebo\\\'s Greater Cleansing', 'enabled'),
(4971, 'Ancient: Chaos Chant', 'enabled'),
(4972, 'Ancient: Frozen Chaos', 'enabled'),
(4973, 'Ancient: Chaos Censure', 'enabled'),
(4974, 'Ancient: Chaos Frost', 'enabled'),
(4975, 'Ancient: Chaos Madness', 'enabled'),
(4976, 'Ancient: Chaos Vortex', 'enabled'),
(4977, 'Ancient: Force of Chaos', 'enabled'),
(4978, 'Ancient: Seduction of Chaos', 'enabled'),
(4979, 'Ancient: Chaotic Pain', 'enabled'),
(4980, 'Ancient: Burning Chaos', 'enabled'),
(4981, 'Ancient: Strike of Chaos', 'enabled'),
(4982, 'Ancient: Bite of Chaos', 'enabled'),
(5016, 'Ancient: Chaos Cry', 'enabled'),
(5018, 'Ancient: Chaos Strike', 'enabled'),
(5020, 'Ancient: Phantom Chaos', 'enabled'),
(5032, 'Ancient: Cry of Chaos', 'enabled'),
(5279, 'Ancient: Pious Conscience', 'enabled'),
(5299, 'Ancient: Force of Jeron', 'enabled'),
(5319, 'Ancient: North Wind', 'enabled'),
(5340, 'Ancient: Bite of Muram', 'enabled'),
(5369, 'Ancient: Glacier Frost', 'enabled'),
(5388, 'Ancient: Call of Power', 'enabled'),
(5418, 'Ancient: Ancestral Calling', 'enabled'),
(5441, 'Ancient: Curse of Mori', 'enabled'),
(5463, 'Ancient: Core Fire', 'enabled'),
(5498, 'Ancient: Nova Strike', 'enabled'),
(5523, 'Ancient: Neurosis', 'enabled'),
(5543, 'Ancient: Savage Ice', 'enabled'),
(6140, 'Ancient: Hallowed Light', 'enabled'),
(6141, 'Ancient: Chlorobon', 'enabled'),
(6142, 'Ancient: Wilslik\\\'s Mending', 'enabled'),
(6143, 'Ancient: Touch of Orshilak', 'enabled'),
(6144, 'Ancient: Voice of Muram', 'enabled'),
(6145, 'Ancient: Veil of Pyrilonus', 'enabled'),
(6146, 'Ancient: Spear of Gelaqua', 'enabled'),
(6502, 'Unpack Brewer\\\'s Still', 'enabled'),
(7681, 'Focus Spellcaster\\\'s Empowering Essence', 'enabled'),
(8235, 'Circle of Undershore', 'enabled'),
(8236, 'Undershore Portal', 'enabled'),
(8237, 'Ring of Undershore', 'enabled'),
(8238, 'Undershore Gate', 'enabled'),
(8239, 'Translocate: Undershore', 'enabled'),
(8965, 'Circle of Arcstone', 'enabled'),
(8966, 'Arcstone Portal', 'enabled'),
(8967, 'Ring of Arcstone', 'enabled'),
(8968, 'Arcstone Gate', 'enabled'),
(8969, 'Translocate: Arcstone', 'enabled'),
(9175, 'Fist of the Sunderock Spires', 'enabled'),
(9443, 'Sunderock Geyser', 'enabled'),
(9953, 'Zephyr: The Steppes', 'enabled'),
(9954, 'Circle of The Steppes', 'enabled'),
(9955, 'Ring of The Steppes', 'enabled'),
(9956, 'Zephyr: Blightfire Moors', 'enabled'),
(9957, 'Circle of Blightfire Moors', 'enabled'),
(9958, 'Ring of Blightfire Moors', 'enabled'),
(10092, 'Sunderock Springwater', 'enabled'),
(10093, 'Sunderock Springwater Rk. II', 'enabled'),
(10094, 'Sunderock Springwater Rk. III', 'enabled'),
(10877, 'Translocate: Sunderock Springs', 'enabled'),
(10878, 'Sunderock Springs Portal', 'enabled'),
(10879, 'Sunderock Springs Gate', 'enabled'),
(10880, 'Translocate: Blightfire Moors', 'enabled'),
(10881, 'Blightfire Moors Portal', 'enabled'),
(10882, 'Blightfire Moors Gate', 'enabled'),
(11980, 'Zephyr: Buried Sea', 'enabled'),
(11981, 'Circle of Buried Sea', 'enabled'),
(11982, 'Ring of Buried Sea', 'enabled'),
(24775, 'Zephyr: Undershore', 'enabled'),
(24776, 'Zephyr: Arcstone', 'enabled'),
(24956, 'Lizard Liver', 'enabled'),
(24957, 'A Little Luck', 'enabled'),
(25694, 'Zephyr: Combines', 'enabled'),
(27749, 'Primary Anchor Gate', 'enabled'),
(27750, 'Translocate: Primary Anchor', 'enabled'),
(27751, 'Primary Anchor Portal', 'enabled'),
(27752, 'Teleport Primary Anchor ', 'enabled'),
(27753, 'Secondary Anchor Gate', 'enabled'),
(27754, 'Translocate: Secondary Anchor', 'enabled'),
(27755, 'Secondary Anchor Portal', 'enabled'),
(27756, 'Teleport Secondary Anchor ', 'enabled'),
(27757, 'Primary Anchor Push', 'enabled'),
(27758, 'Secondary Anchor Push', 'enabled'),
(27779, 'Primary Anchor Ring', 'enabled'),
(27780, 'Zephyr: Primary Anchor', 'enabled'),
(27781, 'Primary Anchor Circle', 'enabled'),
(27782, 'Secondary Anchor Ring', 'enabled'),
(27783, 'Zephyr: Secondary Anchor', 'enabled'),
(27784, 'Secondary Anchor Circle', 'enabled'),
(31991, 'Heroic Leap', 'enabled'),
(33099, 'Teleport Guild Hall Anchor', 'enabled'),
(38001, 'Heroic Leap', 'enabled'),
(41188, 'Teleport Guild Hall Anchor', 'enabled');
COMMIT;

here is the contents of my spell buckets table

Kinglykrab commented 2 years ago

Should be resolved here: https://github.com/EQEmu/Server/pull/2043