10 Replies Latest reply on Feb 20, 2006 10:32 AM by bkeh12

    not find agent library on the library path or in the local d

    bkeh12

      Help me pls..
      I run jboss-Profiler-RC3 in Fedora FC4, but result as below..


      [root@localhost jboss]# $LD_LIBRARY_PATH
      bash: /opt/jboss: is a directory
      [root@localhost jboss]# java -XrunjbossInspector:/tmp Foo
      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # SIGSEGV (0xb) at pc=0x0011bca1, pid=4187, tid=3086019488
      #
      # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing)
      # Problematic frame:
      #
      [error occurred during error reporting, step 60, id 0xb]

      # An error report file with more information is saved as hs_err_pid4187.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp

      this hs_err_pid4187.log is

      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # SIGSEGV (0xb) at pc=0x0011bca1, pid=4187, tid=3086019488
      #
      # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing)
      # Problematic frame:
      #
      [error occurred during error reporting, step 60, id 0xb]


      --------------- T H R E A D ---------------

      Current thread is native thread

      siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0xa9135ecc

      Registers:
      EAX=0xb77782c4, EBX=0x00130fb4, ECX=0xa800005f, EDX=0xb77782c4
      ESP=0xbff20f3c, EBP=0xbff2107c, ESI=0x09135d50, EDI=0xb77782bc
      EIP=0x0011bca1, CR2=0xa9135ecc, EFLAGS=0x00010282

      Top of Stack: (sp=0xbff20f3c)
      0xbff20f3c: 09135d30 12000000 00000000 00259ff4
      0xbff20f4c: 0025b880 00000003 bff20f70 00199792
      0xbff20f5c: 0025b880 00000020 00130fb4 b7f24508
      0xbff20f6c: 00000003 bff2107c 0011ce97 09135d08
      0xbff20f7c: bff20f20 bff21060 00000003 b77782c4
      0xbff20f8c: 0005faf4 bff210f4 00131000 bff20ef0
      0xbff20f9c: bff210f0 00000003 bff21a80 00000000
      0xbff20fac: bff20f3c 09135d30 bff21128 00000003

      Instructions: (pc=0x0011bca1)
      0x0011bc91: 40 08 89 85 0c ff ff ff 89 85 68 ff ff ff eb 31
      0x0011bca1: 89 3c 8e 8b bd 0c ff ff ff 8b 85 68 ff ff ff 8b

      Stack: [0xbfd26000,0xbff26000), sp=0xbff20f3c, free space=2027k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

      [error occurred during error reporting, step 120, id 0xb]


      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )

      Other Threads:

      VM state:not at safepoint (not fully initilizated)

      VM Mutex/Monitor currently owned by a thread: None

      Heap

      [error occurred during error reporting, step 190, id 0xb]

      Dynamic libraries:
      00116000-00130000 r-xp 00000000 fd:00 6685728 /lib/ld-2.3.5.so
      00130000-00131000 r-xp 00019000 fd:00 6685728 /lib/ld-2.3.5.so
      00131000-00132000 rwxp 0001a000 fd:00 6685728 /lib/ld-2.3.5.so
      00134000-00258000 r-xp 00000000 fd:00 6685729 /lib/libc-2.3.5.so
      00258000-0025a000 r-xp 00124000 fd:00 6685729 /lib/libc-2.3.5.so
      0025a000-0025c000 rwxp 00126000 fd:00 6685729 /lib/libc-2.3.5.so
      0025c000-0025e000 rwxp 0025c000 00:00 0
      00260000-00282000 r-xp 00000000 fd:00 6685730 /lib/libm-2.3.5.so
      00282000-00283000 r-xp 00021000 fd:00 6685730 /lib/libm-2.3.5.so
      00283000-00284000 rwxp 00022000 fd:00 6685730 /lib/libm-2.3.5.so
      00286000-00288000 r-xp 00000000 fd:00 6685731 /lib/libdl-2.3.5.so
      00288000-00289000 r-xp 00001000 fd:00 6685731 /lib/libdl-2.3.5.so
      00289000-0028a000 rwxp 00002000 fd:00 6685731 /lib/libdl-2.3.5.so
      00413000-00421000 r-xp 00000000 fd:00 6685732 /lib/libpthread-2.3.5.so
      00421000-00422000 r-xp 0000d000 fd:00 6685732 /lib/libpthread-2.3.5.so
      00422000-00423000 rwxp 0000e000 fd:00 6685732 /lib/libpthread-2.3.5.so
      00423000-00425000 rwxp 00423000 00:00 0
      03c80000-03c92000 r-xp 00000000 fd:00 6685740 /lib/libnsl-2.3.5.so
      03c92000-03c93000 r-xp 00011000 fd:00 6685740 /lib/libnsl-2.3.5.so
      03c93000-03c94000 rwxp 00012000 fd:00 6685740 /lib/libnsl-2.3.5.so
      03c94000-03c96000 rwxp 03c94000 00:00 0
      08048000-08057000 r-xp 00000000 fd:00 11829283 /opt/jdk1.5.0_06/bin/java
      08057000-08059000 rwxp 0000e000 fd:00 11829283 /opt/jdk1.5.0_06/bin/java
      09134000-09155000 rwxp 09134000 00:00 0 [heap]
      b7758000-b7778000 r-xp 00000000 fd:00 11960902 /opt/jboss/libjbossInspector.so
      b7778000-b7779000 rwxp 0001f000 fd:00 11960902 /opt/jboss/libjbossInspector.so
      b7779000-b7ad9000 r-xp 00000000 fd:00 11796491 /opt/jdk1.5.0_06/jre/lib/i386/client/libjvm.so
      b7ad9000-b7af7000 rwxp 0035f000 fd:00 11796491 /opt/jdk1.5.0_06/jre/lib/i386/client/libjvm.so
      b7af7000-b7f0f000 rwxp b7af7000 00:00 0
      b7f1b000-b7f21000 r-xp 00000000 fd:00 11796485 /opt/jdk1.5.0_06/jre/lib/i386/native_threads/libhpi.so
      b7f21000-b7f22000 rwxp 00006000 fd:00 11796485 /opt/jdk1.5.0_06/jre/lib/i386/native_threads/libhpi.so
      b7f22000-b7f23000 rwxp b7f22000 00:00 0
      b7f23000-b7f24000 r-xp b7f23000 00:00 0
      b7f24000-b7f25000 rwxp b7f24000 00:00 0
      b7f25000-b7f26000 r-xp b7f25000 00:00 0 [vdso]
      bff11000-bff26000 rwxp bff11000 00:00 0 [stack]

      VM Arguments:
      jvm_args: -XrunjbossInspector:/tmp
      java_command: Foo
      Launcher Type: SUN_STANDARD

      Environment Variables:
      PATH=/opt/jdk1.5.0_06/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
      LD_LIBRARY_PATH=/opt/jdk1.5.0_06/jre/lib/i386/client:/opt/jdk1.5.0_06/jre/lib/i386:/opt/jdk1.5.0_06/jre/../lib/i386:/opt/jboss/
      SHELL=/bin/bash
      DISPLAY=:0

      Signal Handlers:
      SIGSEGV: [libjvm.so+0x31b990], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
      SIGBUS: [libjvm.so+0x31b990], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
      SIGFPE: [libjvm.so+0x281230], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
      SIGPIPE: [libjvm.so+0x281230], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
      SIGILL: [libjvm.so+0x281230], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
      SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
      SIGUSR2: [libjvm.so+0x283580], sa_mask[0]=0x00000000, sa_flags=0x10000004
      SIGHUP: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
      SIGINT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
      SIGQUIT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
      SIGTERM: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000


      --------------- S Y S T E M ---------------

      OS:Fedora Core release 4 (Stentz)

      uname:Linux 2.6.14-1.1656_FC4 #1 Thu Jan 5 22:13:22 EST 2006 i686
      libc:glibc 2.3.5 NPTL 2.3.5
      rlimit: STACK 10240k, CORE 0k, NPROC 6143, NOFILE 1024, AS infinity
      load average:0.16 0.42 0.36

      CPU:total 1

      Memory: 4k page, physical 386068k(6168k free), swap 786424k(786424k free)

      vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for linux-x86, built on Nov 10 2005 12:08:33 by java_re with gcc 3.2.1-7a (J2SE release)


      Is miss something ?

      Ps:Sorry my english isn't good,I come from Taiwan.


        • 1. Re: not find agent library on the library path or in the loc
          clebert.suconic

          You need to recompile the library using GCC.

          The last chapter of JBoss Profiler documentation shows how to compile it.

          It's just hard to redistribute linux binaries. That's what happened.


          Let me know if you need help compiling.


          Clebert

          • 2. Re: not find agent library on the library path or in the loc
            bkeh12

            Hi,
            Thank you for telling me. :-)
            I try to recompile the library using GCC... but :-(

            Step 1:
            use jvmpi-src/linux/compile.sh to recompile but can't create inffast.o.
            RC3 zlib ver is 1.2.1 so goto www.zlib.org and see this message as below:


            Version 1.2.3 eliminates potential security vulnerabilities in zlib 1.2.1 and 1.2.2, so all users of those versions should upgrade immediately.

            Step 2:
            So download zlib 1.2.3 and ./configure -> make -> make test -> make install -> copy all need .o file to jvmpi-src/src -> update compile.sh(disable rm/gcc; update _INCLUDES) -> run compile.sh create .so -> run java -XrunjbossInspector:/tmp Foo; but..

            [root@localhost jdk1.5.0_06]# export PATH=/opt/jdk1.5.0_06/bin:$PATH
            [root@localhost jdk1.5.0_06]# export LD_LIBRARY_PATH=/opt/jboss
            [root@localhost jdk1.5.0_06]# java -version
            java version "1.5.0_06"
            Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
            Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
            [root@localhost jdk1.5.0_06]# java -XrunjbossInspector:/tmp Foo
            Error occurred during initialization of VM
            Could not find agent library on the library path or in the local directory: jbossInspector
            [root@localhost jdk1.5.0_06]# java -XrunjbossInspector:/tmp Foo
            Error occurred during initialization of VM
            Could not find agent library on the library path or in the local directory: jbossInspector


            Can i loss something ?

            Sorry my enclish isn't good..

            • 3. Re: not find agent library on the library path or in the loc
              clebert.suconic

              Probably the compile.sh distributed on the zip file has some CTRL-M on the end. (windows/Unix file conversion)


              try doing a dos2unix on compile.sh, then you should be able to compile it.

              You don't need to download zlib to do anything. I'm compiling zlib within compile.sh.

              • 4. Re: not find agent library on the library path or in the loc
                bkeh12

                Hi,

                Thank .. :-)
                it work but ..


                [root@localhost linux]# dos2unix compile.sh
                dos2unix: converting file compile.sh to UNIX format ...
                [root@localhost linux]# export JAVA_HOME=/opt/jdk1.5.0_06
                [root@localhost linux]# ./compile.sh
                [root@localhost linux]# cp libjbossInspector.so /opt/jboss/libjbossInspector.so
                cp?is overwrited ?/opt/jboss/libjbossInspector.so?? yes
                [root@localhost linux]# export PATH=/opt/jdk1.5.0_06/bin:$PATH
                [root@localhost linux]# export LD_LIBRARY_PATH=/opt/jboss
                [root@localhost linux]# java -version
                java version "1.5.0_06"
                Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
                Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
                [root@localhost linux]# java -XrunjbossInspector:/tmp Foo
                Error occurred during initialization of VM
                Could not find agent library on the library path or in the local directory: jbossInspector
                [root@localhost linux]# rpm -q zlib
                zlib-1.2.2.2-3
                [root@localhost linux]# $PATH
                bash: /opt/jdk1.5.0_06/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:
                /usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:
                [root@localhost linux]# export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/u
                sr/sbin:/usr/bin:$PATH
                [root@localhost linux]# java -version
                java version "1.4.2"
                gij (GNU libgcj) version 4.0.0 20050519 (Red Hat 4.0.0-8)

                Copyright (C) 2005 Free Software Foundation, Inc.
                This is free software; see the source for copying conditions. There is NO
                warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
                [root@localhost linux]# java -XrunjbossInspector:/tmp Foo
                Exception in thread "main" java.lang.NoClassDefFoundError: Foo
                at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
                Caused by: java.lang.ClassNotFoundException: Foo not found in gnu.gcj.runtime.Sy stemClassLoader{urls=[file:./,file:./], parent=gnu.gcj.runtime.ExtensionClassLoa der{urls=[], parent=null}}
                at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6. 0.0)
                at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgc j.so.6.0.0)
                at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0. 0)
                at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
                at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)



                if not use sun JDK, use gcj is work why ?



                • 5. Re: not find agent library on the library path or in the loc
                  clebert.suconic

                  I never tested it with gcj. It shouldn't work.

                  • 6. Re: not find agent library on the library path or in the loc
                    bkeh12

                    Hi,

                    Because jbossAS must be runing in Sun SDK,I know.

                    thank

                    • 7. Re: not find agent library on the library path or in the loc
                      clebert.suconic

                      Well...

                      I just don't know if JVMPI will work under gcj.
                      I don't think they have support to JVMPI or TI.


                      You could be using JBossProfiler with a standalone java application.

                      • 8. Re: not find agent library on the library path or in the loc
                        bkeh12

                         


                        [root@localhost linux]# java -XrunjbossInspector:/tmp Foo
                        Exception in thread "main" java.lang.NoClassDefFoundError: Foo
                        at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
                        Caused by: java.lang.ClassNotFoundException: Foo not found in gnu.gcj.runtime.Sy stemClassLoader{urls=[file:./,file:./]


                        libjbossInspector.so is binded by gnu.gcj.runtime.
                        gnu.gcj.runtime.Sy stemClassLoader try to load Foo.



                        [root@localhost linux]# java -version
                        java version "1.5.0_06"
                        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
                        Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
                        [root@localhost linux]# java -XrunjbossInspector:/tmp Foo
                        Error occurred during initialization of VM
                        Could not find agent library on the library path or in the local directory: jbossInspector
                        [root@localhost linux]# rpm -q zlib
                        zlib-1.2.2.2-3


                        Why libjbossInspector.so isn't binded by standalone JDK runtime ?

                        ps:I hope you understanding,sorry my english isn't good.

                        • 9. Re: not find agent library on the library path or in the loc
                          bkeh12

                          Hi,
                          This is my config

                          [root@localhost jboss]# ldd -v libjbossInspector.so
                           linux-gate.so.1 => (0x00def000)
                           libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00759000)
                           libm.so.6 => /lib/libm.so.6 (0x00265000)
                           libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x003ae000)
                           libc.so.6 => /lib/libc.so.6 (0x003b8000)
                           /lib/ld-linux.so.2 (0x00116000)
                          
                           Version information:
                           ./libjbossInspector.so:
                           libgcc_s.so.1 (GCC_3.0) => /lib/libgcc_s.so.1
                           libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
                           libstdc++.so.6 (GLIBCXX_3.4) => /usr/lib/libstdc++.so.6
                           libstdc++.so.6 (GLIBCXX_3.4.4) => /usr/lib/libstdc++.so.6
                           libstdc++.so.6 (CXXABI_1.3) => /usr/lib/libstdc++.so.6
                           /usr/lib/libstdc++.so.6:
                           libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.2) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                           libgcc_s.so.1 (GCC_3.3) => /lib/libgcc_s.so.1
                           libgcc_s.so.1 (GCC_3.0) => /lib/libgcc_s.so.1
                           libgcc_s.so.1 (GLIBC_2.0) => /lib/libgcc_s.so.1
                           /lib/libm.so.6:
                           ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
                           libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
                           /lib/libgcc_s.so.1:
                           libc.so.6 (GLIBC_2.2.4) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
                           libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
                           /lib/libc.so.6:
                           ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
                           ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
                           ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
                          
                          

                          it looks like all the dependencies for the library are present.

                          Thanks again for your help.

                          • 10. Re: not find agent library on the library path or in the loc
                            bkeh12

                             


                            Because jbossAS must be runing in Sun SDK,I know.


                            This isn't my mind (sorry my english isn't good).

                            {jvmTI( jvmPI jdk1.4) puglin jvm} + {jbossAS(microkeneral(mbean + httpinvoker))} = jbossProfiler

                            jbossAS(microkeneral(mbean + httpinvoker)) is easy management tool(over http) on top jvm(TI jvmPI),its can replace.

                            So why gcj can puglin(must not work) but sun can't.