3

I'm running into some very weird problems on my MacBook Pro (Intel, 2020, MacOS 11.1). Various command fail, but inconsistently. Running the same command twice can lead to different results.

Queries against my local Postgres server (running in Postgres.app) fail often (but not always) with errors that look like the following in my postgresql.log:

DETAIL:  Could not open file "pg_clog/0000": Interrupted system call.
ERROR:  checkpoint request failed
HINT:  Consult recent messages in the server log for details.

The specific file that fails to open varies; sometimes it's e.g. global/2671 or similar. I'm guessing these are just the internal files that Postgres uses.

When running a Rails app test suite against this same database, sometimes individual tests fail, other times the test command fails like so before I can get through the entire test suite:

<Thread:0x00007f8be1319808@/Users/tao/.rbenv/versions/2.6.6/lib/ruby/2.6.0/open3.rb:287 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    1: from /Users/tao/.rbenv/versions/2.6.6/lib/ruby/2.6.0/open3.rb:287:in `block (2 levels) in capture3'
/Users/tao/.rbenv/versions/2.6.6/lib/ruby/2.6.0/open3.rb:287:in `read': stream closed in another thread (IOError)
#<Thread:0x00007f8be13193a8@/Users/tao/.rbenv/versions/2.6.6/lib/ruby/2.6.0/open3.rb:288 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    1: from /Users/tao/.rbenv/versions/2.6.6/lib/ruby/2.6.0/open3.rb:288:in `block (2 levels) in capture3'
/Users/tao/.rbenv/versions/2.6.6/lib/ruby/2.6.0/open3.rb:288:in `read': stream closed in another thread (IOError)
Interrupted. Exiting...

Finished in 188.009977s, 3.2445 runs/s, 8.5315 assertions/s. 610 runs, 1604 assertions, 0 failures, 0 errors, 0 skips

A similar issue occurred when I tried to install a version of Ruby using rbenv. The same interrupted system call text appears in these errors.

Running disk First Aid in Mac OS' recovery mode didn't resolve anything, nor did reinstalling Postgres. After a clean install of Mac OS, the test suite passed once or twice before the same issues started appearing. Apple Support suggested resetting the SMC, to no avail.

I suspect something along the lines of a hardware problem, but Apple Diagnostics finds no issues, nor does memtester. I'm at a bit of a loss for what to do next to debug the issue. Are these problems consistent with a hardware fault, and what can I do next to find the root cause?

tao_oat
  • 173

1 Answers1

1

This was caused by Avast antivirus.

This is an issue in several apps in Big Sur. See this GitHub issue and this Hacker News thread for more discussion. In short:

The issue seems to be caused by some new security APIs in Big Sur. Apple has apparently started returning with errno=EINTR from some system calls that previously never returned this error.

tao_oat
  • 173