Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: 1.9.1-exploder  (Read 7842 times)

0 Members and 1 Guest are viewing this topic.

Darth Panda

  • Anope User
  • Offline Offline
  • Posts: 33
    • Cheap Software
1.9.1-exploder
« on: August 04, 2009, 05:16:28 AM »

[dp@ircd1 ~/serv-test/data]$ gdb services services.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...services: No such file or directory.

Core was generated by `services'.
Program terminated with signal 11, Segmentation fault.
#0  0x282ebe45 in ?? ()
(gdb)

bt full

I get 1300+ of these
#1349 0x00000012 in ?? ()
No symbol table info available.

then:

Cannot access memory at address 0xbfc00000

Sig11 is a memory error that usually occurs when the program is trying to access a memory location that isn't assigned.

[dp@ircd1 ~/serv-test/bin]$ ./services -version
Anope-1.9.1-explodes-on-impact (0)   -- build #1, compiled Aug  3 2009 20:52:23

You people aren't kidding about exploding ;) I also get massive warnings with both make an gmake.

FreeBSD7.1 x86
gcc (GCC) 4.2.1 20070719  [FreeBSD]
GNU Make 3.81

Tail of log:

[Aug 03 21:05:00.172659 2009] debug: Loaded HostServ database (2/8)
[Aug 03 21:05:00.172704 2009] debug: BotServ database (3/8) not loaded because BotServ is disabled
[Aug 03 21:05:00.172816 2009] debug: Loaded ChanServ database (4/8)
[Aug 03 21:05:00.172878 2009] debug: Loaded OperServ database (5/8)
[Aug 03 21:05:00.172939 2009] debug: Loaded news database (6/8)
[Aug 03 21:05:00.172996 2009] debug: Loaded exception database (7/8)
[Aug 03 21:05:00.173085 2009] debug: Loaded PreNick database (8/8)
[Aug 03 21:05:00.173126 2009] Databases loaded
[Aug 03 21:05:00.173168 2009] Tied oper DarthPanda to type Services Root
[Aug 03 21:05:00.173214 2009] TS6 not supported on this ircd

Note: the id directive is commented.
« Last Edit: August 04, 2009, 05:26:27 AM by Darth Panda »
Logged
Some things just don't need to be fixed.
Less is usually more.
One meets his destiny often on the road he takes to avoid it.

Naram Qashat

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 192
    • CBX's Sprite Animations
Re: 1.9.1-exploder
« Reply #1 on: August 04, 2009, 05:50:09 AM »

I'm well aware of what a segmentation fault is.  However, that core file doesn't help much.  Did you make sure to compile Anope with debug turned on?  The warnings are normal, we're trying to get things working, not worrying about warnings at the moment.  Also, I wouldn't rely on a core file, I'd run Anope in gdb directly and then wait for it to crash, it should give a better backtrace then, provided it was built with debug symbols.

And I'd just like to point this out in your run of gdb:
services: No such file or directory.
Because you ran gdb from inside the data folder, not the bin folder.  So maybe even if you did build Anope with debug symbols, it can't find them because it can't find the executable.
Logged

Darth Panda

  • Anope User
  • Offline Offline
  • Posts: 33
    • Cheap Software
Re: 1.9.1-exploder
« Reply #2 on: August 04, 2009, 02:32:46 PM »

I wasn't explaining it simply for your benefit, there are other users here too you know.

I didn't notice the error about services so I'll re-run it from the bin directory. I'm used to the core and services being in the same directory so that was run out of habit, sorry.

Normal: Normal can be defined as what everyone else is and you are not. In that case these warnings are not normal. I compile applications on a daily basis and I don't "normally" get this many warnings. Not even on Anope 1.9, thus it's not normal. While I do agree that warnings can generally be safely ignored, there are far too many of them for me to do that. Your blind lack of concern seems to me to be a sign that you don't care. Perhaps there is a clue in the warnings that will help you "get things working". Warnings was not created just so you can ignore them. Just like when developers tell users that the documentation wasn't created so they can ignore them.

Run from within gdb:
Code: [Select]
[dp@ircd1 ~/serv-test/bin]$ gdb services
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) run -debug
Starting program: /usr/home/dp/serv-test/bin/services -debug

Program exited normally.
(gdb)


run gdb on core from bin dir:
Code: [Select]
[dp@ircd1 ~/serv-test/bin]$ gdb services ../data/services.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `services'.
Program terminated with signal 5, Trace/breakpoint trap.
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /usr/home/dp/serv-test/bin/../data/modules/runtime/unreal32.so.bqfpTe...done.
Loaded symbols for /usr/home/dp/serv-test/bin/../data/modules/runtime/unreal32.so.bqfpTe
Reading symbols from /usr/home/dp/serv-test/bin/../data/modules/runtime/enc_none.so.JAMCDN...done.
Loaded symbols for /usr/home/dp/serv-test/bin/../data/modules/runtime/enc_none.so.JAMCDN
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x280ecdf1 in r_debug_state () from /libexec/ld-elf.so.1
(gdb) bt full
#0  0x280ecdf1 in r_debug_state () from /libexec/ld-elf.so.1
No symbol table info available.
#1  0x28116d20 in ?? () from /libexec/ld-elf.so.1
No symbol table info available.
#2  0x00000000 in ?? ()
No symbol table info available.
#3  0x00000000 in ?? ()
No symbol table info available.
#4  0x00000000 in ?? ()
No symbol table info available.
#5  0x00000000 in ?? ()
No symbol table info available.
#6  0x00000000 in ?? ()
No symbol table info available.
#7  0xbfbfea50 in ?? ()
No symbol table info available.
#8  0x00000000 in ?? ()
No symbol table info available.
#9  0x00000000 in ?? ()
No symbol table info available.
#10 0xbfbfea50 in ?? ()
No symbol table info available.
#11 0x00000001 in ?? ()
No symbol table info available.
#12 0x00000002 in ?? ()
No symbol table info available.
#13 0xbfbfecfc in ?? ()
No symbol table info available.
#14 0x00000000 in ?? ()
No symbol table info available.
#15 0xbfbfeae8 in ?? ()
No symbol table info available.
#16 0x080db6d5 in ModuleManager::LoadModule (modname=@0xfc08500, u=0x17384) at modulemanager.cpp:176
        err = 0x9883 <Address 0x9883 out of bounds>
        func = (Module *(*)(const string &)) 0xc40c700
        ret = 1
        pbuf = {static npos = 4294967295,
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    _M_p = 0x28b0000 <Address 0x28b0000 out of bounds>}}
        handle = 0xc7240489
        nick = {static npos = 4294967295,
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    _M_p = 0x30938b <Address 0x30938b out of bounds>}}
        m = (Module *) 0x42444
(gdb)

Warnings:
Code: [Select]

Generating language.h... 1655 strings
chanserv.c: In function 'void get_chanserv_stats(long int*, long int*)':
chanserv.c:263: warning: comparison between signed and unsigned integer expressions
chanserv.c: In function 'void load_cs_dbase()':
chanserv.c:491: warning: comparison between signed and unsigned integer expressions
chanserv.c: In function 'void save_cs_dbase()':
chanserv.c:639: warning: comparison between signed and unsigned integer expressions
chanserv.c:671: warning: comparison between signed and unsigned integer expressions
chanserv.c: In function 'int delchan(ChannelInfo*)':
chanserv.c:1774: warning: comparison between signed and unsigned integer expressions

[...]

*** Building Core modules
ls: *.cpp: No such file or directory

[...]

ms_cancel.c:31: warning: declaration of 'name' shadows a member of 'this'
ms_del.c: In member function 'virtual CommandReturn CommandMSDel::Execute(User*, std::vector<std::basic_string<char, ci::ci_char_traits, std::allocator<char> >, std::allocator<std::basic_string<char, ci::ci_char_traits, std::allocator<char> > > >&)':
ms_del.c:108: warning: comparison between signed and unsigned integer expressions

[...]

*** Building protocol support
inspircd11.c: In member function 'virtual void InspIRCdProto::SetAutoIdentificationToken(User*)':
inspircd11.c:688: warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t'
ratbox.c: In member function 'virtual void RatboxProto::SetAutoIdentificationToken(User*)':
ratbox.c:693: warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t'
*** All done, now (g)make install to install Anope/Modules/Tools
ls: *.cpp: No such file or directory
Logged
Some things just don't need to be fixed.
Less is usually more.
One meets his destiny often on the road he takes to avoid it.

Robin Burchell

  • Team
  • *
  • Offline Offline
  • Posts: 11
Re: 1.9.1-exploder
« Reply #3 on: August 04, 2009, 02:42:46 PM »

