Please report new issues athttps://github.com/DOCGroup
TAO VERSION: 1.3.4 ACE VERSION: 5.3.4 HOST MACHINE and OPERATING SYSTEM: Linux 8.0 TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): gcc version 3.2.3 AREA/CLASS/EXAMPLE AFFECTED: N/A DOES THE PROBLEM AFFECT: COMPILATION? No LINKING? No EXECUTION? Yes OTHER (please specify)? SYNOPSIS: Locate Forward thrown by interceptor causes server to segv. DESCRIPTION: When the idl file contains a sequence of outs, and a Locate Forward is thrown from an interceptor, the server dumps core. It appears that the skeleton code doesn't check to see if a location forward is thrown before trying to marshal the response, including the sequence of strings (which is nil). For example, the following idl: module Test { interface Hello { typedef sequence<string> stringSeq; void get_string (out stringSeq test_string); oneway void shutdown (); }; }; has a corresponding skeleton method of get_string_skel() that has code [attached] that trys to marshal the string into the out object even though that sequence of strings has not been initialized in the servant: if (!( (_tao_out << test_string.in ()) )) { TAO_InputCDR::throw_skel_exception (errno ACE_ENV_ARG_PARAMETER); ACE_CHECK; }
Created attachment 245 [details] idl code that illustrates the problem
Is OCI having a fix for this?
Pending OCI's reply to Bala's last comment, we will address this issue when we tackle the generated code refactoring for the skeleton side.
I have a fix for this one, but I haven't finished testing it yet. If it passes, I'll check it in when the repo is open for checkins. The fix is in TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp. It needs to generate an if to skip the marshalling code if TAO_HAS_INTERCEPTORS and this is a location forward. Dale
Dale, please add your patches to the bugzilla. We can integrate it as soon as the beta is out of the door. I think you are on the right track. Adda test case for this. Anyway, during the next stage of refactoring we will have to clean this up. Talking of this, Jeff we have a problem here irrespective of LF. Marshalling a sequence of strings which are not initialized seems to be a problem. We need that fixed. Let me double check that and probably add a bugzilla entry if required.
Dale, I just registered a new bugzilla entry. I think 1676 is "the" bug to fix, and this would get resolved automatically. Nevertheless your patches shuld be useful too
The patch: Index: operation_ss.cpp =================================================================== RCS file: /project/cvs-repository/ACE_wrappers- repository/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp,v retrieving revision 1.77 diff -r1.77 operation_ss.cpp 680a681,686 > // Skip marshalling on location forward > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" << be_nl > << "if (!_tao_vfr.location_forwarded ())" << be_idt_nl > << "{" << be_idt; > *os << "\n#endif /* TAO_HAS_INTERCEPTORS */"<< be_nl; > 684a691 > // begin: marshal code 737a745,755 > > // end of indent: marshal code > *os << be_uidt << be_uidt; > > // End of scope: Skip marshalling on location forward > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1) > << be_uidt_nl << "}" << be_uidt; > *os << "\n#endif /* TAO_HAS_INTERCEPTORS */" << be_nl; I also have a test program that I'll check in eventually. ------------------------------ Bala, I disagree that fixing 1676 fixes this bug. 1676 addresses the issue of an uninitialized out parameter or return value. While I agree that SEGV is not a very good error message for this case, the correct action is to throw a MARSHAL exception. The application program has provided un-marshable data. (I'll add a note to that effect to that bugzilla entry) If 1676 were fixed correctly, but this fix not applied, then a location forward from a portable interceptor would trigger a MARSHAL exception which is not the desired behavior. Dale
oops, I did a little last minute code-polishing before generating the diff. Add a closing quote at the end of the line: > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1) to make it > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" Dale
Dale, coudl you please generate a new diff again? It woudl make my life easier. Please see bug 1676 for my replies to your osbervation
Revised diff: Index: operation_ss.cpp =================================================================== RCS file: /project/cvs-repository/ACE_wrappers- repository/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp,v retrieving revision 1.77 diff -r1.77 operation_ss.cpp 680a681,686 > // Skip marshalling on location forward > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" << be_nl > << "if (!_tao_vfr.location_forwarded ())" << be_idt_nl > << "{" << be_idt; > *os << "\n#endif /* TAO_HAS_INTERCEPTORS */"<< be_nl; > 684a691 > // begin: marshal code 737a745,755 > > // end of indent: marshal code > *os << be_uidt << be_uidt; > > // End of scope: Skip marshalling on location forward > *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" > << be_uidt_nl << "}" << be_uidt; > *os << "\n#endif /* TAO_HAS_INTERCEPTORS */" << be_nl; > > >
I'll go ahead and check in this change. It's been working at OCI for a week.
Fix is checked in. I still need to clean up and check in the regression test.
Fixed already Sun Dec 28 09:55:44 2003 Dale Wilson <wilson_d@ociweb.com>