-
markmcb
not sure if it's a bug, but i've noticed if i have an iov virtual function, e.g., iavf1, to a jail, and i restart the jail, sometimes the virtual function isn't ready when the jail tries to start and so it fails. bug worthy?
-
kevans
markmcb: i'm guessing it's due to other jail lifetime issues
-
kevans
iirc all of 13.x is affected, where a jail will stay alive for some seemingly random (but not actually) period of time after it's killed
-
markmcb
ah, good to know. sounds like there's no need to report it then. thanks!
-
kevans
maybe- but, there is a way to know
-
kevans
one second
-
kevans
I think the problem I'm thinking of
-
kevans
bah, sorry. was fixed in
cgit.freebsd.org/src/commit/?id=5fd…67e885e834cda8f1d122e9b0f9d47977e54. If you can try a -CURRENT snapshot after late April, that should tell you whether it's worth reporting or not
-
kevans
just so that you're not taking my word for it, you can observe if it's both the same problem and fixed in upcoming versions
-
kevans
markmcb: ^ even
-
markmcb
thanks. i'll check it out
-
meena
kevans: why isn't that an MFC candidate?
-
mage
I have a broken disk (da0) in a zraid2 pool (with no free slots), am I correct to use: 1) zpool offline zroot da0p3 2) remove da0 disk / insert new disk at the same place 3) gpart backup da1|gpart restore -F da0p3 4) zpool online zroot da0p3
-
tsoome
mage you also need zpool replace after online.
-
mage
ok :) and couldn't I use detach/attach rather than offline/online/replace?
-
tsoome
for mirror, you can detach and attach instead - if you are replacing in the same disk slot, that can make sense.
-
mage
something like: 1) zpool detach zroot da0p3 2) remove da0 disk / insert new disk at the same place 3) gpart backup da1|gpart restore -F da0 4) zpool attach zroot da0p3
-
tsoome
if you have free slots, I would attach new disk first, when resilver is complete, detach old one.
-
mage
I don't have free slots unfortunately
-
tsoome
yes, in that case, you have to do disk swap.
-
mage
(it's a dell r340 with a HBA330 and 4x3,5 disks)
-
mage
and what would be the difference between offline/online and detach/attach?
-
tsoome
offline does not change pool configuration, detach does.
-
mage
ok, so in my case offline/online is better
-
mage
thanks :)
-
tsoome
in your case, actually, it doe not really make much difference:)
-
tsoome
both methods do work.
-
tsoome
do you have spare?
-
tsoome
with 2-way mirror the obvious risk is about good disk going bad while resilvering (or discovery of checksum errors/bad blocks).
-
tsoome
zpool scrub before replace may be good idea if the broken disk is not dead or blocking the IO
-
mage
tsoome: no I don't have space, it's a raidz2 over 4 disks
-
mage
it is not dead but I have a bunch of:
-
mage
(da0:mrsas0:1:0:0): READ(10). CDB: 28 00 33 9f ac 48 00 00 f0 00
-
mage
(da0:mrsas0:1:0:0): CAM status: SCSI Status Error
-
mage
(da0:mrsas0:1:0:0): SCSI status: OK
-
mage
with some CKSUM: da0p3 ONLINE 0 0 30
-
tsoome
ou, you do not have mirror, but raidz?
-
mage
yes
-
tsoome
with raidz, you only can use zpool offline, no detach for raidz
-
mage
ah.. ok!
-
tsoome
this is because detach will change pool layout, but we can not do that with raidz
-
otis
sigh. disk replacement at home in raidz1 is waiting for me also. good that you reminded me.
-
tsoome
anyhow, since you do have raidz2 (2 parity), scrub before replacing the disk is not that critical.
-
pvalenta
i, I am trying to build latest opensmtpd 7.3.0p0 with libressl 3.7.3. I have build it with -g3 -O0. Package is build ok but smtpd crashes. I need core dump but for some reason is not created. What could be wrong? When I try run simple C test program dereferencing null pointer core dump is created. Thanks
-
RhodiumToad
is the binary installed setuid?
-
pvalenta
RhodiumToad, no, it's not -> -r-xr-xr-x 1 root wheel 568080 Jun 19 19:59 /usr/local/sbin/smtpd
-
RhodiumToad
is it started under a resource limit that disables cores, or does it use setrlimit itself to disable them?
-
RhodiumToad
or perhaps it is running in a directory that it doesn't have permission to write to?
-
RhodiumToad
that last one can be worked around by setting kern.corefile to an absolute path
-
pvalenta
RhodiumToad, it's started under jail so it's possible there are some limits ..... i have run it by hand from /root so core dump should be there
-
pvalenta
RhodiumToad, kern.corefile: %N.core
-
RhodiumToad
that means the core dump is named progname.core in whatever dir is current for the process at the time it dies
-
RhodiumToad
(which might not be the current dir it's started from)
-
otis
unless you change kern.corefile setting to a predictable location
-
otis
ah, RhodiumToad already mentioned. sorry.
-
RhodiumToad
you could for example do sysctl kern.corefile="/var/tmp/%N.%P.core"
-
pvalenta
thanks, I try it
-
pvalenta
but dmesg show > pid 31929 (smtpd), jid 102, uid 257: exited on signal 11 .....and for test -> pid 91544 (test), jid 102, uid 0: exited on signal 11 (core dumped)
-
RhodiumToad
did you check whether smtpd is itself calling setrlimit() to disable cores?
-
RhodiumToad
and if so, whether it has some runtime or compile-time option to have it not do that
-
pvalenta
i have ktrace it and in kdump is no mention about setrlimit
-
RhodiumToad
is there any chdir in the kdump?
-
pvalenta
no, it's not .. my another try was -> lldb -o run -- /usr/local/sbin/smtpd -dv -f /usr/local/etc/mail/smtpd.conf ... but nothing useful is displayed when it crashes
-
RhodiumToad
what actually is displayed and can you get a backtrace?
-
RhodiumToad
oh, your message said uid 257 not uid 0, so something called setuid() ?
-
RhodiumToad
any successful call to set*uid etc. will set the SUGID flag, disabling coredumps unless sysctl kern.sugid_coredump=1 has been set
-
RhodiumToad
(which is a fairly major security hazard, so don't leave it enabled)
-
pvalenta
backtrace is what i want but i need coredump before ...smtpd in lldb crashes and 'bt' says anything about no process running
-
pvalenta
RhodiumToad, i will test sysctl kern.sugid_coredump=1 .....and we will see
-
RhodiumToad
remember that the location of the core file is still controlled by sysctl kern.corefile
-
pvalenta
btw there is no setuid call in kdump
-
RhodiumToad
might be seteuid, setreuid, setresuid, etc.
-
pvalenta
i searched for uid .....and there was many struct stat { ... uid=0 ... } and a few geteuid
-
RhodiumToad
well somehow it got to be uid 257 rather than 0
-
RhodiumToad
I also notice this:
-
RhodiumToad
_smtpd:*:257:257::0:0:OpenSMTPD:/var/empty:/usr/sbin/nologin
-
meena
RhodiumToad: can you explain why kern.sugid_coredump=1 is a security hazard?
-
RhodiumToad
note that /var/empty is a directory which has its immutable flag set, so not even root can put files there
-
RhodiumToad
meena: it allows data read by root to be written to a file owned and readable by non-root
-
meena
*nod*
-
RhodiumToad
the SUGID flag basically indicates whether the current process image may contain data belonging to more than one user/group, or belonging to some user/group other than the one that would own the core file
-
RhodiumToad
it's cleared by an exec() of a non-setuid/setgid program, since that replaces the image
-
RhodiumToad
it's set by exec() of a setuid/setgid program or by any successful change of credentials
-
pvalenta
RhodiumToad, running user is compile time option -> ./configure --with-user-smtpd=_smtpd --with-user-queue=_smtpq --with-group-queue=_smtpq ....so somehow it changes uid, you are right
-
pvalenta
i will try sysctl kern.sugid_coredump=1 and sysctl kern.corefile="/tmp/%N.core"
-
pvalenta
RhodiumToad, but interesting fact is I have opensmtpd 7.3.0 working builded with openssl base, openssl30 from ports too,...but with libressl not
-
» RhodiumToad not an expert on libressl
-
jimmiejaz
so my buildworld, run with /usr/bin/time -h make buildworld came out to 1d5H21m53 Real, 1d4H13m User and 56m49 Sys. du -s shows 16938560 or 16G. Good times. it finally finished overnight
-
gzar
hey folks, how can i enable permissions to write to a mounted disk drive? i am trying to install a bootloader into it with extlinux64, but a mounted drive cannot be written to via raw-device
-
CmdLnKid
as root ? you can shoot yourself in the foot with kern.geom.debugflags=16 and assuming vfs.zfs.debugflags= does the same thing but haven't used it
-
gzar
i am root, that is why i am asking
-
gzar
if i do `echo 1 >>/dev/da0` or `echo 1 >>dev/da0s1` on a disk that is mounted in /mnt i get 'Permission Denied'
-
CmdLnKid
sysctl kern.geom.debugflags=16 and try again
-
CmdLnKid
keep in mind you are turning restriction and checks nearly completely off
-
gzar
i understand, i just need this for 1 usb drive
-
CmdLnKid
think thats why that was there in the first place
-
CmdLnKid
sidecases need a little extra help
-
gzar
still nothing
-
CmdLnKid
you very well may just need to unmount it first
-
gzar
nope
-
gzar
could it have anything to do with the filesystem being msdosfs with FAT32 ?
-
CmdLnKid
no it shouldn't
-
CmdLnKid
if its a usb disk could there be a switch on the side to make it read-only ?
-
CmdLnKid
if anything you should be able to also boot into single user mode attach the device and write to it there too
-
gzar
there is but i switched it off already, its an SD card attached via USB adapter. Its not read only because i can write files to it, i can also write to it IF its unmounted
-
gzar
but i need to run a script from within the usbdrive where i extracted a debian-slax distro and have it properly install its bootloader into the device
-
gzar
which requires the drive to be mounted AND writable via raw-device
-
gzar
maybe some mount flags ?
-
CmdLnKid
that im unsure of. why not just copy the contents off the disk to a obj directory and then unmount the device so you can worth with the raw dev ?
-
CmdLnKid
s/worth/work
-
gzar
because it uses extlinux64 and that needs a directory path
-
gzar
could be also be because i made the layout with gpart instead of fdisk?
-
gzar
kern.geom.disk.da0.flags: aa<OPEN,CANFLUSHCACHE,DIRECTCOMPLETION,CANZONE>
-
gzar
maybe i could do soemthing with these flags?
-
CmdLnKid
that im unsure of. they could follow the kern.geom.debugflags=16
-
gzar
alright, gonna try in single user mode
-
CmdLnKid
++
-
gzar
didnt work
-
gzar
same errors, fbsd just wont allow me to do this
-
gzar
i suppose there isnt a super-root kind of mode
-
kevans
meena: I don't know, maybe it is
-
kevans
not explicitly mentioning it doesn't mean it can't/won't happen, just that the author didn't mention it
-
kevans
you'd have to ask him if there's some kbi implication in that stack that might prevent it
-
gzar
is it possible to write to a raw disk while it is mounted
-
yuripv
gzar: how are testing that you can write?
-
yuripv
that 'echo >>' does not seem to be a valid test
-
gzar
mounting it an writing to it works fine
-
gzar
i can do a dd if=/dev/zero of=/dev/da0 as well
-
gzar
if its unmounted of course
-
crzjp
whats the proper way to start dbus? i have `dbus_enable="YES"` in /etc/rc.conf and i see dbus pids running on background, but without DBUS env vars stuff available and some programs returns errors like "no connection to bus"
-
crzjp
also, i have /var/lib/dbus/machine-id available
-
cpet
service dbus start
-
crzjp
cpet: returns "dbus already running? (pid=963)."
-
meena
kevans: I'm always surprised to re-realise that TV project has no head / hat of MFC
-
crzjp
solved dbus issue starting X with dbus-run-session on xinitrc
-
mcon
I am having problems booting FreeBSD in a VM (actually I'm trying to boot from OPNsense .iso) normally it works, but in a definite environment (the one I need, of course) it bombs with a very suspicious: "Timecounter "TSC" frequency 0 Hz quality 800" followed by "kernel trap 18 with interrupts disabled" What can I check? (note I'm *not* a *BSD expert, but I can do *nix)
-
yuripv
mcon: what hypervisor? also "kernel trap 18" doesn't say much, may be provide a screenshot of the panic?
-
mcon
Underlying is qemu, but I'm using it through LXD. I can provide the full log. Just a moment...
-
mcon
yuripv: Full log (including useless blank lines) is at
bpa.st/75WGK
-
VimDiesel
Title: View paste 75WGK
-
mcon
yuripv: my guess is kernel is trying to compute something using "TSC" (whatever it is) and bombs because it doesn't expect a zero there. Why the Timecounter is zero is beyond my depth.
-
mcon
yuripv: note: I'm still at debug prompt, so I *could* (if directed) try t to dig some more info
-
meena
mcon: which FreeBSD kernel is that? what platform is it running on?
-
meena
ah 13.1
-
meena
mcon: at bug should be fixed in 13.2
-
meena
-
VimDiesel
Title: apic: prevent divide by zero in CPU frequency init by igalic · Pull Request #664 · freebsd/freebsd-src · GitHub
-
mcon
meena: I have two problems now: 1) convince OPNsense guys to upgrade to 13.2+ 2) understand why Timecount is zero in exactly the setup I need ;(
-
derzahl
is there still no way to boot a native zfs encrypted freebsd root? I thought I read about 13.2 having added functionality built into loader or perhaps there was just a round-about way to get it working? I was hoping to install FreeBSD14 on the same encrypted zpool as linux is using but I cant find any info about what needs to be done to boot it anymore
-
derzahl
did i mistake a dream for reality again?
-
meena
mcon: what platform are you running on?
-
meena
Also, 13.1 will be EoL soon.
-
kevans
meena: i don't really understand what you mean
-
kevans
i don't know what TV project you're referring to to start with
-
» meena scrolls back to see what she wrote
-
meena
s/TV/the/
-
kevans
and head/hat of MFC? that's a really individual thing to decide
-
kevans
there's not really going to be one person qualified to say what can be MFC'd
-
meena
but a lot of things are said to be MFCs and then forgotten
-
kevans
not without wasting way too much of their tim
-
kevans
time
-
kevans
we have tooling that's supposed to help there, sometimes it falls through the cracks anyways
-
kevans
we get an e-mail after the MFC period ends if we mark it, for instance
-
kevans
sometimes you get busy, sometimes you realize it's not feasible, sometimes you decide it's not a good idea or needs more bake time
-
meena
aye
-
mcon
meena: I am running LXD under Linux (Debian Bookworm, if it matters) and I'm trying to run OPNsense (FreeBSD based) in a qemu VM; host is a rather small intel x86_64... admittedly not the cleanest situation.
-
meena
mcon: so you're hitting exactly the same bug i did, and fixed
-
meena
mcon: if you can change LXD's default profile to not be Q35, you might succeed
-
meena
mcon: note that you won't be able to benefit from running under LXD, because
lxc/lxd #11761 and
bugs.freebsd.org/bugzilla/show_bug.cgi?id=271793
-
VimDiesel
Title: Make LXD-Agent run on FreeBSD by igalic · Pull Request #11761 · lxc/lxd · GitHub
-
meena
I'm working on those, but not there yet
-
rtprio
mcon: i had a weird old system which picked the wrong time counter, that system ticked so fast ntp couldn't keep it on time
-
mcon
meena: Thanks. If I get you right this means OPNsense will not work right under LXD even if I move to 13.2+ and until you finish implementing virtio-vsock, right? I fear this means I will have to drop OPNsense, at least for the time being :(
-
meena
mcon: no, it'll run, poorly, until you devmatch_blocklist="virtio_random.ko". but you won't be able to lxc console into it, and lxd won't know what's going on inside
-
meena
you'll still be able to use ssh
-
mcon
-
VimDiesel
Title: Run FreeBSD 13.1 / OPNsense 22.7 / pfSense 2.7.0 (and newer?) under LXD VM - Tutorials - Linux Containers Forum
-
meena
mcon: you can try it, but that doesn't disable Q35, which I secretly suspect to be at fault here
-
mcon
meena: Thanks, I'll try it tomorrow. I'll report my findings. (BTW: what is "Q35"?)
-
Erhard
A Transistor?
-
Erhard
A Car?
-
VVD
Intel chipset? :-D
-
Erhard
Part number for the ashtray in a '73 Pinto?
-
rwp
I am still looking for a replacement center brake light lens to replace the broken one in my old Ford.
-
Erhard
lol
-
Erhard
Red tape
-
rwp
But Q35 is an Intel chipset. Two references, both less than useful:
en.wikipedia.org/wiki/List_of_Intel_chipsets and
wiki.qemu.org/Features/Q35
-
VimDiesel
Title: List of Intel chipsets - Wikipedia
-
Erhard
Yeah. I guess I never had a board with that chipset.
-
Erhard
Was X58 X79 etc.
-
rwp
Hail broke it out a while back. It has two lamps beind it. I removed one so there would be no white showing. It's acceptable with one lamp but no redundancy.
-
meena
Q35 is a qemu profile, named after the above Intel chipset. it's essentially "modern" virtio
-
rwp
From the QEMU Q35 page: "Add emulation of the ICH9 host chipset as an alternative to the current I440FX emulation. This will allow for better support of PCI-E passthrough since ICH9 uses a PCI-E bus whereas the I440FX only supports a PCI bus."
-
rwp
What's the PCI bus bandwidth? IIRC it was 32-bits at 32MHz?? Who would ever need more bandwidth? :-)
-
meena
weirdly, some people started demanding their virtual machines to be fast