Thread: [Sablevm-developer] Re: Sablevm-developer digest, Vol 1 #366 - 11 msgs
Brought to you by:
egagnon
From: Fancong Z. <fz...@cs...> - 2004-04-15 20:12:06
|
I see a motivation to incorporate my work of "Deadlock Resolution via Exceptions for Dependable Java Applications" into SableVM. Anyone interested in co-working with me in implementing deadlock exceptions for SableVM? -- Fancong Zeng Department of Computer Science Rutgers University Piscataway, NJ, 08854 (732)445-6994 http://www.cs.rutgers.edu/~fzeng > Message: 8 > Date: Thu, 15 Apr 2004 12:45:37 -0400 > From: Etienne Gagnon <gag...@uq...> > Organization: UQAM > To: Clemens Eisserer <lin...@we...> > CC: sab...@li... > Subject: Re: [Sablevm-developer] Found deadlock in Class.getConstructor(Class[]).newInstance(Objects[]) > > Hi Clemens, > > SableVM will dump a stack trace during execution when you cause a SIGQUIT > signal. On most systems you do this by pressing Ctrl-\ (Control key and "\" > key together). It gives much more information than a simple gdb stack dump > which does not tell us about the content of the Java stack. > > I you have time, it would be grat if you also sent a minimal complete piece > of code that I could simply "compile and run" to exhibit the problem. > > have fun! > > Etienne > > Clemens Eisserer wrote: > > Hello again! > > > > After reinstalling my whole gtk/gdk/atk/pango rpms your build-system now > > even worked on my system. > > > > I'm trying to use a lightweight gui library called "lwvcl", which is > > based on a swingle awt.component. > > At initialisation it does load some classes via class.forName and does > > some other class-based stuff. > > I think I've found a deadlock in > > Class.getConstructor(Class[]).newInstance(Objects[]). > > > > As you can see with this piece if code several different classes where > > loaded (some of them many times), but suddenly the method hangs when > > > > Here's the classname and the argument-type's list: > > > > So geladen:java.lang.String java.lang.String > > So geladen:java.lang.String java.lang.String > > So geladen:java.lang.String java.lang.String > > So geladen:LwBorder int > > So geladen:LwBorder int > > So geladen:LwBorder int > > So geladen:LwBorder int > > So geladen:LwBorder int > > So geladen:LwBorder int > > So geladen:LwImgSetRender java.lang.String int int int int int > > So geladen:LwImgSetRender java.lang.String int int int int int > > So geladen:LwImgSetRender java.lang.String int int int int int > > So geladen:LwImgSetRender java.lang.String int int int int int > > So geladen:LwImgSetRender java.lang.String int int int int int > > So geladen:LwImgSetRender java.lang.String int int int int int > > So geladen:LwImgSetRender java.lang.String int int int int int > > So geladen:LwImgSetRender java.lang.String int int int int int > > So geladen:LwImgSetRender java.lang.String int int int int int > > <----- Deadlock here > > > > > > I tried to debug it using gdb, but unlike without gdb I get a segfault. > > Here's the stacktrace: > > > > Program received signal SIGSEGV, Segmentation fault. > > [Switching to Thread 16384 (LWP 2897)] > > _svmf_interpreter (_env=0x0) at interpreter.c:266 > > 266 _svmt_method_info *method = frame->method; > > (gdb) bt > > #0 _svmf_interpreter (_env=0x0) at interpreter.c:266 > > #1 0x40083491 in JNI_CreateJavaVM (pvm=0xbffff1e0, penv=0xbffff1e4, > > _vm_args=0xbffff1f0) at invoke_interface.c:293 > > #2 0x08049e68 in main (argc=0, argv=0x0) at sablevm.c:1351 > > > > > > And here's the method of the gui library that calls the deadlock-method: > > > > /** > > * Creates an instance of the specified class using appropriate > > constructor for the given input arguments list. > > * The list is set of arguments that are separated by the comma. The > > following arguments types can be > > * used: > > * <ul> > > * <li>Integer. If the argument does not equal "true" or "false" and > > is not bound by quotes.</li> > > * <li>Boolean. If the argument equals "true" or "false" and is not > > bound by quotes.</li> > > * <li>String. If the argument is not bound by quote.</li> > > * </ul> > > * @param <code>className</code> the specified class name. > > * @param <code>argsStr</code> the specified input arguments list. The > > argument can be <code>null</code>. > > * In this case the default constructor will be used to create the class > > instance. > > * @return an instance of the class. > > */ > > public static Object createObj(String className, String argsStr) > > throws Exception > > { > > if (className.indexOf ('@') == 0) return > > getStaticObj(className.substring(1)); > > else > > { > > Class classInstance = > > Class.forName(className.indexOf('.')>0?className:PACKAGE_NAME + className); > > Object objInstance = null; > > if (argsStr == null) > > { > > objInstance = classInstance.newInstance(); > > } > > else > > { > > StringTokenizer args = new StringTokenizer(argsStr, ","); > > Class[] argsTypes = new Class [args.countTokens()]; > > Object[] argsValues = new Object[argsTypes.length]; > > for (int j = 0; args.hasMoreTokens(); j++) > > { > > String arg = args.nextToken().trim(); > > if (arg.indexOf('\"')==0) > > { > > argsTypes [j] = String.class; > > argsValues[j] = arg.substring(1, arg.length() - 1); > > } > > else > > if (arg.equals("true") || arg.equals("false")) > > { > > argsTypes [j] = Boolean.TYPE; > > argsValues[j] = new Boolean(arg); > > } > > else > > if (arg.indexOf('@') == 0) > > { > > argsValues[j] = getStaticObj(arg.substring(1)); > > argsTypes [j] = argsValues[j].getClass(); > > } > > else > > { > > argsTypes [j] = Integer.TYPE; > > argsValues[j] = new Integer(arg); > > } > > } > > System.out.print("So geladen:"+className); > > for(int i=0; i < argsTypes.length; i++) > > { > > System.out.print(" "+argsTypes[i].getName()); > > } > > System.out.println(); > > objInstance = > > classInstance.getConstructor(argsTypes).newInstance(argsValues); > > } > > return objInstance; > > } > > } > > > > > > Maby this code isn't written well, however it works even with the > > Microsoft-JVM ;-) > > > > Hope this helped, lg Linuxhippy > > |
From: Etienne G. <gag...@uq...> - 2004-04-18 17:49:25
|
Fancong Zeng wrote: > I see a motivation to incorporate my work of "Deadlock Resolution via > Exceptions for Dependable Java Applications" into SableVM. Anyone > interested in co-working with me in implementing deadlock exceptions for > SableVM? That would be pretty neat. I don't know, but both Greg P. and Chris P. have touched the code related to locking, a little, and I have written the code. I can't promise much availability, but I can usually answer questions. SableVM's source code is not really cryptic (that's what I hope, at least;-), and you can find information about the locking algorithm in my Ph.D. thesis and the related papers by Bacon and by Onodera. Would you be interested in getting a sandbox in the subversion repository to do your work? [If yes, we'll have to clear up the legal aspects privately; e.g. Are you or is Rutgers U. the copyright holder, and a few little similar details.] Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Fancong Z. <fz...@cs...> - 2004-04-20 14:58:40
|
Hi, I just read your Ph.D. thesis. I like your extension of thin locks. I am now looking into the SableVM system and I hope SableVM has the following features: 1) Being able to run large real-life sever programs. E.g., Tomcat. 2) Supporting true parallelism. This requires kernel-level preemptive thread scheduling and SMP support --- I noticed a note about flaws in SMP, possible to improve the SMP support? 3) Accomodating JIT compilers seamlessly. I have some ideas to have a JIT generate recovery code, and I expect to see the JIT compilers to be incorporated to (the public version of) SableVM. Any comments/information on the three issues I list above? -- Fancong Zeng Department of Computer Science Rutgers University Piscataway, NJ, 08854 (732)445-6994 http://www.cs.rutgers.edu/~fzeng On Sun, 18 Apr 2004, Etienne Gagnon wrote: > Fancong Zeng wrote: > > I see a motivation to incorporate my work of "Deadlock Resolution via > > Exceptions for Dependable Java Applications" into SableVM. Anyone > > interested in co-working with me in implementing deadlock exceptions for > > SableVM? > > That would be pretty neat. I don't know, but both Greg P. and Chris P. > have touched the code related to locking, a little, and I have written > the code. I can't promise much availability, but I can usually answer > questions. SableVM's source code is not really cryptic (that's what I > hope, at least;-), and you can find information about the locking > algorithm in my Ph.D. thesis and the related papers by Bacon and by > Onodera. > > Would you be interested in getting a sandbox in the subversion repository > to do your work? [If yes, we'll have to clear up the legal aspects privately; > e.g. Are you or is Rutgers U. the copyright holder, and a few little > similar details.] > > Etienne > > -- > Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ > SableVM: http://www.sablevm.org/ > SableCC: http://www.sablecc.org/ > |