cancel
Showing results for 
Search instead for 
Did you mean: 

JRC doesn't release open file descriptors

Former Member
0 Kudos

Hi everyone!<br>

We're running a small process on Red Hat Enterprise Linux version 4 based on the JRC 2.0-libraries (crjava-runtime_12.2.202) which renders some different reports for printing and creating pdf-files. This process needs to open different font-files (.ttf) when it renders the reports. These open files are released correctly after finishing the rendering, except of the Lucida-font-files which are included in the JRE (we tried all 1.6_xx-versions). I think it only happens if this font is used in the reports.

Every rendered report leaves some of these open files for the process until the system-side limit is reached what makes the process hang-up. Here's an example for the list of open files after several rendered reports:

<br><br>

[root@xyz]# lsof -p 30141<br>
COMMAND   PID USER   FD   TYPE     DEVICE     SIZE     NODE NAME  <br>
<br>
*faded out .jar-files and others*<br>
<br>
java    30141 root   93r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root   94r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root   95r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root   96r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root   97r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root   98r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root   99r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  100r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  101r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  102r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  103r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  104r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  105u   REG  8,5  8167424 47 /tmp/db-56611.crtmp <br>
java    30141 root  106r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  107r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  108r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  109r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  110r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  111r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  112u  IPv6   82449414 TCP localhost:60982->loc
alhost:1972 (ESTABLISHED)  <br>
java    30141 root  113r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  114r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  115r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  116r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  117r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  118r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  119r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  120r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  121r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  122u   REG  8,5  3481600 40 /tmp/db-56655.crtmp <br>
java    30141 root  123r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  124r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  125r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  126r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  127r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  128r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  129r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  130r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  131r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  132r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  133r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  134r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  135r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  136r   REG  8,2   344908   212956 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaBrightRegular.ttf   <br>
java    30141 root  137r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  138r   REG  8,2   242700   212960 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaTypewriterRegular.ttf <br>
java    30141 root  139r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf     <br>
java    30141 root  140r   REG  8,2   698236   212958 /usr/java/jdk1.6.0_0
6/jre/lib/fonts/LucidaSansRegular.ttf <br>
<br>
etc.<br>
etc.

<br><br>

I already tried to force the JRE not to use its own Lucida-fonts by installing them as "regular" fonts to the system and manipulating the fontconfig.properties-files, but that doesn't work at all.<br>

Anyway, I think it's a bug in the JRC-libraries which is really annoying and should be fixed as soon as possible.<br>

<br>

Any help and hints for workarounds are very welcome :)<br>

<br>

<br>

Best regards,<br>

Volker Deuss<br>

<br>

<br>

// edit: Formatting some text as code doesn't seem to be working, just like carriage return without using html-tags?

<br><br>Edited by: Volker Deuss on Aug 12, 2009 12:39 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks Ted. Is there an anticpated date for Update 7?

Former Member
0 Kudos

I tested our programs using the newest JRC libraries (2.208) after reading

Works fine, problem's solved. Thanks!

ted_ueda
Employee
Employee
0 Kudos

Hello Volker,

Does this happen with non-Java-default fonts?

The CR4E engine requests fonts from the Java JRE via AWT, so the default fonts are usually invoked when a font defined within the rpt file is not found on the system.

I'm wondering if you'd be able to look in the HTML or PDF output, to identify the fonts that are missing.

Sincerely,

Ted Ueda

Former Member
0 Kudos

Hello Ted, hello Don,

when I created this thread, I was telling that the process might be showing this behavior just if fonts of the JRE are used in the report. But that was not right. The reports we use are designed with Crystal Reports for Microsoft Windows. Most of them include Microsoft-fonts like Arial exclusively. Nevertheless open file descriptors are left when the JRC-based process renders these reports. This process on the other hand runs on a linux OS (RedHat). It is enabled to use fonts like Arial by msttcorefonts (http://corefonts.sourceforge.net/). I think this might be the constellation causing problems because (finally answering your request) the output does not miss any fonts. For example, there's a report just using Arial and Arial bold which are shown correctly in the pdf-file (and also listed in the attributes of it), opening and leaving the fonts of the JRE anyhow. Even though it wouldn't be necessary to even open them.

I hope I could help a little because I think there was at least one other having this problem and telling about it here. For us it is not critical anymore because we're going round it by sequently restarting the process.

Former Member
0 Kudos

we have the exact same problem.

[15:03:22]nias@seat:~ lsof -p 27330 | awk '/ttf$/ { print $9 }' | sort | uniq -c | sort -n -r

7 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/fonts/LucidaSansRegular.ttf

6 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/fonts/LucidaTypewriterRegular.ttf

6 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/fonts/LucidaBrightRegular.ttf

2 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/fonts/LucidaSansDemiBold.ttf

2 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/fonts/LucidaBrightDemiItalic.ttf

1 /usr/share/fonts/truetype/ttf-liberation/LiberationMono-BoldItalic.ttf

1 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf

1 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Oblique.ttf

1 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf

1 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf

1 /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf

1 /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf

1 /usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf

1 /usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf

1 /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf

1 /usr/share/fonts/truetype/msttcorefonts/Arial.ttf

1 /usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf

1 /usr/share/fonts/truetype/msttcorefonts/Arial_Black.ttf

1 /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf

1 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/oblique-fonts/LucidaSansDemiOblique.ttf

1 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/fonts/LucidaTypewriterBold.ttf

1 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/fonts/LucidaBrightItalic.ttf

1 /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/fonts/LucidaBrightDemiBold.ttf

we are using JRC from an ear-application inside a JBoss-EAP (4.3 and 5.0.1). Restart is not really an option. After some days the first 3 fonts summarize to more then 1000 open files and the jboss eap goes down cause of too many open files (currently limited to 1024)

any suggestions?

ted_ueda
Employee
Employee
0 Kudos

The issue with the JVM holding on to TrueType font files on Linux is currently being investigated, tracking number ADAPT01425705.

Sincerely,

Ted Ueda

Former Member
0 Kudos

any further progress on this issue? We are experiencing the same behavior...

Also I cannot find the tracking number ADAPT01425705. Can someone point me to where I can find that?

ted_ueda
Employee
Employee
0 Kudos

It's an internal tracking number - it'll be listed in the doc that lists fixed issues when an update build comes out.

ADAPT01425705 is currently slated for Update 7 - the next one upcoming.

Sincerely,

Ted Ueda

0 Kudos
Former Member
0 Kudos

Some additional information I forgot in the message above: The reports were created with Crystal Reports XI Release 2.

Former Member
0 Kudos

Isn't there anyone having a clue about this?

Former Member
0 Kudos

One more time, I reply to myself

Can anyone tell me if serious problems told here are reported to developers of SAP Business Objects? Or is there a different way I have to take for even some hope of getting a solution for this?