Anope Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001673Anope Stable (2.0.x series)[All Projects] Generalpublic2016-04-16 06:472016-04-16 22:58
ReporterDukePyrolator 
Assigned ToAdam 
PriorityhighSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0001673: crash on channel drop
Description[Apr 16 07:29:46.293104 2016] Debug: Received: :971 SNONOTICE J :Channel #test created by DukePyrolator!DukeP@jens.anope.org
[Apr 16 07:29:46.293158 2016] Debug: unknown message from server (:971 SNONOTICE J :Channel #test created by DukePyrolator!DukeP@jens.anope.org)
[Apr 16 07:29:46.293172 2016] Debug: Received: :971 FJOIN #test 1460784586 +nt o,971AAAAFM
[Apr 16 07:29:46.293212 2016] CHANNEL: create #test
[Apr 16 07:29:46.293300 2016] Debug: dev.anope.de is setting #test to +nt
[Apr 16 07:29:46.293320 2016] CHANNEL: DukePyrolator!DukeP@jens.anope.org join #test
[Apr 16 07:29:51.558094 2016] Debug: Received: :971AAAAFM PRIVMSG 00AAAAAAC :register #test test
[Apr 16 07:29:51.559212 2016] COMMAND: DukePyrolator!DukeP@jens.anope.org (DukePyrolator) used REGISTER on #test
[Apr 16 07:29:51.559275 2016] Debug: Sent: :00AAAAAAC NOTICE 971AAAAFM :Channel #test registered under your account: DukePyrolator
[Apr 16 07:29:51.559508 2016] Debug: Sent: :00A METADATA #test mlock :n
[Apr 16 07:29:51.559808 2016] Debug: Sent: :00A METADATA #test mlock :nt
[Apr 16 07:29:51.560184 2016] Debug: Setting correct user modes for DukePyrolator on #test (giving modes)
[Apr 16 07:29:51.560219 2016] Debug: Unknown privilege AUTOOFFICIAL-JOIN
[Apr 16 07:29:51.560243 2016] Debug: Setting +q on #test for DukePyrolator
[Apr 16 07:29:51.560661 2016] Debug: Sent: :00AAAAAAC FMODE #test 1460784586 +rq 971AAAAFM
[Apr 16 07:30:21.122643 2016] Debug: Received: :971AAAAFM PRIVMSG 00AAAAAAB :assign #test chanserv
[Apr 16 07:30:21.122775 2016] COMMAND: DukePyrolator!DukeP@jens.anope.org (DukePyrolator) used ASSIGN on #test for ChanServ
[Apr 16 07:30:21.122824 2016] CHANNEL: ChanServ!services@services.anope.de join #test
[Apr 16 07:30:21.122847 2016] Debug: Sent: :00A FJOIN #test 1460784586 +nrt :,00AAAAAAC
[Apr 16 07:30:21.122874 2016] Debug: Setting +a on #test for ChanServ
[Apr 16 07:30:21.122924 2016] Debug: Setting +o on #test for ChanServ
[Apr 16 07:30:21.123024 2016] Debug: Sent: :00AAAAAAB NOTICE 971AAAAFM :Bot ChanServ has been assigned to #test.
[Apr 16 07:30:21.123072 2016] Debug: Sent: :00AAAAAAC FMODE #test 1460784586 +ao 00AAAAAAC 00AAAAAAC
[Apr 16 07:30:35.534700 2016] Debug: Received: :971AAAAFM PRIVMSG 00AAAAAAC :set persist #test on
[Apr 16 07:30:35.535177 2016] COMMAND: DukePyrolator!DukeP@jens.anope.org (DukePyrolator) used SET PERSIST on #test to enable persist
[Apr 16 07:30:35.535240 2016] Debug: Sent: :00AAAAAAC NOTICE 971AAAAFM :Channel #test is now persistent.
[Apr 16 07:30:45.254133 2016] Debug: Received: :971 PING 971 00A
[Apr 16 07:30:45.254196 2016] Debug: Sent: :00A PONG 00A 971
[Apr 16 07:30:45.423006 2016] Debug: Received: :971AAAAFM PART #test
[Apr 16 07:30:45.423068 2016] CHANNEL: DukePyrolator!DukeP@jens.anope.org part #test Reason: No reason
[Apr 16 07:30:45.423098 2016] CHANNEL: DukePyrolator!DukeP@jens.anope.org leave #test
[Apr 16 07:30:53.729033 2016] Debug: Received: :971AAAAFM PRIVMSG 00AAAAAAC :drop #test #test
[Apr 16 07:30:53.729822 2016] COMMAND: DukePyrolator!DukeP@jens.anope.org (DukePyrolator) used DROP on #test (founder was: DukePyrolator)
[Apr 16 07:30:53.730000 2016] Debug: Sent: :00A METADATA #test mlock :
[Apr 16 07:30:53.730024 2016] Debug: Sent: :00A METADATA #test topiclock :
[Apr 16 07:30:53.731439 2016] Debug: Deleting channel #test
[Apr 16 07:30:53.731486 2016] Debug: Sent: :00AAAAAAC PART #test
[Apr 16 07:30:53.731500 2016] CHANNEL: ChanServ!services@services.anope.de leave #test
[Apr 16 07:30:53.732109 2016] Debug: Sent: :00AAAAAAC FMODE #test 1460784586 -r
[Apr 16 07:30:53.732130 2016] CHANNEL: destroy #test
[Apr 16 07:30:53.732219 2016] Debug: Sent: :00AAAAAAC NOTICE 971AAAAFM :Channel #test has been dropped.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000141 in ?? ()
(gdb) bt full
#0 0x0000000000000141 in ?? ()
No symbol table info available.
0000001 0x000000000051d99f in Channel::DeleteChannels () at /home/anope/anope/src/channels.cpp:953
        c = 0x9dba20
        i = 0
0000002 0x00000000005c36f8 in UplinkSocket::ProcessRead (this=0x96df20) at /home/anope/anope/src/uplink.cpp:138
        buf = {_string = ":971AAAAFM PRIVMSG 00AAAAAAC :drop #test #test", static npos = 18446744073709551615}
        b = true
0000003 0x00000000005bbd16 in SocketEngine::Process () at /home/anope/anope/src/socketengines/socketengine_epoll.cpp:112
        ev = @0xabc110: {events = 1, data = {ptr = 0xd, fd = 13, u32 = 13, u64 = 13}}
        it = {first = 13, second = }
        s = 0x96df68
        i = 0
        total = 1
0000004 0x000000000055398a in main (ac=3, av=0x7fffffffe688, envp=0x7fffffffe6a8) at /home/anope/anope/src/main.cpp:175
        n = 20
        last_check = 1460784650
        updateTimer = {<Timer> = {_vptr.Timer = 0x5dac10 <vtable for UpdateTimer+16>, owner = 0x0, settime = 1460784580, trigger = 1460784880, secs = 300,
            repeat = true}, <No data fields>}
        expireTimer = {<Timer> = {_vptr.Timer = 0x5dabd0 <vtable for ExpireTimer+16>, owner = 0x0, settime = 1460784580, trigger = 1460784700, secs = 120,
            repeat = true}, <No data fields>}
(gdb)



Steps To Reproduce1. if on inspircd, make sure m_permchannels is not loaded
2. join and register a new #channel
3. assign a botserv bot to #channel
4. set persist #channel on
5. part #channel
6. drop #channel
Additional InformationI think the error is in
https://github.com/anope/anope/blob/2.0/modules/commands/cs_drop.cpp#L65 [^]

we save a pointer to the channel before we delete the channel.
the channel gets destroyed when the botserv bot parts the channel
and then we use the pointer to the now unassigned memory.

proposed solution:
 instead of saving the pointer to the channel, we can
    Channel *c = channel::Find(chan)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2016-04-16 06:47 DukePyrolator New Issue
2016-04-16 06:59 DukePyrolator Project Anope Development (1.9.x series) => Anope Stable (2.0.x series)
2016-04-16 06:59 DukePyrolator Category Chanserv => General
2016-04-16 22:58 Adam Status new => resolved
2016-04-16 22:58 Adam Resolution open => fixed
2016-04-16 22:58 Adam Assigned To => Adam


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker