Re: SIGSEGV (segmentation fault) error occurred during init a JDOM element

Rolf Lear <[email protected]> Mon, 25 Feb 2013 20:25:45 -0500
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============2124416818==
Content-Type: multipart/alternative;
 boundary="------------090500080009030804080606"

This is a multi-part message in MIME format.
--------------090500080009030804080606
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi Krish.

This problem is almost certainly not related directly to JDOM. PermGen 
space is typically very small, and only used for two common purposes:
  - storing class definitions
  - storing String constants

  For your interest, the most common causes of PermGen Exhaustion that I 
know of are:

- using Tomcat and loading/unloading servlets - each 'classloader' has 
it's own space in PermGen, and since each servlet has it's own 
classloader the PermGen fills up fast because so many classes are 
duplicated in different places in PermGen
- Using lots of String.intern() calls - String.intern() uses a String 
constant reference from PermGen (or creates one if there was not one 
already). If you have many calls to String.intern() it can fill up 
PermGen very fast. JDOM does not do String.intern()

Rolf

On 25/02/2013 1:30 AM, Krishnendu Roy Chowdhury wrote:
>
> HI!
>
> I have faced a problem related to segmentation fault in Linux box. I 
> got following error -
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> J org.jdom.Element.<init>(Ljava/lang/String;)V
> ...
> siginfo:si_signo=SIGSEGV: si_errno=0, si_code=2 (SEGV_ACCERR), 
> si_addr=0x00002aab2ac30000
>
> ....................................
>
> error  occurred during error reporting (printing native stack), id 0xb
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> It is also shows in the log that 100% use of PermGen space. Why this 
> segmentation fault occurred? Is it related to JDK or JDOM?
>
> In my understanding, problem is related to JDK and occurred due to 
> 100% use of PermGen space. But I am not sure as Problematic frame is J.
>
> Another interesting point is "error occurred during error reporting 
> (printing native stack), id 0xb".
>
> I am using JDK6up20 and Linux environment. Please find attached logs 
> for details.
>
> Please help me.
>
>
> Regards,
> Krish
>
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/[email protected]


--------------090500080009030804080606
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Krish.<br>
      <br>
      This problem is almost certainly not related directly to JDOM.
      PermGen space is typically very small, and only used for two
      common purposes:<br>
      &nbsp;- storing class definitions<br>
      &nbsp;- storing String constants<br>
      <br>
      &nbsp;For your interest, the most common causes of PermGen Exhaustion
      that I know of are:<br>
      <br>
      - using Tomcat and loading/unloading servlets - each 'classloader'
      has it's own space in PermGen, and since each servlet has it's own
      classloader the PermGen fills up fast because so many classes are
      duplicated in different places in PermGen<br>
      - Using lots of String.intern() calls - String.intern() uses a
      String constant reference from PermGen (or creates one if there
      was not one already). If you have many calls to String.intern() it
      can fill up PermGen very fast. JDOM does not do String.intern()<br>
      <br>
      Rolf<br>
      <br>
      On 25/02/2013 1:30 AM, Krishnendu Roy Chowdhury wrote:<br>
    </div>
    <blockquote
cite="mid:[email protected]"
      type="cite">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody>
          <tr>
            <td style="font: inherit;" valign="top">
              <p class="yiv1670231864MsoNormal"><font size="3"
                  face="Times New Roman"><span style="FONT-SIZE:12pt;">HI!
                    <br>
                    <br>
                    I have faced a problem related to segmentation fault
                    in Linux box. I got following error -<br>
                    <br>
                  </span></font></p>
              <p class="yiv1670231864MsoNormal"><font size="3"
                  face="Times New Roman"><span style="FONT-SIZE:12pt;">&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br>
                    J org.jdom.Element.&lt;init&gt;(Ljava/lang/String;)V<br>
                    ...<br>
                    siginfo:si_signo=SIGSEGV: si_errno=0, si_code=2
                    (SEGV_ACCERR), si_addr=0x00002aab2ac30000</span></font></p>
              <p class="yiv1670231864MsoNormal"><font size="3"
                  face="Times New Roman"><span style="FONT-SIZE:12pt;">....................................</span></font></p>
              <p class="yiv1670231864MsoNormal"><font size="3"
                  face="Times New Roman"><span style="FONT-SIZE:12pt;">error
                    &nbsp;occurred during error reporting (printing native
                    stack), id 0xb<br>
                    &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;

                    <br>
                    <br>
                    It is also shows in the log that 100% use of PermGen
                    space. Why this segmentation fault occurred? Is it
                    related to JDK or JDOM?<br>
                    <br>
                    In my understanding, problem is related to JDK and
                    occurred due to 100% use of PermGen space. But I am
                    not sure as Problematic frame is J. <br>
                    <br>
                    Another interesting point is "error occurred during
                    error reporting (printing native stack), id 0xb".<br>
                    <br>
                    I am using JDK6up20 and Linux environment. Please
                    find attached logs for details.</span></font></p>
              <p class="yiv1670231864MsoNormal"><font size="3"
                  face="Times New Roman"><span style="FONT-SIZE:12pt;">&nbsp;</span></font></p>
              <p class="yiv1670231864MsoNormal"><font size="3"
                  face="Times New Roman"><span style="FONT-SIZE:12pt;">Please
                    help me.&nbsp;</span></font></p>
              <font size="3" face="Times New Roman"><span
                  style="FONT-SIZE:12pt;"><br>
                  Regards,<br>
                  Krish</span></font></td>
          </tr>
        </tbody>
      </table>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
To control your jdom-interest membership:
<a class="moz-txt-link-freetext" href="http://www.jdom.org/mailman/options/jdom-interest/[email protected]">http://www.jdom.org/mailman/options/jdom-interest/[email protected]</a></pre>
    </blockquote>
    <br>
  </body>
</html>

--------------090500080009030804080606--

--===============2124416818==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
--===============2124416818==--