- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Strange behavior with long methods
Operating System - HP-UX
1753922
Members
7460
Online
108810
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2007 01:04 AM
09-03-2007 01:04 AM
Strange behavior with long methods
Hi all
I have build 1.3.1 1.3.1.05-JPSE_1.3.1.05_20020425 PA2.0 on HP-UX PA RISC v11.11. It seems there is a very strange thing happening. I have 2 static methods in 2 different classes. First method calls the second method. The second method has many parameters but a particular long parameter behaves strangely.
I have
public static String method1(long parameter)
public static String method2(long parameter)
method 1 is simply calling method 2:
String s= Myclass.method2(1);
However, after some point the although I pass parameter value as 1, inside method 2 if I do a System.out.println the value of this parameter is 0 WIHTOUT any line changing this parameter.
I put
public static String method1(long parameter)
{
System.out.println(parameter);
String s = Myclass2.method2(parameter);
return s;
}
public static String method2(long parameter)
{
System.out.println(parameter);
//other logic
}
I get 1 printed in method1 then 0 printed in method2. These successive method calls are in the same thread, I am sure about this.
These methods are being run in a server application and are being called numerous times before the problem appears. This happens only with these 2 methods and it is intermittent when 2nd method is called with parameter =1. Because I thought the issue starts occurring after a while I thought the problem might appear because method2 is getting compiled and no longer running in interpreted mode, but I'm not able to prove it yet as 1.3.1.05 doesn't allow many VM options.
If I run java command line with -Xcomp parameter, I always (not intermittent) get the parameter changed to value 0 in method2 only the first time method2 is being called.After this, it works OK.In order to reproduce the issue again I either do a kill -HUP on the java process or restart the JVM.
I tried with JDK 1.3.1.20 and I cannot reproduce it yet, but a JDK upgrade would imply many regression testing. Parameter changing value all of a sudden doesn't make any sense, but it happens.
Are you aware of a such a bug in this JDK version with hotspot compiler?
I have build 1.3.1 1.3.1.05-JPSE_1.3.1.05_20020425 PA2.0 on HP-UX PA RISC v11.11. It seems there is a very strange thing happening. I have 2 static methods in 2 different classes. First method calls the second method. The second method has many parameters but a particular long parameter behaves strangely.
I have
public static String method1(long parameter)
public static String method2(long parameter)
method 1 is simply calling method 2:
String s= Myclass.method2(1);
However, after some point the although I pass parameter value as 1, inside method 2 if I do a System.out.println the value of this parameter is 0 WIHTOUT any line changing this parameter.
I put
public static String method1(long parameter)
{
System.out.println(parameter);
String s = Myclass2.method2(parameter);
return s;
}
public static String method2(long parameter)
{
System.out.println(parameter);
//other logic
}
I get 1 printed in method1 then 0 printed in method2. These successive method calls are in the same thread, I am sure about this.
These methods are being run in a server application and are being called numerous times before the problem appears. This happens only with these 2 methods and it is intermittent when 2nd method is called with parameter =1. Because I thought the issue starts occurring after a while I thought the problem might appear because method2 is getting compiled and no longer running in interpreted mode, but I'm not able to prove it yet as 1.3.1.05 doesn't allow many VM options.
If I run java command line with -Xcomp parameter, I always (not intermittent) get the parameter changed to value 0 in method2 only the first time method2 is being called.After this, it works OK.In order to reproduce the issue again I either do a kill -HUP on the java process or restart the JVM.
I tried with JDK 1.3.1.20 and I cannot reproduce it yet, but a JDK upgrade would imply many regression testing. Parameter changing value all of a sudden doesn't make any sense, but it happens.
Are you aware of a such a bug in this JDK version with hotspot compiler?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP