Closed Bug 67962 Opened 24 years ago Closed 24 years ago

Plugin hangs in Runtime::exec when reloaded

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: laux, Assigned: xiaobin.lu)

References

()

Details

(Keywords: testcase)

From Bugzilla Helper: User-Agent: Mozilla/4.75 [en] (X11; U; SunOS 5.7 sun4u) BuildID: 20001107 The html page contains an applet that calls Runtime::exec( "/usr/bin/test" ). The first time this works but if you reload the page the VM hangs in exec. Reproducible: Always Steps to Reproduce: 1. Go to above URL 2. Reload page 3. Open Java Console to see that VM hangs Actual Results: VM hangs import java.io.*; import java.net.*; import java.applet.*; public class JSetupTest extends Applet { /** * path of the native executable that handles the native operations (registery, fonts, ec.) */ private String m_nativeExe = null; /** * string representing the operating system the applet is running on */ private String m_os = null; /** * the process that runs the native application */ private Process m_setupProcess = null; /** * the output stream of the process that runs the native executable. The applet * communicates with the process over the output and input streams. */ private BufferedReader m_setupOutput = null; /** * the input stream of the process that runs the native executable. The applet * communicates with the process over the output and input streams. */ private BufferedWriter m_setupInput = null; public void init() { super.init(); System.out.println("Init started"); m_os = getParameter("OS"); m_nativeExe = getParameter("EXE"); } public void start() { super.start(); System.out.println("Start started"); try { System.out.println("Running test..."); Runtime.getRuntime().traceMethodCalls(true); Runtime.getRuntime().traceInstructions(true); Runtime.getRuntime().exec("/usr/bin/test"); System.out.println("done"); } catch(Exception e) { System.err.println("Could not perform test:" + e); e.printStackTrace(); } } }
Was wrong Component
Component: Java APIs to WebShell → OJI
QA Contact: geetha.vaidyanaathan → shrir
thorsten: I have some questions about this bug. Does this happen outside of the browser? For example, if you re-write your test as a Java application and run it from the shell (i.e., "java JSetupTest"), does it also crash the VM? I'm trying to isolate the problem, see if it's a problem with the JDK on Linux or if it's a problem with the Java Plug-In/browser relationship. Also, I don't know if there are JDK issues with a particular version of Linux, but would you please add another comment with the version of Linux you are running, and any other info that you think may be helpful? (I don't know if patch levels or revision numbers are relevant to Linux) I'm also copying the eng. mgr. of Java Plug-In so he can see this email trail.
This is the Java Version: tlx@bombay(321):/local/tn/netscape6Install/plugins/java2/bin> ./java -version java version "1.3.0_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01) Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode) Linux Version: SuSE Linux 7.0 (i386) - Kernel 2.2.16
Running our test as a Java application behaves normal running with the jre that was installed with netscape. vm does not crash, does not hang. uname -a returns : Linux bombay 2.2.16 #1 Wed Aug 2 20:22:26 GMT 2000 i686 unknown /lib/libc.so.6 returns : GNU C Library stable release version 2.1.3, by Roland McGrath et al. Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 2.95.2 19991024 (release). Compiled on a Linux 2.2.16 system on 2000-07-30. Available extensions: GNU libio by Per Bothner crypt add-on version 2.1 by Michael Glad and others linuxthreads-0.8 by Xavier Leroy NoVersion patch for broken glibc 2.0 binaries BIND-4.9.7-REL NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk NSS V1 modules 2.0.2 by Thorsten Kukuk libthread_db work sponsored by Alpha Processor Inc Report bugs using the `glibcbug' script to <bugs@gnu.org>.
Okay, two more suggestions: 1) Do you have a ~/.java.policy file? Perhaps the plug-in is denying you permission to exec processes? I can send you a good .java.policy file to put in your home directory if you wish, if you don't already know how to create one. Or, you can use the "policytool" application that comes with the JDK/JRE. 2) Did you look at the release notes for J2SE? There's mention of problems with SuSE 6.4 (I realize you're using 7.0, but perhaps the problems remain). I don't know if that's relevant here, but I'd be curious to know whether the problem also exists on RedHat Linux. We'll try here as well. The URL for the Linux JDK release notes is here: http://java.sun.com/j2se/1.3/relnotes-linux.html
If I create the following file: ~/.java.policy /* AUTOMATICALLY GENERATED ON Mon Jun 12 18:06:51 PDT 2000*/ /* DO NOT EDIT */ grant { permission java.security.AllPermission; }; And run the applet from this bug, but in my own page: http://javaweb.eng.sun.com/~edburns/67962/JSetupTest.html I get the following output in the java console: Init Started Start started Running test... done Is this correct output? If so, I'll mark this as WORKSFORME. Please let me know. Ed
Ed: You have to reload the applet. It will work the first time but not the second.
I ran Ed's test HTML, and reloaded several times, it seemed running fine, saw repeating the output lines on the Java console: Init Started Start started Running test... done I was running Redhat 6.1 with Mozilla built on 0922 (RFS) branch with Java plugin 1.3.0_01. Laux, Can you reload other applet pages (i.e., java.sun.com, etc.)?
I wonder if this is a Linux compatibility issue? Thorsten, do you have any RedHat Linux boxes around? If so, would you please try on RedHat 6.2 or later and report results here?
We tested this with turbo 6.0, Suse 6.4, Red Hat 6.1 using Mozilla 5.0 / Netscape 6.01 M 18 with Java 2 (1.3.0_01) and it did not work. We 'll prepare a screnario in swan.
Now we have installed an webserver and an html page with the embedded applet in swan. Please browse with your Netcape 6 with Java Plugin (Linux) to: http://staroffice-secure.germany.sun.com:7733/web/jsetup/jsetup.html ... and check the scenario.
Now we have got linux ws in swan with an installed Netscape 6, where the bug can be reproduced definitely. The name of the machine is so-qawebtop, login as user so-qs6, with password 01eham01. Netscape 6 was installed in the home direction of this user. It is a Suse 7.1 linux. Please browse to the http url I described in my comment from 2001-03-01 07:13. If login to so-qawebtop fails, report your problems to uwe.luebbers@sun.germany.com.
Hi Xiaobin, Can you please look at this bug?
Assignee: edburns → xiaobin.lu
Keywords: testcase
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
I just tried Ed Burns's version of the test case. The test case failed for me in the way that it fails for the bug reporter. In other words, I see this output the first time I run the test case: Init Started Start started Running test... done But the second time I run the test case, I see the following: Init Started Start started Running test... Ed, Joe, I don't know why it's working for you both on your Linux boxes, but I'm going to come over and site beside you and watch, just to check that we're doing the same thing.
Actually I saw what George saw, and since there were always lines printed on the Java console each time I clicked reload, it made me think VM was not hung as the report said. Sorry about overlooking the real problem.
I'm closing this as INVALID. This is not a browser bug, nor is it a Java Plug-In bug. Turns out that the bug is in the JVM on Linux. The failure test case can be reproduced with appletviewer, as was verified by Calvin Austin at Sun (Java Software, works on the Linux JDK port). Dear bug reporter, you should file a bug against Java, ideally using Sun's internal bug tracking tool. I'm happy to help you with this if you like.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Verified per drapeau's comments.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.