[libvirt-php] libvirt_domain_interface_addresses causing segfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

While executing libvirt_domain_interface_addresses() with the qemu-agent running in the guest as the source, the function causes PHP to segfault. If I change the source to either dhcp or arp, the function executes correctly.

Example:

$netdetails = libvirt_domain_interface_addresses($vmres, 0); <-- executes correctly (dhcp source)
$netdetails = libvirt_domain_interface_addresses($vmres, 1); <-- segfault (qemu agent source)
$netdetails = libvirt_domain_interface_addresses($vmres, 2); <-- executes correctly (arp source)

I tested the equivalent function using virsh against the same host and it executes correctly with any source.
I have a php-cgi core file that I can share if that may help on finding the problem.

gdb output:

GNU gdb (Debian 9.1-2) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/php-cgi...
(No debugging symbols found in /usr/bin/php-cgi)
[New LWP 2594]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php-cgi index.php'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:85
85 ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory.
(gdb) bt
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:85
#1 0x000055c6a4ceacd2 in add_assoc_string_ex ()
#2 0x00007f4d36175253 in ?? () from /usr/lib/php/20180731/libvirt-php.so
#3 0x000055c6a4d6b477 in execute_ex ()
#4 0x000055c6a4d705c7 in zend_execute ()
#5 0x000055c6a4ce8ed4 in zend_execute_scripts ()
#6 0x000055c6a4c8be38 in php_execute_script ()
#7 0x000055c6a4b53da8 in ?? ()
#8 0x00007f4d39efce0b in __libc_start_main (main=0x55c6a4b51cf0, argc=2, argv=0x7fff35718588, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fff35718578) at ../csu/libc-start.c:308
#9 0x000055c6a4b544ca in _start ()


System information:

OS: Debian Bullseye
PHP version (fast cgi): 7.3.15
Libvirt PHP version: 0.5.5
Libvirt version: 6.0.0

KVM host libvirt version: 5.9.0

If you need any other information please let me know.

Thanks.

Fernando

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux