Categories

nemulator 2.1.4 released

A recent post on the nesdev boards asked why The Young Indiana Jones Chronicles didn’t work on any NES emulator without displaying graphical glitches in portions of the game. After some debugging, I came up with a theory and ultimately discovered some previous unknown behavior of the NES’s PPU. nemulator can now run this game without any glitches; it’s the first emulator to do so!

Check it out at http://nemulator.com.

Seagate 2TB (ST32000542AS) CC35 Firmware

Well, my aforementioned drive problems returned within a couple of days after installing the refurbs that Seagate sent. Noticing that the replacement drives, which were working ok, were running CC34 firmware (as opposed to the CC32 firmware on the rest of my drives), a little googling led me to this link to CC35 firmware. I pulled the refurbs (which report a generic model number and can’t be upgraded), popped in my “bad” drives, and upgraded everything to CC35. After the last false positive, I’m a little hesitant to call it completely fixed, but it’s been running for 2 weeks now without problems.

OpenSolaris 2010.03 -> 2010.04?

It’s April, and there’s no sign of OpenSolaris 2010.03. I ran into a couple of CIFS authentication issues with snv134 and was hoping to test with 2010.03. Hopefully we’ll see OpenSolaris 2010.04, but the Oracle acquisition has me a bit worried…

On a semi-related note, the limited S.M.A.R.T. monitoring support in OpenSolaris is frustrating. I recently had an issue with a couple of drives in my file server: occasionally, I’d see delays of a few seconds while reading from disk (which, annoyingly, translates to a pause in whatever Blu-ray movie I might be watching at the time). When the delays occurred, iostat would show the failing drive doing nothing, but sitting at 100% busy. This was accompanied by a rapid seeking noise coming from the drive — a great clue had I been within earshot of the server. I replaced the drives and everything is back to normal.

I’ve seen this type of issue in the past, but was able to diagnose/alert on it based on S.M.A.R.T. error messages/counts. Can’t do this with OpenSolaris… Maybe this will improve in the future, but my current solution, for this specific problem, is to simply watch for it with the following command:


iostat -xen 1 | awk '{if ($10 == 100 && $1 + $2 < 5) print strftime("%m/%d/%y"), $0}'

nemulator 2.1.3 released, PGO is great

I’ve released nemulator 2.1.3, which has been compiled using profile-guided optimization (PGO). Very cool stuff; just a few clicks and all of the sudden, nemulator is running a whopping 25% faster. Accurate mode now runs at full speed (in single-game mode) on my 1.06GHz Core 2 Duo laptop.

Read about the other changes, and download it, at http://nemulator.com.

nemulator 2.1.1 released

Fixed a bug that, in some cases, prevented SRAM from being saved to disk.

http://nemulator.com

nemulator 2.1 released

It’s been a long time coming, but nemulator finally has cycle-accurate PPU emulation. What does this mean? In short, games that either wouldn’t run, or would run with graphical glitches, are working perfectly now. Oh, and I dropped the beta designation because, frankly, looking back on the past ~7 years of working on this, it’ll probably never be anything but a beta.

Get it here: http://nemulator.com

p.s. — just discovered Ufouria. Very cool game; kind of like Super Mario Bros. 2 meets Metroid.

Yes, he is climbing a drool ‘rope’. :)

nemulator 2.0 beta 3 released

I’m on a roll… get it at http://nemulator.com.

nemulator 2.0 beta 2 Released

I’ve released a new version of nemulator. Check it out at http://nemulator.com.

Nexus 5000 CRC Errors

I have a bunch of servers connected to Nexus 5020s (running NX-OS 4.0(1a)N2(1)) constantly reporting CRC errors on their NICs. CRC errors are reported on the Nexuses’ egress ports, but ingress ports are clean. What’s happening is pretty interesting.

The N5k considers packets with an ‘invalid’ EtherType to be bad. If it were a store-and-forward switch, it would simply drop the packet on ingress but, since it’s a cut-through switch, there’s no opportunity to drop it before bits are already leaving the egress port. So what to do with a bad packet? When this occurs, the Nexus ’stamps’ the bad packet by overwriting whatever hasn’t been sent yet (with zeros, garbage, …? It’s also unclear to me whether it’s overwriting all of the remaining bits or simply the Ethernet checksum). Hence, the downstream device gets a corrupted packet and drops it (low enough in the stack that you can’t see it with tcpdump, unfortunately).

And the mystery packets are… VMWare ESX beacon probes. These are broadcast from ESX servers to monitor the availability of teamed vmnics. The Ethernet spec says that EtherType numbering starts at 0×8000. ESX beacon probes have an EtherType of 0×05FF. While I can understand the need to detect (and possibly drop) packets with known EtherTypes, I don’t see the logic behind dropping packets with unknown types.

Not sure which version this was fixed in (and I can’t find it in the Bug Toolkit), but switches running 4.1(3)N1(1) do not experience this problem.

Building an OpenSolaris Server: A Better CIFS Server than Windows?

With the capabilities that ZFS brings to the table, I’m beginning to think that OpenSolaris just might make a better CIFS server than Windows. Sun has built CIFS support into the kernel, which helps with some of the interoperability challenges faced with Samba in a mixed Windows/*nix environment. Here’s how to set it up.

First things, first. Install the CIFS server:


james@opensolaris:~# pkg install SUNWsmbskr
DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  2/2       35/35      2.0/2.0

PHASE                                        ACTIONS
Install Phase                                  90/90

Start the idmap and smb/server services:


james@opensolaris:~# svcadm enable idmap
james@opensolaris:~# svcadm enable smb/server
james@opensolaris:~# svcs | egrep "idmap|smb/server"
online         10:50:07 svc:/system/idmap:default
online         10:50:08 svc:/network/smb/server:default

Now let’s create a ZFS file system with the proper permissions and share it out:


james@opensolaris:~# zfs create -o casesensitivity=mixed -o nbmand=on rpool/test
james@opensolaris:~# chmod 777 /rpool/test
james@opensolaris:~# chmod -R A=everyone@:full_set:fd:allow /rpool/test
james@opensolaris:~# zfs set sharesmb=name=test,guestok=true rpool/test
james@opensolaris:~# sharemgr show -v
default
zfs
    zfs/rpool/test
          /rpool/test
                  test=/rpool/test       smb=(guestok="true")


I've enabled guest access on this share (i.e., no password required; you'll probably want to do this on a home network). This requires build snv_118 or later. If you decide to forgo guest access, you'll need to generate SMB compatible passwords for your user accounts. This can be done by simply resetting their passwords. Connect to the share from a Windows box and create a file:

Now take a look at it back on the OpenSolaris box:


james@opensolaris:/rpool/test# ls -al test.txt
-rwxrwxrwx+  1 2147483649 2147483650       0 Dec 17 10:38 test.txt


Uh-oh. OpenSolaris doesn't know how to translate the Windows users/groups. Let's fix that:


james@opensolaris:/rpool/test# idmap add winuser:Guest@opensolaris unixuser:nobody
add     winuser:Guest@opensolaris       unixuser:nobody
james@opensolaris:/rpool/test# idmap add "wingroup:Domain Users@opensolaris" unixgroup:staff
add     "wingroup:Domain Users@opensolaris"     unixgroup:staff


You'll need to reboot for this change to take effect. There may be a way around this, but restarting idmap and/or smb/server doesn't seem to work. Check out the permissions now:


james@opensolaris:/rpool/test# ls -al test.txt
-rwxrwxrwx+  1 nobody   staff          0 Dec 17 10:38 test.txt

Looks good on the Windows side as well:

idmap might not be especially exciting in a home environment, but it does work quite well when integrated into an AD infrastructure. More on that in a future post.

One last thing: ZFS snapshots are recognized by Windows as well: