Re: [Spice-devel] bad id bug in glz decoder
On Thu, Apr 26, 2018 at 01:53:41AM -0400, Frediano Ziglio wrote: > > Hi Ziglio, > > > I was wondering if you have had a chance to look at the email below yet. > > > Best regards, > > Zhongqiang Huang > > Yes, weird, usually git CC people in the commit message, but see > > https://lists.freedesktop.org/archives/spice-devel/2018-April/043230.html > > this was acked and merged. > > Christophe, should we backport to 0.12.8 ? Yup, probably, in general any bug fix should be backported to the 0.12 branch. Thanks for thinking about it :) Christophe signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] bad id bug in glz decoder
> Hi Ziglio, > I was wondering if you have had a chance to look at the email below yet. > Best regards, > Zhongqiang Huang Yes, weird, usually git CC people in the commit message, but see https://lists.freedesktop.org/archives/spice-devel/2018-April/043230.html this was acked and merged. Christophe, should we backport to 0.12.8 ? Frediano > On Mon, Apr 23, 2018 at 5:27 PM, Usepr Xf < usep...@gmail.com > wrote: > > I found this code in glz_encoder.c in spice-server: > > > static inline void encode_64(Encoder *encoder, uint64_t word) > > > { > > > encode_32(encoder, (uint32_t)(word >> 32)); > > > encode_32(encoder, (uint32_t)(word & 0xff)); // <- is it wrong? > > 0xff should be deleted > > > } > > > On Fri, Apr 13, 2018 at 10:04 PM, Frediano Ziglio < fzig...@redhat.com > > > wrote: > > > > > Hi all, > > > > > > > Sorry to be a bother. > > > > > > > After a long time running of glz encode&decode (approx. 4hrs), I came > > > > across > > > > > > > this error. > > > > > > > The higher bits (> 24) of the image id is truncated, which makes dist > > > > less > > > > > > > than id . This error seems to happen when the dist across (1<<24) > > > > > > Is normal that dist is less then id. > > > > > > The id, as far as I know, is incremented from 0 and is a 64 bit, not > > > > > > supposed to overflow, is truncated to get the slot and should not be a > > > > > > problem. The same check "w->images[slot]-> hdr.id == id - dist" is done > > > in > > > > > > wait_for_image which should return TRUE and so "image && image-> hdr.id > > > == > > > wait->id" > > > > > > should be true. > > > > > > Could be that g_coroutine_condition_wait returned FALSE? I think that > > > just > > > calling > > > > > > SPICE_DEBUG is a bug. > > > > > > > Can you help me solve this problem? > > > > > > > Many thanks. > > > > > > > Best regards, > > > > > > > Zhongqiang Huang > > > ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] bad id bug in glz decoder
I found this code in glz_encoder.c in spice-server: static inline void encode_64(Encoder *encoder, uint64_t word) { encode_32(encoder, (uint32_t)(word >> 32)); encode_32(encoder, (uint32_t)(word & 0xff)); // <- is it wrong? 0xff should be deleted } On Fri, Apr 13, 2018 at 10:04 PM, Frediano Ziglio wrote: > > Hi all, > > > Sorry to be a bother. > > > After a long time running of glz encode&decode (approx. 4hrs), I came > across > > this error. > > > The higher bits (> 24) of the image id is truncated, which makes dist > less > > than id . This error seems to happen when the dist across (1<<24) > > > Is normal that dist is less then id. > The id, as far as I know, is incremented from 0 and is a 64 bit, not > supposed to overflow, is truncated to get the slot and should not be a > problem. The same check "w->images[slot]->hdr.id == id - dist" is done in > wait_for_image which should return TRUE and so "image && image->hdr.id == > wait->id" > should be true. > > Could be that g_coroutine_condition_wait returned FALSE? I think that just > calling > SPICE_DEBUG is a bug. > > > Can you help me solve this problem? > > Many thanks. > > > Best regards, > > Zhongqiang Huang > > Frediano > -- Zhongqiang Huang Department of Cognitive Science, Xiamen University, China Tel: +86 137-7993-0982 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] bad id bug in glz decoder
> Hi all, > Sorry to be a bother. > After a long time running of glz encode&decode (approx. 4hrs), I came across > this error. > The higher bits (> 24) of the image id is truncated, which makes dist less > than id . This error seems to happen when the dist across (1<<24) Is normal that dist is less then id. The id, as far as I know, is incremented from 0 and is a 64 bit, not supposed to overflow, is truncated to get the slot and should not be a problem. The same check "w->images[slot]->hdr.id == id - dist" is done in wait_for_image which should return TRUE and so "image && image->hdr.id == wait->id" should be true. Could be that g_coroutine_condition_wait returned FALSE? I think that just calling SPICE_DEBUG is a bug. > Can you help me solve this problem? > Many thanks. > Best regards, > Zhongqiang Huang Frediano ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] bad id bug in glz decoder
Hi, On Wed, Apr 11, 2018 at 12:28:15PM +0800, Usepr Xf wrote: > Hi all, > > Sorry to be a bother. Thanks for taking the time to report this. > After a long time running of glz encode&decode (approx. 4hrs), > I came across this error. It is windows client, correct? Could you confirm remote-viewer's version? > The higher bits (> 24) of the image id is truncated, which > makes *dist* less than *id*. This error seems to happen when > the *dist* across *(1<<24)* > > Can you help me solve this problem? Does it happen often with you? I've filled https://bugs.freedesktop.org/show_bug.cgi?id=106025 Cheers, toso signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] bad id bug in glz decoder
Hello all, I was wondering if you have had a chance to look at the e-mail below yet? It's about the wrong id problem of glz algorithm. Many thanks On Wed, Apr 11, 2018 at 12:28 PM, Usepr Xf wrote: > Hi all, > > Sorry to be a bother. > > After a long time running of glz encode&decode (approx. 4hrs), I came > across this error. > > > > The higher bits (> 24) of the image id is truncated, which makes *dist* > less than *id*. This error seems to happen when the *dist* across > *(1<<24)* > > Can you help me solve this problem? > Many thanks. > > Best regards, > Zhongqiang Huang > > > -- > Zhongqiang Huang > Department of Cognitive Science, Xiamen University, China > Tel: +86 137-7993-0982 > -- Zhongqiang Huang Department of Cognitive Science, Xiamen University, China Tel: +86 137-7993-0982 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel