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

Core dump on qemu #2

Closed
paulsonmathew21 opened this issue Oct 24, 2016 · 1 comment
Closed

Core dump on qemu #2

paulsonmathew21 opened this issue Oct 24, 2016 · 1 comment

Comments

@paulsonmathew21
Copy link

Instead of crashing the VM, I am getting a core dump from the qemu.

ubuntu@ubuntu-Standard-PC-i440FX-PIIX-1996:~$ qemu-system-x86_64: hw/usb/redirect.c:1306: usbredir_chardev_read: Assertion `dev->read_buf == ((void *)0)' failed.
Aborted (core dumped)

This is the error that I am getting.

@schumilo
Copy link
Owner

According to the crash report, it looks like that you are using a pre-built QEMU binary or you might have forgotten to apply the associated patch (qemu-2.1.1.patch). Since this patch is for a very old and dated version, I have attached a simple script to build and patch various QEMU versions. If you build QEMU for the first time, you also need to compile and install usbredir by yourself. I have attached a script for this purpose as well. Please be aware that you probably have to install certain build tools such as automake and libtool.

qemu.sh

#!/bin/bash

patch=true
version='2.4.0'

wget http://wiki.qemu-project.org/download/qemu-$version.tar.bz2
tar xf qemu-$version.tar.bz2

if $patch ; then
    sed -i '/    usbredirparser_caps_set_cap(caps, usb_redir_cap_64bits_ids);/c\    //usbredirparser_caps_set_cap(caps, usb_redir_cap_64bits_ids);' qemu-$version/hw/usb/redirect.c
    sed -i '/    dev->next_attach_time = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 200;/c\    dev->next_attach_time = 0;' qemu-$version/hw/usb/redirect.c
fi

cd qemu-$version
./configure --target-list=x86_64-softmmu --enable-usb-redir
make -j 4 

usbredir.sh

#!/bin/bash

git clone https://github.com/SPICE/usbredir.git
cd usbredir/
aclocal
autoconf
autoheader
./autogen.sh
automake --add-missing
make
sudo make install

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