Operating System - OpenVMS
1752796 Members
5951 Online
108789 Solutions
New Discussion юеВ

Re: Turning off TCPIP stack dumping

 
SOLVED
Go to solution
Dan Herron
Advisor

Turning off TCPIP stack dumping

I am using the MAIL$ utility routines to programatically send email.

When I invoke MAIL$SEND_ADD_ADDRESS and pass it an invalid email address, like smtp%joe@blow. (notice the missing COM or NET after the final period) TCPIP returns a warning "%TCPIP-E-SMTP_BADADDR, recipient address is illegal; unparsed string: @." and then stack dumps.

I have no problem with the error message, but do not want the program to abort/stack dump as I have code within the calling program to handle the situation. I have included the MAIL$_NOSIGNAL item in the input item list when calling MAIL$SEND_ADD_ADDRESS but this does not turn off TCPIP's need to signal the error and stack dump.

How do I turn off the signal/stack dump so that MAIL$SEND_ADD_ADDRESS will just return the error status to the calling program?

Thanks for your help,
Dan Herron
11 REPLIES 11
Volker Halle
Honored Contributor

Re: Turning off TCPIP stack dumping

Dan,

can your reproduce this behaviour using MAIL ?

$ MAIL
MAIL> SEND
To: smtp%joe@blow.

What happens ?

Volker.
Dan Herron
Advisor

Re: Turning off TCPIP stack dumping

Volker,

MAIL> send
To: smtp%joe@blow.
%TCPIP-E-SMTP_BADADDR, recipient address is illegal; unparsed string: @.
%TCPIP-E-SMTP_ABORT, SMTP session aborted

MAIL>


Same error message. No stack dump. Control is returned to the calling program..in this case MAIL.

Thanks,
Dan
Volker Halle
Honored Contributor

Re: Turning off TCPIP stack dumping

Dan,

could you provide an example output of the 'stack dump' ?

Volker.
Dan Herron
Advisor

Re: Turning off TCPIP stack dumping

Volker,
%TCPIP-E-SMTP_BADADDR, recipient address is illegal; unparsed string: @.
%TRACE-E-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
TCPIP$SMTP_MAILSHR 0 000000000006E2D8 000000000221E2D8
TCPIP$SMTP_MAILSHR 0 0000000000070A44 0000000002220A44
MAILSHR 0 0000000000044CC8 0000000000720CC8
MAILSHR 0 000000000003C138 0000000000718138
MAILSHR 0 000000000003C954 0000000000718954
0 FFFFFFFF808B5F18 FFFFFFFF808B5F18
MAILSHR 0 000000000003AF48 0000000000716F48
MAILSHR 0 000000000003B63C 000000000071763C
MAILSHR 0 000000000003B8E0 00000000007178E0
MAILSHR 0 0000000000036F64 0000000000712F64
MAILSHR 0 0000000000037368 0000000000713368
TEST_EMAIL_TYPE_SEND MAIL_SEND_ADD_ADDRESS MAIL_SEND_ADD_ADDRESS
1265 000000000000037C 000000000007C82C
TEST_EMAIL_TYPE_SEND EMAIL_SEND_ARRAY EMAIL_SEND_ARRAY
1623 0000000000000934 0000000000070A94
TEST_EMAIL_TYPE_SEND EMAIL_TYPE_SEND EMAIL_TYPE_SEND
1079 0000000000000D7C 00000000000622DC
TEST_EMAIL_TYPE_SEND TEST_EMAIL_TYPE_SEND$MAIN TEST_EMAIL_TYPE_SEND$MAIN
544 00000000000002F8 00000000000602F8
0 FFFFFFFF8028163C FFFFFFFF8028163C
%TCPIP
-SYSTEM
-CLI
%F-NORMAL, normal successful completion
%?-NOMSG, Message number 0000534E
%E-ILLSER, illegal service call number
%?-NORMAL
%?-BADIMGHDR
%E-ILLSER
%?, normal successful completion
%BADPARAM, bad parameter value
%TRACE-E-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
0 FFFFFFFF80888954 FFFFFFFF80888954
DEC$BASRTL 0 000000000000E48C 00000000007EE48C
----- above condition handler called with exception 0764B39A:

----- end of exception message
0 FFFFFFFF800B7CCC FFFFFFFF800B7CCC
0 FFFFFFFF80888954 FFFFFFFF80888954
TEST_EMAIL_TYPE_SEND MAIL_SEND_ADD_ADDRESS MAIL_SEND_ADD_ADDRESS
1312 0000000000000584 000000000007CA34
TEST_EMAIL_TYPE_SEND EMAIL_SEND_ARRAY EMAIL_SEND_ARRAY
1623 0000000000000934 0000000000070A94
TEST_EMAIL_TYPE_SEND EMAIL_TYPE_SEND EMAIL_TYPE_SEND
1079 0000000000000D7C 00000000000622DC
TEST_EMAIL_TYPE_SEND TEST_EMAIL_TYPE_SEND$MAIN TEST_EMAIL_TYPE_SEND$MAIN
544 00000000000002F8 00000000000602F8
0 FFFFFFFF8028163C FFFFFFFF8028163C
Volker Halle
Honored Contributor

Re: Turning off TCPIP stack dumping

Dan,

did you try $ LINK/NOTRACE ?

Volker.
Dan Herron
Advisor

Re: Turning off TCPIP stack dumping

Yes, I have NOTRACE on the compile and the link. But to of no avail.

Dan
Volker Halle
Honored Contributor

Re: Turning off TCPIP stack dumping

Dan,

MAIL uses it's own condition handler, which re-signals only in case of an ACCVIO. Otherwise it ignores the signal (returning SS$_CONTINUE) or prints the error message.

Volker.
Hoff
Honored Contributor
Solution

Re: Turning off TCPIP stack dumping

You may well be able to make the case that the MAIL$_NOSIGNAL should do this for you, but that's for HP OpenVMS Engineering to decide, and (even in the best possible case) any fix for this probably won't arrive on your schedule here. This matter is for y'all and for HP to discuss more directly, though.

If you have a condition handler established within your code and it's not getting triggered for this case, then you've arguably encountered a (bigger) bug in either the MAIL API or within TCP/IP Services. Various OpenVMS APIs (and particularly the older APIs) can and do use signals.

The simplest way to suppress these often looks like this:

lib$establish( lib$sig_to_ret );

Then start calling the MAIL$ routines; I usually have a set of wrappers (I've posted a set of wrappers with a BSD license in the NEWUSER code) and the wrappers here would include the declaration of the signal handler.

It's entirely feasible to do rather more within the handler than to just convert the signal into a return status (sig_to_ret), including (often) gathering (far) more information on the error.

nb: the conversion to the return occurs when the signal arrives at the call frame depth (level) of the code that has declared the handler, which would be at the "wrapper" call here.

Reading materials:

http://labs.hoffmanlabs.com/node/1438

http://labs.hoffmanlabs.com/node/1260

I wrote various updates to the HP Programming Concepts Manual over the years around these sorts of things, and that's probably also worth a read here if you've not taken the time. That document tries to describe some of these areas of OpenVMS in some detail.
Dan Herron
Advisor

Re: Turning off TCPIP stack dumping

Volker,
Thank you very much for your quick responses to my question.

Hoff,
Thank you for your responses also.

Both your responses lead me (in a round about way) to the
OPTION HANDLE=ERROR command in BASIC (our language of choice) which allows the BASIC program to trap externally generated errors (via TCPIP, etc.) during the execution of the program.

Thanks again,
Dan Herron