5 Replies Latest reply: Aug 28, 2009 12:08 AM by 807567 RSS

    Core file truncation. ulimit is unlimited

    807567
      Hi,

      The core file gets truncated to 102400000 bytes(0.1 GB) exactly even though ulimit is unlimited. What other reasons could cause core file truncation?

      Am using Solaris 5.10.

      Thanks in advance,
      Balaji.

      Edited by: balaji_ramani on Aug 12, 2009 11:55 PM
        • 1. Re: Core file truncation. ulimit is unlimited
          800381
          What is the output from running "coreadm"?
          • 2. Re: Core file truncation. ulimit is unlimited
            807567
            Hi,

            Please find coreadm output below.

            global core file pattern:
            global core file content: default
            init core file pattern: core
            init core file content: default
            global core dumps: disabled
            per-process core dumps: enabled
            global setid core dumps: disabled
            per-process setid core dumps: disabled
            global core dump logging: disabled

            Thanks,
            Balaji.
            • 3. Re: Core file truncation. ulimit is unlimited
              abrante
              I don't know if its still relevant, but there used to be a variable that you could set in /etc/system to define the maximum corefile size globally, if i recall correctly the syntax was:

              sys:coredumpsize = <size>

              .. so, can you check /etc/system on the affected machine to see if you have anything suspect there?

              .7/M.
              • 4. Re: Core file truncation. ulimit is unlimited
                abrante
                I forgot a 'set' in my previous post..

                Also, if you know what process it came from, and have a new process running, you can examine the new process with 'plimit':

                If you are unsure which process that caused the corefile you can also use 'file' to check.

                Here is an example where i used 'kill -3' to cause a gnome-terminal to crash (for the record i normally use xterm, but gnome-terminal was a good example since it uses more memory ;-)

                berlioz(~):$ pkill -3 gnome-terminal

                berlioz(~):$ file core
                core: ELF 32-bit LSB core file 80386 Version 1, from 'gnome-terminal'

                berlioz(~):$ plimit `pgrep gnome-terminal`
                1470: /usr/bin/gnome-terminal
                resource current maximum
                time(seconds) unlimited unlimited
                file(blocks) unlimited unlimited
                data(kbytes) unlimited unlimited
                stack(kbytes) 8480 130336
                coredump(blocks) unlimited unlimited
                nofiles(descriptors) 256 65536
                vmemory(kbytes) unlimited unlimited
                berlioz(~):$

                This way you can find out the limits of the running process.

                .7/M.
                • 5. Re: Core file truncation. ulimit is unlimited
                  807567
                  Hi abrante,

                  I did a plimit on my process and found there was a limit on the process core dump size. Now I ll get this one fixed.

                  Thanks a ton.

                  Balaji.