9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Stanley Lieber <sl@stanleylieber.com>
To: 9front@9front.org
Subject: Re: [9front] aux/wacom: possible race
Date: Mon, 06 Dec 2021 03:08:14 +0000	[thread overview]
Message-ID: <FBA3C587-0D86-41F2-BBC7-1A0F4AD1AC54@stanleylieber.com> (raw)
In-Reply-To: <5FA0662D627A99E4DF5914FDD6E872E7@wopr.sciops.net>

On December 6, 2021 2:50:19 AM UTC, qwx@sciops.net wrote:
>Hello,
>
>I've been playing with aux/wacom and aux/tablet on x61t.
>aux/tablet often crashes with a `no concurrent reads, please'
>error mid-drawing.  From what I can tell both of these
>programs are early 9front additions.  Has anyone else seen
>these errors?
>
>I think that the issue is that nothing prevents the .req
>field of each Reader from being modified at the same time
>as a read(2) comes in, so at some point a new read could
>check the field before sendout() can clear it.  The patch
>below seems to work.
>
>What do you think?
>
>Thanks,
>qwx
>
>
>diff 69249e8313fb8853c5c162dd16b927099e25bb15 uncommitted
>--- a//sys/src/cmd/aux/wacom.c
>+++ b//sys/src/cmd/aux/wacom.c
>@@ -303,11 +303,13 @@
> 		reply(req, m);
> 		msgdecref(m);
> 	} else {
>+		lock(&readers);
> 		if(r->req) {
> 			respond(req, "no concurrent reads, please");
> 		} else {
> 			r->req = req;
> 		}
>+		unlock(&readers);
> 	}
> }
> 
>

no clue as to the cause, but i do occasionally see this on both x60t and x61t.

sl

  reply	other threads:[~2021-12-06 10:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06  2:50 qwx
2021-12-06  3:08 ` Stanley Lieber [this message]
2021-12-14 23:55 ` qwx
2021-12-15  0:00   ` Stanley Lieber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FBA3C587-0D86-41F2-BBC7-1A0F4AD1AC54@stanleylieber.com \
    --to=sl@stanleylieber.com \
    --cc=9front@9front.org \
    --subject='Re: [9front] aux/wacom: possible race' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).