Missing compat_43 stuff for netbsd32?
While working on the compat code, I noticed that there are a few old syscalls which are defined in syc/compat/netbsd323/syscalls.master with a type of COMPAT_43, yet there does not exist any compat_netbsd32 implementation as far as I can see... #64 ogetpagesize #84 owait #89 ogetdtablesize #108osigvec #142ogethostid (interestingly, there _is_ an implementation for osethostid!) #149oquota Does any of this really matter? Should we attempt to implement them? +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org | +--+--++
Re: Missing compat_43 stuff for netbsd32?
Le 11/09/2018 à 09:46, Paul Goyette a écrit : While working on the compat code, I noticed that there are a few old syscalls which are defined in syc/compat/netbsd323/syscalls.master with a type of COMPAT_43, yet there does not exist any compat_netbsd32 implementation as far as I can see... #64ogetpagesize #84owait #89ogetdtablesize #108osigvec #142ogethostid (interestingly, there _is_ an implementation for osethostid!) #149oquota Does any of this really matter? Should we attempt to implement them? This would be silly. If no one noticed they weren't there, then it likely means no one has ever used them; and if so, then we shouldn't add them - ie we shouldn't introduce new entry points in the kernel. I mean we are in 2018.
Re: Missing compat_43 stuff for netbsd32?
On Tue, 11 Sep 2018, Maxime Villard wrote: Le 11/09/2018 à 09:46, Paul Goyette a écrit : While working on the compat code, I noticed that there are a few old syscalls which are defined in syc/compat/netbsd323/syscalls.master with a type of COMPAT_43, yet there does not exist any compat_netbsd32 implementation as far as I can see... #64ogetpagesize #84owait #89ogetdtablesize #108osigvec #142ogethostid (interestingly, there _is_ an implementation for osethostid!) #149oquota Does any of this really matter? Should we attempt to implement them? This would be silly. If no one noticed they weren't there, then it likely means no one has ever used them; and if so, then we shouldn't add them - ie we shouldn't introduce new entry points in the kernel. I mean we are in 2018. Sounds good to me. Is there any problem/issue with leaving the type field set to COMPAT_43 rather than UNIMPL or OBSOL ? +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org | +--+--++
Re: Missing compat_43 stuff for netbsd32?
If I had to guess, I'd tend to think that those were old syscalls that became oxxx in 4.3 (or before), rather than from 4.3 In particular, the wait() syscall was made obsolete (replaced by a libc function which used wait3()) in about 4.1c or 4.2 BSD days (perhaps earlier - could have even been 4.0) - back then the old sys call would have been needed for the normal reason, but now they'd only be useful if you could find some really old (and obviously only vax) binaries to use them. kre
Re: Missing compat_43 stuff for netbsd32?
On Tue, 11 Sep 2018, Paul Goyette wrote: > While working on the compat code, I noticed that there are a few old > syscalls which are defined in syc/compat/netbsd323/syscalls.master > with a type of COMPAT_43, yet there does not exist any compat_netbsd32 > implementation as far as I can see... > > #64 ogetpagesize > #84 owait > #89 ogetdtablesize > #108osigvec > #142ogethostid (interestingly, there _is_ an implementation > for osethostid!) > #149oquota > > Does any of this really matter? Should we attempt to implement them? I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3. Anybody have any old BSD 4.3 80386 binaries they still run? Did BSD 4.3 run on an 80386? Did the 80386 even exist when Berkeley published BSD 4.3? It's probably only useful for running ancient SunOS 4.x binaries, maybe Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3. Eduardo
Re: Missing compat_43 stuff for netbsd32?
> I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3. I think so too. Did NetBSD 4.3 ever exist? According to /ftp/pub/NetBSD-archive on ftp.n.o, 4.0 and 4.0.1 were the only 4.x versions. (Anonymous FTPing to ftp.n.o, I see /NetBSD-archive, but it's empty - apparently the archive is in /pub/NetBSD-archive. I have no idea why /NetBSD-archive is there.) > Did the 80386 even exist when Berkeley published BSD 4.3? According to Wikipedia, the 80386 was introduced in 1985 and 4.3 was released in June 1986, so, yes, it did. But between .5 and 1.5 years is not really long enough for it to be plausible that 4.3 ran on the '386. I don't _think_ BSD ran on the '386 until the Jolitzes, but I wasn't close to that effort, so I don't really know. > It's probably only useful for running ancient SunOS 4.x binaries, > maybe Ultrix, Irix or OSF-1 depending on how closely they followed > BSD 4.3. That's pretty much my own perspective on COMPAT_43. Probably should have been called COMPAT_BSD43 or some such /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTMLmo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Re: Missing compat_43 stuff for netbsd32?
Le 11/09/2018 à 10:07, Paul Goyette a écrit : On Tue, 11 Sep 2018, Maxime Villard wrote: Le 11/09/2018 à 09:46, Paul Goyette a écrit : While working on the compat code, I noticed that there are a few old syscalls which are defined in syc/compat/netbsd323/syscalls.master with a type of COMPAT_43, yet there does not exist any compat_netbsd32 implementation as far as I can see... #64ogetpagesize #84owait #89ogetdtablesize #108osigvec #142ogethostid (interestingly, there _is_ an implementation for osethostid!) #149oquota Does any of this really matter? Should we attempt to implement them? This would be silly. If no one noticed they weren't there, then it likely means no one has ever used them; and if so, then we shouldn't add them - ie we shouldn't introduce new entry points in the kernel. I mean we are in 2018. Sounds good to me. Is there any problem/issue with leaving the type field set to COMPAT_43 rather than UNIMPL or OBSOL ? I don't have any particular opinion on that
Re: Missing compat_43 stuff for netbsd32?
On 2018-09-11 17:35, Eduardo Horvath wrote: On Tue, 11 Sep 2018, Paul Goyette wrote: While working on the compat code, I noticed that there are a few old syscalls which are defined in syc/compat/netbsd323/syscalls.master with a type of COMPAT_43, yet there does not exist any compat_netbsd32 implementation as far as I can see... #64 ogetpagesize #84 owait #89 ogetdtablesize #108osigvec #142ogethostid (interestingly, there _is_ an implementation for osethostid!) #149oquota Does any of this really matter? Should we attempt to implement them? I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3. Anybody have any old BSD 4.3 80386 binaries they still run? Did BSD 4.3 run on an 80386? Did the 80386 even exist when Berkeley published BSD 4.3? I would say it'd most definitely BSD 4.3. And no, it did not run on 386. The first BSD version to run on anything besides VAX was 4.3 Tahoe, unless I remember wrong, if we talk about actual BSD. There were forks, though. Such as SunOS. Which were done even earlier than 4.3. It's probably only useful for running ancient SunOS 4.x binaries, maybe Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3. Well, how about running actual BSD 4.3 binaries? :-) But this is obviously limited to VAX only. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: Missing compat_43 stuff for netbsd32?
hello. I think, but am not certain, that old NetBSD-0.8 binaries might use some of those 4.3 syscalls. I have a few binaries I'm still using from NetBSD-0.9A days which may use those syscalls as well. I know that I use COMPAT_43 in all of my kernel configs, and I have this vague recollection that when I forgot to include that in one build, those binaries broke. -thanks -Brian On Sep 11, 1:19pm, Mouse wrote: } Subject: Re: Missing compat_43 stuff for netbsd32? } > I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3. } } I think so too. Did NetBSD 4.3 ever exist? According to } /ftp/pub/NetBSD-archive on ftp.n.o, 4.0 and 4.0.1 were the only 4.x } versions. (Anonymous FTPing to ftp.n.o, I see /NetBSD-archive, but } it's empty - apparently the archive is in /pub/NetBSD-archive. I have } no idea why /NetBSD-archive is there.) } } > Did the 80386 even exist when Berkeley published BSD 4.3? } } According to Wikipedia, the 80386 was introduced in 1985 and 4.3 } was released in June 1986, so, yes, it did. But between .5 and 1.5 } years is not really long enough for it to be plausible that 4.3 ran on } the '386. I don't _think_ BSD ran on the '386 until the Jolitzes, but } I wasn't close to that effort, so I don't really know. } } > It's probably only useful for running ancient SunOS 4.x binaries, } > maybe Ultrix, Irix or OSF-1 depending on how closely they followed } > BSD 4.3. } } That's pretty much my own perspective on COMPAT_43. Probably should } have been called COMPAT_BSD43 or some such } } /~\ The ASCII Mouse } \ / Ribbon Campaign } X Against HTML mo...@rodents-montreal.org } / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B >-- End of excerpt from Mouse
Re: Missing compat_43 stuff for netbsd32?
On Tue, 11 Sep 2018, Johnny Billquist wrote: Well, how about running actual BSD 4.3 binaries? :-) But this is obviously limited to VAX only. We don't have a compat_netbsd32 for vax. We have the module only for amd64, mips, and arm. +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org | +--+--++
Re: Missing compat_43 stuff for netbsd32?
Date:Tue, 11 Sep 2018 12:53:20 -0700 From:Brian Buhrow Message-ID: <201809111953.w8bjrkuz015...@lothlorien.nfbcal.org> | hello. I think, but am not certain, that old NetBSD-0.8 binaries | might use some of those 4.3 syscalls. I have a few binaries I'm still | using from NetBSD-0.9A days which may use those syscalls as well. I know | that I use COMPAT_43 in all of my kernel configs, and I have this vague | recollection that when I forgot to include that in one build, those | binaries broke. That would be true of the syscalls that actually are emulated in COMPAT_43 but the ones Paul asked about, I suspect, were ones obsoleted even earlier than that. That is, I believe they were not 4.3BSD sys calls which have changed since (since there would be no reason at all to do that for wait()) but even older sys calls that were already oxxx() in 4.3 (and probably even earlier.) There really has not been an application built since the mid 80's (on a BSD system, and well before there were non-vax BSD ports) that ever used the wait() sys call. SunOS would have only used in in whatever they called the thing that ran on Sun 1's - pre BSD SunOS. wait(2) was really wait(3) and was implemented using wait3(2) (if you can sort that out). You'd need to have a binary from (almost) preceding job control (4.0BSD - or was that in 3BSD) to have something actually using wait(2) as a syscall. If I remember correctly, there was a period when both wait() and wait3() were sys calls, but it was a fairly short period.Of course back at the time old binaries that did use wait(2) were common - so owait() was needed to handle them, but I cannot imagine anyone finding such a binary now (and certainly not for anything that is not a vax). I also suspect that the oquota() referred to might have been the one I initially implemented, which was never released anywhere - the version in 4.2BSD was different, and had a different quota struct (and so needed a different sys call - but the old binaries were, again, still around, at that time.) Again, if this is what that was, nothing but a vax ever issued the (old) quota() sys call. After that I don't recall any changes to quota(2) until quota2() was invented (much more recently). kre
Re: Missing compat_43 stuff for netbsd32?
On 2018-09-11 23:06, Paul Goyette wrote: On Tue, 11 Sep 2018, Johnny Billquist wrote: Well, how about running actual BSD 4.3 binaries? :-) But this is obviously limited to VAX only. We don't have a compat_netbsd32 for vax. We have the module only for amd64, mips, and arm. I guess that is correct, but this was about COMPAT_43, not something_32. Or did I miss something? Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: Missing compat_43 stuff for netbsd32?
On Wed, 12 Sep 2018, Johnny Billquist wrote: On 2018-09-11 23:06, Paul Goyette wrote: On Tue, 11 Sep 2018, Johnny Billquist wrote: Well, how about running actual BSD 4.3 binaries? :-) But this is obviously limited to VAX only. We don't have a compat_netbsd32 for vax.?? We have the module only for amd64, mips, and arm. I guess that is correct, but this was about COMPAT_43, not something_32. Or did I miss something? It was specifically about COMPAT_43 _under_ COMPAT_NETBSD :) See src/sys/compat/compat_netbsd32/netbsd32_compat_43.c for the stuff that _is_ implemented (including osethostid()!) +--+--++ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com | | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org | +--+--++
Re: Missing compat_43 stuff for netbsd32?
On 2018-09-12 00:06, Paul Goyette wrote: On Wed, 12 Sep 2018, Johnny Billquist wrote: On 2018-09-11 23:06, Paul Goyette wrote: On Tue, 11 Sep 2018, Johnny Billquist wrote: Well, how about running actual BSD 4.3 binaries? :-) But this is obviously limited to VAX only. We don't have a compat_netbsd32 for vax. We have the module only for amd64, mips, and arm. I guess that is correct, but this was about COMPAT_43, not something_32. Or did I miss something? It was specifically about COMPAT_43 _under_ COMPAT_NETBSD :) D'oh! My fault then. Sorry. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: b...@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Re: Missing compat_43 stuff for netbsd32?
On Tue, Sep 11, 2018 at 03:35:24PM +, Eduardo Horvath wrote: > > It's probably only useful for running ancient SunOS 4.x binaries, maybe > Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3. Actually, I think amd64, sparc64, and mips64 are the only platforms where it could even be possible to encounter netbsd32 executables that required system calls that had the "o" names in 4.3BSD. On amd64, because i386 architecture SunOS 4 executables exist and I am not sure the SunOS 4 kernel did actually pick up all the new syscalls from 4.3BSD. Whether such executables would run at all though, I'm not sure; there is probably other COMPAT_SUNOS code needed that may not work on i386. On sparc64 because there were releases of SunOS 3 for 32-bit SPARC and SunOS 3 *definitely* didn't have 4.3BSD's new system calls (thus didn't have the old ones renamed to o*). On mips64 *if* EXEC_AOUT or EXEC_PECOFF work, because: * Ultrix basically was 4.2BSD. * MIPS themselves ported 4.3BSD to the R3000 The first (amd64) and last (mips64) seem pretty much theoretical but it does seem like there may be 32-bit sparc binaries out there which work on 32-bit NetBSD but not 64-bit NetBSD. Whether anyone cares, dunno. There can be a lot of value to being able to run really old executables, but you need the right customer in the right state of utter desperation... Thor
panic: ffs_snapshot_mount: already on list
This morning, a busy NetBSD-8.0/amd64 server greeted me with an unpleasant panic on reboot: ffs_snapshot_mount: xxx already on list I booted in single user mode and ran fsck. After cleaning up things, the filesystem would mount read-only, but mounting read-write, with or without -o log, would raise the same panic. There is no mount option to disable snapshots, hence I tried to build a custom kernel with options FFS_NO_SNAPSHOT to run without snapshot support and get this filesystem to mount. No luck, even with so called FFS_NO_SNAPSHOT, it would still crash in snapshot-related ffs_snapshot_mount. I patched ffs_snapshot_mount to #ifndef FFS_NO_SNAPSHOT, the whole function, rebuilt a kernel and booted on that. With that, I was able to mount read-only. I then removed the obsolete snapshot backend files from the filesystem and rebooted on GENERIC. No panic anymore, it only complains at mount time: ffs_snapshot_mount: vget failed 2 ffs_snapshot_mount: vget failed 2 ffs_snapshot_mount: vget failed 2 Beside the problem that FFS_NO_SNAPSHOT does not really disable snapshot code, I think we should have a nosnapshot or nofss mount option to handle such a scenario. Anyone has opinion on this? -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz m...@netbsd.org
Re: Missing compat_43 stuff for netbsd32?
Eduardo Horvath writes: > On Tue, 11 Sep 2018, Paul Goyette wrote: > >> While working on the compat code, I noticed that there are a few old >> syscalls which are defined in syc/compat/netbsd323/syscalls.master >> with a type of COMPAT_43, yet there does not exist any compat_netbsd32 >> implementation as far as I can see... >> >> #64 ogetpagesize >> #84 owait >> #89 ogetdtablesize >> #108osigvec >> #142ogethostid (interestingly, there _is_ an implementation >> for osethostid!) >> #149oquota >> >> Does any of this really matter? Should we attempt to implement them? > > I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3. Anybody have any old > BSD 4.3 80386 binaries they still run? Did BSD 4.3 run on an 80386? Did > the 80386 even exist when Berkeley published BSD 4.3? > > It's probably only useful for running ancient SunOS 4.x binaries, maybe > Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3. > > Eduardo It has been a very long time since I did this, and I may not remember correctly, but I believe that COMPAT_43 is needed on NetBSD/i386 to run BSDI binaries. I remember using the BSDI Netscape 3.x binary back in the day and I think it was required. -- Brad Spencer - b...@anduin.eldar.org - KC8VKS - http://anduin.eldar.org
Re: panic: ffs_snapshot_mount: already on list
m...@netbsd.org (Emmanuel Dreyfus) writes: > Beside the problem that FFS_NO_SNAPSHOT does not really disable > snapshot code, I think we should have a nosnapshot or nofss mount option > to handle such a scenario. Anyone has opinion on this? That seems sensible; filesystems are complicated enough that being able to really ignore complicated features seems good. But we are trying to maintaint invariants (which weren't) and it would be good if mounting without a feature doesn't make things work. So maybe this is a RO mount option? But also, it seems that there was something wrong with this filesystem, but fsck didn't fix it. That seems like the most important thing to fix. signature.asc Description: PGP signature
Re: Missing compat_43 stuff for netbsd32?
On Sep 11, 6:38pm, Thor Lancelot Simon wrote: } On Tue, Sep 11, 2018 at 03:35:24PM +, Eduardo Horvath wrote: } > } > It's probably only useful for running ancient SunOS 4.x binaries, maybe } > Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3. } } Actually, I think amd64, sparc64, and mips64 are the only platforms where } it could even be possible to encounter netbsd32 executables that required } system calls that had the "o" names in 4.3BSD. } } On amd64, because i386 architecture SunOS 4 executables exist and I am not } sure the SunOS 4 kernel did actually pick up all the new syscalls from Yeah, but that would be the Roadrunner, which I believe was pretty rare, and a bit of a quirky system (software and hardware wise). I did lay eyes on one once many years, but I don't believe I touched that one. I suspect that not very many people have even seen one. } 4.3BSD. Whether such executables would run at all though, I'm not sure; Personally, I have my doubts. } there is probably other COMPAT_SUNOS code needed that may not work on i386. } }-- End of excerpt from Thor Lancelot Simon
Re: panic: ffs_snapshot_mount: already on list
Greg Troxel wrote: > But also, it seems that there was something wrong with this filesystem, > but fsck didn't fix it. That seems like the most important thing to > fix. Or there is something wrong with ffs_snapshot_mount, which panics where it could just ignore the duplicate snapshot? -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz m...@netbsd.org
Re: Xen dom0 freeze after domU exits (was Re: Zombie kernel thread)
Emmanuel Dreyfus wrote: > I follow up on my previous report: On XEN3_DOM0 kernel I very often freeze the > kernel after a domU exits. I think I found a second problem, which seems to be reproductible if I run a domU with two block devices configured and this stress test: while true; xl create -x domu.conf; sleep 60; xl shutdown -w domu; done After a while the system will freeze. Here are significant processes: PIDLID S CPU FLAGS STRUCT LWP * NAME WAIT 6309 1 3 0 0 a2093700 vnconfig biowait 6846 1 3 080 a0d1a080 vnconfig fstcnt 0 243 3 0 200 a213e340 vnd1 fstchg 0 242 3 0 200 a24168a0 vnd0 vndbp vnconfig of PID 6309 backtrace: sleepq_block cv_wait biowait convertdisklabel validate_label readdisklabel vndopen spec_open VOP_OPEN vn_open do_open do_sys_openat sys_open syscall() That process is waiting for an I/O inside a fs transaction (started where?) db> call fstrans_dump Fstrans locks by lwp: 6309.1 (/) shared 1 cow 0 Fstrans state by mount: /state suspended But the I/O should be performed by vndthread of PID 0.243 which is itself waiting to start a fs transaction. Here is the backtrace: sleepq_block cv_wait fstrans_start genfs_do_putpages VOP_PUTPAGES vndthread That looks like a deadlock, but for now I have no idea how to fix it. -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz m...@netbsd.org
Re: Missing compat_43 stuff for netbsd32?
On Tue, Sep 11, 2018, 4:38 PM Thor Lancelot Simon wrote: > There can be a lot of value to being able to run really old executables, > but you need the right customer in the right state of utter desperation... > I'm writing a COMPAT_V7 right now to celebrate Unix 50 next year. To be difficult, this is really COMPAT_VENIX for an old 8088 v7 port that I have some history with. There is a wait call there mentioned elsewhere in the thread. I want it mostly so I can run the compiler on something fast... Maybe not desperation, but at least a little crazy .. it's not clear even a kernel module is the right path since qemu userland might be easier... Warner >
Re: Missing compat_43 stuff for netbsd32?
On Tue, Sep 11, 2018, 5:48 PM Brad Spencer wrote: > Eduardo Horvath writes: > > > On Tue, 11 Sep 2018, Paul Goyette wrote: > > > >> While working on the compat code, I noticed that there are a few old > >> syscalls which are defined in syc/compat/netbsd323/syscalls.master > >> with a type of COMPAT_43, yet there does not exist any compat_netbsd32 > >> implementation as far as I can see... > >> > >> #64 ogetpagesize > >> #84 owait > >> #89 ogetdtablesize > >> #108osigvec > >> #142ogethostid (interestingly, there _is_ an implementation > >> for osethostid!) > >> #149oquota > >> > >> Does any of this really matter? Should we attempt to implement them? > > > > I believe COMPAT_43 is not NetBSD 4.3 it's BSD 4.3. Anybody have any > old > > BSD 4.3 80386 binaries they still run? Did BSD 4.3 run on an 80386? > Did > > the 80386 even exist when Berkeley published BSD 4.3? > > > > It's probably only useful for running ancient SunOS 4.x binaries, maybe > > Ultrix, Irix or OSF-1 depending on how closely they followed BSD 4.3. > > > > Eduardo > > > It has been a very long time since I did this, and I may not remember > correctly, but I believe that COMPAT_43 is needed on NetBSD/i386 to run > BSDI binaries. I remember using the BSDI Netscape 3.x binary back in > the day and I think it was required. > FreeBSD does too... net2 was closer to 4.3 system calls for many things than 4.4. Warner >