Bug 432181 - icedtea from rawhide segfaults when running freecol (worked in F-8)
Summary: icedtea from rawhide segfaults when running freecol (worked in F-8)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.7.0-icedtea
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Lillian Angel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-09 13:58 UTC by Hans de Goede
Modified: 2008-02-13 17:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-13 17:57:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Hans de Goede 2008-02-09 13:58:24 UTC
Description of problem:

Install freecol on rawhide: "yum install freecol" and then run it "freecol"

Output:
[hans@localhost devel]$ freecol
java virtual machine used: /usr/lib/jvm/java-icedtea/bin/java
classpath used: /usr/share/java/freecol.jar:/usr/share/java/higlayout.jar
main class used: net.sf.freecol.FreeCol
flags used: 
options used: -Xmx256M
arguments used: --freecol-data /usr/share/freecol/data
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002aaaaaac04b1, pid=13245, tid=1088477520
#
# Java VM: IcedTea 64-Bit Server VM (1.7.0-b24 mixed mode linux-amd64)
# Problematic frame:
# C  [ld-linux-x86-64.so.2+0x154b1]
#
# An error report file with more information is saved as:
# /home/hans/.freecol/hs_err_pid13245.log
#
# If you would like to submit a bug report, please visit:
#   http://icedtea.classpath.org/bugzilla

Note this is on an x86_64 machine, freecol worked fine on both i386 and x86_64
in F-8

Comment 1 Lillian Angel 2008-02-11 15:10:54 UTC
I tested this on F-8 with IcedTea-b24 (rawhide) on i386 and it works.
I, also, tested this on F-8 with IcedTea-b21 (not rawhide) on x86_64 and it works.

Actually, the game works really well. Any idea how else I can reproduce this?
Can you attach the log (/home/hans/.freecol/hs_err_pid13245.log)?

Changing status to NEEDINFO.

Comment 2 Lillian Angel 2008-02-11 15:12:00 UTC
Note- I, also, tested this on F-8 with IcedTea-b24 (rawhide) on x86_64 and it works.

Comment 3 Lillian Angel 2008-02-11 15:18:58 UTC
After a few tries, I was finally able to reproduce this. I am looking into the
problem:

Stack: [0x0000000040b0b000,0x0000000040c0c000],  sp=0x0000000040c0a100,  free
space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [ld-linux-x86-64.so.2+0x12d41]

[error occurred during error reporting (printing native stack), id 0xb]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.awt.image.JPEGImageDecoder.initIDs(Ljava/lang/Class;)V+0
j  sun.awt.image.JPEGImageDecoder.<clinit>()V+22
v  ~StubRoutines::call_stub
j 
sun.awt.image.InputStreamImageSource.getDecoder(Ljava/io/InputStream;)Lsun/awt/image/ImageDecoder;+135
j  sun.awt.image.FileImageSource.getDecoder()Lsun/awt/image/ImageDecoder;+27
j  sun.awt.image.InputStreamImageSource.doFetch()V+30
j  sun.awt.image.ImageFetcher.fetchloop()V+33
j  sun.awt.image.ImageFetcher.run()V+5
v  ~StubRoutines::call_stub


Comment 4 Hans de Goede 2008-02-11 15:59:17 UTC
Hmm,

Strange that it was hard to reproduce for you, it crashed reproducible for me
(tried 3 times). Maybe this is timing related?


Comment 5 Lillian Angel 2008-02-11 15:59:37 UTC
I was able to get this working with the version of IcedTea in the repo. This
will be in rawhide when the next release (b25) is out.

Workaround: Build IcedTea from the mercurial repo and change JAVA_HOME in
/usr/bin/freecol to:

/path/to/openjdk/build/linux-amd64/j2sdk-image/bin/java

