-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem getting SENDS in DDT #2343
Conversation
@eswenson, I see ES has the same issue EDIT: Strike that, maybe ES just has the GitHub version. |
If I type |
It seems the code implements an undocumented feature: you can supply an ITS name (as per .GETSYS' ITSNMS) to ^A, and then DDT will check for sends on that machine (using the MLDEV device). But somehow this feature trips up things when there's no argument to ^A. The missing argument is treated as a empty device name. This change happened in 1978, between DDT 1000 and 1072. |
Another interesting finding is that sends are preferentially stored on the .TEMP. directory, but DDT will fall back to COMMON if .TEMP. is missing. There is also code to have MAIL files on COMMON, but that has been disabled in favor of Old versions of DDT use the COM: device for sends. |
The problem is in MCHOKP which checks whether A is a valid ITS name. It goes through all names in MCHTAB. The bug is that it compares A against a table entry before checking if the entry is 0. So if A is 0 it will (probably) hit an empty entry and think it's a valid name, rather than finding the end of the table and exiting the loop. If we pass in a user name there's no problem, because it will not match a 0 in MCHTAB. |
MCHOKP does another strange thing. It checks whether B is DSK, and if so returns the local machine ITS name. Not all callers will have something sensible in B, however. This change was also made in 1978, between DDT 1263 and 1316. |
d57ff34
to
c509db8
Compare
If MCHOKP was called with A=0, it would mistakenly match this against an empty MCHTAB entry and do a skip return to indicate a valid ITS name. To fix this, the check for an empty entry is moved up.
c509db8
to
fb5f7f5
Compare
Indeed, I updated SENDS from GitHub. I generally do this all the time. ES should be running the latest GitHub code. But if something existed in PI that hasn’t been included in GitHub, I leave it be. |
(One idea would be to check for corresponding code in other programs that got updated to use the ITSNMS-generated list of ITSes. I don't have time right now.) |
@larsbrinkhoff I've been using :QSEND to send messages to other machines. DDT's SNDFLG allows the use of :SEND to invoke an external program of the same name, and our build causes SYS; TS SEND to be linked with SYSBIN;SENDER BIN. However, when I try :send ejs@ex ^C from ES, I get "Can't", and the ">>" prompt. When I try :send ejs@es ^C on EX, it sends perfectly find and I receive the message. On both systems, SYS;TS SEND is a link to SYSBIN;SENDER BIN, and BINPRT says that both were assembled from SYSEN1;SENDER 398. Because :SEND ejs@ex ^C on ES always says "Can't", I figured that it didn't support the chaos SEND protocol. However, as seen by the success of the same thing from EX, that was a bad assumption. I've always used :QSEND rather than :SEND when sending messages to other machines (I used to do that back in my MIT-MC days as well). Can you think of any reason why this works from one machine (EX/DB) and not from ES? QSEND, of course, works perfectly fine on both machines for sending to the other (and other chaosnet hosts). |
For whatever reason, on ES attempting to use :SEND to send to EX, SENDER attempts to use the CLI device, rather than CHAOS. This fails (and :send prints "Can't"). However, if after the failure, I use the "K" command to switch from CLI to Chaos, it works fine. On EX, on the other hand, it doesn't attempt to use the CLI device, but chooses CHAOS, which works. I don't understand why on ES, SEND tries to use the %CLI device, but not on EX. Any ideas? |
My first idea is that you have forgotten to set SNDFLG to -1 on ES. You should be able to make CLI work by having all your "local" machines in ITSNMS and setting up MLDEV between them. |
I have SNDFLG set to 1 (not -1) on both machines. DDTORD says 0 or non-zero, so 1 should be fine. I’m pretty sure that ITSNMS has EX and ES on both systems. And MLDEV is set up on both systems. |
In that case I think it's TS SEND (SENDER) printing "Can't" (and maybe something more?) I'm guessing it can't open EX:.TEMP.;uname SENDS for some reason. |
Well, it's not that. I can, from ES, write to EX:.temp.;ejs sends (using the :copy command). And I can do the same from EX (writing to ES:.temp.ejs sends). MLDEV is working perfectly fine from either machine to the other. I put a breakpoint at BEGAN in SEND on ES and stepped until the .getsys call. I see EX in the ITS machine table.
And I stepped through the code that decides whether the recipient host is "an ITS" and that does determine it EX is an ITS host. Since the $Force flag is not on, we first attempt the CLI route. ANITS returns with TT set to EXCLI. What would prevent an OPEN and subsequent write to EXCLI on ES (but the corresponding open of ESCLI on EX to work)? Is there anything that needs to be set up in DEVICE for EXCLI to be considered a usable device? Here is the failure point:
We attempt an open to EXCLI and this doesn't skip-return, hence an error. However, why does it want to go to EJS HACTRN on EXCLI? This seems wrong. Weird thing is that on EX, attempting to send to EJS@ES works just fine:
We're doing the same CLI open on EX (to ES), and it works there. |
Well, I did the debug-mldev thing (having another user run MLDEV with breakpoints, and having first user set up translation to other user's MLDEV), and when I do that, :SEND EJS@EX works just fine. I've stepped through all the code and the sending user is correctly connecting to MLDEV, and through it to the EX ITS system CLI device for EX:EJS HACTRN. But when I kill the translation and MLDEV job, I cannot send a message. I have no idea why. I had suspected it was my changes to MLDEV a while back, but I'm running the same MLDEV on ES and EX, and, as I said, when debugging MLDEV, it works just fine. So I'm stumped. Anyone have any ideas? |
ATSIGN DEVICE does some magic to make device names like EXCLI work. I see it has ES built in, but not EX. Unless you fixed that locally? |
Thanks, Björn! That was indeed the issue. I added entries for EX to @dev and now EXCLI works just fine. |
There seems to be a problem getting SENDS in DDT using the ^A command. For example: