View Issue Details

IDProjectCategoryView StatusLast Update
0001337Anope Development (1.9.x series)Chanservpublic2011-10-11 06:11
ReporterCereaL Assigned ToAdam  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Summary0001337: Services crash on add/del user
DescriptionUser has nick DX
If he adds or deletes a user from any channel .. services crash


[Oct 09 16:03:09.102806 2011] Debug: Received: :DX ! ChanServ :QOP #sekret ADD Enigma78
Segmentation fault (core dumped)


Steps To Reproduceadd or delete a user from any channel

Additional Informationservices also appeared to crash after another user with a different nick tried to do a qop add ... this user was a founder. not sure if it was a founder related issue or not.
TagsNo tags attached.

Activities

Adam

2011-10-11 06:11

administrator   ~0005967

Fixed in f3f6727cdddf0a7e1e01311f9641a081885957d9

CereaL

2011-10-10 20:36

reporter   ~0005966

weird .. coz it was also affecting other users who aren't nick linked ..

it also affected other levels like SOP as well

CuleX

2011-10-10 19:29

reporter   ~0005965

Uploaded a backtrace from my own reproduction of the bug (bt_qop_crash).

It appears that it happens when a user on the QOP list tries to manipulate the QOP list himself/herself.

CuleX

2011-10-10 19:28

reporter  

bt_qop_crash (16,749 bytes)   
[Oct 10 19:13:38.709582 2011] Debug: Received: :42XAAAAAA NICK DX :1318266818
[Oct 10 19:13:38.709768 2011] USERS: culex!culex@localhost (unknown) changed nick to DX
[Oct 10 19:13:38.709991 2011] Debug: Sent: :5RVAAAAAF NOTICE DX :This nickname is registered and protected.  If it is your
[Oct 10 19:13:38.710080 2011] Debug: Sent: :5RVAAAAAF NOTICE DX :nick, type /msg NickServ IDENTIFY password.  Otherwise,
[Oct 10 19:13:38.710155 2011] Debug: Sent: :5RVAAAAAF NOTICE DX :please choose a different nick.
[Oct 10 19:13:38.710378 2011] Debug: Sent: :5RVAAAAAF ENCAP * SVSMODE 42XAAAAAA 1318266818 -r
[Oct 10 19:13:40.173334 2011] Debug: Received: :DX PRIVMSG NickServ@services.invalid :id a
[Oct 10 19:13:40.173775 2011] COMMAND: DX!culex@localhost used identify to log out of account CuleX
[Oct 10 19:13:40.173835 2011] COMMAND: DX!culex@localhost used identify and identified for account DX
[Oct 10 19:13:40.173977 2011] Debug: Sent: :5RVAAAAAF NOTICE DX :Password accepted - you are now recognized.
[Oct 10 19:13:40.174113 2011] Debug: Sent: :5RV ENCAP * SU 42XAAAAAA DX
[Oct 10 19:13:40.174236 2011] Debug: Setting correct user modes for DX on #services (giving modes)
[Oct 10 19:13:40.174562 2011] Debug: Sent: :5RVAAAAAF ENCAP * SVSMODE 42XAAAAAA 1318266818 +r
[Oct 10 19:13:49.603940 2011] Debug: Received: :DX PRIVMSG ChanServ@services.invalid :qop #sekret add culex
[Oct 10 19:13:49.604449 2011] COMMAND: DX!culex@localhost used qop on #sekret ADD culex
[Oct 10 19:13:49.604635 2011] Debug: Sent: :5RVAAAAAB NOTICE DX :culex added to #sekret QOP list.
[Oct 10 19:13:51.587509 2011] Debug: Received: :42XAAAAAA NICK culex :1318266831
[Oct 10 19:13:51.587747 2011] USERS: DX!culex@localhost (unknown) changed nick to culex
[Oct 10 19:13:51.588039 2011] Debug: Sent: :5RVAAAAAF NOTICE culex :This nickname is registered and protected.  If it is your
[Oct 10 19:13:51.588169 2011] Debug: Sent: :5RVAAAAAF NOTICE culex :nick, type /msg NickServ IDENTIFY password.  Otherwise,
[Oct 10 19:13:51.588270 2011] Debug: Sent: :5RVAAAAAF NOTICE culex :please choose a different nick.
[Oct 10 19:13:51.588606 2011] Debug: Sent: :5RVAAAAAF ENCAP * SVSMODE 42XAAAAAA 1318266831 -r
[Oct 10 19:13:54.155503 2011] Debug: Received: :culex PRIVMSG NickServ@services.invalid :id a
[Oct 10 19:13:54.155880 2011] COMMAND: culex!culex@localhost used identify to log out of account DX
[Oct 10 19:13:54.155937 2011] COMMAND: culex!culex@localhost used identify and identified for account CuleX
[Oct 10 19:13:54.156075 2011] Debug: Sent: :5RVAAAAAF NOTICE culex :Password accepted - you are now recognized.
[Oct 10 19:13:54.156195 2011] Debug: Sent: :5RV ENCAP * SU 42XAAAAAA CuleX
[Oct 10 19:13:54.156280 2011] Debug: Sent: :5RV ENCAP * CHGHOST culex localghost
[Oct 10 19:13:54.156429 2011] Debug: Sent: :5RVAAAAAD NOTICE culex :Your vhost of localghost is now activated.
[Oct 10 19:13:54.156522 2011] Debug: Setting correct user modes for culex on #services (giving modes)
[Oct 10 19:13:54.156918 2011] Debug: Sent: :5RVAAAAAG NOTICE culex :Changing your usermodes to +N
[Oct 10 19:13:54.157245 2011] Debug: Sent: :5RVAAAAAF ENCAP * SVSMODE 42XAAAAAA 1318266831 +r
[Oct 10 19:14:01.034281 2011] Debug: Received: :culex PRIVMSG ChanServ@services.invalid :qop #sekret add enigma78

Program received signal SIGSEGV, Segmentation fault.
0xb7f4ac36 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const () from /usr/lib/libstdc++.so.6
(gdb) bt full
#0  0xb7f4ac36 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const ()
   from /usr/lib/libstdc++.so.6
No symbol table info available.
#1  0x081269b3 in std::operator==<char> (__lhs=..., __rhs=...)
    at /usr/lib/gcc/i686-pc-linux-gnu/4.6.1/../../../../include/c++/4.6.1/bits/basic_string.h:2438
No locals.
#2  0x08126566 in Anope::string::operator== (this=0xb73a45a8, _str=...) at /home/culex/misc/src/anope-1.9/include/anope.h:80
No locals.
#3  0xb738c551 in XOPChanAccess::HasPriv (this=0x842f360, priv=...) at /home/culex/misc/src/anope-1.9/modules/commands/cs_xop.cpp:121
        j = 0
        x = @0xb73a45a0
        i = 0
#4  0x0812497c in AccessGroup::Highest (this=0xbffecb60) at /home/culex/misc/src/anope-1.9/src/access.cpp:166
        j = 1
        i = 36
        privs = @0x829a860
#5  0xb738da36 in XOPBase::DoAdd (this=0x8372e60, source=..., ci=0x84300b0, params=..., level=XOP_QOP)
    at /home/culex/misc/src/anope-1.9/modules/commands/cs_xop.cpp:351
        u = 0x8421810
        mask = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x8419094 "enigma78"}}, static npos = 4294967295}
        access = {<std::vector<ChanAccess*, std::allocator<ChanAccess*> >> = {<std::_Vector_base<ChanAccess*, std::allocator<ChanAcces
s*> >> = {
              _M_impl = {<std::allocator<ChanAccess*>> = {<__gnu_cxx::new_allocator<ChanAccess*>> = {<No data fields>}, <No data field
s>}, _M_start = 0x84305e8, _M_finish = 0x84305ec, _M_end_of_storage = 0x84305ec}}, <No data fields>}, ci = 0x84300b0, nc = 0x84194a0, 
          SuperAdmin = false, Founder = false}
        acc = 0xbffecda8
        override = false
        highest = 0xb73987ba
        u_level = -1073820257
        provider = {<dynamic_reference<AccessProvider>> = {<dynamic_reference_base> = {<Base> = {_vptr.Base = 0x842cbb0, 
                References = {_M_t = {
                    _M_impl = {<std::allocator<std::_Rb_tree_node<dynamic_reference_base*> >> = {<__gnu_cxx::new_allocator<std::_Rb_tr
ee_node<dynamic_reference_base*> >> = {<No data fields>}, <No data fields>}, 
                      _M_key_compare = {<std::binary_function<dynamic_reference_base*, dynamic_reference_base*, bool>> = {<No data fie
lds>}, <No data fields>}, _M_header = {_M_color = 138608264, _M_parent = 0x7, _M_left = 0x829be44, _M_right = 0xb6923298}, 
---Type <return> to continue, or q <return> to quit---
                      _M_node_count = 0}}}}, invalid = 207}, ref = 0x842cbb0}, name = {_string = {static npos = <optimized out>, 
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                _M_p = 0x842cee3 ""}}, static npos = 4294967295}}
#6  0xb738f7bc in XOPBase::DoXop (this=0x8372e60, source=..., params=..., level=XOP_QOP)
    at /home/culex/misc/src/anope-1.9/modules/commands/cs_xop.cpp:586
        ci = 0x84300b0
        cmd = @0x842fe44
#7  0xb738fbcf in CommandCSQOP::Execute (this=0x8372e60, source=..., params=...)
    at /home/culex/misc/src/anope-1.9/modules/commands/cs_xop.cpp:626
No locals.
#8  0x08137b03 in BotInfo::OnMessage (this=0x8303f00, u=0x8421810, message=...) at /home/culex/misc/src/anope-1.9/src/bots.cpp:297
        params = {<std::_Vector_base<Anope::string, std::allocator<Anope::string> >> = {
            _M_impl = {<std::allocator<Anope::string>> = {<__gnu_cxx::new_allocator<Anope::string>> = {<No data fields>}, <No data fie
lds>}, _M_start = 0x842fe40, _M_finish = 0x842fe4c, _M_end_of_storage = 0x842fe50}}, <No data fields>}
        has_help = true
        count = 4
        info = @0x83078d4
        c = {<dynamic_reference<Command>> = {<dynamic_reference_base> = {<Base> = {_vptr.Base = 0x82177a8, References = {_M_t = {
                    _M_impl = {<std::allocator<std::_Rb_tree_node<dynamic_reference_base*> >> = {<__gnu_cxx::new_allocator<std::_Rb_tr
ee_node<dynamic_reference_base*> >> = {<No data fields>}, <No data fields>}, 
                      _M_key_compare = {<std::binary_function<dynamic_reference_base*, dynamic_reference_base*, bool>> = {<No data fie
lds>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0xbffece54, _M_right = 0xbffece54}, 
                      _M_node_count = 0}}}}, invalid = false}, ref = 0x8372e60}, name = {_string = {static npos = <optimized out>, 
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                _M_p = 0x84055cc "chanserv/qop"}}, static npos = 4294967295}}
        MOD_RESULT = EVENT_CONTINUE
        it = {_M_node = 0x83078c0}
        source = {u = 0x8421810, c = 0x0, owner = 0x8303f00, service = 0x8303f00, command = {_string = {
              static npos = <optimized out>, 
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                _M_p = 0x830785c "QOP"}}, static npos = 4294967295}, permission = {_string = {static npos = <optimized out>, 
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                _M_p = 0xb7f9b9dc ""}}, static npos = 4294967295}}
        user_reference = {<dynamic_reference_base> = {<Base> = {_vptr.Base = 0x8217888, References = {_M_t = {
                  _M_impl = {<std::allocator<std::_Rb_tree_node<dynamic_reference_base*> >> = {<__gnu_cxx::new_allocator<std::_Rb_tree
_node<dynamic_reference_base*> >> = {<No data fields>}, <No data fields>}, 
                    _M_key_compare = {<std::binary_function<dynamic_reference_base*, dynamic_reference_base*, bool>> = {<No data field
---Type <return> to continue, or q <return> to quit---
s>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0xbffece7c, _M_right = 0xbffece7c}, 
                    _M_node_count = 0}}}}, invalid = false}, ref = 0x8421810}
#9  0x081dcfd8 in IRCdMessage::OnPrivmsg (this=0x82e4e68, source=..., params=...)
    at /home/culex/misc/src/anope-1.9/src/protocol.cpp:432
        MOD_RESULT = EVENT_CONTINUE
        botname = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x8430c3c "ChanServ"}}, static npos = 4294967295}
        s = 8
        bi = 0x8303f00
        receiver = @0xbffed46c
        message = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x8429c34 "qop #sekret add enigma78"}}, static npos = 4294967295}
        u = 0x8421810
