{"action":"created","issue":{"url":"https://api.github.com/repos/rathena/rathena/issues/3402","repository_url":"https://api.github.com/repos/rathena/rathena","labels_url":"https://api.github.com/repos/rathena/rathena/issues/3402/labels{/name}","comments_url":"https://api.github.com/repos/rathena/rathena/issues/3402/comments","events_url":"https://api.github.com/repos/rathena/rathena/issues/3402/events","html_url":"https://github.com/rathena/rathena/issues/3402","id":349821711,"node_id":"MDU6SXNzdWUzNDk4MjE3MTE=","number":3402,"title":"Mapserver Crash on Room of Consciousness instance","user":{"login":"uddevil","id":10105610,"node_id":"MDQ6VXNlcjEwMTA1NjEw","avatar_url":"https://avatars2.githubusercontent.com/u/10105610?v=4","gravatar_id":"","url":"https://api.github.com/users/uddevil","html_url":"https://github.com/uddevil","followers_url":"https://api.github.com/users/uddevil/followers","following_url":"https://api.github.com/users/uddevil/following{/other_user}","gists_url":"https://api.github.com/users/uddevil/gists{/gist_id}","starred_url":"https://api.github.com/users/uddevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uddevil/subscriptions","organizations_url":"https://api.github.com/users/uddevil/orgs","repos_url":"https://api.github.com/users/uddevil/repos","events_url":"https://api.github.com/users/uddevil/events{/privacy}","received_events_url":"https://api.github.com/users/uddevil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-12T15:37:16Z","updated_at":"2018-08-20T13:27:06Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"* **rAthena Hash**: 9ca000a4a751bad8b5e576ea67cd73740ef81442\r\n* **Client Date**: 2015-11-04\r\n* **Server Mode**: Renewal\r\n* **Description of Issue**: \r\n  * Result:\r\n    Mapserver crashed (suspected to be related with Room of Consciousness instance [https://irowiki.org/wiki/Room_of_Consciousness](https://irowiki.org/wiki/Room_of_Consciousness) \r\n  * How to Reproduce: \r\n    This is the problem, to this point i cannot 100% reproduce the crash, but it always related with the Room of Consciousness instance above. Its highliy suspected that instance timer expired is the problem, combined with multiple people using the instance.\r\n  * Official Information: none.\r\n\r\n* **Modifications that may affect results**: \r\n   I don't know if its relevant, but this is what i'm guessing,\r\n   1. Few days ago, after updating to 584fcac43a13381d74374cf8835b2d2b077913b6 all of my instance somehow messed up with my custom maps\r\n   2. The solution i'm using is to rebuild my mapcache using weemapcache, and increasing start index in `db/import/map_index.txt` to 2000\r\n   3. I also increased `#define MAX_MAPINDEX` on `src/common/mapindex.hpp` to 10000\r\n   4. It worked well (i think), until 9ca000a4a751bad8b5e576ea67cd73740ef81442 , and i'm guessing that its related to 48ae1a1e05db440263ac2a4fe0d887d1528151f3 but i'm not sure.\r\n   5. Now every now and then there's error related to Room of Consciousness instance \r\n   6. Its hard for me to track the problem because i have no problem on my test server (windows 7 x64), while on my live server (debian) it crashes so often.\r\n   7. Here's the coredump data\r\n```\r\n#0  std::_Hashtable<short, std::pair<short const, int>, std::allocator<std::pair<short const, int> >, std::__detail::_Select1st, std::equal_to<short>, std::hash<short>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node (this=this@entry=0x559b0e538be8 <map+5634120>, __n=__n@entry=3, __k=@0x7ffce1709eee: 26, __k@entry=@0x0: <optimized out>, __code=<optimized out>)\r\n    at /usr/include/c++/6/bits/hashtable.h:1417\r\n        __p = <optimized out>\r\n        __prev_p = 0x21\r\n#1  0x0000559b0db8ae28 in std::_Hashtable<short, std::pair<short const, int>, std::allocator<std::pair<short const, int> >, std::__detail::_Select1st, std::equal_to<short>, std::hash<short>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_node (__c=<optimized out>, __key=<optimized out>, __bkt=<optimized out>, this=this@entry=0x559b0e538be8 <map+5634120>)\r\n    at /usr/include/c++/6/bits/hashtable.h:634\r\n        __before_n = <optimized out>\r\n#2  std::_Hashtable<short, std::pair<short const, int>, std::allocator<std::pair<short const, int> >, std::__detail::_Select1st, std::equal_to<short>, std::hash<short>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::find (this=this@entry=0x559b0e538be8 <map+5634120>, __k=<optimized out>) at /usr/include/c++/6/bits/hashtable.h:1294\r\n        __code = <optimized out>\r\n        __n = <optimized out>\r\n        __p = <optimized out>\r\n#3  0x0000559b0db887e9 in std::unordered_map<short, int, std::hash<short>, std::equal_to<short>, std::allocator<std::pair<short const, int> > >::find (\r\n    __x=<optimized out>, this=<optimized out>) at /usr/include/c++/6/bits/unordered_map.h:851\r\nNo locals.\r\n#4  rathena::util::umap_get<short, int> (defaultValue=<optimized out>, key=<optimized out>, map=...) at ../common/utilities.hpp:85\r\nNo locals.\r\n#5  map_getmapflag_sub (m=m@entry=1048, mapflag=mapflag@entry=MF_GVG_CASTLE, args=args@entry=0x0) at map.cpp:4508\r\n        mapdata = 0x559b0e538ba0 <map+5634048>\r\n        __FUNCTION__ = \"map_getmapflag_sub\"\r\n#6  0x0000559b0dbcc9c7 in pc_setpos (sd=sd@entry=0x559b183014a0, mapindex=<optimized out>, x=x@entry=101, y=y@entry=10, clrtype=clrtype@entry=CLR_OUTSIGHT)\r\n    at pc.cpp:5660\r\n        m = <optimized out>\r\n        mapdata = 0x559b0e538ba0 <map+5634048>\r\n        clrtype = <optimized out>\r\n        y = 10\r\n        mapindex = <optimized out>\r\n        x = 101\r\n        sd = 0x559b183014a0\r\n#7  0x0000559b0db6a55f in instance_enter (sd=0x559b183014a0, instance_id=instance_id@entry=1, name=0x7f0b216ea390 \"Room of Consciousness\", x=x@entry=-1, y=y@entry=-1)\r\n    at instance.cpp:803\r\n        m = <optimized out>\r\n        mode = <optimized out>\r\n        y = 10\r\n        instance_id = 1\r\n        x = 101\r\n\t\tname = 0x7f0b216ea390 \"Room of Consciousness\"\r\n        sd = 0x559b183014a0\r\n#8  0x0000559b0dc3b751 in buildin_instance_enter (st=0x7f0b2c66610c) at script.cpp:19681\r\n        sd = 0x559b183014a0\r\n        x = -1\r\n        y = -1\r\n        instance_id = 1\r\n        __FUNCTION__ = \"buildin_instance_enter\"\r\n#9  0x0000559b0dc0c4cc in run_func (st=st@entry=0x7f0b2c66610c) at script.cpp:3995\r\n        data = <optimized out>\r\n        i = <optimized out>\r\n        start_sp = <optimized out>\r\n        end_sp = <optimized out>\r\n        func = 494\r\n#10 0x0000559b0dc10dc0 in run_script_main (st=0x7f0b2c66610c) at script.cpp:4270\r\n        cmdcount = 655324\r\n        gotocount = 2046\r\n        sd = <optimized out>\r\n        stack = 0x7f0b205a6c14\r\n#11 0x0000559b0dba1309 in npc_scriptcont (sd=0x559b183014a0, id=110013750, closing=false) at npc.cpp:1366\r\n        target = 0x7f0b212fe2cc\r\n        __FUNCTION__ = \"npc_scriptcont\"\r\n#12 0x0000559b0db27c84 in clif_parse (fd=<optimized out>) at clif.cpp:20627\r\n        cmd = <optimized out>\r\n        packet_len = 7\r\n        sd = <optimized out>\r\n        pnum = 0\r\n        cmd2 = -512712352\r\n#13 0x0000559b0dac5c65 in do_sockets (next=<optimized out>) at socket.cpp:917\r\n        rfd = {fds_bits = {8192, 0 <repeats 15 times>}}\r\n        timeout = {tv_sec = 0, tv_usec = 16603}\r\n        ret = 0\r\n        i = 13\r\n#14 main (argc=<optimized out>, argv=<optimized out>) at core.cpp:368\r\nNo locals.\r\n```\r\n\r\n* **Extra Information**: \r\n   - I don't know if its relevant, but i'm using VS 2015 Community Edition on my test server, windows 7 x64\r\n   - And my live server is using GCC 6.3.0 on debian 9 x64\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rathena/rathena/issues/comments/414315963","html_url":"https://github.com/rathena/rathena/issues/3402#issuecomment-414315963","issue_url":"https://api.github.com/repos/rathena/rathena/issues/3402","id":414315963,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDMxNTk2Mw==","user":{"login":"uddevil","id":10105610,"node_id":"MDQ6VXNlcjEwMTA1NjEw","avatar_url":"https://avatars2.githubusercontent.com/u/10105610?v=4","gravatar_id":"","url":"https://api.github.com/users/uddevil","html_url":"https://github.com/uddevil","followers_url":"https://api.github.com/users/uddevil/followers","following_url":"https://api.github.com/users/uddevil/following{/other_user}","gists_url":"https://api.github.com/users/uddevil/gists{/gist_id}","starred_url":"https://api.github.com/users/uddevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uddevil/subscriptions","organizations_url":"https://api.github.com/users/uddevil/orgs","repos_url":"https://api.github.com/users/uddevil/repos","events_url":"https://api.github.com/users/uddevil/events{/privacy}","received_events_url":"https://api.github.com/users/uddevil/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T13:27:06Z","updated_at":"2018-08-20T13:27:06Z","author_association":"CONTRIBUTOR","body":"Update :\r\n\r\nHere's how i 100% reproduce the error on my linux server\r\n1. generate and enter Room of Consciousness instance\r\n2. finish it ( i finish it under 5 minutes with godly GM character )\r\n3. visit *Friedrich S. Heine* ( prt_cas_q 21 83 )\r\n4. receive Honor Token\r\n5. use `@go prontera`\r\n6. wait till instance expired\r\n7. Immediately change my character (same account)\r\n8. generate a new Room of Consciousness instance\r\n9. segfault happens when i enter the instance (not when i generate it)\r\n\r\nI have tried the steps above twice, and both of them produce segfault error.\r\n\r\nThis is my environment :\r\n```\r\nDistributor ID: Debian\r\nDescription:    Debian GNU/Linux 9.5 (stretch)\r\nRelease:        9.5\r\nCodename:       stretch\r\n```\r\n\r\nTried compiling with 2 version gcc and g++\r\n```\r\ngcc (Debian 7.3.0-28) 7.3.0\r\ng++ (Debian 7.3.0-28) 7.3.0\r\n```\r\nAnd\r\n```\r\ngcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516\r\ng++-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516\r\n```\r\n\r\nI'm still curious why there's no error on windows environment (with vs2015)"}}
{"actor":{"display_login":"uddevil"}}