Hey guys, I'm jumping on the train of building a c...
# general
a
Hey guys, I'm jumping on the train of building a cache server for pants, and am running into some problems. I have setup a simple nginx server with dav enabled. When I try to compile something, I get these errors:
Copy code
objc[30554]: +[NSValue initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
objc[30555]: +[NSValue initialize] may have been in progress in another thread when fork() was called.
I checked the packets and do see the server respond with 404s when the file requested by the GET does not exist, and assumed pants will then build the artifacts and attempt to write it back. But it doesn't seem to even get to the compilation part before hitting these errors. A quick google search says this error has to do with some multithreading restriction with osx? Any thoughts? I'm running osx 10.14 (mojave), running Pants 1.11.0. I have the read and write url set to be the same in
pants.ini
for the
[cache]
block
a
this would be fantastic if you were to open source it! i am planning to do this soon for our internal buildcache but it would be truly wonderful if the community could converge on a solution earlier (although the v2 engine uses a cache remote process execution api which would replace this -- but that will happen after all of pants is migrated to the v2 engine). i believe @curved-vase-73456 has experience implementing the remote cache, although i believe he implemented it with django (and has more familiarity with what the cache does than i do). what is the multithreading restriction you're finding? how does that relate to the use of pants -- is the threading restriction on pants, or on the nginx side?
🔥 1
w
that particular issue should be fixed in more recent versions of pants.
💯 1
👖 1
🔥 2
a
even better!
w
(thanks to Yi)
👌 2
the fix was https://github.com/pantsbuild/pants/pull/6748 , so it looks like it was first in 1.12.x
a
Hmmm I see. I'll go play with 1.12 and see how that goes. Also speaking of 1.12, is the 1.12.0 release on the website an error? The release date is only a few days after rc0, and is the same as 1.11.0 so I just assumed it was an accident?
a
that may have been my fault, i seriously dropped the ball on releasing 1.11.0 i think. i'm sorry for the confusion.
is there an issue with 1.12.0 beyond that?
w
both 1.11.0 and 1.12.0 are valid. it just took longer than usual to cut 1.11.0
a
Hmmm gotcha. I'll go try 1.12.0 and see how it goes. Thanks!
Yup that error is gone in 1.12.0. Thanks @witty-crayon-22786 and @aloof-angle-91616!
✨ 1
a
glad to hear it!!