dpoon
03-06-2005, 03:51 PM
I've just upgraded my VPS from Fedora Core 2 to FC3. The upgrade went rather well (I'll outline how I did it in the Share Knowledge forum (http://forums.rimuhosting.com/phpBB/viewtopic.php?t=52)). However, I noticed MySQL server and the JRE segfaulting after the upgrade, necessitating a workaround.
Symptom 1: MySQL server fails to start. If you run "/sbin/service mysqld start", you'll see a segfault logged in /var/log/mysqld.log. However, it starts up fine if you run "/etc/init.d/mysqld start" instead.
Symptom 2: The Java Runtime Environment segfaults if it is spawned from a CGI. (Yeah, I know, this is a silly way to do things.)
The common theme is that both /sbin/service and Apache httpd clear the environment variables before spawning their subprocesses. If I modify /etc/init.d/mysqld and my CGI to explicitly export LD_ASSUME_KERNEL=2.4.19 in the environment, the problems go away.
I notice that the Rimu setup includes /etc/profile.d/glibc.sh which exports LD_ASSUME_KERNEL=2.4.19. I presume that this is necessary because User-Mode Linux does not support thread-local storage (http://linuxfromscratch.org/pipermail/lfs-hackers/2004-July/001815.html). (The comment in glibc.sh is a bit vague; can anyone at Rimu confirm my speculation?) If that's the case, you would also need to handle apps that are not launched from the shell. I recommend implementing the following workarounds:
1) In /etc/init.d/functions, add
LD_ASSUME_KERNEL=2.4.19; export LD_ASSUME_KERNEL
2) Create /etc/httpd/conf.d/rimu.conf, containing
PassEnv LD_ASSUME_KERNEL
Perhaps these should be added to the Rimu errata. I can't explain why these problems weren't apparent before my FC2->FC3 upgrade, though.
Symptom 1: MySQL server fails to start. If you run "/sbin/service mysqld start", you'll see a segfault logged in /var/log/mysqld.log. However, it starts up fine if you run "/etc/init.d/mysqld start" instead.
Symptom 2: The Java Runtime Environment segfaults if it is spawned from a CGI. (Yeah, I know, this is a silly way to do things.)
The common theme is that both /sbin/service and Apache httpd clear the environment variables before spawning their subprocesses. If I modify /etc/init.d/mysqld and my CGI to explicitly export LD_ASSUME_KERNEL=2.4.19 in the environment, the problems go away.
I notice that the Rimu setup includes /etc/profile.d/glibc.sh which exports LD_ASSUME_KERNEL=2.4.19. I presume that this is necessary because User-Mode Linux does not support thread-local storage (http://linuxfromscratch.org/pipermail/lfs-hackers/2004-July/001815.html). (The comment in glibc.sh is a bit vague; can anyone at Rimu confirm my speculation?) If that's the case, you would also need to handle apps that are not launched from the shell. I recommend implementing the following workarounds:
1) In /etc/init.d/functions, add
LD_ASSUME_KERNEL=2.4.19; export LD_ASSUME_KERNEL
2) Create /etc/httpd/conf.d/rimu.conf, containing
PassEnv LD_ASSUME_KERNEL
Perhaps these should be added to the Rimu errata. I can't explain why these problems weren't apparent before my FC2->FC3 upgrade, though.