Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have Java (Java 6) applications running on RHEL kernel versions "2.6.32-573.1.1.el6.x86_64" and ""2.6.32-573.26.1.el6.x86_64".". These Java applications process several files in a day i.e. heavy in IO.
The Java application in question connects to an Oracle DB, fetches rows, and for each row does the following:
1. stores the value of a column that has an XML string into a Java DOM variable.
2. writes the DOM variable as XML string to a XML file using the Java IO package.
3. parses the DOM variable for a few XML element values and outputs these values to a text file
1 out of 5 times, i see that the XML file generated in step 2 above is getting corrupted. The corruption spans ~4K bytes somewhere in the middle of the file. The corrupting data appears to be coming from the OS page cache as this data is not related to the Java application in question. The XML file being generated is about 10 MB in size.
Appreciate if folks can suggest on how to go about identifying the cause of this corruption. XML data in DB is NOT corrupt. We do not see corruption of Java variable either as text file generated in step 3 above is NOT corrupt either.
Hi,
I have Java (Java 6) applications running on RHEL kernel versions "2.6.32-573.1.1.el6.x86_64" and ""2.6.32-573.26.1.el6.x86_64".". These Java applications process several files in a day i.e. heavy in IO. The Java application in question connects to an Oracle DB, fetches rows, and for each row does the following:
1. stores the value of a column that has an XML string into a Java DOM variable.
2. writes the DOM variable as XML string to a XML file using the Java IO package.
3. parses the DOM variable for a few XML element values and outputs these values to a text file
1 out of 5 times, i see that the XML file generated in step 2 above is getting corrupted. The corruption spans ~4K bytes somewhere in the middle of the file. The corrupting data appears to be coming from the OS page cache as this data is not related to the Java application in question. The XML file being generated is about 10 MB in size.
Appreciate if folks can suggest on how to go about identifying the cause of this corruption. XML data in DB is NOT corrupt. We do not see corruption of Java variable either as text file generated in step 3 above is NOT corrupt either.
Confused here...if the data is not corrupted in step 3, how would it be corrupt in step 2? Isn't step 2 FEEDING step 3??
And is is **ALWAYS** every fifth try? If so..I'd look hard at the application regarding whatever loop is there. And what do you mean by 'corrupt'?? Missing/extra data? Garbled? Could the variable have old data in it from the previous loop that isn't getting cleared out? And if you're saying that the data in step 3 is always correct, that means the data in step 2 is ALSO correct, just not getting written correctly...which gives you another piece to debug.
Sounds like a custom application...there isn't alot we can tell you, since this is all your custom code.
I would be looking at the code too. This intermittent type of error smacks of someone "helping" gc by setting a reference to null, and then later getting bitten by gc doing its thing.
The java VM might also be screwing up (much more unlikely), or the Linux mm code. The likelihood of that one I'd have diminishingly close to zero.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.