[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 00/10] curl: fix curl read
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] [PATCH v3 00/10] curl: fix curl read |
Date: |
Mon, 20 May 2013 09:49:59 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Mon, May 20, 2013 at 09:41:06AM +0100, Richard W.M. Jones wrote:
> On Mon, May 20, 2013 at 03:03:34PM +0800, Fam Zheng wrote:
> > CURL library API has changed, the current curl driver is not working.
> > This patch rewrites the use of API as well as the structure of internal
> > states.
>
> I tried this, but it segfaults:
>
> Program terminated with signal 11, Segmentation fault.
That stack trace was wrong. I was testing against the version of
libcurl in Fedora which is known to be broken.
Here is the stack trace, this time really running against
curl-7_30_0-147-gae26ee3:
Program terminated with signal 11, Segmentation fault.
#0 curl_read_cb (ptr=<optimized out>, size=<optimized out>,
nmemb=<optimized out>, opaque=0x7f63d48ba340) at block/curl.c:240
240 size_t aio_base = acb->sector_num * SECTOR_SIZE;
Missing separate debuginfos, use: debuginfo-install SDL-1.2.15-3.fc18.x86_64
bluez-libs-4.101-6.fc18.x86_64 brlapi-0.5.6-12.fc18.x86_64
celt051-0.5.1.3-5.fc18.x86_64 ceph-devel-0.56.3-1.fc18.x86_64
ceph-libs-0.56.3-1.fc18.x86_64 cryptopp-5.6.2-2.fc18.x86_64
cyrus-sasl-lib-2.1.25-2.fc18.x86_64 leveldb-1.7.0-4.fc18.x86_64
libfdt-1.3.0-5.fc18.x86_64 libseccomp-1.0.1-0.fc18.x86_64
libselinux-2.1.12-7.3.fc18.x86_64 libusbx-1.0.14-1.fc18.x86_64
nss-mdns-0.10-11.fc18.x86_64 snappy-1.0.5-2.fc18.x86_64
spice-server-0.12.2-3.fc18.x86_64 usbredir-0.6-1.fc18.x86_64
xen-libs-4.2.2-3.fc18.x86_64
(gdb) bt
#0 curl_read_cb (ptr=<optimized out>, size=<optimized out>,
nmemb=<optimized out>, opaque=0x7f63d48ba340) at block/curl.c:240
#1 0x00007f63cef51cc8 in Curl_client_write ()
from /home/rjones/d/curl/lib/.libs/libcurl.so.4
#2 0x00007f63cef697ef in Curl_readwrite ()
from /home/rjones/d/curl/lib/.libs/libcurl.so.4
#3 0x00007f63cef710b0 in multi_runsingle ()
from /home/rjones/d/curl/lib/.libs/libcurl.so.4
#4 0x00007f63cef720f7 in multi_socket ()
from /home/rjones/d/curl/lib/.libs/libcurl.so.4
#5 0x00007f63cef721df in curl_multi_socket_action ()
from /home/rjones/d/curl/lib/.libs/libcurl.so.4
#6 0x00007f63d27d9043 in curl_fd_handler (arg=0x7f63d48e16c0)
at block/curl.c:265
#7 0x00007f63d27bcbbb in aio_dispatch (ctx=0x7f63d48b33f0, ctx=0x7f63d48b33f0)
at aio-posix.c:149
#8 0x00007f63d27bd0b1 in aio_poll (ctx=0x7f63d48b33f0,
address@hidden) at aio-posix.c:248
#9 0x00007f63d29019c9 in qemu_aio_wait () at main-loop.c:484
#10 0x00007f63d27d2b65 in bdrv_rwv_co (address@hidden,
address@hidden, address@hidden,
address@hidden) at block.c:2215
#11 0x00007f63d27d2c90 in bdrv_rw_co (is_write=false,
nb_sectors=<optimized out>, buf=<optimized out>, sector_num=0, bs=
0x7f63d48b96e0) at block.c:2234
#12 bdrv_read (address@hidden, address@hidden,
address@hidden "3\300\216ΠΌ", address@hidden)
at block.c:2241
#13 0x00007f63d27d2d82 in bdrv_pread (bs=0x7f63d48b96e0, address@hidden
0, address@hidden, address@hidden) at block.c:2303
#14 0x00007f63d27d3460 in find_image_format (pdrv=<synthetic pointer>,
filename=0x7f63d48b6b40 "http://192.168.0.249/scratch/winxp.img",
bs=<optimized out>) at block.c:533
#15 bdrv_open (bs=0x7f63d48b6cc0, address@hidden
0x7f63d48b6b40 "http://192.168.0.249/scratch/winxp.img", options=
0x7f63d48b76a0, address@hidden, flags=8258, address@hidden
0x0) at block.c:1047
#16 0x00007f63d2806093 in drive_init (all_opts=0x7f63d48b2420,
block_default_type=IF_NONE) at blockdev.c:698
#17 0x00007f63d297054b in drive_init_func (opts=<optimized out>,
opaque=<optimized out>) at vl.c:1117
#18 0x00007f63d2a9a6f3 in qemu_opts_foreach (list=<optimized out>,
address@hidden <drive_init_func>, address@hidden
0x7f63d2e938f0 <pc_i440fx_machine_v1_5+48>,
address@hidden) at util/qemu-option.c:1162
#19 0x00007f63d27b7b89 in main (argc=<optimized out>, argv=<optimized out>,
envp=<optimized out>) at vl.c:4201
---
For completeness:
(1) qemu from git (without your patches) works.
(2) I'm testing using the following command:
$ LD_LIBRARY_PATH=~/d/curl/lib/.libs \
LIBGUESTFS_BACKEND=direct \
LIBGUESTFS_QEMU=~/d/qemu/qemu.wrapper \
./run ./fish/guestfish -a http://192.168.0.249/scratch/winxp.img -i -v
where:
(a) ~/d/libguestfs contains libguestfs from git
(b) ~/d/curl contains curl-7_30_0-147-gae26ee3
(c) http://192.168.0.249/scratch/winxp.img is a Windows XP image
(d) qemu.wrapper is:
----------------------------------------------------------------------
#!/bin/sh -
qemudir=/home/rjones/d/qemu
exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "$@"
----------------------------------------------------------------------
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
- [Qemu-devel] [PATCH v3 02/10] curl: change magic number to sizeof, (continued)
- [Qemu-devel] [PATCH v3 02/10] curl: change magic number to sizeof, Fam Zheng, 2013/05/20
- [Qemu-devel] [PATCH v3 03/10] curl: change curl_multi_do to curl_fd_handler, Fam Zheng, 2013/05/20
- [Qemu-devel] [PATCH v3 04/10] curl: fix curl_open, Fam Zheng, 2013/05/20
- [Qemu-devel] [PATCH v3 05/10] curl: add timer to BDRVCURLState, Fam Zheng, 2013/05/20
- [Qemu-devel] [PATCH v3 06/10] curl: introduce CURLDataCache, Fam Zheng, 2013/05/20
- [Qemu-devel] [PATCH v3 07/10] curl: make use of CURLDataCache., Fam Zheng, 2013/05/20
- [Qemu-devel] [PATCH v3 08/10] curl: use list to store CURLState, Fam Zheng, 2013/05/20
- [Qemu-devel] [PATCH v3 09/10] curl: add cache quota., Fam Zheng, 2013/05/20
- [Qemu-devel] [PATCH v3 10/10] curl: introduce ssl_no_cert runtime option., Fam Zheng, 2013/05/20
- Re: [Qemu-devel] [PATCH v3 00/10] curl: fix curl read, Richard W.M. Jones, 2013/05/20
- Re: [Qemu-devel] [PATCH v3 00/10] curl: fix curl read,
Richard W.M. Jones <=