Comment 6 Lillian Angel 2008-02-11 16:00:15 UTC
(In reply to comment #4)
> Hmm,
> 
> Strange that it was hard to reproduce for you, it crashed reproducible for me
> (tried 3 times). Maybe this is timing related?
> 

I believe my setup was a little messed up, I fixed it and was able to reproduce
it again.

Thx


Comment 7 Lillian Angel 2008-02-11 18:19:18 UTC
Duplicate of this bug:
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=98

Comment 8 Hans de Goede 2008-02-11 18:33:51 UTC
(In reply to comment #7)
> Duplicate of this bug:
> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=98

Ah yes that explains, notice the following important comment which I've just
added to that bug:

Notice that not only the path (/usr/lib instead of /usr/lib64) is a problem,
but also the soname used to open, libjpeg.so will only be present if
libjpeg-devel (Fedora) or distro used equivalent -devel package is installed.

When dlopening libs the full soname should be used, not the .so symlink which
is only there for determining which lib to use when linking during compile of
software!


Comment 9 Lillian Angel 2008-02-11 18:37:26 UTC
libjpeg-devel is a requirement for IcedTea. 

IMO, This is not a bug.

Comment 10 Hans de Goede 2008-02-11 18:46:22 UTC
No it isn't:

[hans@localhost ~]$ rpm -q --requires java-1.7.0-icedtea
java-1.7.0-icedtea-1.7.0.0-0.24.b24.fc9.x86_64
/bin/sh  
/bin/sh  
/usr/sbin/alternatives  
/usr/sbin/alternatives  
config(java-1.7.0-icedtea) = 1.7.0.0-0.24.b24.fc9
jpackage-utils >= 1.7.3-1jpp.3
ld-linux-x86-64.so.2()(64bit)  
ld-linux-x86-64.so.2(GLIBC_2.3)(64bit)  
libX11.so.6()(64bit)  
libXext.so.6()(64bit)  
libXi.so.6()(64bit)  
libXtst.so.6()(64bit)  
libasound.so.2()(64bit)  
libasound.so.2()(64bit)  
libasound.so.2(ALSA_0.9)(64bit)  
libasound.so.2(ALSA_0.9.0rc4)(64bit)  
libawt.so()(64bit)  
libc.so.6()(64bit)  
libc.so.6(GLIBC_2.2.5)(64bit)  
libc.so.6(GLIBC_2.3)(64bit)  
libc.so.6(GLIBC_2.3.2)(64bit)  
libc.so.6(GLIBC_2.4)(64bit)  
libdl.so.2()(64bit)  
libdl.so.2(GLIBC_2.2.5)(64bit)  
libfreetype.so.6()(64bit)  
libgcc_s.so.1()(64bit) 
libgcc_s.so.1(GCC_3.0)(64bit)  
libgcc_s.so.1(GCC_3.3)(64bit)  
libgcc_s.so.1(GCC_4.2.0)(64bit)  
libgif.so.4()(64bit)  
libjava.so()(64bit)  
libjava.so(SUNWprivate_1.1)(64bit)  
libjli.so()(64bit)  
libjli.so(SUNWprivate_1.1)(64bit)  
libjpeg.so.62()(64bit)  
libjvm.so()(64bit)  
libjvm.so(SUNWprivate_1.1)(64bit)  
libm.so.6()(64bit) 
libm.so.6(GLIBC_2.2.5)(64bit)  
libmawt.so()(64bit)  
libmawt.so(SUNWprivate_1.1)(64bit)  
libnet.so()(64bit)  
libnet.so(SUNWprivate_1.1)(64bit)  
libnsl.so.1()(64bit)  
libpng12.so.0()(64bit)  
libpng12.so.0(PNG12_0)(64bit)  
libpthread.so.0()(64bit)  
libpthread.so.0(GLIBC_2.2.5)(64bit)  
libpthread.so.0(GLIBC_2.3.2)(64bit)  
libpthread.so.0(GLIBC_2.3.3)(64bit)
libthread_db.so.1()(64bit)  
libthread_db.so.1(GLIBC_2.2.5)(64bit)  
libverify.so()(64bit)  
libverify.so(SUNWprivate_1.1)(64bit)  
libz.so.1()(64bit)  
openssl  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
rtld(GNU_HASH)  
tzdata-java  

And the fact that it isn't a Requires, but only a BuildRequires is correct, no
normal package should ever Require a -devel package. Really I might not know
much about java, but trust me on this one, you _must_ dlopen the full soname,
not the .so symlink which is there for development purposes only. I've got 200
(mostly C) packages I maintain (with close to 0 open bugs) and 10 years of C
experience saying so. If still in doubt ask on fedora-devel-list or fedora-devel
on IRC I'm sure others will agree with me.


Comment 11 Lillian Angel 2008-02-11 18:52:56 UTC
:) I am not disagreeing with you. I just want to do this the best way. I was
considering adding this as a requirement (it is only a build requirement) at the
moment, but if that is not the best idea, I will look into doing it another way.

thanks

Comment 12 Lillian Angel 2008-02-11 19:09:47 UTC
I will fix it to dlopen /usr/lib(64)/libjpeg.so.62.0.0 and add libjpeg-6b-40 as
a requirement to the spec file.


Comment 13 Lillian Angel 2008-02-11 19:12:40 UTC
libjpeg-6b not libjpeg-6b-40

Comment 14 Lillian Angel 2008-02-11 19:43:45 UTC
libjpeg-devel is still a build requirement. 

These headers:
/usr/include/jconfig.h
/usr/include/jerror.h
/usr/include/jmorecfg.h
/usr/include/jpeglib.h

Are needed by several sources, and only included in the libjpeg-devel package. I
have left the configure script and all build requirements unchanged.

libjpeg = 6b has been added as a requirement to the spec file.


Comment 15 Lillian Angel 2008-02-13 17:57:55 UTC
This will be in rawhide within the next couple of days.


Note You need to log in before you can comment on or make changes to this bug.