sailorproject / sailor

A Lua MVC Web Framework.
MIT License
921 stars 125 forks source link

lfs.so seems to be causing a fault in running page #182

Open jqwez opened 1 year ago

jqwez commented 1 year ago

I have been diligently trying to fight this issue on my own since this repo is lacking attention. I might just fork the repo and replace lfs entirely with the io library to see if it's a problem with loading up the ?.so files. Nobody else seems to have had this issue but most issues are over 3 years old.

Setup: -Ubuntu 22.04 Server -Apache2 Server My apache settings are standard for the project, that is the ones expected from installation instructions. -Lua 5.1.5 -Sailor 0.5-4

Issue: Server 500 error / Server hanging with no response when trying to load a webpage.

Logs: sudo tail -1 /var/log/apache2/error.log [core:notice] [pid 83778:tid 140461499479936] AH00051: child pid 84880 exit signal Segmentation fault (11), possible coredump in /etc/apache2 This log doesn't make sense since require 'lfs' shouldn't cause a seg fault only running a ?.so should.

Troubleshooting: -Previously lfs.so wasn't loading at leading to 500 server fault but I have both tried adding the lfs.so to the Sailor project folder and adding LuaPackageCPath to the .htaccess with the appropriate location with the same results, the webpage hangs and never returns. -I have checked to make sure lfs is working which it does both in the REPL and my own script. I have ensured a good working mod_lua which, when loading a non Sailor script, returns a webpage successfully. -I have tried also doing this whole ordeal with an NGINX server and it seems to be the same issue getting hung up on the webpage. -When I try running server with the Xavante dev server, I'm able to visit at localhost:8080 and get a webpage although I think some styling is missing. -I have tried reinstalling lfs via luarocks via luarocks and indicating lua version and compiling it myself. -From where I stand, I can only imagine it seems to be a weird permissions problem. I have tried changing the sailor project's directory ownership with chown -R www-data <project-folder. The only other way I have been able to replicate a server hanging problem without ever delivering a 500 status message is by having my own script try to do something it doesn't have permission to do e.g. create a file in a location without proper permissions.