9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: noam@pixelhero.dev
To: 9fans@9fans.net
Subject: Re: [9fans] [PATCH] fossil: fix a deadlock in the caching logic
Date: Tue, 04 Apr 2023 18:15:13 -0400	[thread overview]
Message-ID: <F2F9C9AB1A28283E528A4861D6E8A813@pixelhero.dev> (raw)
In-Reply-To: <EB8D37D9-6D99-4F9C-B7F1-050CB5BE7D7E@quintile.net>

Quoth Steve Simon <steve@quintile.net>:
> was this hard to reproduce?

I've seen it sporadically over the last year, and - when looking for it -
was able to trigger it deliberately yesterday with minimal effort the
first time I looked for it.

...of course, when I was later trying to reproduce it a third time, I
wasn't able to trigger it even on the fs running *without* the patch, so.
~50% reproducibility rate so far when I'm actively trying to hit it.

I'm fairly sure the root cause is a race condition between some of the
periodic threads - this is only triggered when we try to flush a clean
block, which isn't a common occurrence - but I wouldn't have put in so
much effort to fix this if it wasn't something I semiregularly ran into.

for(f in `{walk /sys})
        chmod +w $f

I think this, combined with the periodic flush routines and tight timing,
consistently reproduces it. There's probably a more general way to do so,
but without diving even deeper and seeing how we end up trying to flush
clean blocks, it's hard to say for sure.

fossil is *usually* pretty stable for me these days. My thinkpad often
has an uptime of weeks, and usually resets because I'm hacking on the
system and need to reboot to test it, not because of fossil.

I *have* seen bugs depressingly often, though. Once every month or so,
pretty consistently.

e.g. building any version of Go newer than 1.7 on my thinkpad crashes
fossil with ~50% consistency. The rest of the time, it alternates
between sporadic failures due to bugs in the Go compiler, and actually
working.

Similarly, using kvik's clone tool to move large volumes of data has
been a reliable way to crash fossil for me in the past (100% reliability
- there was an invocation that would cause the system to die literally
every time, but I don't remember exactly which dataset it was, or
what level of parallelism was required).


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T354fe702e1e9d5e9-M4de9844d7316ae1c346391d7
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

      parent reply	other threads:[~2023-04-04 18:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 17:15 noam
2023-04-04 18:03 ` Steve Simon
2023-04-04 18:34   ` Skip Tavakkolian
2023-04-04 20:44     ` Charles Forsyth
2023-04-04 20:50       ` Charles Forsyth
2023-04-05  1:59         ` noam
2023-04-05 21:25           ` Charles Forsyth
2023-04-06  3:22             ` noam
2023-04-06  3:57               ` Lucio De Re
2023-04-08  7:50                 ` hiro
2023-04-08 14:30                   ` Charles Forsyth
2023-04-08 14:36                     ` Charles Forsyth
2023-04-08 15:09                       ` Dan Cross
2023-04-08 15:27                         ` Steffen Nurpmeso
2023-04-08 17:12                         ` Bakul Shah
2023-04-04 22:07       ` Anthony Martin
2023-04-05  2:48         ` noam
2023-04-04 22:15   ` noam [this message]

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=F2F9C9AB1A28283E528A4861D6E8A813@pixelhero.dev \
    --to=noam@pixelhero.dev \
    --cc=9fans@9fans.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).