Reputation: 6657
I have one application which runs fine on a normal system having 4 GB RAM, but when I set my system RAM to 12 GB, the system crashes, and I need to restart the application.
Do I have to set any kernel parameters manually for my RAM changes???
Details of the operating system and crash dump is given below
OS
Linux manage 2.6.39.4-1smp #19 SMP Tue Nov 27 18:47:20 IST 2012 i686 unknown
Crash in /var/log/messages
Mar 06 16:43:39 1425640419 kernel: Pid: 29750, comm: java Tainted: G W 2.6.39.4-1smp #19
Mar 06 16:43:39 1425640419 kernel: Call Trace:
Mar 06 16:43:39 1425640419 kernel: [<c105e36f>] bad_page+0xb4/0xcd
Mar 06 16:43:39 1425640419 kernel: [<c105f6e8>] get_page_from_freelist+0x303/0x488
Mar 06 16:43:39 1425640419 kernel: [<c105f9e2>] __alloc_pages_nodemask+0xe2/0x525
Mar 06 16:43:39 1425640419 kernel: [<c106195d>] ? ____pagevec_lru_add_fn+0xa0/0xa6
Mar 06 16:43:39 1425640419 kernel: [<c107d0c0>] alloc_pages_vma+0x15b/0x164
Mar 06 16:43:39 1425640419 kernel: [<c106d477>] do_wp_page+0x402/0x686
Mar 06 16:43:39 1425640419 kernel: [<c106df1e>] handle_pte_fault+0x823/0x879
Mar 06 16:43:39 1425640419 kernel: [<c106ee53>] handle_mm_fault+0x159/0x16b
Mar 06 16:43:39 1425640419 kernel: [<c101a868>] ? mm_fault_error+0xc9/0xc9
Mar 06 16:43:39 1425640419 kernel: [<c101ab80>] do_page_fault+0x318/0x330
Mar 06 16:43:39 1425640419 kernel: [<c101a868>] ? mm_fault_error+0xc9/0xc9
Mar 06 16:43:39 1425640419 kernel: [<c1228f72>] error_code+0x5a/0x60
Mar 06 16:43:39 1425640419 kernel: [<c101a868>] ? mm_fault_error+0xc9/0xc9
Mar 06 16:43:39 1425640419 kernel: Disabling lock debugging due to kernel taint
Mar 06 16:43:39 1425640419 kernel: BUG: Bad page state in process java pfn:bf081
Mar 06 16:43:39 1425640419 kernel: page:f25e3020 count:0 mapcount:0 mapping:00b40000 index:0x0
Mar 06 16:43:39 1425640419 kernel: page flags: 0x10a30000(swapcache|mappedtodisk|mlocked)
search hit BOTTOM, continuing at TOP
Upvotes: 0
Views: 382
Reputation: 473
Well, I think there could be a few issues, probably not related to Java. I've put them in the order of easiest to hardest, not most to least likely.
1)
If you have exactly 12 GB RAM, decrease the JVM allocation. Maybe some breathing room will help.
2)
The first is to make sure it's not a security/limits issue. Check:
/etc/security/limits.conf
Specifically look for a memlock limit. Memlock reserves RAM for shares, which may or may not be applicable to your system. If the Memlock is set too high, maybe there's some sort of weird conflict. Follow the rule:
Free memory (allocable) = installed RAM - 2 GB - Memlock
3)
If you're running any virtualization software (VirtualBox and a few others), this module is known to taint the kernel. If it's present, remove it and see if the problem is fixed.
4)
This can be caused by hardware problems. Servers can run for days even weeks until a crash happens due to a (minor) hardware problem. Run a memtest and remove any bad RAM sticks. I remember reading an article about a server that would crash about every 30 days running JavaEE. The guy ran a memtest after a few months and found a bad RAM stick. It was replaced and the crashes stopped.
5)
Run:
lsmod
And look for anything out of the ordinary, especially proprietary drivers. These are usually the culprit for kernel taints. Remove them if possible.
6)
If you've gotten to here, I'm afraid you'll have to do some additional digging to find the cause of the taint. Almost always the taint is caused by an non-GPL compliant kernel module. This should be outside the realm of of a JVM (unless you have a plugin). Check this article for finding and resolving problems with kernel taints.
I can't say for sure if any of these are the cause of your problem, but the first few are easy to test and take little time. Hopefully this can get you on the right track.
Upvotes: 2