#10 0x081a8ead in OnPrivmsg (source=..., params=...) at /home/culex/misc/src/anope-1.9/src/messages.cpp:132
No locals.
#11 0x081d9032 in process (buffer=...) at /home/culex/misc/src/anope-1.9/src/process.cpp:87
        m = 0x829ec18
        it = {_M_current = 0x84067b0}
        it_end = {_M_current = 0x84067b4}
        retVal = true
        buf = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x841945c "PRIVMSG ChanServ@services.invalid :qop #sekret add enigma78"}}, static npos = 4294967295}
        buf_token = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x8422354 ":qop"}}, static npos = 4294967295}
        command = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x842c8e4 "PRIVMSG"}}, static npos = 4294967295}
        params = {<std::_Vector_base<Anope::string, std::allocator<Anope::string> >> = {
            _M_impl = {<std::allocator<Anope::string>> = {<__gnu_cxx::new_allocator<Anope::string>> = {<No data fields>}, <No data fie
lds>}, _M_start = 0x84302d8, _M_finish = 0x84302e0, _M_end_of_storage = 0x84302e0}}, <No data fields>}
        messages = {<std::_Vector_base<Message*, std::allocator<Message*> >> = {
            _M_impl = {<std::allocator<Message*>> = {<__gnu_cxx::new_allocator<Message*>> = {<No data fields>}, <No data fields>}, 
              _M_start = 0x84067b0, _M_finish = 0x84067b4, _M_end_of_storage = 0x84067b4}}, <No data fields>}
---Type <return> to continue, or q <return> to quit---
        source = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x842e6f4 "culex"}}, static npos = 4294967295}
        buf_sep = {<sepstream> = {_vptr.sepstream = 0x8219658, tokens = {_string = {static npos = <optimized out>, 
                _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                  _M_p = 0x84222a4 "PRIVMSG ChanServ@services.invalid :qop #sekret add enigma78"}}, static npos = 4294967295}, 
            last_starting_position = {_M_current = 0x84222cb "#sekret add enigma78"}, n = {
              _M_current = 0x84222cb "#sekret add enigma78"}, sep = 32 ' '}, <No data fields>}
#12 0x0819e273 in UplinkSocket::Read (this=0x8408020, buf=...) at /home/culex/misc/src/anope-1.9/src/main.cpp:159
No locals.
#13 0x081fa519 in BufferedSocket::ProcessRead (this=0x8408040) at /home/culex/misc/src/anope-1.9/src/socket_transport.cpp:57
        len = 68
        sbuffer = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x841903c ":culex PRIVMSG ChanServ@services.invalid :qop #sekret add enigma78\r\n"}}, static npos = 4294967295}
        stream = {_vptr.sepstream = 0x821ff48, tokens = {_string = {static npos = <optimized out>, 
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
                _M_p = 0x8429bdc ":culex PRIVMSG ChanServ@services.invalid :qop #sekret add enigma78\r\n"}}, 
            static npos = 4294967295}, last_starting_position = {_M_current = 0x8429c20 ""}, n = {_M_current = 0x8429c20 ""}, 
          sep = 10 '\n'}
        tbuffer = ":culex PRIVMSG ChanServ@services.invalid :qop #sekret add enigma78\r\n\000\000ID culex 1 1318266754 +Naioqrwxy cule
