Skip to content
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

Muddle ASYLUM doesn't work #2183

Open
eswenson1 opened this issue Mar 24, 2023 · 0 comments
Open

Muddle ASYLUM doesn't work #2183

eswenson1 opened this issue Mar 24, 2023 · 0 comments
Labels
dynamic modeling Things from the Dynamic Modeling machine. muddle Muddle/MDL

Comments

@eswenson1
Copy link
Member

Using original binaries (or sources) from MIT-DMS' backup tapes, I've tried (for a very long time) to get ASYLUM to work under MDL 55. I've not succeeded. This has been discussed in #1960, but it makes sense to have its own ticket.

The failure case looks like this:

<USE "ASYLUM">
<MAKE-DATA-BASE "ejs;test asylum">
<SET ASY <OPEN-DATA-FILE "ejs;test asylum">>
<SET SPC <AFIND 1>>
<SET S1 <ASTRING .SPC "plugh">>
<DATA-APRINT .ASY 1 .SPC .S1>
<DATA-AREAD .ASY 1 .SPC>

The error that occurs is this:

<DATA-AREAD .ASY 1 .SPC>$

*ERROR*
DANGEROUS-INTERRUPT-NOT-HANDLED
MPV!-INTERRUPTS
#WORD *000000727665*
LISTENING-AT-LEVEL 2 PROCESS 1
<FRAMES>$

0 ERROR [DANGEROUS-INTERRUPT-NOT-HANDLED!-ERRORS
         MPV!-INTERRUPTS
         #WORD *000000727665*]
1 PRIN1
*ERROR*
DANGEROUS-INTERRUPT-NOT-HANDLED
MPV!-INTERRUPTS
#WORD *000000727665*
LISTENING-AT-LEVEL 3 PROCESS 1

Note, the MPV (above) is occurring because the object returned by DATA-AREAD is bogus -- not a valid Muddle object. It should be the string "plugh" from the MADMAN space (.SPC). Note the string is not in garbage-collected space, but in its own MADMAN space. The MPV occurs when the REPL is trying to PRINT the value returned by DATA-AREAD.

The actual error and value returned can vary -- depending on what has happened before the call to DATA-AREAD. Sometimes, instead of the string "plugh", the atom T is returned (this is incorrect, but in this case, the REPL can print the result).

After analyzing the results of a DATA-APRINT, it seems that the string "plugh" does exist in the ASYLUM in the first file (MANIAC). The number 1 in the DATA-APRINT and DATA-AREAD specifies file number 1. I've done the DATA-APRINT and then loaded the ASYLUM file into a fake job using $0L and found the "plugh" with the $W DDT command. In fact, if I trace the call to APRINT (MADMAN function called by DATA-APRINT), I see the correct offset (into the ASYLUM file) as a parameter.

However, when I call DATA-AREAD, specifying the same file, I get garbage back. Tracing shows that the correct file offset is passed to AREAD (called by DATA-AREAD), but the "plugh" is not returned. This suggests that opening the ASYLUM file (I mean the file "inside" the ASYLUM -- also called a MANIAC), and reading it into memory is not working correctly.

The code is quite gnarly here. The file structure of an ASYLUM file is documented in MADMAN;ASYLUM INTERN (and the user interface is documented in MADMAN;ASYLUM DOC). There are headers in the ITS file that holds the ASYLUM, as well as MFDs (master file directory), and all sorts of other data structures. These structures are largely read by doing reads at memory or file offsets into IUVECTORs of appropriate lengths. Math is done to arrive at the offsets, and there are lots of CHTYPEs to convert from WORDS to different types. Memory is allocated for the various pages, and BLT copies are done to map file records into memory pages. In other words, this is very low-level code. Any error can result in pointers to invalid structures.

Note: I haven't gotten any of this code to work in pdp10-ka, pdp10-ks, pdp10-kl, or KLH10 using MDL 55.

Note 2: Apparently, @larsbrinkhoff got TRIVIA to work using the MDL 54 versions of binaries from DM backup tapes. TRIVIA uses ASYLUM and MADMAN for its storage as well. That suggests that the version of ASYLUM and MADMAN used by TRIVIA works in MDL 54. Not exactly sure what this means, though!

@larsbrinkhoff larsbrinkhoff added dynamic modeling Things from the Dynamic Modeling machine. muddle Muddle/MDL labels Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamic modeling Things from the Dynamic Modeling machine. muddle Muddle/MDL
Projects
None yet
Development

No branches or pull requests

2 participants