Can't locate object method "get_status_hash"

  • harold

    harold - 2007-06-13

    Hi - I just installed innotop on ubuntu and get this error when I try to run it:

    Can't locate object method "get_status_hash" via package "InnoDBParser" at /usr/bin/innotop line 6375.

    The .innotop_core_dump file is 0 bytes.

    Any help is appreciated.



    • Anonymous - 2007-06-13

      Hi.  It sounds to me like you have an earlier version of on your system, and perhaps you upgraded innotop and it's trying to use the old module.  Can you look into that possibility?

      • harold

        harold - 2007-06-13

        Yes - that it correct.  I first downloaded innotop-0.1.160 from the blog website before I knew there were newer files here.  I was getting a segmentation fault and eventually found the files here and downloaded innotop_1.4.2-1_all.deb.

        I installed that one and got the error reported in my previous post.

        Now, I removed both copies of I found on the system and reinstalled innotop_1.4.2-1_all.deb.  I also removed .innotop.  Now I get farther, but am back to the segmentation fault problem:

        InnoDB Txns (? for help) mydb, 13:18:00, InnoDB 45s :-), 0.21 QPS, 3 thd, 5.0.22-Debian_0ubuntu6.06.3-lo

        CXN           History  Versions  Undo  Dirty Buf  Used Bufs  Txns  MaxTxnTime  LStrcts
        mydb                1         6  0 0       0.12%     14.62%     3       00:00        0

        CXN  ID  User  Host  Txn Status  Time  Undo  Query TextSegmentation fault

        .innotop_core_dump is still 0 bytes.

        Thanks again.

        • Anonymous - 2007-06-13

          I have never seen Perl segmentation fault.  I think the .innotop_core_dump will probably never have anything in it in this case, because I doubt it's getting a chance to exit gracefully.

          How long does it run before the segfault?  Can you get it to run successfully in other modes?  For example, Q mode.  If  you don't get a chance to switch to that mode with the Q key after starting it, start innotop with "innotop --mode=Q" at the command line and see.

          What version of Ubuntu do you have, and what are your versions of MySQL, perl, DBI and DBD::mysql?

          • harold

            harold - 2007-06-13

            Ok, I have to admit I don't know how to check the versions of DBI and DBD::mysql (which very well indicates maybe I don't have all the prereqs installed).  Here are the others, though:

            This is perl, v5.8.7 built for x86_64-linux-gnu-thread-multi

            $ uname -a
            Linux hal #3 SMP Sun Oct 15 13:15:34 BST 2006 x86_64 GNU/Linux

            • Anonymous - 2007-06-14

              That looks fine.  I'm sure you have the prerequisites.  I'm at a loss as to what could be happening, so far.  Were you able to get it to run in any other mode?  Can you get it to run on a different machine, pointing at the same database server?  I'm just trying to narrow down where the problem might be.

              • harold

                harold - 2007-06-14

                Sorry - forgot to say that I tried in Q mode and got the same result.  It seg faults immediately at startup before the first screen is even completely built.  I haven't tried to dissect the script to see what it's doing but I find it curious that the segmentation fault seems to occur as this line is being printed to the screen:

                CXN ID User Host Txn Status Time Undo Query TextSegmentation fault

                I think I also forgot to share the mysql version I'm using:

                $ mysql --version
                mysql  Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using readline 5.1

                Should I try removing all innotop files and reinstall to make sure there's nothing left over from the older version?  Also, is there a simple test that I can try in perl to test that the db connection and DSN string is working?

                I don't have this db open to the world so I can't test it from another box without opening that port up. 

                Thanks again for your help.  It's not critical that I get this working, but it would be nice to have.

                • Anonymous - 2007-06-14


                  No, based on the errors you're getting, and the output you showed in earlier messages, I can see that it's connecting to your server okay and even parsing everything okay.  I had not thought fully about some of the output you pasted into the messages.

                  It's dying while printing results.  Nothing at all fancy happens here, except perhaps Term::ANSIColor color codes.  Let's try disabling that and see if it helps.  Unfortunately, somehow I omitted this as a configuration variable!

                  First: do you have Term::ANSIColor installed?

                  • harold

                    harold - 2007-06-14

                    Yes, Term::ANSIColor is installed.

                    • Anonymous - 2007-06-14

                      Okay.  This is a long shot, but let's try to disable terminal coloring.  You will need to edit /usr/bin/innotop. Somewhere near  line 2250, you'll see something like this:

                      eval {
                         if ( !$opts{n} ) {
                            if ( $windows ) {
                               require Win32::Console::ANSI;
                            require Term::ANSIColor;
                            import Term::ANSIColor qw(colored);
                            $have_color = 1;

                      Change that so it dies immediately inside the eval, like this:

                      eval {

                      (If I had added a proper configuration variable for this, we could just set a config setting, but unfortunately I didn't.  Sorry about that).  See if it will run then.


                      • harold

                        harold - 2007-06-14

                        Ok, I changed the eval to look like this:

                        # If terminal coloring is available, use it.  The only function I want from
                        # the module is the colored() function.
                        eval {

                        This is the result...  looks like I have one additional line than before - I don't think I was getting the "----" line before:

                        Query List (? for help)                         mydb, 13:37:19, 0.17 QPS, 3 thd, 5.0.22-Debian_0ubuntu6.06.3-log

                        CXN   When   Load  QPS   Slow  QCacheHit  KCacheHit  BpsIn  BpsOut
                        ----  -----  ----  ----  ----  ---------  ---------  -----  ------
                        mydb  Total  0.00  0.17     0     82.82%    100.00%  12.84  170.65

                        CXN     ID      User   Host           DB      Time   Query
                        ------  ------  -----  -------------  ------  -----  -----Segmentation fault

                        • Anonymous - 2007-06-14

                          OK, that eliminates the terminal coloring as a problem.  The extra line is expected; with terminal coloring, innotop uses underlining, but without it draws a row of dashes to set off the table header.

                          I think there is something in the first row of output that might be odd.  For example, an international character, a control character, or something like that.  Let's see if Perl can even print the data it's trying to print.  Around line 4389 or so, look for the draw_screen sub and add a Data::Dumper right inside it, before anything else happens:

                          sub draw_screen {
                             use Data::Dumper;
                             print Dumper(@_);
                             ... rest of subroutine ...

                          Tell me how that goes, and if you don't have private data there, can you redirect the output into a file and attach it to a bug report or email it to me if it looks useful?

                          Thanks for your patience with this.

    • harold

      harold - 2007-06-13

      More on the linux version:

      /etc$ cat lsb-release
      DISTRIB_DESCRIPTION="Ubuntu 6.06.1 LTS"

    • Anonymous - 2007-06-18

      We discussed this over email a little.  Summary: we eventually discovered it was segmentation faulting in Term::ReadKey.  Here is the conclusion:

      "Looks like I downloaded and installed a version of Term:ReadKey on top of what was pre-installed with Perl, not realizing I already had it installed.  I removed it and reinstalled using apt-get and it works now.

      Thanks again for your help.


      On Jun 17, 2007, at 3:23 PM, Baron Schwartz wrote:

      > Hi,
      > It looks like Term::ReadKey on your system is broken.  Where did you get your Term::ReadKey from?  If you are using a version from CPAN, try removing it and using the one Debian provides, or vice versa:
      > sudo apt-get install libterm-readkey-perl
      > I searched the web and found this thread related to mytop, which makes that look like a promising direction:
      > mytop and innotop use the same method to pause between refreshing the screen.
      > Regards,
      > Baron


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks