<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Parallel-Tests on Saroj Maharjan</title>
		<link>https://sarojmaharjan.com/tags/parallel-tests/</link>
		<description>Recent content in Parallel-Tests on Saroj Maharjan</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
			<copyright>&amp;copy; All rights reserved.</copyright>
		
		
			<lastBuildDate>Wed, 23 Sep 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://sarojmaharjan.com/tags/parallel-tests/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Fix a Ruby pg Segfault on macOS When Running Rails Tests in Parallel</title>
				<link>https://sarojmaharjan.com/blog/rails-parallel-tests-pg-segfault-gssencmode/</link>
				<pubDate>Wed, 23 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://sarojmaharjan.com/blog/rails-parallel-tests-pg-segfault-gssencmode/</guid>
				<description>&lt;p&gt;I use &lt;code&gt;minitest&lt;/code&gt; to run parallel tests with &lt;code&gt;bin/rails test&lt;/code&gt; on &lt;a href=&#34;https://gemchat.org&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;GemChat&lt;/a&gt;&#xA; (Rails &lt;code&gt;8.1&lt;/code&gt;, Ruby &lt;code&gt;4.0.7&lt;/code&gt;, &lt;code&gt;pg&lt;/code&gt; &lt;code&gt;1.6.3&lt;/code&gt;, PostgreSQL in Docker).&lt;/p&gt;&#xA;&lt;p&gt;Running the Rails test suite in parallel should make it faster.&lt;/p&gt;&#xA;&lt;p&gt;Instead, on my Mac, it made Ruby segfault:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ bin/rails test&#xA;≈ tailwindcss v4.3.3&#xA;&#xA;Done in 134ms&#xA;Running 838 tests in parallel using 10 processes&#xA;Run options: --seed 8608&#xA;&#xA;# Running:&#xA;&#xA;/Users/zoras/.local/share/mise/installs/ruby/4.0.7/lib/ruby/gems/4.0.0/gems/pg-1.6.3-arm64-darwin/lib/pg/connection.rb:944: [BUG] Segmentation fault at 0x0000000124e34971&#xA;ruby 4.0.7 (2026-09-15 revision 229531a6cf) +PRISM [arm64-darwin25]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The parent process never stopped. It used 0% CPU and ignored everything except Ctrl+C. Serial runs with &lt;code&gt;PARALLEL_WORKERS=1&lt;/code&gt; always passed. For months, the workaround was &amp;ldquo;do not use parallel mode on macOS.&amp;rdquo;&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
