Opened 9 years ago

Closed 7 years ago

#49 closed defect (fixed)

LVMGUI and TCPCFG2 won't start

Reported by: David McKenna Owned by:
Priority: major Milestone: GA2
Component: general Version: 1.6.0-b19 Beta 2
Severity: low Keywords:
Cc:

Description

Set up beta 2 to be default Java per instructions on eCS 2 (added C:\Java6\Bin; to PATH and LIBPATH, removed Java142, removed SET CLASSPATH and SET JAVA_HOME in CONFIG.SYS). Tried to start LVM (advanced) and got:

[C:\os2\javaapps]java lvmgui
Exception in thread "main" java.lang.UnsatisfiedLinkError?: no engine in java.library.path

at java.lang.ClassLoader?.loadLibrary(ClassLoader?.java:1681)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at Engine.<clinit>(lvmgui.java:289)
at GUI.<init>(lvmgui.java:543)
at lvmgui.main(lvmgui.java:322)

Tried to start the TCPIP configuration applet and got:

[C:\]tcpcfg2
Exception in thread "main" java.lang.UnsatisfiedLinkError?: no cfg2natv in java.library.path

at java.lang.ClassLoader?.loadLibrary(ClassLoader?.java:1681)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at COM.ibm.raleigh.tcp.tcpcfg2.server.NativeData?.<clinit>(NativeData?.java:354)
at COM.ibm.raleigh.tcp.tcpcfg2.common.FileLock?.getLock(FileLock?.java:66)
at COM.ibm.raleigh.tcp.tcpcfg2.client.Tcpcfg2.init(Tcpcfg2.java:209)
at COM.ibm.raleigh.tcp.tcpcfg2.client.Tcpcfg2c.main(Tcpcfg2c.java:137)

The problem seems related to both.

My one other Java App (Limewire) seems to work fine.

Change History (11)

comment:1 Changed 9 years ago by David McKenna

Forgot to mention I installed the JRE only.

comment:2 Changed 9 years ago by dmik

  • Milestone set to GA

I confirm the problem and found the reason: the java.library.path property is incorrectly initialized with the value of PATH while it should be the value of LIBPATH from config.sys. I will fix that (#51).

As a temporary solution, you may move the DLL in question (such as 'engine.dll' or 'cfg2nativ.dll') to some path from PATH. This satisfies the class loader here but both application crash.

The symptoms of the crash are similar to what I see with Jeti/2 (#47) -- a crash in JVM.DLL in nearly the same place, so I suppose they have the same reason.

comment:3 Changed 8 years ago by dmik

After trying with #47 and #51 fixed, TCPCFG2 with the debug Java gives this:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (d:/Coding/javaos2/openjdk/hotspot/src/share/vm/prims/jni.cpp:175), pid=39162, tid=2566520836
#  Error: guarantee(jfieldIDWorkaround::is_instance_jfieldID(k, id),"must be an instance field")
#
# JRE version: 6.0
# Java VM: OpenJDK Client VM (16.0-b13-debug mixed mode os2-x86 )
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x20116c00):  JavaThread "main" [_thread_in_vm, id=-1728446460, stack(0x031f0000,0x03300000)]

Stack: [0x031f0000,0x03300000],  sp=0x032ef040,  free space=3fc03300000k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [JVM+0x852fa6]
V  [JVM+0x853fa2]
V  [JVM+0x2ca68a]
V  [JVM+0x43585f]
V  [JVM+0x43470f]
V  [JVM+0x457d8c]
C  [CFG2NATV+0x67f]
j  COM.ibm.raleigh.tcp.tcpcfg2.server.NativeData.getDirs([B[B[B)V+0
j  COM.ibm.raleigh.tcp.tcpcfg2.server.NativeData.getPaths()V+21
j  COM.ibm.raleigh.tcp.tcpcfg2.common.FileLock.getLock()Z+31
j  COM.ibm.raleigh.tcp.tcpcfg2.client.Tcpcfg2.init()V+312
j  COM.ibm.raleigh.tcp.tcpcfg2.client.Tcpcfg2c.main([Ljava/lang/String;)V+358
v  ~StubRoutines::call_stub
V  [JVM+0x41c850]
V  [JVM+0x67b413]
V  [JVM+0x41c1c4]
V  [JVM+0x43c3d2]
V  [JVM+0x454b9d]
C  [JAVA+0xd48]
C  [KERNEL32+0x27eee]
C  [KERNEL32+0xf350]
C  [WGSS50+0xb36f]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  COM.ibm.raleigh.tcp.tcpcfg2.server.NativeData.getDirs([B[B[B)V+0
j  COM.ibm.raleigh.tcp.tcpcfg2.server.NativeData.getPaths()V+21
j  COM.ibm.raleigh.tcp.tcpcfg2.common.FileLock.getLock()Z+31
j  COM.ibm.raleigh.tcp.tcpcfg2.client.Tcpcfg2.init()V+312
j  COM.ibm.raleigh.tcp.tcpcfg2.client.Tcpcfg2c.main([Ljava/lang/String;)V+358
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x203a1c00 JavaThread "AWT-Windows" daemon [_thread_in_native, id=-1728446449, stack(0x04180000,0x04290000)]
  0x2039f800 JavaThread "AWT-Shutdown" [_thread_blocked, id=-1728446450, stack(0x04040000,0x04150000)]
  0x2039d800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-1728446451, stack(0x03f00000,0x04010000)]
  0x201bc400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-1728446453, stack(0x03bc0000,0x03cd0000)]
  0x201b5c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-1728446454, stack(0x03980000,0x03b90000)]
  0x201b3000 JavaThread "Attach Listener" daemon [_thread_blocked, id=-1728446455, stack(0x03840000,0x03950000)]
  0x201b1400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-1728446456, stack(0x03700000,0x03810000)]
  0x20193800 JavaThread "Finalizer" daemon [_thread_blocked, id=-1728446457, stack(0x035c0000,0x036d0000)]
  0x20191000 JavaThread "Reference Handler" daemon [_thread_blocked, id=-1728446458, stack(0x03480000,0x03590000)]
=>0x20116c00 JavaThread "main" [_thread_in_vm, id=-1728446460, stack(0x031f0000,0x03300000)]

Other Threads:
  0x2018d800 VMThread [stack: 0x03340000,0x03450000] [id=-1728446459]
  0x201c4c00 WatcherThread [stack: 0x03d00000,0x03e10000] [id=-1728446452]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

And LVMGUI gives this:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1cbe4fc8, pid=39178, tid=2567569412
#
# JRE version: 6.0
# Java VM: OpenJDK Client VM (16.0-b13-debug mixed mode os2-x86 )
# Problematic frame:
# V  [JVM+0x184fc8]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x20116c00):  JavaThread "main" [_thread_in_vm, id=-1727397884, stack(0x031f0000,0x03300000)]

siginfo: ExceptionCode=0xc0000005, reading address 0xffffffff

Registers:
EAX=0x61660051, EBX=0x33693b90, ECX=0x1cd8931a, EDX=0x61660049
ESP=0x032ef9f0, EBP=0x032ef9f0, ESI=0x33693b90, EDI=0x20116c00
EIP=0x1cbe4fc8, EFLAGS=0x00010216

Top of Stack: (sp=0x032ef9f0)
0x032ef9f0:   1d0dde77 13d8cf40 032ef9f0 1cbe4fc8
0x032efa00:   00000000 00000000 032ef9f0 032ef9f0
0x032efa10:   00000006 01000000 13d8cfc0 032efa3c
0x032efa20:   1d0dd342 13d8cf40 1d0dd318 00000001
0x032efa30:   00000023 032efa40 1ca69e53 032efa8c
0x032efa40:   032efa4c 1d0dcb78 032efaac 032efa5c
0x032efa50:   0000990a 00000000 032f0f78 032efafc
0x032efa60:   1d2b3fa2 032efb30 032efa8c 000007d0 

Instructions: (pc=0x1cbe4fc8)
0x1cbe4fb8:   04 24 e8 29 6c ff ff c9 c3 cc 55 89 e5 8b 45 08
0x1cbe4fc8:   8b 00 5d c3 55 89 e5 83 ec 18 8b 45 08 8b 00 89 


Stack: [0x031f0000,0x03300000],  sp=0x032ef9f0,  free space=3fe03300000k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [JVM+0x184fc8]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)

[error occurred during error reporting (printing Java stack), id 0xe0000000]


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x2025f800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=-1727397873, stack(0x04180000,0x04290000)]
  0x2025d800 JavaThread "AWT-Shutdown" [_thread_blocked, id=-1727397874, stack(0x04040000,0x04150000)]
  0x202dac00 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=-1727397875, stack(0x03f00000,0x04010000)]
  0x201bc400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-1727397877, stack(0x03bb0000,0x03cc0000)]
  0x201b5800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=-1727397878, stack(0x03980000,0x03b90000)]
  0x201b2c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=-1727397879, stack(0x03840000,0x03950000)]
  0x201b1400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-1727397880, stack(0x03700000,0x03810000)]
  0x20192800 JavaThread "Finalizer" daemon [_thread_blocked, id=-1727397881, stack(0x035c0000,0x036d0000)]
  0x20190c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=-1727397882, stack(0x03480000,0x03590000)]
