Skip to content

Recompiled all Tedit files #2195

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rmkaplan
Copy link
Contributor

For a baseline comparison with rmk88. A slight change to TEDIT-FNKEYS (constant dependency) that the recompiled revealed.

@pamoroso
Copy link
Contributor

I switched to this branch and so far I'm not noticing anything unusual on Linux Mint 22.1 Cinnamon.

Previous master version didn't have all of the tests
@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jun 23, 2025 via email

@pamoroso
Copy link
Contributor

I updated to commit 0f17d71 and ran the stress test but, since it didn't break, I interrupted it after about 10 minutes of runtime and over 14K iterations. Approximately how many iterations are needed for the test to fail?

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jun 24, 2025 via email

@pamoroso
Copy link
Contributor

No, I'm running in the default Medley directory. I'll try running from lispusers.

@pamoroso
Copy link
Contributor

I ran another test like this (MEDLEY is a pseudohost pointing to the Medley directory):

(LOAD '{MEDLEY}library>tedit>TEDIT-STRESS.LCOM)
CD '{MEDLEY}>lispusers>
(STRESSINSERT)

Since the test ran regularly for more than 6 minutes and over 220 iterations I stopped it.

@rmkaplan
Copy link
Contributor Author

As was suggesed in the meeting, I modified the stress test so that it saves the virtual memory (either SAVEFM or SYSOUT) before each insertion. The hope is that we will catch the state of the virtual memory just before it crashes, and perhaps then run to watch more precisely where it goes bad.

This strategy doesn't seem to help. When the pre-crash memory image is started up, it doesn't immediately crash as it expected. It just keeps on doing the insertions as if nothing had gone wrong.

Is there any value in looking more carefully at the precrash image? Or does this suggest that the problem is not in the Lisp memory but in some Maiko state?

@rmkaplan
Copy link
Contributor Author

(P.S. These are always arrayblock crashes, either bad passwords or header/trailer length mismatch).

@nbriggs
Copy link
Contributor

nbriggs commented Jun 27, 2025

I've added code that looks over all the memory of a block it is about to free to see if there are any words that look like block headers/trailers within it -- I have not found any cases yet in many hours of running the code. I am running with ARRAYBLOCKCHECKING turned on (both from the Lisp side, and by forcing it on in Maiko directly), but am NOT running with TEdit calling CHECKARRAYS. If there is a problem, and not something caused by the timing of when CHECKARRAYS is called, then it should become visible from the Maiko checking.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jun 27, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Jun 27, 2025

It could be that CHECKARRAYS needs to be uninterruptable, but I think stopping calling it is a good test. Still set ARRAYBLOCKCHECKING to T though, since you won't have it otherwise forced on in the Maiko code.

The extra checking/trap code is NOT in maiko master -- it's hacks to the code that makes it unusable in a release situation (it generates a dozen or so lines of output on stdout for every allocation/reclaim, and if it does find a potential problem (there are some false positives) you have to poke around in URaid and then continue.

@nbriggs
Copy link
Contributor

nbriggs commented Jun 27, 2025

Compiling CHECKARRAYS with an UNINTERRUPTABLE around the PARSEARRAYSPACE doesn't make it behave better.
I will add more code in Maiko to see if I can see what the Lisp PARSEARRAYSPACE is doing differently.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jun 27, 2025 via email

@masinter
Copy link
Member

The medley process scheduler isn't preemptive ... no other process will run until the current process does a (BLOCK), or there is an interrupt by timer (for SPY) or keystroke (an interrupt character).

UNINTERRUPTABLE is only useful to let operations that really must be done in a single transaction lest the memory would be corrupted.

It should never be wrapped around code that in the normal course of events would (BLOCK).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants