VMware Cloud Community
Aelix
Contributor
Contributor

VMware agent plugin segmentation fault on 3.0

I have a Centos 4.4 x86_64 server running VMware server 1.0.1. When I start the agent, it dies during auto-discovery when it reaches the VMware plugin. It does this with both the included JRE and the IBM 1.4.2 JRE.

I've attached javacores from both the bundled JRE and IBM 1.4.2 JRE.
Reply
0 Kudos
3 Replies
dougm_hyperic
VMware Employee
VMware Employee

I noticed that vmcontrol.so isn't loaded, in which case the plugin
should be skipping auto-discovery rather than crash. Can you try the
following command and paste the output?

java -classpath pdk/lib/sigar.jar
org.hyperic.sigar.vmware.VMControlLibrary

In the meantime you can disable the vmware plugin by adding the
following to agent.properties:
plugins.exclude=vmware

On Feb 19, 2007, at 5:33 AM, aelix wrote:

> I have a Centos 4.4 x86_64 server running VMware server 1.0.1. When
> I start the agent, it dies during auto-discovery when it reaches
> the VMware plugin. It does this with both the included JRE and the
> IBM 1.4.2 JRE.
>
> I've attached javacores from both the bundled JRE and IBM 1.4.2 JRE.
>



Reply
0 Kudos
Aelix
Contributor
Contributor

[root@thor hyperic-hq-agent-3.0.0]# java -classpath pdk/lib/sigar.jar org.hyperic.sigar.vmware.VMControlLibrary
Exception in thread "main" java.io.IOException: exec[/usr/bin/gcc, -shared, -o, /usr/local/hyperic-hq-agent-3.0.0/vmcontrol.so, /usr/local/hyperic-hq-agent-3.0.0/control-only/vmcontrol.o, -Wl,-rpath, /usr/lib/vmware/lib/libssl.so.0.9.7, -Wl,-rpath, /usr/lib/vmware/lib/libcrypto.so.0.9.7, /usr/lib/vmware/lib/libssl.so.0.9.7/libssl.so.0.9.7, /usr/lib/vmware/lib/libcrypto.so.0.9.7/libcrypto.so.0.9.7] failed: 1
at org.hyperic.sigar.vmware.VMControlLibrary.exec(VMControlLibrary.java:114)
at org.hyperic.sigar.vmware.VMControlLibrary.link(VMControlLibrary.java:270)
at org.hyperic.sigar.vmware.VMControlLibrary.link(VMControlLibrary.java:134)
at org.hyperic.sigar.vmware.VMControlLibrary.main(VMControlLibrary.java:282)
[root@thor hyperic-hq-agent-3.0.0]#

I thought it was weird that its trying to pass -Wl and -rpath to gcc and not ld? If you run the above command, gcc exits with the complaint -rpath is an unknown option. If I set those linker flags in LDFLAGS instead, it gets a bit further:

[root@thor hyperic-hq-agent-3.0.0]# LDFLAGS=-Wl,-rpath,/usr/lib/vmware/lib/libssl.so.0.9.7,-Wl,-rpath,/usr/lib/vmware/lib/libcrypto.so.0.9.7
[root@thor hyperic-hq-agent-3.0.0]# gcc -shared -o /usr/local/hyperic-hq-agent-3.0.0/vmcontrol.so /usr/local/hyperic-hq-agent-3.0.0/control-only/vmcontrol.o /usr/lib/vmware/lib/libssl.so.0.9.7/libssl.so.0.9.7 /usr/lib/vmware/lib/libcrypto.so.0.9.7/libcrypto.so.0.9.7
/usr/lib/vmware/lib/libssl.so.0.9.7/libssl.so.0.9.7: could not read symbols: File in wrong format
Reply
0 Kudos
dougm_hyperic
VMware Employee
VMware Employee

The exec line is printed with ArrayList.toString(), which uses ", "
as a delimiter. So the syntax is correct if you strip all commas
with the exception of -Wl,-rpath. In any case, I see the same result
on x64 "could not read symbols: File in wrong format". Not sure why
vmware auto-discovery is being run in your environment, it should
just be skipped if vmcontrol.so can't be linked. So I suggest
disabling the plugin for now. I've opened a ticket for this and will
post an update here when we have a fix: http://jira.hyperic.com/
browse/SIGAR-44

On Feb 20, 2007, at 6:01 AM, aelix wrote:

> [root@thor hyperic-hq-agent-3.0.0]# java -classpath pdk/lib/
> sigar.jar org.hyperic.sigar.vmware.VMControlLibrary
> Exception in thread "main" java.io.IOException: exec[/usr/bin/gcc, -
> shared, -o, /usr/local/hyperic-hq-agent-3.0.0/vmcontrol.so, /usr/
> local/hyperic-hq-agent-3.0.0/control-only/vmcontrol.o, -Wl,-rpath, /
> usr/lib/vmware/lib/libssl.so.0.9.7, -Wl,-rpath, /usr/lib/vmware/lib/
> libcrypto.so.0.9.7, /usr/lib/vmware/lib/libssl.so.0.9.7/libssl.so.
> 0.9.7, /usr/lib/vmware/lib/libcrypto.so.0.9.7/libcrypto.so.0.9.7]
> failed: 1
> at org.hyperic.sigar.vmware.VMControlLibrary.exec
> (VMControlLibrary.java:114)
> at org.hyperic.sigar.vmware.VMControlLibrary.link
> (VMControlLibrary.java:270)
> at org.hyperic.sigar.vmware.VMControlLibrary.link
> (VMControlLibrary.java:134)
> at org.hyperic.sigar.vmware.VMControlLibrary.main
> (VMControlLibrary.java:282)
> [root@thor hyperic-hq-agent-3.0.0]#
>
> I thought it was weird that its trying to pass -Wl and -rpath to
> gcc and not ld? If you run the above command, gcc exits with the
> complaint -rpath is an unknown option. If I set those linker flags
> in LDFLAGS instead, it gets a bit further:
>
> [root@thor hyperic-hq-agent-3.0.0]# LDFLAGS=-Wl,-rpath,/usr/lib/
> vmware/lib/libssl.so.0.9.7,-Wl,-rpath,/usr/lib/vmware/lib/
> libcrypto.so.0.9.7
> [root@thor hyperic-hq-agent-3.0.0]# gcc -shared -o /usr/local/
> hyperic-hq-agent-3.0.0/vmcontrol.so /usr/local/hyperic-hq-
> agent-3.0.0/control-only/vmcontrol.o /usr/lib/vmware/lib/libssl.so.
> 0.9.7/libssl.so.0.9.7 /usr/lib/vmware/lib/libcrypto.so.0.9.7/
> libcrypto.so.0.9.7
> /usr/lib/vmware/lib/libssl.so.0.9.7/libssl.so.0.9.7: could not read
> symbols: File in wrong format
>



Reply
0 Kudos