Closed Bug 955799 Opened 11 years ago Closed 11 years ago

Bug comment containing "DBD::mysql::db do failed: Incorrect key file for table" err msg causes bugz to believe mysql is reporting error

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

4.2.7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: kjohnstn, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131210132650

Steps to reproduce:

I think the problems all started after a power failure, I think my mysql bugs table was genuinely damaged. The next time I tried to edit a bug I got a "DBD::mysql::db do failed: Incorrect key file for table" error. To recreate the exact error message, remove all '>' characters from this garbled message:

>DBD::mys>ql::db d>o failed>: Incorr>ect key >file for> table '>./bugs/b>ugs_full>text.MYI>'; try t>o repair> it [for> Stateme>nt "UPDA>TE bugs_>fulltext> SET com>ments = >?, comme>nts_nopr>ivate = ?
>        >       W>HERE bug>_id = ?">] at Bug>zilla/Bu>g.pm line 1072.
>	Bugzill>a::Bug::>_sync_fu>lltext('>Bugzilla>::Bug=HA>SH(0x3ae>2aa0)') >called a>t Bugzil>la/Bug.p>m line 1019
>	Bugzill>a::Bug::>update('>Bugzilla>::Bug=HA>SH(0x3ae>2aa0)') >called a>t /usr/s>hare/bug>zilla/pr>ocess_bu>g.cgi line 373

Sorry for the garbled message, but allow me to explain.

I ran myisamchk --recover and it said all was fixed.

But not long after that I got the same error message again. I think it was after another power cycle, but (1) I'm not absolutely certain of the connection to the power cycle (there was some time lapse) and (2) that power cycle was a clean shutdown/reboot event.

I ran myisamchk --recover again, and again it said all was fixed. But I wasn't convinced, and I created a new bug to investigate further when I could, and I pasted the error message into the bug description.

When I submitted that bug description, bugz crashed again and gave the same "Incorrect key file for table" error.

I was beginning to think my db table was irreparably damaged, but the strange thing was myisamchk and mysqlcheck kept insisting they had fixed the problem and the table was fine, plus I could view, edit, and even create other bugs no problem. But if I edited the bug with the DBD::mysql::db error message in the bug text, bugz crashed every time.

It is as if bugz thinks the error msg in the bug description is an error *from* the db, and bugz panics.

That's why I don't want to put the raw error msg in this bug description.

Other details:
FC19
Bugzilla 4.2.7
Firefox 26.0


Actual results:

Every time I edit the bug with the (un-garbled) error message text above, bugz thinks the bug db is damaged. The problem is only on edit, I can view the bug with no problem.


Expected results:

The error message in the bug description is just text, it should be completely harmless, it is simply part of a bug description.
This has nothing to do with the content of comments. There is something wrong with your bugs_fulltext table (it's a MyISAM table). You should try deleting its content for your buggy bug and try again.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Just trying an experiment:

DBD::mysql::db do failed: Incorrect key file for table './bugs/bugs_fulltext.MYI'; try to repair it [for Statement "UPDATE bugs_fulltext SET comments = ?, comments_noprivate = ?
               WHERE bug_id = ?"] at Bugzilla/Bug.pm line 1072.
	Bugzilla::Bug::_sync_fulltext('Bugzilla::Bug=HASH(0x3ae2aa0)') called at Bugzilla/Bug.pm line 1019
	Bugzilla::Bug::update('Bugzilla::Bug=HASH(0x3ae2aa0)') called at /usr/share/bugzilla/process_bug.cgi line 373
Okay, I dunno. When I submit the text of comment#2 to my local bugzilla, it crashes. Maybe it really is my bug db, I'll update if I discover anything more.
Hey, Kevin,

I also got the same problem. But I did n't get any solution till now.
I had filed a Bug for this, 1056798. Bugzilla team had given the same reply, what you got.
Have you got any solution for this problem.
Hey Kevin,

I had resolved the problem.

Run the following mysql command at command prompt, Admin (root) privileges.
# mysqlcheck -u root -p --auto-repair -c -o bugs

I think it will solve your problem, if your database name is 'bugs'.

Thank you.
@Chalapathi:

IIRC, I tried --auto-repair but it did not help. But I did solve my problems by rebuilding my entire db from dump:

sudo mysql < /path/to/dump

I had daily dumps from my standard backups. I did *not* have to go back to a dump from before the problems started, and I did *not* have to make any repairs in the dump, I just read in the latest dump and everything has been fine ever since.
You need to log in before you can comment on or make changes to this bug.