Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference in vagrant #14

Closed
aghamir opened this issue Jun 2, 2017 · 7 comments
Closed

undefined reference in vagrant #14

aghamir opened this issue Jun 2, 2017 · 7 comments

Comments

@aghamir
Copy link

aghamir commented Jun 2, 2017

Hi @Wenzel ,
I've ran main.py in vagrant. I've got this error:

vagrant@jessie:/vagrant/nitro$ ./main.py nitro_win7x64
Finding QEMU pid for domain nitro_win7x64
Detected 1 VCPUs
Dumping physical memory to /tmp/tmp2xqs280v/tmpbhzv8j73
Extracting symbols with Rekall
Loading symbols
Traceback (most recent call last):
  File "./main.py", line 76, in <module>
    main(docopt(__doc__))
  File "./main.py", line 51, in main
    with Backend(domain, analyze_enabled) as backend:
  File "/vagrant/nitro/nitro/backend.py", line 52, in __init__
    self.libvmi = Libvmi(domain.name())
  File "/vagrant/nitro/nitro/libvmi.py", line 62, in __init__
    self.libvmi = cdll.LoadLibrary('libvmi.so')
  File "/usr/lib/python3.4/ctypes/__init__.py", line 429, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libvmi.so: undefined symbol: xen_get_address_width

Also when I run process_list in libvmi, I get this error:

vagrant@jessie:/vagrant/libvmi/examples$ sudo ./vmi-process-list nitro_win7x64
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_get_address_width'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_set_vcpureg'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_init_vmi'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_write'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_get_vcpureg'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_get_vcpuregs'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_get_domainname'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_init'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_test'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_pause_vm'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_set_domainname'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_set_domainid'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_get_name_from_domainid'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_resume_vm'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_get_memsize'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_read_page'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_destroy'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_get_domainid_from_name'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_is_pv'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_set_vcpuregs'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_check_domainid'
/vagrant/libvmi/libvmi/.libs/libvmi.so: undefined reference to `xen_get_domainid'
@Wenzel
Copy link
Member

Wenzel commented Jun 2, 2017

Hi,

how did you run vagrant ?
Did you use the packaged option, or did you use the defaults (NFS, full build) ?

@Wenzel
Copy link
Member

Wenzel commented Jun 2, 2017

Also, i have doing some changes to the playbooks recently.
Did you pulled from master on kvm-vmi ?
you should be at this commit : fix libvmi in provision_packaged

@aghamir
Copy link
Author

aghamir commented Jun 2, 2017

With NFS and full build(Not packaged).

@Wenzel
Copy link
Member

Wenzel commented Jun 2, 2017

Ok, last time i checked, it was working.
But i will rebuild everything tonight and see if i can reproduce your error.

Otherwise, checkout the latest master, and if you just want to work on Nitro python library, i advise you to use the packaged option. It's much faster.

@aghamir
Copy link
Author

aghamir commented Jun 2, 2017

Yes, I am at latest commit. Tnx, I will try it with packaged option.

@Wenzel
Copy link
Member

Wenzel commented Jun 4, 2017

hi @aghamir

sorry but i cannot reproduce your bug.
All i could find was that the QEMU binary was being replaced by the Debian one, so i moved the QEMU installation a bit later.
Did you tried the packaged playbook ?

@aghamir
Copy link
Author

aghamir commented Jun 4, 2017

Package playbook was OK. Maybe QEMU was the point. Thank you a lot. We can close this.

@Wenzel Wenzel closed this as completed Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants