<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: TRB Homework, Part N: Threads</title>
	<atom:link href="http://cgra.net/2021/08/trb-homework-part-n-threads/feed" rel="self" type="application/rss+xml" />
	<link>http://cgra.net/2021/08/trb-homework-part-n-threads</link>
	<description></description>
	<pubDate>Thu, 16 Apr 2026 05:26:39 +0000</pubDate>
	<generator>http://polimedia.us</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cgra</title>
		<link>http://cgra.net/2021/08/trb-homework-part-n-threads/comment-page-1#comment-7</link>
		<dc:creator>cgra</dc:creator>
		<pubDate>Fri, 27 Aug 2021 08:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://cgra.net/?p=10#comment-7</guid>
		<description>@spyked

Despite the article name suggesting it'd be highly TRB-specific, I ended up with a pretty generic summary about concurrency. It's because I didn't have a clear picture even of the concurrency basics in my head; discovering it while I was trying to finish &lt;a href="/2021/08/trb-oom-patch-no_peer_dumpster" rel="nofollow"&gt;a patch&lt;/a&gt;. I might continue on the topic some other day, in form of another article, or even a book-style chapter/specification. Time will tell...

Re your TRB documentation points: I think were well worth mentioning in this context, and I find the presented open questions entirely justified!</description>
		<content:encoded><![CDATA[<p>@spyked</p>
<p>Despite the article name suggesting it'd be highly TRB-specific, I ended up with a pretty generic summary about concurrency. It's because I didn't have a clear picture even of the concurrency basics in my head; discovering it while I was trying to finish <a href="/2021/08/trb-oom-patch-no_peer_dumpster" rel="nofollow">a patch</a>. I might continue on the topic some other day, in form of another article, or even a book-style chapter/specification. Time will tell...</p>
<p>Re your TRB documentation points: I think were well worth mentioning in this context, and I find the presented open questions entirely justified!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spyked</title>
		<link>http://cgra.net/2021/08/trb-homework-part-n-threads/comment-page-1#comment-5</link>
		<dc:creator>spyked</dc:creator>
		<pubDate>Sun, 22 Aug 2021 20:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://cgra.net/?p=10#comment-5</guid>
		<description>At some point I did some digging through TRB's &lt;a href="http://thetarpit.org/2020/a-cursory-look-at-the-infamous-trb-wedge-bug" rel="nofollow"&gt;getdata weirdness&lt;/a&gt;, which got me thinking that TRB oughta come with at least two pieces of documentation in order to be considered "complete".

One of them would be a documentation of the memory/concurrency model, which is, I believe, what you're considering. Still, there are a few interesting unanswered questions here in my opinion: what dynamic data handling is TRB performing at run-time? which of is it assumed to be thread-local and what portion of it is considered to be "shared" between threads? what synchronization primitives are used for protection and how? Concurrency is a bitch, what with data races, lock ordering and indefinite postponement issues, so maybe there's a few ways to get TRB to hang merely through bad synchronization design. Maybe, I haven't really looked, to be honest.

The other would be a line-by-line annotation of the code with what it &lt;em&gt;actually&lt;/em&gt; does, especially with respect to assumptions in the previous paragraph. It's a ton of work, but I for one see no other way to guard TRB against future exploits. The good part is that it only needs to be done once, and it's done for as long as Bitcoin remains a thing.</description>
		<content:encoded><![CDATA[<p>At some point I did some digging through TRB's <a href="http://thetarpit.org/2020/a-cursory-look-at-the-infamous-trb-wedge-bug" rel="nofollow">getdata weirdness</a>, which got me thinking that TRB oughta come with at least two pieces of documentation in order to be considered "complete".</p>
<p>One of them would be a documentation of the memory/concurrency model, which is, I believe, what you're considering. Still, there are a few interesting unanswered questions here in my opinion: what dynamic data handling is TRB performing at run-time? which of is it assumed to be thread-local and what portion of it is considered to be "shared" between threads? what synchronization primitives are used for protection and how? Concurrency is a bitch, what with data races, lock ordering and indefinite postponement issues, so maybe there's a few ways to get TRB to hang merely through bad synchronization design. Maybe, I haven't really looked, to be honest.</p>
<p>The other would be a line-by-line annotation of the code with what it <em>actually</em> does, especially with respect to assumptions in the previous paragraph. It's a ton of work, but I for one see no other way to guard TRB against future exploits. The good part is that it only needs to be done once, and it's done for as long as Bitcoin remains a thing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
