Re: [Libguestfs] Issue with downloading files whose path contains multi-byte utf-8 characters

2023-02-13 Thread Richard W.M. Jones
On Mon, Feb 13, 2023 at 09:38:50PM +0200, Yonatan Shtarkman wrote: > Also, as a workaround, I avoided calling the event callback if null is > returned > by Py_BuildValue (still print the error and release the thread). > This seems to work for our usage (we only use the event callbacks for >

Re: [Libguestfs] Issue with downloading files whose path contains multi-byte utf-8 characters

2023-02-13 Thread Richard W.M. Jones
On Mon, Feb 13, 2023 at 09:38:50PM +0200, Yonatan Shtarkman wrote: > Thanks for looking into this Rich and Daniel, and thanks for the profound > explanation. > See my answers below. > > `'i' is not used inside the loop?  Or is this error intermittent?` - 'i' can  > be > removed, the error is

Re: [Libguestfs] Issue with downloading files whose path contains multi-byte utf-8 characters

2023-02-13 Thread Yonatan Shtarkman
Thanks for looking into this Rich and Daniel, and thanks for the profound explanation. See my answers below. `'i' is not used inside the loop? Or is this error intermittent?` - 'i' can be removed, the error is intermittent. This reproduces on libguestfs 1.46.2 and 1.48.6. `This is specifically

Re: [Libguestfs] Issue with downloading files whose path contains multi-byte utf-8 characters

2023-02-13 Thread Daniel P . Berrangé
On Mon, Feb 13, 2023 at 06:07:58PM +, Richard W.M. Jones wrote: > On Sun, Feb 12, 2023 at 03:31:08PM +0200, Yonatan Shtarkman wrote: > > Hey, > > When downloading a file whose path contains multi-byte utf-8, libguestfs > > sometimes crashes. > > This reproduces when using python, and not when

Re: [Libguestfs] Issue with downloading files whose path contains multi-byte utf-8 characters

2023-02-13 Thread Richard W.M. Jones
And this one too: https://bugzilla.redhat.com/show_bug.cgi?id=1684004 -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful

Re: [Libguestfs] Issue with downloading files whose path contains multi-byte utf-8 characters

2023-02-13 Thread Richard W.M. Jones
On Mon, Feb 13, 2023 at 06:07:58PM +, Richard W.M. Jones wrote: > On Sun, Feb 12, 2023 at 03:31:08PM +0200, Yonatan Shtarkman wrote: > > Hey, > > When downloading a file whose path contains multi-byte utf-8, libguestfs > > sometimes crashes. > > This reproduces when using python, and not when

Re: [Libguestfs] Issue with downloading files whose path contains multi-byte utf-8 characters

2023-02-13 Thread Richard W.M. Jones
On Sun, Feb 12, 2023 at 03:31:08PM +0200, Yonatan Shtarkman wrote: > Hey, > When downloading a file whose path contains multi-byte utf-8, libguestfs > sometimes crashes. > This reproduces when using python, and not when using guestfish. > > Code to reproduce: > for i in range(2000): >    

[Libguestfs] Issue with downloading files whose path contains multi-byte utf-8 characters

2023-02-13 Thread Yonatan Shtarkman
Hey, When downloading a file whose path contains multi-byte utf-8, libguestfs sometimes crashes. This reproduces when using python, and not when using guestfish. Code to reproduce: for i in range(2000): g.download ('/xxxó', '/tmp/1') #0 raise (sig=) at ../sysdeps/unix/sysv/linux/raise.c:50