=>0x20116c00 JavaThread "main" [_thread_in_vm, id=-1727397884, stack(0x031f0000,0x03300000)]

Other Threads:
  0x2018d400 VMThread [stack: 0x03340000,0x03450000] [id=-1727397883]
  0x201bf400 WatcherThread [stack: 0x03cf0000,0x03e00000] [id=-1727397876]

VM state:synchronizing (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x20115058] Threads_lock - owner thread: 0x2018d400

comment:4 Changed 8 years ago by dmik

The latter crash of LVMGUI has the following call stack:

oopDesc::load_decode_heap_oop(oopDesc**) (oop.inline.hpp, #192)
oopDesc::obj_field(int) const (oop.inline.hpp, #278)
java_lang_Class:as_klassOop(oopDesc*) (javaClasses.cpp, #393)
jni_GetFieldID@16 (jni.cpp, #1641)
some native method in ENGINE.DLL
...

When I try the release Java build, both apps seem to crash in oopDesc::load_decode_heap_oop(oopDesc). This code deals with accessing fields of Java classes from the native Java methods (in this case, located in ENGINE.DLL or in GFG2NATV.DLL) and something goes wrong with that, probably because these DLLs are too old and there was some change in the JNI interface that breaks them.

Both Sun JDK 1.4 and Sun JDK 1.5 work fine with these applications so it's either an OpenJDK 6 feature or some OS/2 specific bug.

Both applications are real crap and it's a pity that we have to deal with them...

comment:5 Changed 8 years ago by dmik

  • Milestone changed from RC to GA

comment:6 Changed 8 years ago by dmik

  • Milestone changed from RC2 to GA
  • Severity set to low

comment:7 Changed 8 years ago by dmik

  • Milestone changed from GA to Enhanced

So far, I don't see how this can be easily solved w/o getting the sources of these native DLLs. Moving it to Enhanced.

comment:8 Changed 8 years ago by wlhartzell

Tip:: To restore the IBM version to functional order do this:
In each of these files found in \tcpip\bin:
admin_pw.cmd, binlscpc.cmd, binlscps.cmd, dadmgui.cmd, dnsapc.cmd, ddnsaps.cmd, ddnszone.cmd, dhcpscpc.cmd, dhcpscps.cmd, tcpcfg2.cmd, tcpcfg2d.cmd, & tcpcfg2r.cmd;
insert on the line just after // at the top, this:
'set classpath=D:\JAVA11\LIB\SecMa?.jar;D:\java11\Swing\swingall.jar;D:\java11\lib\classes.zip;.\.;'
'set beginlibpath=d:\java11\bin;d:\java11\lib;d:\java11\dll;d:\java11\sma;d:\java11\jmf2.1.1;d:\java11\swing;%beginlibpath%'
'SET SWING_HOME=D:\java11\Swing'
'set Java_Home=d:\java11'
'set path=d:\java11\bin;%path%'
Be sure to adjust the paths to match your system, and don't lose the single quotes.

This is a work-around, assuming that they have not uninstalled Java 1.1.18. This will work for LVMgui.cmd also & with the Java 1.3.1 replacement that someone else coded (and I use).
'set beginlibpath=d:\java131\jre\bin;d:\java131\jre\lib;d:\java131\jre\dll;%beginlibpath%'
'set Java_Home=d:\java131\jre'
'set path=d:\java131\jre\bin;%path%'

The jar files that correspond to the cmd file don't have to be on libpath or path. You should suggest that they don't uninstall any previous versions of Java, so that they can use them, when need be. There are Java programs out there that did not follow guidelines and are incompatible with later versions. I think these are some of them.

Suggestion: change this to 'won't fix'? Note that asterisks disappeared from the Rexx comment line above...

comment:9 Changed 8 years ago by dmik

Thanks for the tip.

I don't think that we should close this defect. Let's leave it open so that the problem may be seen in detail.

comment:10 Changed 7 years ago by diver

  • Milestone changed from Enhanced to GA2

this might go along with #24

comment:11 Changed 7 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed with #24.

Note: See TracTickets for help on using tickets.