My journey started when deploying and getting a 500 Server error. Checking permissions, writable config, suexec logs, libunwind8 installation but it still gave me a server error. Looking at the logs I saw the famous “line 118” error, so I tried starting the binary from the command line: Segmentation Fault.
Running it standalone on the same server worked fine.
So, I created a simple new web application (empty page with a label) and tried to deploy that: same error.
Did a backtrace on it:
#0 0x00007f358298c854 in ?? () from /usr/lib/x86_64-linux-gnu/libunwind-x86_64.so.8
#1 0x00007f358298d7b4 in _Ux86_64_step () from /usr/lib/x86_64-linux-gnu/libunwind-x86_64.so.8
#2 0x00007f35841e5dff in ?? () from /var/www/vhosts/docs.vivia-connect.nl/httpdocs/cgi-bin/Test Libs/XojoConsoleFramework64.so
#3 0x00007f35842a61dd in RuntimeRaiseException () from /var/www/vhosts/docs.vivia-connect.nl/httpdocs/cgi-bin/Test Libs/XojoConsoleFramework64.so
#4 0x00007f35842a639d in RuntimeRaiseFunctionNotFoundException () from /var/www/vhosts/docs.vivia-connect.nl/httpdocs/cgi-bin/Test Libs/XojoConsoleFramework64.so
#5 0x000000000032fdc7 in _WebSupport.set_umask%%i8 ()
#6 0x0000000000319120 in _CGIGateway.Start%b%o<_HTTPServer.HTTPRequestHandler>i8 ()
#7 0x0000000000340c25 in WebApplication.Event_Run%i8%o<WebApplication>A1s ()
#8 0x00007f35841e423a in ?? () from /var/www/vhosts/docs.vivia-connect.nl/httpdocs/cgi-bin/Test Libs/XojoConsoleFramework64.so
#9 0x00000000002ac0d8 in ConsoleApplication._CallFunctionWithExceptionHandling%%o<ConsoleApplication>p ()
#10 0x00007f35842acbe6 in ?? () from /var/www/vhosts/docs.vivia-connect.nl/httpdocs/cgi-bin/Test Libs/XojoConsoleFramework64.so
#11 0x00007f35842abf39 in RuntimeRun () from /var/www/vhosts/docs.vivia-connect.nl/httpdocs/cgi-bin/Test Libs/XojoConsoleFramework64.so
#12 0x000000000040cf03 in REALbasic._RuntimeRun ()
#13 0x00000000004e18da in _Main ()
#14 0x00000000004e1283 in main ()
Now I am stuck. It seems that Libunwind is the problem right? Any ideas on how to fix this? Or am I overlooking the obvious?
[quote=473430:@Greg O’Lone]The only thing I can think of is that you don’t have your libraries up to date. Please check the versions of the following items via apt:
glibc-doc/xenial-updates,xenial-updates 2.23-0ubuntu11 all
glibc-doc-reference/xenial,xenial 2.19-1 all
glibc-source/xenial-updates,xenial-updates 2.23-0ubuntu11 all
libstdc++ seems to be installed in several versions, from 4 to 6. Libunwind8 is installed. ldd output is in a previous message.
The standalone compiled application runs fine on this server, I assume that the libraries are ok then?
Or maybe apt list is not the proper way of checking?
Also I noticed that in the /tmp directory a file with the name of the app-identifier is written with correct permissions so that seems to be ok.
[quote=473434:@Derk Jochems]@Paul Zwiers it’s been a while yeah…
Are you trying to daemonize the application yourself?
You should set the “application” to executable and don’t start it from the commandline. That won’t work it needs to be called from the cgi script.[/quote]
It is a standard new Web application, build as CGI 64 bit with only a label on an empty page, No other code.
I understand I need to run the cgi from apache, but if I run the executable binary directly, I assume I get some errors, but no segfault right?
If thats the case then the app is getting at least part way into a running state. Are you perhaps running low on RAM?
FWIW, internally the CGI and Standalone modes are nearly identical, but that call to umask is definitely one of the differences. Umask also has a command-line component. Perhaps you should check and see if thats installed?
I’ve ran into issues with the VPS one, also resulting in Segmentation Faults. Even on Commandline apps without any code. The VPS servers are running a modified kernel I believe, causing incompatibility with libunwind.
It may be better to move to hostnet for example, a VPS with debian and plesk runs flawless and is easy to manage. Then there is Xojo Cloud, or any other (total control VPS) would do. It could be strato has a different kernel, if so it’s probably not the best idea to stay there.
[quote=473458:@Greg O’Lone]If thats the case then the app is getting at least part way into a running state. Are you perhaps running low on RAM?
FWIW, internally the CGI and Standalone modes are nearly identical, but that call to umask is definitely one of the differences. Umask also has a command-line component. Perhaps you should check and see if thats installed?[/quote]
RAM is available, umask is available. Your umask remarks made me check permissions, especially on the /tmp directory because I though it could be that the tmp-file is created, but after that the user might not be able to write to it or something. But all is fine in that area, as root user I have the same problems.
I guess this can very well be the outcome. This was a staging-issue, for production I need a NEN7510 certified hosting partner with a dutch datacenter, perhaps I will be staging there to. I have been using Strato for a long time and never had any complaints (also running (older) Xojo web apps), but unfortunately I need to switch.
[quote=473835:@Paul Zwiers]It is a VPS, but your remarks make sense. Before the libunwind8 requirements, I rolled out web-apps without any problems on the same server.
Would you happen to know if I switched to a Strato VPS on CentOS instead of Ubuntu, it would work?[/quote]
Nope, I have no clue. We switched to an ikoula dedicated server; hosted in France I believe…