https://pantsbuild.org/ logo
a

acoustic-book-58772

01/08/2019, 7:06 PM
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

aloof-angle-91616

01/08/2019, 7:09 PM
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

witty-crayon-22786

01/08/2019, 7:09 PM
that particular issue should be fixed in more recent versions of pants.
💯 1
👖 1
🔥 2
a

aloof-angle-91616

01/08/2019, 7:09 PM
even better!
w

witty-crayon-22786

01/08/2019, 7:09 PM
(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

acoustic-book-58772

01/08/2019, 7:15 PM
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

aloof-angle-91616

01/08/2019, 7:18 PM
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

witty-crayon-22786

01/08/2019, 7:19 PM
both 1.11.0 and 1.12.0 are valid. it just took longer than usual to cut 1.11.0
a

acoustic-book-58772

01/08/2019, 7:21 PM
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

aloof-angle-91616

01/08/2019, 7:37 PM
glad to hear it!!
5 Views