Bad File Descriptor

Asked by WA

Hi,

I am using the benchmark SPECjvm2008 that depends on the java application and i am also using the intel pin tool to extract memory traces from this benchmark,after that i am storing these memory traces in a file of type gzFile.

My Problem is that gzwrite returns the following error :
ERROR: Bad file descriptor

So please would anyone suggest me a solution or give me any hints?

Thank You in advance for time and effort.

Best Regards
Wael AMR

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu openjdk-7 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Which java are you using? Oracle java or open java?

Revision history for this message
WA (wael-amr2004) said :
#2

I typed this command "java -version" on the terminal ,
here is the output :
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

Thanks
Best Reagrds
Wael AMR

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

How did you install the Java you are using?
Do Java test pages (like http://www.java.com/en/download/installed.jsp) work ok?

Thanks

Revision history for this message
WA (wael-amr2004) said :
#4

I installed Sun Java 6 at http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html.

I think that the "ERROR: Bad file descriptor" is due to the gzfile is closed and then there it is a try for writing in it after closing.
I don't understand how this occurs as I am closing the gzfile ONLY in an exit function.

I guess that this may be due to JRE threads,so is there any option i can use to set only one running thread for the JRE ?

Thanks
Best Regards
Wael AMR

Revision history for this message
WA (wael-amr2004) said :
#5

I am investigating through using the gdb debugger.

When attach with gdb debugger ,then type continue,i observed that it is continuing then it stopped giving this message:

.........
.........
(y or n) y
Reading symbols from /home/wael/Studies/pin_Count/source/tools/MyPinTool/obj-intel64/MyPinTool.so...done.
(gdb) cont
Continuing.
process 3498 is executing new program: /usr/lib/jvm/java-6-oracle/jre/bin/java
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fd3815da700 (LWP 3525)]
[New Thread 0x7fd378fff700 (LWP 3526)]
[New Thread 0x7fd378efe700 (LWP 3527)]
[New Thread 0x7fd378961700 (LWP 3528)]
[New Thread 0x7fd378860700 (LWP 3529)]
[New Thread 0x7fd37875f700 (LWP 3530)]
[New Thread 0x7fd37865e700 (LWP 3531)]
[New Thread 0x7fd37855d700 (LWP 3532)]
[New Thread 0x7fd37845c700 (LWP 3533)]
[New Thread 0x7fd37835b700 (LWP 3534)]
[New Thread 0x7fd37825a700 (LWP 3535)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fd3815da700 (LWP 3525)]
0x00007fd379073e6c in ?? ()

So Any suggestion / hint that can help me.
Thanks
Best Regards
Wael AMR

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.