Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: segfault about badwords  (Read 3821 times)

0 Members and 1 Guest are viewing this topic.

guigui

  • Guest
segfault about badwords
« on: December 03, 2006, 04:24:40 PM »

Hi,

I have got a segfault while upgrading from anope 1.7.15 to 1.7.17 (I have correctly modified the structure regarding to Changes.mysql). I checked with gdb, and that's what I see:

run -debug -nofork
[...]
Dec 03 17:03:56.199989 2006] debug: MySQL: SELECT `ttb_id`, `value` FROM `anope_cs_ttb` WHERE `channel` = '#megalopeople'
[Dec 03 17:03:56.200453 2006] debug: MySQL: SELECT `word`,`type` FROM `anope_cs_badwords` WHERE `channel` = '#megalopeople'

Program received signal SIGSEGV, Segmentation fault.
db_mysql_load_cs_dbase () at mysql.c:1372
1372                        ci->badwords[j].word = sstrdup(row[0]);
(gdb) bt
#0  db_mysql_load_cs_dbase () at mysql.c:1372
#1  0x08088017 in rdb_load_dbases () at rdb.c:478
#2  0x0806c44e in init_secondary (ac=139805552, av=0x8554370) at init.c:631
#3  0x080708ff in main (ac=3, av=0xbffffb84, envp=0xbffffb94) at main.c:567
(gdb)

I had a look to badwords of this channel in mysql table, and saw there is no record for the first SELECT query on anope_cs_ttb, and 55 records for select query on anope_cs_badwords (my badwords limit in services.conf is configured for 64 max badwords).

I tried to delete badwords with spaces, numbers, "*" or "éàè..", without success, but when there is only 20 records, the gdb log goes to another channel having more than 20 records.

Could you help me solve this problem ? Do you need something more ?

Thank you by advance.
Regards.
Logged

heinz

  • Guest
(No subject)
« Reply #1 on: December 03, 2006, 04:28:20 PM »

Did you say you've edited the MySQL data manually, and now this issue has happened? Or it happened, then you altered the data?
Logged

guigui

  • Guest
(No subject)
« Reply #2 on: December 03, 2006, 04:31:08 PM »

No, issue happened before editing MySQL data manually, then, after gdb, I tried (of course I have got backups) to modify data to try to find what's going wrong.
Logged

heinz

  • Guest
(No subject)
« Reply #3 on: December 03, 2006, 04:34:02 PM »

Well, the Anope implementation of MySQL does not rely on 'COUNT(*)' statements to find out how many items there are in a table, it uses a field in the main table for that item.

For example, badwords in this case, there's a bwcount field in anope_ci_info which contains the number of badwords records. This should match the number of items in the badwords table for each channel.

At a guess, it's probably something like the bwcount number is lower than the number of records in the badwords table.
Logged

guigui

  • Guest
(No subject)
« Reply #4 on: December 03, 2006, 04:46:14 PM »

Ok, I had a look, and I saw 55 records in the badwords table regarding the #megalopeople channel, and in anope_cs_info, I saw 64 for the bwcount column of the same channel, so it is not lower, but higher. I tried to modify bwcount to 55, but nothing changed, same gdb log, same bt...
Logged

guigui

  • Guest
(No subject)
« Reply #5 on: December 03, 2006, 05:02:50 PM »

Note: I can fall back to 1.7.15, who stated without any problem, even if bwcount is wrong compared to anope_cs_badwords table...
Logged

heinz

  • Guest
(No subject)
« Reply #6 on: December 03, 2006, 05:14:45 PM »

Add it to http://bugs.anope.org and either myself, or another Anope team member will take a look when we get a chance.
Logged
Pages: [1]   Go Up