x localghost 127.0.0.1 42XAAAAAA 0 localhost :unknown\r\n:hydra.invalid ENCAP * AUTHFLAGS culex"...
        lastnewline = 67
        tbuf = {_string = {static npos = <optimized out>, 
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
              _M_p = 0x842224c ":culex PRIVMSG ChanServ@services.invalid :qop #sekret add enigma78"}}, static npos = 4294967295}
#14 0x081ff3fb in SocketEngine::Process () at /home/culex/misc/src/anope-1.9/src/socketengines/socketengine_epoll.cpp:140
        ev = 0x830c890
        it = {_M_node = 0x8407630}
        s = 0x8408050
        i = 0
        total = 1
#15 0x0819f77b in main (ac=3, av=0xbffff7b4, envp=0xbffff7c4) at /home/culex/misc/src/anope-1.9/src/main.cpp:354
        return_code = 0
        cwd = "/home/culex/local/anope-1.9", '\000' <repeats 4068 times>
        n = 27
        last_check = 1318266839
---Type <return> to continue, or q <return> to quit---
        updateTimer = {<Timer> = {<Extensible> = {<Base> = {_vptr.Base = 0x82248f8, References = {_M_t = {
                    _M_impl = {<std::allocator<std::_Rb_tree_node<dynamic_reference_base*> >> = {<__gnu_cxx::new_allocator<std::_Rb_tr
ee_node<dynamic_reference_base*> >> = {<No data fields>}, <No data fields>}, 
                      _M_key_compare = {<std::binary_function<dynamic_reference_base*, dynamic_reference_base*, bool>> = {<No data fie
lds>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0xbffff0e4, _M_right = 0xbffff0e4}, 
                      _M_node_count = 0}}}}, 
              extension_items = {<std::map<Anope::string, ExtensibleItem*, std::less<Anope::string>, std::allocator<std::pair<Anope::s
tring const, ExtensibleItem*> > >> = {_M_t = {
                    _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<Anope::string const, ExtensibleItem*> > >> = {<__gnu_cxx::
new_allocator<std::_Rb_tree_node<std::pair<Anope::string const, ExtensibleItem*> > >> = {<No data fields>}, <No data fields>}, 
                      _M_key_compare = {<std::binary_function<Anope::string, Anope::string, bool>> = {<No data fields>}, <No data fiel
ds>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0xbffff0fc, _M_right = 0xbffff0fc}, 
                      _M_node_count = 0}}}, <No data fields>}}, settime = 1318266796, trigger = 1318267096, secs = 300, 
            repeat = true}, <No data fields>}
(gdb) 

bt_qop_crash (16,749 bytes)   

Adam

2011-10-10 18:52

administrator   ~0005964

Could you get a backtrace of this?

CereaL

2011-10-10 11:55

reporter   ~0005962

sorry .. version is

Anope-1.9.6-with-bacon-and-eggs (1) -- build 0000003, compiled 19:07:09 Sep 28 2011

Issue History

Date Modified Username Field Change
2011-10-09 23:30 CereaL New Issue
2011-10-10 11:55 CereaL Note Added: 0005962
2011-10-10 18:52 Adam Note Added: 0005964
2011-10-10 19:28 CuleX File Added: bt_qop_crash
2011-10-10 19:29 CuleX Note Added: 0005965
2011-10-10 20:36 CereaL Note Added: 0005966
2011-10-11 06:11 Adam Note Added: 0005967
2011-10-11 06:11 Adam Status new => resolved
2011-10-11 06:11 Adam Resolution open => fixed
2011-10-11 06:11 Adam Assigned To => Adam