-
Notifications
You must be signed in to change notification settings - Fork 93
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
VAX qe interface has problems on macOS, when compiled with -O1 or -O2, works when DEBUG=1 is set #387
Comments
I'm confused. The title speaks of Mac OS, but the description keeps talking about OpenBSD. Could you explain more precisely what OS you're building on, with what tools, and what network option (pcap, vde, etc.). What simulator are you building, and what are you running on that simulator, and what is the test that demonstrates the issue? |
I'm building on Mac OS, with the MicroVAX 3900 simulator, running OpenBSD 5.8/vax in the simulator. The problem is that when SIMH is built with -O2, the qe driver breaks, with the OpenBSD kernel messages put above. I'm using distcc in OpenBSD/vax to handle compiling the base system. The errors generally start after a few miutes of network activity, and then networking stops working in the simulator entirely. The problem largely seems to happen when there are a large number of TCP/IP connections open and closing within a short period, but I'm not sure if that's what actually triggering it. Building SIMH with -O0 causes the network within OpenBSD/vax to work correctly, and I can use distcc with multiple simulators to great effect. From the behavior, and messages I'm seeing, this feels like an alignment issue, but it only happens when the system is under load. |
Thanks. One possible answer is that it's an OpenBSD issue related to timing of the emulated device. The emulator runs much faster than the real hardware, so if there are timing bugs they can appear in simulation even if the bug is impossible to reach on the original hardware. |
I agree that unless this can be replicated on real hardware, it isn't a SIMH issue. I haven't seen any similar issues with Ultrix, 4.2BSD, NetBSD, etc. and I've used all of them in a fairly heavily loaded way for extended periods of time. |
I've had similar problems with NetBSD as said above; the same fix, compiling DEBUG=1/-O0 resolved it there. So I can reproduce this with different OSes in SIMH. I'll test more when I get a chance, but from memory, I did have stable network on SIMH with the same OS image on different host platforms; I only had broken networking on macOS as a host platform. |
Context
Using the network interface on OpenBSD or NetBSD mostly works, on a stock OpenSIMH build, but has problems under heavy load, or with certain small packets such as ICMP ping.
This problem was discovered running distcc from OpenBSD in an effort to rebuild the OS a bit faster, but shows up in other network related ways. I'm using NAT attachment on macOS. I get similar network weirdness in NetBSD, although I haven't had a network delock on NetBSD like I have had in multiple versions of OpenBSD.
Compiling Open SIMH was DEBUG=1 causes the network stack to behave.
I tried running SIMH on NetBSD/arm64 as an additional data point, but it kept hanging trying to load the KA655 self-test.
the output of "sim> SHOW VERSION" while running the simulator which is having the issue
how you built the simulator or that you're using prebuilt binaries
Pull current git master, make DEBUG=1, load up my OpenBSD image, see network problems go away. Building with standard make or make OPTIMIZE=-O1 still has broken network stack
the simulator configuration file (or commands) which were used when the problem occurred.
the expected behavior and the actual behavior
I can have an optimized SIMH and working network at once.
The text was updated successfully, but these errors were encountered: