Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 104272

Summary: java crashes on segfault with just bare -classpath option
Product: Gentoo Linux Reporter: Clock <clock>
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED UPSTREAM    
Severity: critical CC: camilo.aguilar, morten
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Clock 2005-08-30 08:24:26 UTC
clock@kestrel:~/zserver$ java -version
java version "1.4.2-02"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-02, mixed mode)

clock@kestrel:~/zserver$ java -classpath
*** glibc detected *** free(): invalid next size (fast): 0x08059d88 ***
Aborted (core dumped)
(gdb) bt full
#0  0xb7e7d181 in kill () from /lib/libc.so.6
No symbol table info available.
#1  0xb7f79131 in pthread_kill () from /lib/libpthread.so.0
No symbol table info available.
#2  0xb7f794ab in raise () from /lib/libpthread.so.0
No symbol table info available.
#3  0xb7e7cf14 in raise () from /lib/libc.so.6
No symbol table info available.
#4  0xb7e7e3ad in abort () from /lib/libc.so.6
No symbol table info available.
#5  0xb7eaf41c in __fsetlocking () from /lib/libc.so.6
No symbol table info available.
#6  0xb7eb9226 in mallopt () from /lib/libc.so.6
No symbol table info available.
#7  0xb7eb7f0f in mallopt () from /lib/libc.so.6
No symbol table info available.
#8  0xb7eb6b2f in free () from /lib/libc.so.6
No symbol table info available.
#9  0x0804a205 in ?? ()


Reproducible: Always
Steps to Reproduce:
1.java -classpath
2.
3.

Actual Results:  
crash

Expected Results:  
anything else than crash

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.5-r1, 2.6.11-gentoo-r9 i686)
================================================================= System uname:
2.6.11-gentoo-r9 i686 Intel(R) Pentium(R) M processor 1.50GHz Gentoo Base System
version 1.6.13 dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf
/etc/terminfo /etc/env.d" CXXFLAGS="" DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac aalib alsa apm arts
avi berkdb bitmap-fonts cdr crypt cups curl dga divx4linux dri dv dvd dvdread eds
emboss encode esd exif fam ffmpeg fftw flac flash foomatic foomaticdb fortran ftp
gd gdbm gif glut gnome gpm gstreamer gtk gtk2 guile icq imagemagick imap imlib
ipv6 jabber jack java javascript jpeg kde ldap libcaca libg++ libwww live
matroska mikmod ming mmap mmx mng motif mozilla mp3 mpeg mysql nas ncurses nls
ogg oggvorbis opengl oss pam pdflib perl php png python qt quicktime readline
real ruby samba sdl sharedmem shorten slang socks5 speex spell sse ssl svg svga
tcltk tcpd tetex theora threads tiff tls truetype truetype-fonts type1-fonts
unicode vorbis wifi win32codecs wmf xine xinerama xml xml2 xmms xpm xv xvid zlib
userland_GNU kernel_linux elibc_glibc" Unset:  ASFLAGS, CTARGET, LANG, LC_ALL,
LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Camilo Aguilar 2005-08-30 17:11:08 UTC
on amd64 crash too

dev ~ # java -classpath
*** glibc detected *** free(): invalid next size (fast): 0x0000000040113010 ***
Aborted

Addiotional Information

dev ~ # java -version
java version "1.4.2-02"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02)
Java HotSpot(TM) 64-Bit Server VM (build Blackdown-1.4.2-02, mixed mode)

dev ~ # export MALLOC_CHECK_=3

dev ~ # valgrind --tool=memcheck java -classpath
malloc: using debugging hooks
malloc: using debugging hooks
==29473== Memcheck, a memory error detector.
==29473== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==29473== Using LibVEX rev 1313, a library for dynamic binary translation.
==29473== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==29473== Using valgrind-3.0.0, a dynamic binary instrumentation framework.
==29473== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==29473== For more details, rerun with: -v
==29473==
==29473== Invalid write of size 8
==29473==    at 0x4000267B: (within /opt/blackdown-jdk-1.4.2.02/bin/java)
==29473==    by 0x40001AC8: (within /opt/blackdown-jdk-1.4.2.02/bin/java)
==29473==    by 0x140EEE06566D: __libc_start_main (in /lib/libc-2.3.5.so)
==29473==    by 0x400019A9: (within /opt/blackdown-jdk-1.4.2.02/bin/java)
==29473==  Address 0x140EEE271048 is 0 bytes after a block of size 24 alloc'd
==29473==    at 0x140EEDD19F9E: malloc (in /usr/lib/valgrind/vgpreload_memcheck.so)
==29473==    by 0x40003768: (within /opt/blackdown-jdk-1.4.2.02/bin/java)
==29473==    by 0x40002602: (within /opt/blackdown-jdk-1.4.2.02/bin/java)
==29473==    by 0x40001AC8: (within /opt/blackdown-jdk-1.4.2.02/bin/java)
==29473==    by 0x140EEE06566D: __libc_start_main (in /lib/libc-2.3.5.so)
==29473==    by 0x400019A9: (within /opt/blackdown-jdk-1.4.2.02/bin/java)
malloc: using debugging hooks
*** glibc detected *** free(): invalid pointer: 0x0000000040113010 ***
Aborted





Comment 2 Sandro Bonazzola (RETIRED) gentoo-dev 2006-02-14 12:13:24 UTC
# java -version
java version "1.4.2-03"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-03)
Java HotSpot(TM) 64-Bit Server VM (build Blackdown-1.4.2-03, mixed mode)

# java -clasppath
Unrecognized option: -clasppath
Could not create the Java virtual machine.

works fine with 1.4.2.03-r2 on ~amd64.
Comment 3 Sandro Bonazzola (RETIRED) gentoo-dev 2006-02-14 13:26:34 UTC
(In reply to comment #2)
> # java -clasppath
> Unrecognized option: -clasppath
> Could not create the Java virtual machine.
> 
> works fine with 1.4.2.03-r2 on ~amd64.

I'm sorry, just mispelled classpath...
Confirming the bug.
# java -classpath
*** glibc detected *** free(): invalid next size (fast): 0x0000000040113010 ***
Aborted

Comment 4 Morten Cools 2006-05-27 05:25:25 UTC
This problem is not present in java-1.5.0.06-r2:

$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
$ java -classpath
-classpath requires class path specification
Comment 5 Josh Nichols (RETIRED) gentoo-dev 2006-07-01 10:36:17 UTC
This is really something upstream would have to fix for affected versions, particularly since they are closed source.