What information can we know from minor code?

0 Likes

Problem:

  • Product Name: VisiBroker
  • Product Version: All
  • Platform/OS Version: All
  • JDK/Compiler Version: All

What information can we know from minor code?

User sees exceptions with minor code thrown from VisiBroker process from time to time.  How to use this minor code to understand the cause for the exception?

Resolution:

According to OMG CORBA specifications, there are 39 SystemExceptions defined. These standard system exceptions are described in Common Object Request Broker Architecture: Core Specification Section 4.12.3, "Standard System Exception Definitions".

Each standard CORBA exception includes a minor code to designate the subcategory of the exception. Minor exception codes are of type unsigned long and consist of a 20-bit "Vendor Minor CodesetID" (VMCID), which occupies the high order 20 bits, and the minor code occupies the low order 12 bits.

Here is the list of some VMCIDs that users often encounter
 

(OMG) experimental use
0x00000000
(OMG) experimental use
0xFFFFF000
OMG reserved use (1 - F)
0x0000N000
OMG standard minor exceptions
0x4F4D0000
GNU Classpath
0x47430000
IONA (ORBix)
0x49540000
JacORB
0x4A430000
omniORB
0x41540000
Sun
0x53550000
TAO
0x54410000
Borland (VisiBroker)
0x56420000


*VMCID assigned to OMG is CORBA::OMG VMCID (0x4F4D0000). Borland's VMCID is 0x56420000.

Minor Code Range and VMCID

  1. If minor code is from 1330446336 (0x4F4D0000) to 1330450431 (0x4F4D0FFF), use OMG VMCID.
  2. If minor code is from 1447165952 (0x5642000) to 1447170047 (0x56420FFF), it will uses Borland specific VMCID.
  3. If minor code does not fall into the above ranges but is greater than 4095 (0xFFF), it represents the OS system exception(In VisiBroker implementation, it takes OS error code as minor code.)

The exception and its corresponding minor codes provide very useful information to users.

Example 1

Exception: CORBA::BAD_INV_ORDER
Minor: 1330446340
CompletionStatus: MAYBE

  1. Convert the decimal minor code to hexadecimal, you get0x4F4D0004.
  2. XOR the hexadecimal with OMGVMCID (4F4D0000), you get 4.
  3. Checking exception code of OMG CORBA specification (as shownbelow)
  4. BAD_INV_ORDER 1 Dependency exists in IFR preventing destruction of this object.
    2 Attempt to destroy indestructible objects in IFR.
    3 Operation would deadlock.
    4 ORB has shutdown.
    ...
    20 An OTS/XA integration xa_ call returnedXAER_PROTO.

It means ORB has been shut down. You can refer to What is the meaning of the minor codes for more information.

Example 2

CORBA exception: CORBA::COMM_FAILURE. Minor code: 10055

  1. This exception is thrown from application running on Windows.  By checking Windows system exception, it shows "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full".

Example 3

System Exception, name=CORBA::TIMEOUT, minor_code=1447165953,completion_status=no.

  1. Convert the decimal minor code to hexadecimal, you get 0x56420001.
  2. XOR the hexadecimal with Borland's VMCID 0x56420000, the result is 1.
  3. Under "Value added enhancements" of VisiBroker 7.0 release notes,

    "CORBA::TIMEOUT exceptions being thrown during an attempt to make a connection, sending a request or receiving a reply now have different minor codes in the Vmcid::VBVMCID1 namespace to distinguish them. For connection time-out, the minor code is 1 | Vmcid::VBVMCID1. For request timeout, the minor code is 2 | Vmcid::VBVMCID1. For reply timeout, the minor code is 3 | Vmcid::VBVMCID1. "

    It indicates TCP connection timeout.

Example 4

org.omg.CORBA.TIMEOUT: Read timed out at waiting stage  vmcid: OMG  minor code: 0  completed: No

  1. This is an OMG exception. According to CORBA specification (CORBA Core Specification, Appendix A), "If an exception that is to be raised for an error condition does not explicitly specify a specific standard minor code for that error condition, implementations can either use a minor code of zero, or use a vendor-specific minor code to convey more detail about the error." In this case, the minor code 0 means there is no detailed information of this exception.


 
Old KB# 26831

Labels:

Security
VisiBroker
Visibroker
Comment List
Related
Recommended