VOGONS


First post, by GemCookie

User metadata
Rank Member
Rank
Member

After a disappointing experience with Linux on my K6-2 build, I thought I'd give OpenBSD a shot. I heard it had solid support for older hardware; I had also tried it a few times in the past, both on real hardware and in VMs, and concluded it was fine.
Sure enough, I installed it, then got X11 and Lynx running without any major issues. From there, the OS made it onto three of my newer PCs. I tried to actually use it, and that's where the show-stopping issues cropped up.

  • If I start QEMU with 512 MiB of RAM allocated to the virtual machine, it crashes with the text "qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory". Most forum threads on this issue provide the unhelpful suggestion to "install more RAM"; however, QEMU crashes regardless of how much RAM is on the host. Here are the first few lines of top on one of the affected systems:
    load averages:  1.70,  0.98,  0.43    gemcookie.my.domain 08:19:22
    49 processes: 48 idle, 1 on processor up 0 days 00:03:19
    CPU0: 7.2% user, 0.0% nice, 3.4% sys, 0.4% spin, 1.0% intr, 88.0% idle
    CPU1: 7.4% user, 0.0% nice, 3.0% sys, 0.4% spin, 0.0% intr, 89.2% idle
    Memory: Real: 401M/2263M act/tot Free: 13G Cache: 1090M Swap: 0K/4339M
    I clearly have more than enough RAM to start a virtual machine.
    Another suggestion involves writing a value to /proc/sys/vm/drop_caches. This isn't an option, since OpenBSD has no /proc directory!
    I can confirm this issue on two machines running OpenBSD/amd64 7.6 and one running OpenBSD/i386 7.3.
  • I can't get any acceleration out of my Quadro FX 2700M, even though the nv driver should support it. I ran Xorg -configure in an effort to rectify this, only to get a nonsensical error message:
    c2d-openbsd$ Xorg -configure
    Unrecognized option: -configure
    use: X [:<display>] [option]
    ...
    -configure             probe for devices and write an xorg.conf
    ...
    Fatal server error:
    (EE) Unrecognized option: -configure
    (EE)
    (EE)
  • valgrind crashes hard on startup.
    memcheck-amd64-openbsd[83754]: pinsyscalls addr 3806a478 code 20, pinoff 0xffffffff (pin 0 0-0 0) (libcpin 0 0-0 0) error 78
    Abort trap
    I can confirm this issue on two machines running OpenBSD/amd64 7.6.

Any ideas as to what could be wrong? I might be running out of non-Windows operating systems to play with. Linux isn't looking much better, with the nouveau driver causing segmentation faults on pre-unified shader cards.

Gigabyte GA-8I915P Duo Pro | P4 530J | GF 6600 | 2GiB | 120G HDD | 2k/Vista/10
MSI MS-5169 | K6-2/350 | TNT2 M64 | 384MiB | 120G HDD | DR-/MS-DOS/NT/2k/XP/Ubuntu
Dell Precision M6400 | C2D T9600 | FX 2700M | 16GiB | 128G SSD | 2k/Vista/11/Arch/OBSD

Reply 1 of 4, by mr.cat

User metadata
Rank Member
Rank
Member

What kind of host are you using for qemu? (Which OS, hardware?)
I remember that the default ulimit value has sometimes caused me trouble with various apps (I think this was on a Linux host).
Also, it's generally not a good idea to launch qemu as root, but you could try that. If it works, you've moved one step closer to a solution.

Reply 2 of 4, by GemCookie

User metadata
Rank Member
Rank
Member
mr.cat wrote on 2024-11-10, 22:07:

What kind of host are you using for qemu? (Which OS, hardware?)

I'm trying to use OpenBSD as the host on three PCs: a Core 2 Quad desktop, a Core 2 Duo laptop and a Pentium 4 desktop. Specs for the latter two systems are in my signature.

Also, it's generally not a good idea to launch qemu as root, but you could try that. If it works, you've moved one step closer to a solution.

This appears to work so far! On my laptop with 16 GiB of RAM, I can now allocate up to 2.5 GiB to the VM before it gives up.

Gigabyte GA-8I915P Duo Pro | P4 530J | GF 6600 | 2GiB | 120G HDD | 2k/Vista/10
MSI MS-5169 | K6-2/350 | TNT2 M64 | 384MiB | 120G HDD | DR-/MS-DOS/NT/2k/XP/Ubuntu
Dell Precision M6400 | C2D T9600 | FX 2700M | 16GiB | 128G SSD | 2k/Vista/11/Arch/OBSD

Reply 3 of 4, by mr.cat

User metadata
Rank Member
Rank
Member

Great! That means it's probably either a permissions issue, or ulimit doing it's thing.
See "man sh" (or whatever your shell is) for more info on ulimit, it's part of the shell.
On Linux I can get the full list with "ulimit -a" but I'm not sure if it's the same on OpenBSD.
BSDs traditionally use a different shell than does Linux, and the differences don't end there.

That 2.5GB figure sounds to me like a 32-bit memory limit, so it's a bit weird if that's on amd64.
Then again, maybe ulimit is the explanation for that. I mean, maybe root is limited too, but has higher defaults than normal users?

Reply 4 of 4, by kmeaw

User metadata
Rank Member
Rank
Member

OpenBSD has limits in /etc/login.conf. Try running ulimit -d 8388608 then start qemu from the same shell. If it helps then you have hit the data segment size limit - on my machine it defaults to 4GiB for the root user.

X -configure fails for me the same way. I don't know why exactly. 🙁 I set it up manually by writing the desired configuration in /etc/X11/xorg.conf