I won't address anything else, because I don't have the time right now, but this I really have to point out.

Those warnings have been there _forever_.

They exist in 1.8, they exist in 1.6, and further back.

There were compiler flags specifically hiding them, so you never saw them to get worried about. With 1.9, that was turned off because it's a stupid idea, and extra cflags have been added to show _more_ warnings.

In our case, we fix warnings as we re-architect the area affected by them, not before. This means we rewrite the affected section totally, removing both the warning and probably a lot of shit that shouldn't have been there at the same time.

This doesn't mean that we don't care about it at all (and I'm a little sad that you had to suggest that), but that we care about fixing them properly.

If you'd like, I could get you a copy of 1.9 without warnings, but as you point out yourself, they are there for a reason.
Logged

Darth Panda

  • Anope User
  • Offline Offline
  • Posts: 33
    • Cheap Software
Re: 1.9.1-exploder
« Reply #4 on: August 04, 2009, 02:48:06 PM »

point taken about the warnings, robin.

When I said that you don't care, I was talking to that individual, not the team as a whole.

Hopefully, someone else can help with the segfault.

I added the -nofork switch to run -debug and got this:

Code: [Select]
[Aug 04 06:53:47.067720 2009] TS6 not supported on this ircd

Program received signal SIGSEGV, Segmentation fault.
0x282ebe45 in strcasecmp () from /lib/libc.so.7

I'm still a bit confused about why it's saying the IRCd doesn't support TS6 (which I know it doesn't), it makes me think that I accidentally uncommented id = and at first I thought that's why it wasn't starting. I spent a few minutes going back over the config file because of it. Then I tailed the log and here we are :)

Thanks.
« Last Edit: August 04, 2009, 02:59:50 PM by Darth Panda »
Logged
Some things just don't need to be fixed.
Less is usually more.
One meets his destiny often on the road he takes to avoid it.

Naram Qashat

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 192
    • CBX's Sprite Animations
Re: 1.9.1-exploder
« Reply #5 on: August 04, 2009, 04:59:39 PM »

I'm sorry that I brought up that first comment in my original reply.  Robin prodded me about it and yeah, I've been a bit more grouchy than I should be.  Again, sorry.

Anyways, it's not that I don't care that Anope throws a lot of warnings, personally I hate seeing them too.  But as Robin pointed out, they have always been there, just hidden by lack of compiler flags, and we do try to fix them.  You should've seen how many warnings were in 1.9 when we first moved over to C++ and doused the errors.

You backtrace from the core file does show a problem in the ModuleManager class, but it doesn't show much more past that.  When you run Anope in gdb using -nofork -debug, can you do a bt full there?  That should show exactly where the strcasecmp() line is that is failing.

As for the line about TS6, it's because certain parts of Anope call the TS6 functions regardless of the IRCd supporting it or not, that'll be changed in the future as I'm sure most people don't want to see those repeated line about it when it's not needed.
Logged

Darth Panda

  • Anope User
  • Offline Offline
  • Posts: 33
    • Cheap Software
Re: 1.9.1-exploder
« Reply #6 on: August 04, 2009, 05:28:24 PM »

no worries about the grouchiness, I was rather grouchy too. :)

Code: [Select]
[dp@ircd1 ~/serv-test/bin]$ gdb services
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) run -debug -debug -debug -debug
Starting program: /usr/home/db/serv-test/bin/services -debug -debug -debug -debug

Program exited normally.

Now with -nofork :

Code: [Select]
(gdb) run -debug -debug -debug -debug -nofork

[normal debug lvl4 stuff]

