Sound driver crashes NeXTStep under VMware Fusion 3.1

Started by andreas_g, May 27, 2010, 12:44:35 PM

Previous topic - Next topic

bkmoore

I found some good documentation on debugging the kernel in the Next Developer documentation and driver kit examples.  I made a copy of my NS3.3 VM and got both virtual machines talking to each other on a peer-to-peer NeXT Network.

The basic idea is to run the driver on the slave VM, and over the network run the debugger on the master.  I was not able to get the master's debugger to link to the slaves debugger however.  I read that not all networking cards support network debugging.  So my question is if the VMXNet driver supports this feature. If not, I may have to try a different approach.

I think if I can get the sound driver going in the debugger, there's a good chance I might be able to fix the driver if it's something simple.  Otherwise, at the very least I hope to be able to know why it keeps crashing and maybe someone more knowledgeable could fix it.

On a side note, if this community wants to remain viable, we probably should develop some community expertise in driver maintenance and development.  Emulators will change, drivers will keep getting broken.

Brian

Morgon

Quote from: "bkmoore"So my question is if the VMXNet driver supports this feature. If not, I may have to try a different approach.

Unfortunately my network driver doesn't support remote kernel debuging due to the fact that the interface and driver methods needed for this aren't documented anywhere. Even the demo drivers supplied with NeXTDeveloper don't suppport kernel debugging.

When I wrote the driver in the first place I already had a look at the old darwin sources to figure out some things but even there the debugging interface wasn't that obvious to find that I could implement it easily. Since I had no need for kernel debuging at that time (debugging the network driver which had some bugs in the first release would not have been possible after all) I haven't bothered after that to find out how to implement the interface.

Maybe I have a look at that again when I find the time someday, but right now I'm too busy with other stuff much more urgent for my company. Sorry for that.

Hope you can solve the problem with the SoundBlaster driver so it gets usable again for the VMWareFusion users. From the description I would think it's a kind of memory access error happening while playing sound but as quite some years have passed since I wrote that driver I can't even give advice where to look for in the first place.

Good luck everyone, I'm happy that there are still other ppl out there using this great system and bothering to get it running better in newer VM versions. For sure I will do the same again once vital parts of the system stops working in newer versions of VMware we have to install in our company.

Morgon

Thomas

Are there any logging tools available for NeXTSTEP that allow to record a detailed log of all events going on?
I looked at the VMware log and it really doesn't show much. I figure that a detailed log from within NeXTSTEP could give more insight.
I never thought I could miss the Windors Blue Screen but in such cases it is really useful.
NeXTcube with NeXTdimension - OPENSTEP 4.2
NeXTstation TurboColor - NeXTSTEP 3.3
NeXTstation mono

bkmoore

There are two other supported options to get information on a driver while it is running.  The simplest is to use the IOLog() macro at various points in the code to try to get a window into the execution.  The drawback is it interrupts driver execution to dump the data into the /usr/adm/messages file.  Also, I don't know how much use it would be if the driver crashes because it would crash before making the log entry, so I may not be able to find the cause from the log file.

The other option is to use the DDM Macros.  I am currently reading up on how to do this.  I suspect, as Morgon posted, that the problem is probably a memory access error somewhere.  I think finding the error will probably be more difficult than actually fixing it once found.  But I make no promises, as I am working on other projects and this is just a hobby for me.

Brian

Morgon

Quote from: "bkmoore"There are two other supported options to get information on a driver while it is running.  The simplest is to use the IOLog() macro at various points in the code to try to get a window into the execution.  The drawback is it interrupts driver execution to dump the data into the /usr/adm/messages file.  Also, I don't know how much use it would be if the driver crashes because it would crash before making the log entry, so I may not be able to find the cause from the log file.

When used too extensive IOLog() looses more than just the last log lines before a crash. Even when not crashing not all log lines make it to /usr/adm/messages.

That's because IOLog() uses an in-kernel buffer first before things get flushed to disk to minimize interference with driver and other interrupts. So when many IOLog() calls are done within short time you will miss other log lines too as older ones get purged from the buffer when new ones arrive while the buffer is full.

Other than you OpenStep is more than a hobby for me, but since we don't need sound for our company programs that driver falls in the category hobby for me for sure.

Morgon

bkmoore

I tried inserting some IOLog() calls in the code to get an idea where it's crashing, but for the reasons Morgon stated there was no useful information in the messages log.  I will try using the DDM viewer next.

I do 99% of my NeXT work on an actual NeXTStation Color.  But I paid good money for a copy of VMWare because it worked with a sound driver and ran on my MacBook Pro.  Even though I barely use VMWare, I feel like I wasted my money.  (I use Parallels for Windows and Linux) That's why I'm trying to fix the driver.

