-
_xor
Ok this is annoying enough now that it's worth actually trying to debug >:(
-
_xor
My desktop environment randomly coredumps sometimes when I exit a terminal (using x11/foot).
-
_xor
Is there a standard way to enable debug builds when using meson?
-
RhodiumToad
in a port build or just stuff you're building yourself?
-
RhodiumToad
(in a port build, WITH_DEBUG=1, when building yourself, the --buildtype debug option to meson
-
_xor
RhodiumToad: Port build (x11-wm/hyprland), so WITH_DEBUG it is then.
-
_xor
So far, based on this:
termbin.com/wtxi
-
_xor
-
VimDiesel
Title: Hyprland/src/protocols/XDGOutput.cpp at v0.27.2 · hyprwm/Hyprland · GitHub
-
_xor
...but I'm also wondering why I'm doing a debug build of hyprland when I should be doing one of wayland heh.
-
_xor
er, libwayland-server.so.
-
RhodiumToad
interesting that it's a bus error rather than a segv.
-
RhodiumToad
that sometimes helps tracking these things down.
-
_xor
How come?
-
» _xor is learning
-
RhodiumToad
you get segv if you try and access memory that's not there, often from referencing a null pointer
-
RhodiumToad
you get a bus error for two main cases: on amd64, from accessing a non-canonical address (i.e. the top bits are neither 0x0000 nor 0xffff),
-
RhodiumToad
or on pretty much any platform, from doing an access that requires an aligned address but which was given an unaligned one
-
_xor
Ah, earlier when I was looking at XDGOutput.cpp, I was wondering if it was a null pointer from line 15 (wl_resource_destroy), but then I saw I was looking at the wrong line and the function above it uses a smart pointer.
-
_xor
Based on this though, that wouldn't be an issue.
-
RhodiumToad
a third possibility is access to memory that's mapped, but which you don't have permission for
-
_xor
Hmm
-
johnjaye
you may not appreciate that us lurkers are also learning. but we are. thanks Rhodium
-
RhodiumToad
note that this doesn't necessarily generalize across OSes, this is just mostly true for freebsd
-
RhodiumToad
other systems may just report segv for every kind of error
-
_xor
I'm using this too, which might also be a potential culprit:
github.com/amshafer/nvidia-driver
-
VimDiesel
Title: GitHub - amshafer/nvidia-driver: Fork of the Nvidia FreeBSD driver to port the nvidia-drm.ko module from Linux
-
_xor
But it started happening with the latest release of x11-wm/hyprland when exiting a terminal session of x11/foot.
-
» RhodiumToad is currently knee-deep in bus errors from trying to compile fortran ports on i386
-
_xor
It happens randomly though and not very often.
-
_xor
So that also includes x32 and not just x64?
-
RhodiumToad
(there's a long-standing bug in the gcc builds that bites on i386 whenever you set a CPUTYPE of pentium3 or later)
-
_xor
Oh btw, is there a make port macro to get the current architecture as x86_64 instead of amd64? (e.g. ${ARCH})
-
johnjaye
RhodiumToad: that sounds bizarre
-
RhodiumToad
freebsd always calls it amd64, if the port needs to see x64_64 then you generally need to patch the port or override it in the CONFIGURE_* or MAKE_* vars
-
_xor
ah
-
RhodiumToad
johnjaye: not really. clang and gcc disagree over what the presumed stack alignment should be on i386, and the gcc ports don't try and correct this
-
johnjaye
fascinating. i didn't know gcc and clang disagreed on much things
-
RhodiumToad
so if you call gcc-compiled code from clang-compiled code, the stack isn't aligned as gcc expects, and if the CPU architecture includes any SSE instructions and those were used, you get bus errors
-
_xor
This is for a rust port, which uses x86_64 for its "target tuple" of architecture-vendor-os string.
-
RhodiumToad
since some SSE instructions require 16-byte alignment and clang provides only 4-byte stack alignment
-
_xor
Heh, I was confused for a second before I remembered that SSE came out with P90 (or around then) on i386. For a second I was confused.
-
RhodiumToad
pentium3 was the first to have sse, pentium4 to have sse2
-
_xor
Oh it was as late as P3?
-
_xor
Oh, I'm thinking of MMX, nevermind. Confused again lol.
-
RhodiumToad
MMX doesn't have any alignment restrictions as far as I know.
-
_xor
I'm sure you're right, I just got MMX and SSE confused for a second. Had you thrown in Altivec or something, my head would have exploded.
-
RhodiumToad
it was SSE that introduced 16-byte move instructions like movaps
-
_xor
Oh, I need to restart this session don't I?
-
» _xor just rebuilt graphics/wayland with WITH_DEBUG=1
-
RhodiumToad
if you recompiled, yes, obviously
-
_xor
Umm...dumb question, but I made a .pkg of graphics/wayland. When I try to install it using `sudo pkg install -F ./wayland-1.22.0.pkg` it confirms with me but then it doesn't actually do anything (even with -f).
-
_xor
What am I doing wrong?
-
_xor
I'd prefer to not have to remove the existing installed package (though I guess I could tell it not to uninstall its dependencies).
-
_xor
Nevermind, I got it. Forgot I setup a local repo on this workstation for exactly this type of reason.
-
_xor
Oh
-
» _xor just noticed mentions from a few days ago
-
_xor
RhodiumToad: Yeah, I was asking about order of loading kernel modules between loader.conf and rc.conf. I noticed that hyprland wouldn't load unless I unloaded and then reloaded nvidia-drm.ko. After that it started fine.
-
_xor
I moved that from loader.conf back to rc.conf and the problem went away.
-
_xor
Interestingly, I think this coredump was generated when I restarted this system a few minutes ago...
-
_xor
-
_xor
All right, let me see if I can get this to coredump again.
-
_xor
Fantastic. The time I need it to coredump, it's not doing so. :|
-
_xor
RhodiumToad: * frame #0: 0x0000000821e55739 libwayland-server.so.0`___lldb_unnamed_symbol313 + 137
-
_xor
RhodiumToad: Is there a way to get that unnamed symbol without a debug build?
-
_xor
That memory address is in the process space of Hyprland where libwayland-server.so.0 is mapped, no? So we don't have enough information to figure out where in libwayland-server.so.0 that frame was sitting?
-
_xor
For some reason my brain is popping up "relocatable", but not sure why. I know that has to do with fixing up location references when the linker loads executable code.
-
RhodiumToad
a more interesting thing to look at is the output of info reg
-
RhodiumToad
and disassembling the specific instruction that faulted
-
_xor
-
RhodiumToad
and what do you get by disassembling at 0x0000000821e55739
-
RhodiumToad
I'm betting it's indexing %rax, which would be a noncanonical address
-
_xor
One min
-
_xor
Wanted to save this really quick before disassembling that...
-
RhodiumToad
(the content of %rax looks like ascii to me, "oyed (wl" )
-
_xor
-
_xor
That's the function referenced by the top two frames.
-
RhodiumToad
which line is line 376 ?
-
_xor
Specifically, "opcode = p[1] & 0xffff;" as the frame.
-
_xor
It's probably p[1] by the sounds of what you're saying, but let me double-check the line number.
-
_xor
Yup, that's line 376.
-
RhodiumToad
what's wl_connection_copy look like?
-
_xor
-
_xor
Want me to find ring_buffer_copy?
-
_xor
Oh it's in that same file.
-
_xor
-
_xor
I just copied the whole set of related functions.
-
RhodiumToad
and what do you get by disassembling at 0x0000000821e55739
-
_xor
Doing that now
-
» _xor has to look up the lldb commands while doing this
-
_xor
-
_xor
That's from `disassemble --frame` in lldb, which I'm assuming is current frame as marked by the *.
-
RhodiumToad
oh, the register values from before were from a different dump, not this one? what are the registers from this one?
-
_xor
I thought that was odd, but I'm pretty sure they're from the same dump (let me double-check).
-
_xor
I have two dumps so far, and I've been using the oldest one (which was caused by exiting a foot terminal). The other one is just from the reboot I did like an hour ago. I can probably get rid of that.
-
_xor
Oh wait, the first dump is from when graphics/wayland was built without debug. I've since rebuilt+reinstalled the port WITH_DEBUG=1.
-
_xor
Is it that the dump is pointing to the wrong addresses now that it's a different shared lib?
-
RhodiumToad
yes
-
» _xor sighs
-
RhodiumToad
you need to investigate the dump BEFORE replacing the libs :-)
-
_xor
One min, let me reinstall the one package without debugging and reload + disassemble the dump again.
-
_xor
yeah
-
_xor
Oh, I don't need to reboot, do I? It's loading it from disk, right?
-
_xor
-
RhodiumToad
hah
-
RhodiumToad
so yes, it's using %rax as an address, in this case a pointer to a function
-
RhodiumToad
but it contains some ascii value that isn't a canonical address, so you get a bus error
-
_xor
Dumb question, but it's left-to-right in this asm syntax, right?
-
_xor
AT&T?
-
RhodiumToad
yes
-
_xor
I'm used to seeing dst, src from Intel.
-
RhodiumToad
op src,dest
-
_xor
yup
-
RhodiumToad
rax apparently came from here: movq 0x18(%r12), %rax
-
_xor
Is the ASCII value from the movq at 572c?
-
_xor
Ah
-
RhodiumToad
what's in memory at %r12 ?
-
_xor
While I'm getting that...what does the 0x18 prefix do in "0x18(%r12)"? is that an offset or something?
-
RhodiumToad
offset, yes
-
_xor
-
_xor
Is that correct or is the final result from disassemble wrong?
-
RhodiumToad
that memory is data, not code, so disassembling it is just garbage
-
RhodiumToad
display it as ascii :-)
-
_xor
ah
-
_xor
Oh so I was thinking right with the `memory read ...` I did, just need to change the --format I take it?
-
RhodiumToad
yes
-
_xor
-
_xor
I just guessed a for ASCII.
-
» _xor is looking up valid values for --format...
-
_xor
Oh oops, forgot to include the address lol
-
_xor
-
_xor
Heh
-
RhodiumToad
well, that's obviously not what the code expected.
-
_xor
Nope.
-
RhodiumToad
the question is, what code exactly was being called, and where did the value come from
-
_xor
Yeah I'm trying to picture in my head where that string would come from.
-
» _xor fuzzy-greps the source for that string
-
_xor
Apparently it's coming from here...
-
_xor
-
VimDiesel
Title: Hyprland/src/protocols/WaylandProtocol.cpp at v0.27.2 · hyprwm/Hyprland · GitHub
-
_xor
That dtor.
-
_xor
...though I guess that doesn't really say much since it's trying to callq without having a valid value in %rax.
-
_xor
RhodiumToad: Maybe a dumb question, but is "movq 0x18(%r12), %rax" trying to index into a vtable or something to get the address of a function?
-
_xor
I mean is that what that could look like?
-
RhodiumToad
hard to know without the source
-
darwin
i just got a Lenovo ThinkPad X1 Yoga (gen5/20UB) and am trying to install FreeBSD UNIX... I used Slackware to create a FreeBSD partition, then in the FreeBSD installer, went to shell and did newfs /dev/nvd0s1 , and then went to the installer and selected to manually use that partition... it says it's not bootable... do I have to make something else within it?
-
darwin
i want to use UFS... does it have to be changed to something like install freebsd-ufs on /dev/nvd0s1a? I haven't seen a way to make the 'a' yet if that's it...
-
darwin
the manual is insufficient for manual partitioning and creating slices and areas in those and filesystems... i found a forum thread discussing details (similar to what people told me here a few years ago) and now seems I'm able to install...
-
RhodiumToad
you shouldn't try and create filesystems directly on an MBR-type partition
-
polyex
if we deploy a production site on vms at whatever hosts, what's the right way to handle freebsd version upgrades? freebsd-update the vms in-place and update our vm template, or only update our vm template and redeploy every server. in other words is there ever a good reason to freebsd-update running production servers?
-
RhodiumToad
darwin: this system doesn't support UEFI?
-
RhodiumToad
darwin: what you probably wanted was gpart create -s BSD /dev/nvd0s1 && gpart add -t freebsd-ufs /dev/nvd0s1
-
meena
polyex: imo, the right way is to update the templates, and blast the VMs away
-
RhodiumToad
darwin: of course you'd also need something like gpart bootcode -b /boot/boot /dev/nvd0s1
-
polyex
meena me too. the 1 exception i can maybe see is like, what if an urgent security fix is put out? not desirable to be able to update them in place, still better to update template and roll out updated vms?
-
meena
my opinion is informed by working on cloud-init
-
meena
I spend a lot of time blasting away VMs and setting them up again, and yet, this VM running my IRC client, is woefully outdated
-
polyex
ya i'll skip adding update functionality to vms and keep them more immutable
-
polyex
ty
-
meena
imo, freebsd-update on one machine takes about as long as doing that on the template
-
polyex
do you allow pkg update on vms or that only in template & redeploy too?
-
meena
the story is slightly different with PkgBase, but there we still don't bectl automated so if it's updates that touch anything that might fail your applications, or botch your etc, recovery is pretty hard
-
meena
polyex: pkg is okay, unless you have a pipeline for rebuilding images. but at that point you're probably better off with just jails
-
polyex
ya imo pkg upgrade can break shit easier than freebsd-update could. so neither should happen on immutable production vms
-
polyex
ya i'm moving to jails what i can, but there still needs to be vms to house the jails
-
polyex
at least to me i don't have dedicated servers
-
meena
So, it's a balancing act full of bad opinions. pick your poison, and test how effective it is, before zealously committing to it, and telling everyone that your process is the best (i.e. becoming a DevOps Though Leader)
-
polyex
lol
-
» meena puts on her DevOps Thought Leader Hat
-
meena
The easiest way to ensure your software works after an update is end to end testing, and perhaps the most efficient way to do end to end tests without lying to yourself is in production. Putting that together: The most efficient way to ensure that your software updates work is green blue deployment.
-
polyex
what's green blue deployment?
-
meena
it's a setup where your deployment is duplicated, and every time you update you flip between the two, and every time something goes wrong in an update you flop back
-
_xor
Side-by-side deployments.
-
_xor
Yeah, that.
-
meena
In times of need it could also be misappropriated to extend the capacity by 100%, but that might be tricky depending on the database setups
-
parv
Thanks, meena
-
polyex
seems heavy no? to update a whole deployment then swap over, rather than having rolling updates on the same single deployment
-
parv
You have always on backup, with relatively minimal downtime
-
_xor
Ephemeral instances have the benefit of reproducible environments.
-
polyex
i mean if i'm paying for 1k servers now i gotta pay for 2k just so 1k can stand by for the next dev update?
-
_xor
You're separating runtime environment from application data (generally) and it allows for finer-grained HA tuning.
-
meena
polyex: depending on the size of the infra, this may only be feasible or sensible for a small subset
-
_xor
Not necessarily, you're doing it in smaller batches and they're spot instances.
-
meena
or what _xor says
-
» meena takes off her DevOps Thought Leader Hat again
-
polyex
oh so i'd spin up 1k new ones in a new env, run e2e on them, then if they work swap load balancer ip to ip of new env?
-
_xor
RhodiumToad: Based on some existing issues I found in the main repo, I decided to update ports and reinstall wlroots+hyprland to see if it helps. Heh, not only did it not help, it made it a lot worse.
-
_xor
It was coredumping left and right. Now I'm afraid to open a terminal heh.
-
parv
.oO( Ouch, ouch )
-
_xor
polyex: You can do that, or you can do them 50 servers at a time (depending on how application state is handled).
-
meena
polyex: also, you could keep them idle, if you're doing that process once an hour
-
_xor
CI/CD pipeline + images work well with this type of workflow.
-
_xor
You can keep a fixed set of VMs if you want and just deploy containers (e.g. jails) from images (e.g. ZFS).
-
polyex
how does CI/CD tell your hosting companies to create x new vms for it to provision and deploy new build to?
-
_xor
Depends on the orchestrator you're using, but Terraform can do that (for example). It does it via provider APIs. Common approach is to monitor resource utilization and then spin up more containers (or VMs if desired) and deploy more application instances, or destroy containers (or VMs) if low utilization.
-
meena
polyex: what's your hosting company?
-
polyex
so CI/CD systems have integrations with hosting companies? nice
-
polyex
vultr but open to better
-
_xor
I deploy to bare metal in my server rack, but if I wanted to, I could configure my CI/CD infra to deploy to AWS or DigitalOcean or whatnot.
-
_xor
I use Vultr now and I like them so far (though don't really utilize my VM much, just picked them after DigitalOcean dropped FreeBSD support).
-
polyex
how do you deploy to bare metal?
-
_xor
I use Nomad, which handles orchestration for me across my physical servers.
-
polyex
you need install disk in it so it boots then gets new OS files over network?
-
meena
polyex: how do you get IPv6 in jails on Vultr?
-
polyex
not sure. just use vms atm but wanna move to vms + jails
-
_xor
No, I use jails. Don't need to install a new OS for every deployment (though I can if I want, as I have iPXE setup with cloud-init integrated).
-
polyex
oh wow
-
polyex
how does ipxe get integrated with cloud-init?
-
meena
_xor: cool
-
_xor
iPXE to handle system boot after it POSTs, followed by a FreeBSD install (usually from a prebuilt image I've made). Then cloud-init to configure the server on boot before consul+nomad+vault takeover.
-
polyex
damn nice
-
polyex
what CI/CD you use?
-
polyex
you seem to got a pretty modern stack
-
_xor
That's in flux, but I've used Gitlab CI, BuildBot, and now currently OneDev.
-
polyex
fav and why?
-
_xor
Probably OneDev because it's pretty straightforward and has decent functionality for my needs. But I haven't been using it for long and probably haven't run into the rough edges yet.
-
_xor
Gitlab CI is nice, but Gitlab is too heavy for my tastes. Gitea is nice too, but some of the more recent releases seemed to be getting more Linux-centric and I got tired of spending more time porting it.
-
_xor
I like devel/soft-serve quite a bit. It's really lightweight, fast, and simple. Pair that with BuildBot.
-
_xor
Lots of CI/CD systems these days are very docker-centric, so the choices on FreeBSD are a bit more limited (unless you don't mind porting).
-
_xor
There's Woodpecker, Concourse, Drone, Argo, Earthly, etc.
-
polyex
ya i want out of box freebsd support
-
polyex
ty i'll look at those
-
_xor
BuildBot is in ports tree and is pretty good, as long as you don't mind Python.
-
pertho
is iwlwifi(4) still stuck on 802.11n? Is there any 802.11ac support in FreeBSD?
-
pertho
actually media is reporting 802.11g :(
-
parv
What does "wifibox" port report?
-
pertho
wifibox? I'm running iwlwifi(4) in FreeBSD not in a vm
-
parv
Yes, I know. Was asking if the Linux driver worked better
-
pertho
will check once I'm done git clone'ing freebsd ports :D
-
pertho
wifibox status says it's running on a PID
-
pertho
not sure what I am doing here
-
pertho
I have a wifibox0 device
-
pertho
never mind.. going to have to abandon FreeBSD on this laptop.. HW is too new
-
pertho
thanks anyway :)
-
meena
iwlwifi(4) is a Linux driver
-
tivolo
Hello. Today i tried
-
tivolo
# bsdinstall jail <path>. After choosing a mirror to install, i receive the error: "the checksum for base.txz does not match. It may have become corrupted, and should be redownloaded.". Restart is not successful neither. I would appreciate any help on this issue. Thx!
-
meena
tivolo: which version?
-
tivolo
@meena FreeBSD 13.2-RELEASE releng/13.2 GENERIC arm64
-
tivolo
@meena I solved it. I had to delete the folder '/usr/freebsd-dist' and restart bsdinstall. Any explanation?
-
meena
tivolo: nope. i don't use bsdinstall for jails
-
meena
So I'm not too deeply familiar with its inner workings
-
monkeybusiness
Hi, has anyone got FreeBSD to work with Qubes?. I have gotten it to work in the past, but I had issues with the mouse, even though technically it is not a dealbreaker, given that i could use cwm or i3, exclusively with keyboard bindings
-
ted-ious
antranigv: How's your devuan documentation coming?
-
antranigv
ted-ious pretty good. I forgot to publish it! :D
-
ted-ious
LOL
-
monkeybusiness
I would have found writing all that documentation ted-ious
-
ted-ious
:)
-
dvl
Here's me hoping: Much chance of getting latest cron into FreeBSD 14?
vixie/cron #20 - it supports last-day-of-month.
-
VimDiesel
Title: allow '$' to indicate last day-of-month by vixie · Pull Request #20 · vixie/cron · GitHub
-
meena
dvl: that's extremely cool
-
llua
pretty easy to do without it tho
-
meena
dvl: has they're been a release since?
-
meena
llua: yes, but getting explicit notation is better than everyone having to figure out how to easily do it without
-
meena
there's zero Tags on that repo
-
meena
dvl: you got commit, surely you can do a vendor import
-
dvl
I got a port commit
-
meena
i thought commit was extended to just be. commit
-
meena
-
VimDiesel
Title: src - FreeBSD source tree
-
meena
dvl: given how selective that import is, maybe you can email the committer and ask for pulling… that pull request in
-
mystic
-
VimDiesel
Title: HW probe of ASUSTek P8P67 Desktop Computer #0e10359af8: dmesg
-
mystic
what's that WARNING ?
-
RhodiumToad
probably harmless
-
mystic
RhodiumToad: ok
-
Jean-Loups
FreeBSD powered
-
tyler82
what is the default settings of tap0? i have deleted it and i have created again but if i do vm init the vm-public switch does not activate it.
-
Jean-Loups
how can i configure dvorak keyboard before boot proces for cryted disk ?
-
jbo
what's the correct sysctl to grab the total amount of installed memory (in bytes)?
-
Jean-Loups
good night, take care
-
mquin
jbo: looks like hw.physmem
-
mquin
there's also hw.realmem
-
mquin
not sure what the difference is. On a system with 8GB of memory realmem is exactly that in bytes, physmem is slightly lower (maybe due to a graphics window or some such?)
-
mquin
-
VimDiesel
Title: hw.physmem/hw.realmem question
-
mystic
hello, I have another queston: netgraph concern security ? or it's just a way to interconnect devices ?
-
rwp
mystic, "netgraph"? Please say more?
-
mystic
-
VimDiesel
Title: netgraph(4)
-
rwp
mystic, How is netgraph(4) a security concern? And if it is then wouldn't socket(2) also be the same security concern?
-
mystic
rwp: if it would be so simple I wouldn't ask that, isn'it ?