[Aug 04 09:20:50.752520 2009] debug: [hs_request] Set config vars: MemoUser=1 MemoOper=1 MemoSetters=1 DBName='hs_request.db'
[Aug 04 09:20:50.752680 2009] [hs_request] Unable to open database ('hs_request.db') for reading
[Aug 04 09:20:50.752742 2009] debug: hs_request Adding 21 texts for language 0
[Aug 04 09:20:50.752804 2009] debug: hs_request Adding 21 texts for language 12
[Aug 04 09:20:50.752864 2009] debug: hs_request Adding 21 texts for language 5
[Aug 04 09:20:50.752940 2009] debug: hs_request Adding 21 texts for language 13
[Aug 04 09:20:50.753012 2009] debug: hs_request Adding 21 texts for language 8
[Aug 04 09:20:50.753202 2009] debug: Sent: :services.localhost GLOBOPS :Write error on nick.db: No such file or directory
[Aug 04 09:20:50.753265 2009] debug: Loaded NickServ database (1/8)
[Aug 04 09:20:50.753334 2009] debug: Loaded HostServ database (2/8)
[Aug 04 09:20:50.753382 2009] debug: BotServ database (3/8) not loaded because BotServ is disabled
[Aug 04 09:20:50.753447 2009] debug: Loaded ChanServ database (4/8)
[Aug 04 09:20:50.753515 2009] debug: Loaded OperServ database (5/8)
[Aug 04 09:20:50.753576 2009] debug: Loaded news database (6/8)
[Aug 04 09:20:50.753638 2009] debug: Loaded exception database (7/8)
[Aug 04 09:20:50.753775 2009] debug: Loaded PreNick database (8/8)
[Aug 04 09:20:50.753822 2009] Databases loaded
[Aug 04 09:20:50.753877 2009] Oper nick DarthPanda is not registered
[Aug 04 09:20:50.753936 2009] TS6 not supported on this ircd

Program received signal SIGSEGV, Segmentation fault.
0x282ebe45 in strcasecmp () from /lib/libc.so.7
(gdb)

I do find it funny that services is sending globops before it even loads it's DB's let alone waiting for EOB.

Now for the backtrace:

Code: [Select]
(gdb) bt full
#0  0x282ebe45 in strcasecmp () from /lib/libc.so.7
No symbol table info available.
#1  0x08073ced in BotInfo (this=0x287d2900, nnick=0x284103b0 "OperServ", nuser=0x284102b0 "services",
    nhost=0x284102c0 "localhost.org", nreal=0x2841dba0 "Operator Service") at bots.cpp:58
No locals.
#2  0x080afb21 in init_secondary (ac=6, av=0xbfbfecc4) at init.c:594
        i = -1077941024
        started_from_term = 1
        bi = (BotInfo *) 0x0
        curr_uplink = {_M_node = 0xbfbfec08}
        end_uplink = {_M_node = 0x1}
        servernum = 672056425
#3  0x080b3d07 in main (ac=6, av=0xbfbfecc4, envp=0xbfbfece0) at main.c:407
        last_update = -1077940896
        last_expire = 674426304
        last_check = -1077941128
        last_DefCon = 134810714
        i = 0
        progname = 0xbfbfedc9 "services"
(gdb)
Logged
Some things just don't need to be fixed.
Less is usually more.
One meets his destiny often on the road he takes to avoid it.

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: 1.9.1-exploder
« Reply #7 on: August 04, 2009, 05:38:05 PM »

Thanks, should be fixed in r2405
Logged

Darth Panda

  • Anope User
  • Offline Offline
  • Posts: 33
    • Cheap Software
Re: 1.9.1-exploder
« Reply #8 on: August 04, 2009, 05:45:22 PM »

would you mind elaborating the issue please?
Logged
Some things just don't need to be fixed.
Less is usually more.
One meets his destiny often on the road he takes to avoid it.

Naram Qashat

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 192
    • CBX's Sprite Animations
Re: 1.9.1-exploder
« Reply #9 on: August 04, 2009, 05:50:41 PM »

In short, the BotInfo constructors were comparing the nick given to BotServ but checking if HostServ was defined instead.  Which would lead to the segfault if BotServ wasn't defined.
Logged

Darth Panda

  • Anope User
  • Offline Offline
  • Posts: 33
    • Cheap Software
Re: 1.9.1-exploder
« Reply #10 on: August 04, 2009, 05:58:50 PM »

and since I don't use BotServ ...  ;D

Thanks again.
Logged
Some things just don't need to be fixed.
Less is usually more.
One meets his destiny often on the road he takes to avoid it.

Darth Panda

  • Anope User
  • Offline Offline
  • Posts: 33
    • Cheap Software
Re: 1.9.1-exploder
« Reply #11 on: August 04, 2009, 08:15:06 PM »

I think we are going to has sooo much fun today! :)

http://bugs.anope.org/show_bug.cgi?id=1091
Logged
Some things just don't need to be fixed.
Less is usually more.
One meets his destiny often on the road he takes to avoid it.

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: 1.9.1-exploder
« Reply #12 on: August 05, 2009, 10:40:29 AM »

r2407
Logged
Pages: [1]   Go Up