Apache server crashes when logging in to application
My experience is limited regarding all above except C++ and in this case my C++ knowledge doesn’t help much.
The Linux version is to be changed to a later one in a new environment and the MySql –server is to be running on a separate machine. PHP and Apache is not to be upgraded.
Since the application is installed in /myapp/ all functionality, MySql, PHP, Apache is located under /ada today. The new environment requires that the top directory is /opt/. This means that my system will now be located like /opt/ada/. I expected that it would be possible to just copy the /ada –directory and move it to the new environment. Changes in the defined paths in the system would be necessary of course. All paths starting with /ada/ are now changed to /opt/ada/ in the files.
The webserver starts in the new environment and it is possible to get the login page. It looks fine but having entered user name and password and Enter it crashes.
In the old working environment it works fine and I have used strace in both environments to see what the differences are. There are differences from the very beginning. Log snippets file attached.
Now the questions:
1. As mentioned above the /ada directory was copied(made a .tar-file) from the old environment and put it in the /opt directory in the new. Is this a possible way to get the system working or am I bound for problems? I mean, should I have installed php, Apache in some other way or is this way OK...?
2. In the beginning of both logs ther is a read but it differs.
Working environment shows "read(9, "GET /query/ HTTP/1.1\r\nAccept: im"..., 8000) = 680" while
non-working shows "read(9, "POST /authenticate HTTP/1.1\r\nAcc"..., 8000) = 778"
I am speculating that this difference is the root cause to the segmentation fault later on. Since it is the same code in both environments I have no idea why this differs.
I have been thinking about that there might be some access/permission/configuration problem with Apache.
Any ideas about what to check/do about this? Environment variables maybe?
3. Anybody recognizing the futex in the segmentation fault and what the problem might be?
Running gdb shows more information
The continuing investigation regarding why the web server processes crashes has shown that they crash even the first time the IP-address is entered in the web-browser. The attached file with the strace snippets is then unfortunately misguiding. It seems to be working fine but there is a segmentation fault before these logs are created.
When using gdb on all the processes it has been found that the segmentation fault occurs when the pthread_cancel-method in libpthread is called.
More information about the system is that it has been compiled and linked in a 32-bit machine and is now running in a 64-bit machine. The libpthread used in the old environment is 2.3.4 and now it is 2.5.
Anybody having any ideas to why these crashes occur? What to check? Is recompiling/linking in the 64-bit environment necessary? Are libpthread 2.3.4 and 2.5 not compatible or...?