On Fri, Sep 21, Richard W.M. Jones wrote: > The problem with collecting core dumps is how you get them out of the > appliance, given that it is short-lived and disappears on exit. We > looked at various methods including writing them to a block device or > squirting it down a virtio-serial connection, but none of them are > very satisfactory.
Yes, getting a file out of the guest is tricky. > strace output can do through the usual console logging mechanism. Yes, my take would be 'var="strace -f -s 123 -tt" ; $var guestfsd'. > gdb seems intractable to me if you want to use gdb interactively. > Just printing stack traces can go via the console logging mechanism. > Note there's very limited development tools in the appliance (no > debuginfo), and I'd be cautious about how much stuff gdb will pull in > via dependencies. That's why we looked at core dumps. gdb is certainly more advanced, something like 'var="gdb --readnow -ex r -ex bt -ex quit' ; $var guestfsd' would be good enough, or gdb --command=FILE. As you say, without adding debuginfo into guest the backtrace would be not that useful. But its better than nothing. Yesterday I tried to run guestfsd via gdb, and it required a few python files. But it turned out that the actual segfault happend in the host, not the guest. So I did not look further if gdb did really work. Olaf _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
