Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: 1.7.14 crash everytime a channel is being registered  (Read 10708 times)

0 Members and 1 Guest are viewing this topic.

Feel

  • Guest
1.7.14 crash everytime a channel is being registered
« on: July 01, 2006, 11:39:40 PM »

Here is the debug :
[Jul 02 00:28:42.109251 2006] PANIC! buffer = :FeelGood PRIVMSG ChanServ@services.netrusk.net :register #evilisevil ttt ttt
[Jul 02 00:28:42.109884 2006] debug: Sent: :services.netrusk.net OPERWALL :PANIC! buffer = :FeelGood PRIVMSG ChanServ@services.netrusk.net :register #evilisevil ttt ttt^M

[Jul 02 00:28:42.110321 2006] Backtrace: Segmentation fault detected
[Jul 02 00:28:42.110506 2006] Backtrace: report the following lines
[Jul 02 00:28:42.110681 2006] Backtrace: Anope version 1.7.14 (1023) build #1, compiled Jun 30 2006 12:09:47  TQM
[Jul 02 00:28:42.125706 2006] Backtrace(1): ./services(sighandler+0x16c) [0x806f68c]
[Jul 02 00:28:42.125921 2006] Backtrace(2): [0xffffe420]
[Jul 02 00:28:42.126105 2006] Backtrace(3): ./services(destroyModule+0x29) [0x80739a9]
[Jul 02 00:28:42.126288 2006] Backtrace(4): ./services(delModule+0x86) [0x8073b66]
[Jul 02 00:28:42.126640 2006] Backtrace(5): ./services(modules_unload_all+0xbc) [0x80738cc]
[Jul 02 00:28:42.126860 2006] Backtrace(6): ./services(sighandler+0x218) [0x806f738]
[Jul 02 00:28:42.127139 2006] Backtrace(7): [0xffffe420]
[Jul 02 00:28:42.127328 2006] Backtrace(8): ./services(destroyModule+0x29) [0x80739a9]
[Jul 02 00:28:42.127511 2006] Backtrace(9): ./services(delModule+0x86) [0x8073b66]
[Jul 02 00:28:42.127698 2006] Backtrace: complete
[Jul 02 00:28:42.127903 2006] debug: Emitting event "signal" (1 args)
[Jul 02 00:28:42.128097 2006] debug: Emitting event "shutdown" (1 args)
[Jul 02 00:28:42.128289 2006] Services terminating: Segmentation fault
[Jul 02 00:28:42.156486 2006] debug: Sent: SQUIT services.netrusk.net :Services terminating: Segmentation fault


I can't find the source of the segfault.
Please help.
linux 2.6.15
gcc3.3
modified hybrid (svsnick, svshost, etc)
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
(No subject)
« Reply #1 on: July 02, 2006, 08:46:07 AM »

Are you running any modules? (Output of /msg operserv modlist)
Logged

Feel

  • Guest
(No subject)
« Reply #2 on: July 02, 2006, 09:28:42 AM »

Oh, sorry, I haven't said that, it's the first thing that I've tryed : to remove all modules :

[10:27:19] [NOTICE OperServ]: Liste des modules courant:
[10:27:19] [NOTICE OperServ]: Module: hybrid [$Id: hybrid.c 915 2005-10-21 14:30:01Z geniusdex $] [Protocol]
[10:27:19] [NOTICE OperServ]: 1 Modules changés.
Logged

Dave Robson

  • Team
  • *
  • Offline Offline
  • Posts: 357
(No subject)
« Reply #3 on: July 02, 2006, 09:38:21 AM »

Are you using an amd 64 bit machine?

and can you possibly get us a backtrace, on the shell type:

gdb ./services

wait for the (gdb) thing to load up then do:

run -nofork

Then when services crash, type:

bt
Logged

Feel

  • Guest
(No subject)
« Reply #4 on: July 02, 2006, 10:03:21 AM »

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211017536 (LWP 21701)]
0x00000000 in ?? ()
(gdb)
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x0806c5b2 in anope_valid_chan (chan=0xbfb4fc80 "#evilisevil") at ircd.c:602
#2  0xb7cb4057 in do_register (u=0x8529a10) at cs_register.c:98
#3  0x080643e0 in do_run_cmd (service=0x80d5d18 "ChanServ", u=0x8529a10, c=0x8337658, cmd=0xbfb4fc77 "register")
    at commands.c:100
#4  0x0805c7ee in chanserv (u=0x8529a10, buf=0xbfb4fc80 "#evilisevil") at chanserv.c:414
#5  0x0807119b in m_privmsg (source=0xbfb4fe90 "FeelGood", receiver=0xbfb4fc58 "ChanServ", msg=0xbfb4fc77 "register")
    at messages.c:186
#6  0xb7d0f54e in anope_event_privmsg (source=0xbfb4fc80 "#evilisevil", ac=2, av=0xbfb4fc80) at hybrid.c:1068
#7  0x0807fc26 in process () at process.c:276
#8  0x0806fc78 in main (ac=1, av=0xbfb4ffa4, envp=0xbfb4ffb0) at main.c:580


it's seems to be in hybrid.c.
As mine is modified, because our hybrid is modified, it's more than possible that the problem come fron that file.
Can I send you hybrid.c for some help ?
Logged

Feel

  • Guest
(No subject)
« Reply #5 on: July 02, 2006, 10:06:13 AM »

Nothing relevant in m_privmsg from hybrid.c :

int anope_event_privmsg(char *source, int ac, char **av)
{
        if (ac != 2)
                return MOD_CONT;
        m_privmsg(source, av[0], av[1]);
        return MOD_CONT;
}
Logged

Feel

  • Guest
(No subject)
« Reply #6 on: July 02, 2006, 10:09:00 AM »

How can I add breakpoints and run program step by step with gdb ?
I'm only familliar with graphical debugger (borland / windows).
Logged

Dave Robson

  • Team
  • *
  • Offline Offline
  • Posts: 357
(No subject)
« Reply #7 on: July 02, 2006, 10:33:09 AM »

looking at that bt, it seems your hybrid.c is missing the is_valid_chan stuff, yeah you can send me the .c file and i can take a quick look

( to put break points, after you get the (gbd) prompt, do: break file_name.c:line_number )

then just s/n/c for step/next/continue
Logged

Feel

  • Guest
(No subject)
« Reply #8 on: July 02, 2006, 10:36:59 AM »

ok, excellent, I have a look in hybrid.c, if I can't find the bug i'll send you the file.
Thanks a lot.
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
(No subject)
« Reply #9 on: July 02, 2006, 10:40:05 AM »

Yay for a user who helps themselves :)
Logged

Feel

  • Guest
(No subject)
« Reply #10 on: July 02, 2006, 10:44:15 AM »

There is no is_valid_chan function in my hybrtid.c, but, I can only find such fonction in charibdis.c ()charybdis.c:    pmodule_valid_chan(charybdis_valid_chan);

Do I just have to sample this one in my hybrid.c or is it more complex ?
Logged

Feel

  • Guest
(No subject)
« Reply #11 on: July 02, 2006, 10:50:45 AM »

Hmmm, I've perhaps found problem origin.
Our modified hybrid.c came from 1.7.12...
I have to make a patch between .12 and .14 version then backport our modifications, I think. No ?
Logged

Dave Robson

  • Team
  • *
  • Offline Offline
  • Posts: 357
(No subject)
« Reply #12 on: July 02, 2006, 10:53:00 AM »

yeah if you have local patchs to anope's source, each time you update you will have to back-port the changes, if possible think about moving your changes out into a module, that should simplify things for you in the future.
Logged

Feel

  • Guest
(No subject)
« Reply #13 on: July 02, 2006, 11:13:23 AM »

It's OK crash solved, thanks a lot.
I have another little bug, but i'll made a new thread.
Logged

Dave Robson

  • Team
  • *
  • Offline Offline
  • Posts: 357
(No subject)
« Reply #14 on: July 02, 2006, 04:59:40 PM »

we have a bug tracker for actual bugs, http://bugs.anope.org - just for future refrence :)
Logged

Feel

  • Guest
(No subject)
« Reply #15 on: July 04, 2006, 07:21:24 AM »

Does it include custom  modules bugs ?
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
(No subject)
« Reply #16 on: July 04, 2006, 09:20:25 AM »

Not really no. If its a third party module, you'd be better taking it up with the author. We don't mind though if you use this forum (Modules Section) to air your own custom module bugs with the hope of getting some input from others.
Logged
Pages: [1]   Go Up