Brian

bergqvistjl

Hi guys, has anyone managed to get sound back up and running in VMware?

aragon

Quote from: "bergqvistjl"Hi guys, has anyone managed to get sound back up and running in VMware?

Yes,

this works with the SB16PCI driver by Jens Heise:
http://mitglied.lycos.de/Morgon_de/downloads/SoundBlaster16PCI-1.0.I.bs.tar.gz

Simply set the soundcard in vmware to autodetect andf install this driver.

bergqvistjl

Quote from: "aragon"
Quote from: "bergqvistjl"Hi guys, has anyone managed to get sound back up and running in VMware?

Yes,

this works with the SB16PCI driver by Jens Heise:
http://mitglied.lycos.de/Morgon_de/downloads/SoundBlaster16PCI-1.0.I.bs.tar.gz

Simply set the soundcard in vmware to autodetect andf install this driver.
As far as I can see this is just the same driver that crashes openstep in VMware any way, which was the entire reason why this thread was created. Did you upload the correct one?

I'm using VMware 7.1.2 in Windows 7 64-bit.

bkmoore

As far as I can tell from reading the forum, the driver only crashes in the Mac version of VMware after the 3.1 update. Earlier versions of Fusion on the Mac work fine with the driver. Windows versions of Fusion (as far as I know) are not affected.

I tried to get the driver going in a remote debugger to see where it is crashing. My suspicion is a bad memory address somewhere. The VMware network driver doesn't support network debugging. I do not have the time to do any more debugging.

Another thought, if Windows versions of Fusion are not affected, the crash might be a bug in the Mac version of Fusion itself.

bergqvistjl

Quote from: "bkmoore"As far as I can tell from reading the forum, the driver only crashes in the Mac version of VMware after the 3.1 update. Earlier versions of Fusion on the Mac work fine with the driver. Windows versions of Fusion (as far as I know) are not affected.

I tried to get the driver going in a remote debugger to see where it is crashing. My suspicion is a bad memory address somewhere. The VMware network driver doesn't support network debugging. I do not have the time to do any more debugging.

Another thought, if Windows versions of Fusion are not affected, the crash might be a bug in the Mac version of Fusion itself.
Well I am using Windows 7 64bit with WMare workstation 7.1.2 and the sound crashes exactly in the same way as the users have described previously, you can hear the beginning of the sound and the system completely freezes.

Stealthii

VMWare Fusion 3 on OSX stopped emulating SB16.  It's some ES chipset it emulates now.  For now you'll not get sound working on OSX, and I think recent versions of VMWorkstation are starting to depreciate the SB16 emulation.  Check your VM's config file and manually set it to use SB16 if it's not already set.

Morgon

Quote from: "Stealthii"VMWare Fusion 3 on OSX stopped emulating SB16.  It's some ES chipset it emulates now.  

The SoundBlaster16 PCI uses an ES chipset. It is the ES1371 to be exact. And that's just the chipset my driver is able to talk to. With a different chipset the driver won't load at all due to different PCI-IDs and thus won't cause a crash.

I know that they changed the host side of the sound system to ALSA in the latest version 7 of VMware for Linux. And with just that version the sound broke for Linux too as far as I read from this forum.  Maybethey changed something similar on MacOSX before and that affects the implementation of the sound device towards the guest as well causing these nasty crashes.

Unfortunately I still have no free time to add debugging support to my network driver and then debug the sound driver itself under VMware 7.x under linux.

Deek

It's not exactly a workaround for the DRIVER, but if you want your bleeps and bloops to work then you can do the following:

Find the .vmx file for your VM, and add the following:

sound.virtualDev = "sb16"
sound.synth.operational = "true"
sound.baseAddr = "0x220"
sound.dma16 = "7"
sound.dma8 = "1"
sound.irq = "5"
sound.mpu401baseAddr = "0x330"
sound.Opl3BaseAddr = "0x388"


then install the SoundBlaster 16 (8 and 16 bit DMA) sound driver (it won't auto-detect).

Choose DMA Channel 1 and 7, IRQ Level 5, Port Address 0x220, and reboot the VM. It probably won't be perfect (some sounds don't seem to play on my machine), but it should at least work without crashing the OS.

eagle

Thanks for posting these instructions.  Unfortunately they don't restore sound to either my NS3.3 or my OS4.2 VM running in Fusion 4.

Has anyone by chance come up with a solution that will restore sound in Fusion 4 or 5?
My NeXTs:
NeXT Computer prototype (68030-25 x2, 68040-25)
Two NeXTstations (68040-25)
All mono