Bug 134093
Summary: | Java Application crashes when run from cron | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Dirk Gfroerer <dirk.gfroerer> | ||||||||||||
Component: | IBMJava2-JRE | Assignee: | Thomas Fitzsimmons <fitzsim> | ||||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||
Priority: | medium | ||||||||||||||
Version: | 3.0 | ||||||||||||||
Target Milestone: | --- | ||||||||||||||
Target Release: | --- | ||||||||||||||
Hardware: | x86_64 | ||||||||||||||
OS: | Linux | ||||||||||||||
Whiteboard: | |||||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||
Clone Of: | Environment: | ||||||||||||||
Last Closed: | 2004-12-22 17:24:47 UTC | Type: | --- | ||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||
Documentation: | --- | CRM: | |||||||||||||
Verified Versions: | Category: | --- | |||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||
Embargoed: | |||||||||||||||
Attachments: |
|
Description
Dirk Gfroerer
2004-09-29 16:21:16 UTC
Created attachment 104516 [details]
Source file with sample program
This may be caused by the stack limit workaround in the java wrapper script. Open /etc/alternatives/jre_ibm/bin/java with a text editor and try commenting out the if clause. I've tried calling * /usr/lib/jvm/java-1.4.2-ibm-ibm-1.4.2.0/jre/bin/java.bin directly from cron * commented everything but the ulimit -s 10240 and called the shell script again. Again nothing happend (and I've got a defunct process). Can you run "env" on the command line and as a cron job and post the results? Likewise for "ulimit -a"? There may be relevant environment variables that are set on the command line but not by cron. Likewise, resource settings may differ in each case. Another (less likely) possibility is that this is a permission problem; does the cron job work when run from the root account? Created attachment 105190 [details]
env from command line
Created attachment 105191 [details]
env from cron
Created attachment 105192 [details]
ulimit from command line
Created attachment 105193 [details]
ulimit from cron
I've created the requested outputs and added them via attachements to the bug. Running the program from cron as root didn't work, too. What still confuses me, is, why prepending LD_ASSUME_KERNEL=2.4.1 helps? LD_ASSUME_KERNEL=2.4.1 causes the dynamic linker to load the LinuxThreads thread library instead of the default, NPTL. It appears that the JVM happens to work with LinuxThreads but not with NPTL. The only difference in the ulimits is the max user processes value. You may want to try setting that limit in the cron job to the command line value. From the environment variables in the output you've posted, I would guess that only NLS_LANG, USER, MAIL, LANG and DISPLAY may be relevant. Try setting them for the cron run. Hopefully IBM will release a native x86-64 JVM soon, which will likely solve this problem without requiring any of these workarounds. IBM has released a native x86-64 JVM that will ship with RHEL3-U4 as version java-1.4.2-ibm-1.4.2.0-1jpp_13rh. Just brought the machine to U4 and installed the new java rpms. Everything is now working as expected. So this bug can be closed from my point of view. Thanks! |