[jboss-user] [Beginners Corner] - DANGER !!!!!! BE CAREFUL OF LD_ASSUME_KERNEL=2.1.4 ABOVE

ngonidan do-not-reply at jboss.com
Tue Mar 3 01:57:15 EST 2009


DANGER !!!!!

BE CAREFUL OF SETTING LD_ASSUME_KERNEL=2.1.4 ABOVE in newer Linux distros like Fedora 4 upwards etc

PLEASE BE CAREFUL OR YOU WILL CRASH YOUR MACHINE AND FAIL TO LOGIN



What is LD_ASSUME_KERNEL 

A while back a environment variable was introduced (mostly) to allow users to control how Linux handled threading issues. All sorts of applications (in particular Java) started telling users to set this LD_ASSUME_KERNEL variable. If you still have this variable set in Fedora Core 4, you are looking for trouble. 
*****It’s true, I ngonidan crashed our Proxy server at office because I set the variable to 
export LD_ASSUME_KERNEL=2.1.4
**********************
When Linux was changing threading models the new threading model broke several applications (in particular Java) and so they added a variable you could set to get the old threading behavior. Many people just added this to their .profile or login to always allow things like Java to work. 
Another application that had issues at one point with the threading model was rpm. After some upgrades you would need to set LD_ASSUME_KERNEL to some particular value to get rpm to work at all. 
At some times during the transition, mozilla/firefox needed LD_ASSUME_KERNEL to properly run. Those days are long past. 
This was all well and good for transition to a new threading model/abi, but this has long since been completed. If you have LD_ASSUME_KERNEL set in Fedora Core you will see nifty errors like: 
/usr/lib/openoffice.org2.0/program/javaldx: /lib/obsolete/linuxthreads/libpthread.so.0: version `GLIBC_2.3.3' not found 
and 
rpmdb: unable to initialize mutex: Function not implemented. error: cannot open Name index using db3 - Function not implemented (38) 
The solution is of course to go through all your personal init files and make sure you remove any mention of LD_ASSUME_KERNEL. Including .profile, .bashrc, etc. 


How did I Ngonidan solve the crash
NOW, soon after setting  export LD_ASSUME_KERNEL=2.1.4 in bashrc, I could not login as root. This meant the whole machine users were in trouble. Now I got a tip to use a failsafe session, which is kind of a safe mode for linux. BUT, commands Do NOT work as expected e.g. programs like vi, etc. I think it’s coz programs/services are not loaded so what I did, I thought of using the append commands. I booted linux, took note of Fedora Kernel 2.6.18-1.2798.fc6
Solution- was to simply append another environment variable soon after that erroneous line, which meant that will be the variable which will be loaded 
# echo export LD_ASSUME_KERNEL=2.6.18-1.2798.fc6 >> /etc/bashrc
That’s it. Disaster recovered, will never play again with LD_ASSUME_KERNEL !!!!!!!!


If above fails Try using an Ubuntu Live CD to go in and edit the file and save and reboot machine. But for me Ubuntu Live CD took too long or actually failed to startup my machine


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214381#4214381

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214381




More information about the jboss-user mailing list