`virsh dumpxml dom | xmlstarlet sel -t -v '//domain/devices/interface[1]/mac/@address'` does what I'd expect and prints out the MAC. But `virsh dumpxml dom | virt-inspector --xpath '//domain/devices/interface[1]/mac/@address'` segfaults. Stack trace: #0 0x00007ffff6fb7ac4 in free () from /usr/lib/libc.so.6 #1 0x00007ffff75538d9 in xmlFreeNodeList () from /usr/lib/libxml2.so.2 #2 0x00007ffff7553696 in xmlFreeDoc () from /usr/lib/libxml2.so.2 #3 0x0000000000409dcc in guestfs_int_cleanup_xmlFreeDoc (ptr=0x7fffffffdc28) at cleanup.c:87 #4 0x0000000000409be2 in do_xpath ( query=0x7fffffffe1a6 "//domain/devices/interface[1]/mac/@address") at inspector.c:805 #5 0x0000000000406f30 in main (argc=3, argv=0x7fffffffddd8) at inspector.c:250 Running version 1.30.4 on archlinux.
I can reproduce this on 1.31.25 too.
Patch posted: https://www.redhat.com/archives/libguestfs/2015-November/msg00133.html
I've validated the fix in a build from master.
Fixed in 1.31.26.