Closed llmII closed 5 years ago
Further looking into this issue it would seem that in FreeBSD 11 lua53 port was built with pthreads linked, whereas it seems this has changed in FreeBSD 12. The change was unexpected and building lua from source, editing src/Makefile and adding '-pthread' to LDFLAGS fixes this issue. Waiting on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235158 to see if this is intended, and one should always build their own lua, or if this will be fixed to work as before.
Hi @daurnimator,
We had an email conversation about this issue that ended inconclusively (Re: Luaossl on FreeBSD). There was evidence that the bug creating this issue had been resolved which was documented in the Lua53 port review https://reviews.freebsd.org/D13690. I was told it was fixed by the commit here: https://svnweb.freebsd.org/base?view=revision&revision=276630. I had asked you if there was tests I could run to confirm this bug either way, but none were forthcoming. I then assumed the test I had run was adequate. I apologize for the mistake.
Is it possible for someone to provide a test that I can run to validate any fix that comes out of this? My preference is a fix for FreeBSD if possible, but I assume at this point I'll need to add an option to the port.
@llmII I will make further comments in the bugzilla issue you opened. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235158
Once again, apologies to all.
Sorry, I just saw the test code in the initial message. I'll work with that unless there is something more extensive. Cheers.
I've put forward a patch for the FreeBSD port Makefile that adds pthread as a build option (Lua 53 only). Review here: https://reviews.freebsd.org/D18939
@RussellHaley thanks for sorting it out :)
Glad I could help! I'm still waiting for the patch to get pushed up. I'm pleased that we found a regression in FreeBSD.
The below code should trigger the issue. Have tried on two FreeBSD 12.0-RELEASE-p2 systems and this is the code abstracted out of something else I was working on that seems to demonstrate the issue best.
Some possible directions to look are - Line 340 in thread.c .
fprintf sprinkling like the below modification around Line 340 basically pointed at it and I'm at a loss as to what would be causing that function to hang.