-
Notifications
You must be signed in to change notification settings - Fork 2
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
Test tape device with a VAXstation 3100 running OpenVMS 7.2 #111
Comments
These are the logs and scripts for this ticket.
@Pacjunk Please add whatever may be missing. The latest s2p log triggered by your foreign mount operation should be added I think. |
Correction: The mount/foreign works correctly. The error occurs when using the backup/list command to list the contents of the first saveset. If the tape is mounted normally (files11), then the first file can be copied from tape to disk and read successfully - which shows that the tape is formatted correctly, and the files are valid. Simh can read the same .tap file (although not emulating SCSI), and a physical SCSI tape drive also works correctly. |
I sse, I confused the commands. s2p can also read the file, but it has to report a SCSI error because of the block mismatch. s2p does not have an issue with the file, but with the combination of block sizes in the file and the SCSI command to read these blocks. s2psimh does not know anything about this context but just lists the file structure/contents. |
This is the trace log for the mount/foreign command - which completes successfully. This is the log for the backup/list (what I was calling foreignlist) - which fails and produces the error "tape is not valid ANSI format". This is because it attempts to read the label block and s2p signals an error because of block size mismatch. |
Just to ensure that the test scenario for this ticket is correct: First mount.txt has to be applied, then list.txt. With your drive this sequence of commands works fine, with s2p it results in an error. Please confirm or correct. |
Correct |
Good, but these were only the logs. Can you please add the matching scripts generated by s2p for these logs? |
A question regarding the ANSI format: The initial blocks in the .tap files we use for testing have 80 bytes.
This is the same for the .tap files from your download link as for a blank tap file that you have initialized. |
Yes, that is ANSI. I found some information on VMS 8.4 (quite a bit later, and not using this architecture, but tape formats havent changed for years). Link is https://community.hpe.com/t5/operating-system-openvms/openvms-8-4-backup-log-disk-test-mga0-test-bck-save-not-working/td-p/4830493. The person is getting the same error messages as me. One of the replies states the following:
|
Where would take s2p the additional data from? Note that your tape drive also does not return more data than available, but signals the mismatch in the response, in the same way s2p does. RQUEST SENSE then provides the details, with custom bytes at the end of the added by your drive. |
What additional data? The above statement says that the device just returns the 80 bytes (and I assume there is a length field somewhere indicating the length of the response?) The tape drive must at some stage return the required data though, otherwise it wouldn't work. |
The drive in its sense data provides the difference of requested vs. available data, and that's it. When the requested size is bigger than the block size it will not return any data from the block at all, not even the 80 bytes that exist. The spec says:
That is what both s2p and your drive do. This is an s2p log:
This is my HP drive:
This is your drive:
The only difference is the number of mismatched bytes, because this test was run with 4 byte blocks and 32 bytes were requested. And we have the custom bytes at the end. IMO the conclusion is that when your drive is connected, your OS never tries to read 90 bytes from the freshly initialized tape, which only has blocks of 80 bytes. Otherwise your drive would report the same error as s2p, except for the custom bytes. If the custom bytes have no relevance, it means that something must have happened before, which caused your OS to do what is does in the s2p case, but do a different thing, i.e. NOT trying to read 90 byte blocks, when your drive is connected. Would you agree on this conclusion? I checked all commands in the logs again. There is one READ POSITION, which seems to ensure that the drive is at the beginning of the tape. s2p returns data that say that it is. I don't think anything is wrong with that. My tape drive returns the same data as s2p.
s2p says (page 0 default settings for tape devices):
This is what my HP drive says:
Since the contents of page 0 are vendor-specific, there are no general default values. Each device that provides these data may need its own set of values, but the first bytes are mentioned in the spec, but IMO a bit fuzzy.
It tells s2p to return the specified data for page 0 for each device that matches the INQUIRY product data in the property key. Regarding the mode pages more changes may be required, because your OS might change your drive's behavior by modifying vendor-specific data. You can see this in the commands sent by your OS, which are reflected by this script:
It reads mode page 0, then writes data for mode page 0, then reads mode page 0 again. Quite likely it assumes that after the MODE SELECT the page data have changed. In case of my HD drive nothing is changed by this command. The OS also checks which data of the device configuration page are changeable, but does not send any MODE SELECT to change them. |
OK, thanks a lot. I may just have found something relevant while re-checking all logs. I still don't know why my streamer does not work with Linux and the Atari. When using s2pexec with it I can successfully run the init script and can read the data it writes. When doing this I noticed that in the mount log there is a difference in the error data returned when the first filemark is hit. The OS reads the first 3 blocks, then there is another read command. This one has to fail because after the third block there is a filemark. This raises an error (with your drive, with my drive, and with s2p), but s2p does not return the requested block size in the error message, whereas my drive does. The spec also says this has to be returned. I am in the process of updating s2p accordingly. |
I ran the script twice. The first time it produced a message "Error: UNIT ATTENTION (Sense Key $06), NOT READY TO READY TRANSITION (MEDIUM MAY HAVE CHANGED) (ASC $28), ASCQ $00". The second time, no such message. |
Wrt your first comment: I don't know what you mean with "mode page stuff set". Wrt to the next comment: The UNIT ATTENTION was expected, this is why there was a TEST UNIT READY at the beginning of the script, to clear the unit attention status. The second time you ran the script the status was already cleared, therefore no unit attention anymore. |
Running the script on your drive has revealed what the MODE SELECT does. With the MODE SENSE before the MODE SELECT your drive says that it has a default block size of 512 bytes. The MODE SELECT changes this. After the MODE SELECT your drive return 0 as default block size with the next MODE SENSE. The spec says: |
The block size change works now. Can you please check if this already improves something after updating and re-compiling issue_111? Important: Remove the mode page line from /etc/s2p.conf. |
The mount crashes s2p with floating point exception |
I just committed a fix so that when hitting a filemark the requested length is returned. The exception is most likely also fixed in the very latest issue_111 sources. If not, please provide an up to date mount script with the commands that result in the exception. The mount operation also sends the MODE SELECT, this is why it is also affected by the MODE SELECT change. |
Same floating point exception |
I see, please provide the script, so that I can reproduce the issue with my setup. |
I may have found what's wrong without a script (but would still like to have it). Please update once more and re-test with commit ID 408538d. |
That fixed the floating point exception. Logs for mount: Backup/list still fails. Logs: |
Tthe sense data when hitting the filemark in the mount test are now correct. Please configure a custom mode page 0 again, this time with a block size 0, by updating /etc/s2p.conf:
Then please run the list test and provide script and log. |
I'm packing up for the night. I will check in tomorrow. Cheers, |
simh does more than just VMS, but they are mostly minicomputer type systems with heaving leaning towards DEC gear. Written by a DEC guy, so I suppose this makes sense. I think the tape drive stuff emulates a TQK50 controller. Certainly the device name (MU) supports that. If it was SCSI it would be MK. There is a fork of simh that supports later workstations (including mine), but it only supports SCSI disks. Tape is still non-SCSI. What would happen (as a test) if the s2p code didn't generate an error and just returned the 80 bytes? Would be interesting to see. |
Your OS requests 90 bytes in the DATA OUT phase. Just returning 80 will cause issues, e.g. a blocked bus. We simply have to accept that also the real drives do not return 80 bytes in this case, and that this is compliant with the specification. The drives and s2p do the right thing in this context. |
Looks like we're never going to find out then! If this is a dead end, I suggest we move onto writing files to the tape (reading seems to work) |
@bog-dan-ro You mentioned that you wanted to implement tape support for PiSCSI. This appears to be stalling, but anyway: I would appreciate your help with testing the SCSI2Pi tape support. The current state is already far beyond what your suggested code for PiSCSI provides. It also supports non-fixed block sizes and simh-compatible image files. |
@Pacjunk I agree, let's continue with writing. I would not be surprised if we learn something when dealing with other features, i.e. writing, that helps us with the current problem. I am not as pessimistic as you ;-). For software problems there is always a solution. What's hard in this case is to collect all the data we need in order to make a full analysis of the problem. I bet it is just a minor detail which is causing issues. |
@Pacjunk I assume that you are going to start with a new test case. If there is something that does not work, please post the required data - you have a lot of practice with this now ;-) - and I will probably create a new, specific ticket for this case. |
OK. Here are some logs. I initialised a tape in the normal way (don't think we need logs for that now). The .tap file is 64KB in size. I then mounted the tape (not foreign like we were doing). This worked. Then I tried to copy a small file (probably only 40 bytes of real data) to the tape... The main error message I got, said that "magnetic tape position lost". I assume it didn't find the right place to append the ANSI header and/or the data for the file. |
@Pacjunk Regarding the list operation, let me make some statements. Please comment on what you think is wrong and why. This is not so much about s2p, but about the operations executed by the OS.
We have two different second blocks in our scenarios:
This above is from your latest mount script (not foreign).
This is from the foreign mount, isn't it? I guess there are different ways of labeling, and these data determine what the OS can later do with a tape? This is a test scenario that will provide more insight into the 80/90 bytes problem:
From the sequence of commands sent I am quite sure that your OS will not notice that the device has changed. It always reconfigures the drive for its needs before really doing something. |
Yes getting back into this and will get stuff deployed asap. Job change has really eaten into my play time. lol.
Appreciate all the work that you have done.
Sent from my iPhone
On Dec 7, 2024, at 4:20 AM, Uwe Seimet ***@***.***> wrote:
@sidick<https://github.com/sidick> @ppuskari<https://github.com/ppuskari> You also expressed interest in tape support. If you are still interested, this is the right time to help with testing.
—
Reply to this email directly, view it on GitHub<#111 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAIMVUHVC4HJVUZV3NXTK6D2ELDVTAVCNFSM6AAAAABS73SEU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRVGA3DCNJYGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thinking about this 90 byte block, I think this is a quick test to see if the tape is in ANSI format. Here is my theory: The backup command will require that the tape be in ANSI format, so it requests a 90 byte read. I think this is what must be happening. Mounting a tape foreign doesn't care about the format. If you mount a zero filled file, it reports no label, but it still mounts it. This is for transfering data to/from a "foreign" format. Backup requires a foreign mount, but does care about ANSI format, so must test it as above. I think the issue must be about how s2p handles the response to the invalid block request. I will run your tests soon, but I wanted to put forward this theory! |
I ran your check position script. The first time it generated errors, so I ran it again. I then mounted the real tape foreign, switched off the tape drive, started s2p, then did the backup/list. Same error - which is expected as it is the backup command that generates the 90 byte read. As I said in the last comment, the foreign mount doesn't really care what format the tape is in. If it is ANSI, then it will display the label. If not, it just says no label and continues anyway. |
I tried it the other way around (mount the s2p tape, then read the real tape), but this failed as it said the drive contains the wrong tape. There must be a serial number on it, because despite having the same label, it knows it has been changed. In theory your test should work as it is the backup/list command that causes the issue. |
I'm afraid this collides with what the logs say: They all say that s2p does the same as your drive does when there is a block that has 80 bytes but 90 bytes are requested. It is also the same as my drive does, and matches what the specification says must happen. When receiving this response your OS stops sending commands. I don't think I have missed something when looking at the errors reported by the devices/s2p. The sense data are only two lines, and the command sent before IMO is also identical, requesting 90 bytes. |
The check script shows that the drive is at position 0. This is expected, but we needed to verify this. Too bad that there appears to be a serial number. But as mentioned before there are indeed different numbers in the block contents logged by s2p.
INQUIRY, TEST UNIT READY, REWIND, 4x READ. The latter should fail and your drive will report errors, which can be ignored. With the output we can create a .tap file with exactly the same contents, i.e. the same serial numbers. Then when you replace the drive by s2p, the OS will think the tape is the same. |
I think you meant 08 there, rather than 03. Anyway, with a blank tape I got: With the tape with the backups on it (which is the one we should be working with) I got: I can't see a serial number there, and I initialised a tape twice and the results are identical. Some how the OS knew that I had switched the tapes. |
Yes, 08, you are right. Regarding the OS, it can only know that something was switched in 3 cases:
I will create a .tap file with the same content as the full.txt tape, and then let's see what happens. This tape has more than 4 blocks and no tape mark on it, but I hope that the first 4 are sufficient for this kind of test, because the error we are dealing with happened before any attempt to read the fourth block. |
One more question: The data of full.txt are completely different from the data we used previously. We have at least 4 data blocks, but no tape marks at the beginning. Previously, for the list test, we were using these data:
full.txt starts like this, in simh speech:
I guess I am missing something here. Just to ensure that we are talking about the same: The new test is supposed to look like this:
|
The steps that you listed do not detect the tape change. Mounted the real tape, then swapped to the emulated for the list: (attempts the 90 byte read) The tape change issue occurs the other direction. ie mount the tape with s2p, then try to list with the real tape drive. I think the issue is the the backup/list command itself. As I stated before, the mount/foreign doesn't really care about the tape format. Anyway, packing up for the night. |
Thank you for your help today. The last test indeed says that it is the list command and nothing that happened before. But let's verify this with the other test, because we have to ensure with all the means we have that we do not miss anything.
The drive will report UNIT ATTENTION, but it will only do this once. You can run the command above twice to verify. Now quit s2pexec and run the list operation with your OS. Note that if the tape/image contents are not identical, the OS may still notice the change. I am prepared to provide a faked .tap file if required. We expect that the list operation will work with this test scenario, don't we? s2p has done the mount, and the real drive will execute the list operation. Just in case it should be needed, these are the first 4 blocks of your backup file full.txt as simh file:
A tool that creates simh .tap files from real tapes would be useful, wouldn't it? Then you do not have to do things like that manually, and can convert complete tapes. #113 |
At least for the current tests, where I faked the tape contents, we can be sure that everything is identical. s2psimh and s2pexec show that. If you read 4 blocks from a tape and the contents are the same as what s2psimh displays for a file with 4 blocks, everything is fine. |
Any comment on the scsimon trace above? |
I am not sure. In case you think these data show that a 90 byte read for a 80 byte block is successful, you would have to resolve the contradiciton with the specification. And why the two streamers we use for testing both report CHECK CONDITION when you try to read 90 bytes from an 80 bytes block. Or do you think this shows that the 90 byte read command actually is sent by the OS? Yes, this is probably what the data show. This would mean that I am not right with finding it more likely that it is not sent. And then the question remains, why does the OS react differently on the respective CHECK CONDITION situation with s2p than with your streamer, even though the logs show that the same data are returned? |
I don't know what it means, but I have not left out any of the trace. It goes straight from sending the command to retrieving the data. I don't know what the 00,04,00,08,48,80 values are in between the command and the data. You would know better than me! |
I'm afraid I do not know. There cannot be any data values that are not also visible somewhere in the s2p logs. 00, 04 are rather ubiquitous. 80 may be 80 bytes as part of a read command, but can also be something else. 48 is an alphanumeric "0", also ubiquitous. Please run the test with the switched drive. It would at least provide a bit more information. I don't think that the positioning fixes done for #112 are also relevant for this ticket, but checking whether something has improved with the latest code also for #111 may be worth trying. |
Just for fun I tried scsimon with Linux and my tape drive. The sg_inq Linux tool sends two INQUIRY commands and, depending on the outcome, a REQUEST SENSE. A very simple scenario. |
This is a follow-up ticket for #100, dealing with issues found when testing the tape device. The OS reports "tape is not valid ANSI format" when trying to list files after a foreign mount operation.
The text was updated successfully, but these errors were encountered: