Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
What you're missing is that I only have a vague understanding of this and the person making noise has maybe 10% of my vague level of understanding. I'm going to be descending into kernel stuff soon but I haven't even started to understand anything strace is doing. So if I have that futex line, does that mean whatever call associated with it actually completed?

I guess the real problem is that they run two containers, and one of them likes to get stuck when they are shutting down. What is not known by me is if one of the particular containers is the one getting stuck and if it takes both of them running simultaneously to cause it.

Adbot
ADBOT LOVES YOU

Rescue Toaster
Mar 13, 2003
Yeah the = 0 at the end means, the call returned and there's no errors.

For instance, if you do a
code:
strace sleep 5
You'll see it temporarily hangs like this:
code:
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=5, tv_nsec=0}, NULL)
And then after the sleep is complete you'll see the return value and the last few calls:
code:
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=5, tv_nsec=0}, NULL) = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++
So what's really going on is either A) the program is busy doing something that doesn't involve system calls. or more likely B) there is another thread blocked on something previously. Use strace -f to see threads. For example, I created this program that creates two threads and they each sleep for different amounts of time, so you'll see output like this:

code:
[pid 18628] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=1, tv_nsec=0},  <unfinished ...>
[pid 18629] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=2, tv_nsec=0},  <unfinished ...>
<snip some other crap>
[pid 18628] <... clock_nanosleep resumed>0x7fb5754b7dc0) = 0
Now if we were to get stuck here... it would look like we were sitting at a 'completed' syscall, but we're really waiting for the 2 second delay that started above in thread 18629...
[pid 18629] <... clock_nanosleep resumed>0x7fb574cb6dc0) = 0
Short version, if you want to see what you're actually blocked on with strace, you need to at minimum use -f to see all the threads and look for previous unfinished calls.

Mr. Crow
May 22, 2008

Snap City mayor for life

horse_ebookmarklet posted:

I'm getting an unstable virtualized install of Windows 10. Its so bad the windows installer is bluescreening. Sometimes I can get it to install but marginal.
I do have a FreeBSD and Linux install working as guests on this platform, they're working fine, even under load. Its just windows that is upset.
This is a dedicated server without IMPI, I sent in a support ticket to flash the latest bios.
What else should I be looking at?

Here is what I have done to diagnose this:
  1. Verified Windows 10 ISO installer SHA256 matches
  2. Ran memory tests on the host (from linux host userspace).
  3. Ran CPU stress on the host (from linux host userspace).
  4. Ran MemTest86+ inside VM (pass, ran for 48 hours continuously)
  5. Ran CPU stress tests, a couple, from ultimate boot CD
  6. Faffed about with the arguments to virt-install
  7. Checked host dmesg, syslog, libvirt logs, nothing out of the ordinary

Ryzen 5 3600, 64GB ram.
Ubuntu 20.04.5 LTS
libvirt version: 6.0.0, package: 0ubuntu8.16
qemu version: 4.2.1Debian 1:4.2-3ubuntu6.23
kernel: 5.4.0-125-generic

pre:
virt-install --name=win10-vm \
--cpu host \
--vcpus=6,sockets=1,cores=6 \
--memory=16384  \
--network bridge=br1,model=virtio \
--cdrom=/tmp/Win10_21H2_English_x64.iso \
--disk=/tmp/virtio-win.iso,device=cdrom \
--graphics vnc,listen=127.0.0.1 --noautoconsole \
--disk size=64,bus=virtio,format=raw,cache=none,io=native \
--os-variant=win10



horse_ebookmarklet posted:

I'm getting an unstable virtualized install of Windows 10. Its so bad the windows installer is bluescreening. Sometimes I can get it to install but marginal.
I do have a FreeBSD and Linux install working as guests on this platform, they're working fine, even under load. Its just windows that is upset.
This is a dedicated server without IMPI, I sent in a support ticket to flash the latest bios.
What else should I be looking at?

Here is what I have done to diagnose this:
  1. Verified Windows 10 ISO installer SHA256 matches
  2. Ran memory tests on the host (from linux host userspace).
  3. Ran CPU stress on the host (from linux host userspace).
  4. Ran MemTest86+ inside VM (pass, ran for 48 hours continuously)
  5. Ran CPU stress tests, a couple, from ultimate boot CD
  6. Faffed about with the arguments to virt-install
  7. Checked host dmesg, syslog, libvirt logs, nothing out of the ordinary

Ryzen 5 3600, 64GB ram.
Ubuntu 20.04.5 LTS
libvirt version: 6.0.0, package: 0ubuntu8.16
qemu version: 4.2.1Debian 1:4.2-3ubuntu6.23
kernel: 5.4.0-125-generic

pre:
virt-install --name=win10-vm \
--cpu host \
--vcpus=6,sockets=1,cores=6 \
--memory=16384  \
--network bridge=br1,model=virtio \
--cdrom=/tmp/Win10_21H2_English_x64.iso \
--disk=/tmp/virtio-win.iso,device=cdrom \
--graphics vnc,listen=127.0.0.1 --noautoconsole \
--disk size=64,bus=virtio,format=raw,cache=none,io=native \
--os-variant=win10

Could be a bug or missing dependency on the installer, try a different version?

ExcessBLarg!
Sep 1, 2001

Rocko Bonaparte posted:

I guess the real problem is that they run two containers, and one of them likes to get stuck when they are shutting down. What is not known by me is if one of the particular containers is the one getting stuck and if it takes both of them running simultaneously to cause it.
Yeah, using "strace -fo /tmp/strace.log" may help. The other option you can try is to gdb attach to the stuck process and poke around (mostly use "info" commands) to get a sense of what's going on.

If you're on a Debian distro and you end up going the gdb route, you can add the "ddebs" repo to your sources.list and install the "-dbgsym" packages for whatever you're tracing--Debian/Ubuntu build separate debug symbol packages for everything in their repos, and store them in a separate repo to keep mirror volumes reasonable. With the relevant dbgsym packages when you gdb attach and run a backtrace you actually get useful symbol names.

RFC2324
Jun 7, 2012

http 418

why are all the rhel based WSL distros not free? wtf
even rocky is $0.99

Sir Bobert Fishbone
Jan 16, 2006

Beebort

RFC2324 posted:

why are all the rhel based WSL distros not free? wtf
even rocky is $0.99

I followed some instructions from here a while back to get Fedora on wsl2.

RFC2324
Jun 7, 2012

http 418

Sir Bobert Fishbone posted:

I followed some instructions from here a while back to get Fedora on wsl2.

thanks.

I still maintain that its dumb af

LochNessMonster
Feb 3, 2005

I need about three fitty


RFC2324 posted:

why are all the rhel based WSL distros not free? wtf
even rocky is $0.99

You can’t download the binary anymore and install manually?

My employer blocks the Windows Store so I’ve been installing them manually. That’s Ubuntu and Debian though, haven’t looked at the RH based distros though.

Thanks Ants
May 21, 2004

#essereFerrari


$0.99 doesn't seem like a large amount to avoid a load of manual steps

Volguus
Mar 3, 2009

Thanks Ants posted:

$0.99 doesn't seem like a large amount to avoid a load of manual steps

It's the principle of it. And, to be fair, there are probably a load of manual steps to even buy it: now you have to make a MS account, login with it in windows (or just the store?, whatever, they have to know you're you) go to the store and find that item, have to add or enter a credit card.

Sure, you can argue: "but you only have to do that once. After that you can buy things a lot easier". And, while that's technically true, this is why you don't wanna do it even once. Ever.

Volguus fucked around with this message at 23:46 on Sep 11, 2022

RFC2324
Jun 7, 2012

http 418

Volguus posted:

It's the principle of it. And, to be fair, there are probably a load of manual steps to even buy it: now you have to make a MS account, login with it in windows (or just the store?, whatever, they have to know you're you) go to the store and find that item, have to add or enter a credit card.

Sure, you can argue: "but you only have to do that once. After that you can buy things a lot easier". And, while that's technically true, this is why you don't wanna do it even once. Ever.

I already did these things for game pass, so its 100% principle

especially since its only the RHEL family, ubuntu and opensuse are free

other people
Jun 27, 2004
Associate Christ
Quality Linux just costs more. I can't imagine what they must be charging for the BSDs!

Criss-cross
Jun 14, 2022

by Fluffdaddy

other people posted:

Quality Linux just costs more. I can't imagine what they must be charging for the BSDs!

Cash back?

Eletriarnation
Apr 6, 2005

People don't appreciate the substance of things...
objects in space.


Oven Wrangler
From what I'm seeing Suse and Ubuntu's WSL releases are maintained by the organizations that maintain the distros themselves, and those releases being free makes sense considering those orgs want to increase adoption of their product.

The only releases I see for Fedora and Rocky are from 3rd parties, who I imagine care a lot less about making a particular distro popular and more about getting paid directly. It seems pretty straightforward.

Eletriarnation fucked around with this message at 09:57 on Sep 12, 2022

Keito
Jul 21, 2005

WHAT DO I CHOOSE ?
Importing Rocky into WSL looks pretty easy to me:

https://docs.rockylinux.org/guides/interoperability/import_rocky_to_wsl/

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Ok, I got my nice new HDD and installed it on my Fedora system. I formatted it as encrypted BTRFS, and I should note that all my partitions, including /home, were also originally encrypted by the Fedora installer.

Some real basic tech support questions:

1) I initially mounted it (via KDE partition manager) to /home/myuser/hdd. This borked my system - "root account is locked, cannot access console" - because presumably it resulted in an invalid /etc/fstab I guess? Thanks to Silverblue I just rolled back and everything was dandy (instead of needing to boot from a live USB to unfuck the /etc/fstab), but I don't get why what I tried to do was so verboten or why the KDE p.m. went along with it.

2) After rolling back, fine, I just left the HDD on the default mount point of /run/media/myuser/my_hdd_label. I guess I can create a symlink from my home dir if I want to access it from a less unwieldy path? In general, is there a recommended practice for where to mount additional drives in a desktop computer? It's going to hold my personal data, which is why I would like it under /home, and the only reason I didn't just make a single BTRFS filesystem is because I didn't want to mix SSD and HDD storage.

3) I also wanted the HDD to encrypt at the same time as the main SSD, i.e. when I enter my LUKS password at boot, since they're going to hold similar data. In my naïvete I hoped that setting the same LUKS password for both would make them automatically unlock together, but no such luck. I found this guide which looks relatively straightforward, but given that it's from 2008 is it still valid?

e: oh, and this seems pretty scary. Why isn't this automatic or strongly recommended whenever the subject of LUKS comes up? I know you gotta have backups and I do, but jeez.

NihilCredo fucked around with this message at 09:25 on Sep 13, 2022

Klyith
Aug 3, 2007

GBS Pledge Week

NihilCredo posted:

1) I initially mounted it (via KDE partition manager) to /home/myuser/hdd. This borked my system - "root account is locked, cannot access console" - because presumably it resulted in an invalid /etc/fstab I guess? Thanks to Silverblue I just rolled back and everything was dandy (instead of needing to boot from a live USB to unfuck the /etc/fstab), but I don't get why what I tried to do was so verboten or why the KDE p.m. went along with it.

Ha ha! Exact same thing happened to me! KDE pm put the /dev/mapper/luks-asdf... in fstab, but the problem is it isn't decrypted & mapped at that stage. This brings boot to a halt with an error, because stuff in fstab is by default mandatory.

To put a secondary LUKS encrypted drive in fstab, you need to put the noauto or at least nofail so that that it moves on. Or use crypttab, which is the proper way to mount an encrypted drive at the system level.

(I just went with noauto, and it works out that KDE asks for password & auto-mounts the drive when the desktop boots up.)

NihilCredo posted:

2) After rolling back, fine, I just left the HDD on the default mount point of /run/media/myuser/my_hdd_label. I guess I can create a symlink from my home dir if I want to access it from a less unwieldy path? In general, is there a recommended practice for where to mount additional drives in a desktop computer? It's going to hold my personal data, which is why I would like it under /home, and the only reason I didn't just make a single BTRFS filesystem is because I didn't want to mix SSD and HDD storage.

I asked the same thing a little while back and got "whatever makes sense to you if it's not totally stupid".

ExcessBLarg!
Sep 1, 2001

NihilCredo posted:

e: oh, and this seems pretty scary. Why isn't this automatic or strongly recommended whenever the subject of LUKS comes up? I know you gotta have backups and I do, but jeez.
Usually when a sector fails on a magnetic disk, it's just that sector (or a group of sectors physically located near each other) that can't be read, but the majority of the disk is still intact. This is a problem, though, if that (or those) sectors contain key data structures required for traversal of the rest of disk. With a traditional file system the worst thing that could be lost is the "superblock" which contains the core information about the file system and the location of the root directory inode. This is why mke2fs makes multiple superblock backups throughout the disk. I assume btrfs does the same.

The LUKS header is the same thing, if the crypto keys in the header are stored on a sector that can't be read, you'll no longer be able to read the entire disk without backups. I'm not entirely sure why LUKS doesn't store backups of the header throughout the volume. Maybe they didn't want a sophisticated LBA mapping between encrypted and plaintext sectors? Perhaps they wanted to make it as straightforward as possible to wipe the headers in case you do want to zap the disk? I agree that the advice to "make header backups!" through a very manual process is annoying, but I've always regarded lost disks as an inconvenience rather than a problem.

As with everything, the situation with modern SSDs is more complicated. I've yet to see a SSD in the field that just has "a few" unrecoverable sectors. In my experience if something goes wrong with them it's always more catastrophic. That could just be anecdotal though.

Computer viking
May 30, 2011
Now with less breakage.

Full disk encryption seems like a tradeoff between risk of losing access to your data vs risk of losing control over your data - and I'm not sure it's always the right solution for everyone. Backups mitigate most of the former risk, of course.

Klyith
Aug 3, 2007

GBS Pledge Week
The LUKS header data is stored twice, so a simple one-off bad HDD sector or two shouldn't kill your volume. User error with DD is a possibility, but if you're using DD in cavalier ways that's what you get.

ExcessBLarg! posted:

I'm not entirely sure why LUKS doesn't store backups of the header throughout the volume. Maybe they didn't want a sophisticated LBA mapping between encrypted and plaintext sectors? Perhaps they wanted to make it as straightforward as possible to wipe the headers in case you do want to zap the disk?

You probably can't do throughout the volume on an encrypted drive, but you could do front and back and it would be far more resistant to fuckups with dd or whatever. So probably the fast wipe ability?

BlankSystemDaemon
Mar 13, 2009



Klyith posted:

The LUKS header data is stored twice, so a simple one-off bad HDD sector or two shouldn't kill your volume. User error with DD is a possibility, but if you're using DD in cavalier ways that's what you get.
I can't think of a storage system designed in the last 30 years that doesn't store metadata at least two places; GEOM, ZFS, LUKS, various forms of RAID.

Rescue Toaster
Mar 13, 2003

ExcessBLarg! posted:

As with everything, the situation with modern SSDs is more complicated. I've yet to see a SSD in the field that just has "a few" unrecoverable sectors. In my experience if something goes wrong with them it's always more catastrophic. That could just be anecdotal though.

You're correct, most people are grossly overestimating how reliable SSDs are. Lots of 'Well when it fails it just becomes read-only!' kind of bullshit gets repeated constantly. They fail in strange hard to diagnose ways too. Like you can write to a block, read it back, and it's correct, and then seconds/minutes/hours later it drifts out and the data is corrupted next time it is read. Everything depends entirely on how the controller firmware was implemented, and they can really be all over the map. Though things are probably better these days if you're sticking to the main brands, there is a lot of god awful SSD firmware kicking around out there waiting to blow up in weird ways.

Reflections85
Apr 30, 2013

Rescue Toaster posted:

You're correct, most people are grossly overestimating how reliable SSDs are. Lots of 'Well when it fails it just becomes read-only!' kind of bullshit gets repeated constantly. They fail in strange hard to diagnose ways too. Like you can write to a block, read it back, and it's correct, and then seconds/minutes/hours later it drifts out and the data is corrupted next time it is read. Everything depends entirely on how the controller firmware was implemented, and they can really be all over the map. Though things are probably better these days if you're sticking to the main brands, there is a lot of god awful SSD firmware kicking around out there waiting to blow up in weird ways.

Dumb question, but what SSD brands for consumers are good? I mostly hear about Samsung.

Klyith
Aug 3, 2007

GBS Pledge Week

Reflections85 posted:

Dumb question, but what SSD brands for consumers are good? I mostly hear about Samsung.

Samsung, WD/Sandisk, Crucial/Micron, SK Hynix -- these are all companies with the major NAND fabs, so they're putting their own flash into their drives. Means they've got an inside track on QC.

Besides those, there are plenty of brands that have a generally good rep. One that I'd point to in particular if you're in the US is Inland, which is microcenter's house brand. They make a couple drives that are very good on the $/TB scale, though not so much the fastest latest tech. They sell on amazon so you can get them even if you don't have a microcenter.

RFC2324
Jun 7, 2012

http 418

anyone have a reasonably modern, up to date, how to linux 101 they can share?

I got stuck with an intern who had to be taught about `ls` and its been 25 years since I dealt with the basics, I have no idea how to teach him to be useful

Methanar
Sep 26, 2013

by the sex ghost

RFC2324 posted:

anyone have a reasonably modern, up to date, how to linux 101 they can share?

I got stuck with an intern who had to be taught about `ls` and its been 25 years since I dealt with the basics, I have no idea how to teach him to be useful

Give him to another intern

RFC2324
Jun 7, 2012

http 418

Methanar posted:

Give him to another intern

He's the first of them, and our previous newbie that I was in the middle of training just went on his reserves month, so I can't hand him off there yet.

Hopefully the other guy who is training him is better at teaching basics, because I have trouble slowing down

Phosphine
May 30, 2011

WHY, JUDY?! WHY?!
🤰🐰🆚🥪🦊

RFC2324 posted:

anyone have a reasonably modern, up to date, how to linux 101 they can share?

I got stuck with an intern who had to be taught about `ls` and its been 25 years since I dealt with the basics, I have no idea how to teach him to be useful

What is the goal of the Linux knowledge? Is it just "do whatever our job is, but in Linux" or more "learn how to do the Linux stuff the job is actually about"? Because for the first one, helping them find a good wm/de and setting up hotkeys similar to windows (or Mac if that's where they're from) might be enough. If the second, I don't know, I'm in the same situation that I've lived and worked in Linux and terminals for so long that I have a hard time relating to not being that way.

RFC2324
Jun 7, 2012

http 418

Phosphine posted:

What is the goal of the Linux knowledge? Is it just "do whatever our job is, but in Linux" or more "learn how to do the Linux stuff the job is actually about"? Because for the first one, helping them find a good wm/de and setting up hotkeys similar to windows (or Mac if that's where they're from) might be enough. If the second, I don't know, I'm in the same situation that I've lived and worked in Linux and terminals for so long that I have a hard time relating to not being that way.

its supposed to be the latter, but having him for only a semester makes me doubt its possible.

dude is getting paid to make distract me from work lol

Buck Turgidson
Feb 6, 2011

𓀬𓀠𓀟𓀡𓀢𓀣𓀤𓀥𓀞𓀬
I got a free copy of Mike Cannon's book Linux for Beginners, I read through a few chapters and it seemed decent.

Methanar
Sep 26, 2013

by the sex ghost

RFC2324 posted:

its supposed to be the latter, but having him for only a semester makes me doubt its possible.

dude is getting paid to make distract me from work lol

buy him a raspberry pi and tell him to install arch linux on it and set up a lamp stack. That'll keep him busy for a few days.

CaptainSarcastic
Jul 6, 2013



RFC2324 posted:

its supposed to be the latter, but having him for only a semester makes me doubt its possible.

dude is getting paid to make distract me from work lol

If he's a beginner but at least semi-competent then I'd suggest cheatsheets. Having a bunch of commands listed out and named as a quick reference can be a great learning tool.

goatsestretchgoals
Jun 4, 2011

CaptainSarcastic posted:

If he's a beginner but at least semi-competent then I'd suggest cheatsheets. Having a bunch of commands listed out and named as a quick reference can be a great learning tool.

And teach them how to use man. The cheat sheet works well with man because they don’t know what commands to look up documentation for.

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.
I would probably check Linux Documentation Project Guides. They are old but should still be valid for this kind of use.

Bash Guide for Beginners
Introduction to Linux
GNU/Linux Command-Line Tools Summary

I had been wondering this question recently. We just moved offices at the university and in the process I happened to be left with a decades old guide book to the terminal system university was using in those days. It covered everything from what do 'cd' and 'ls' do to awk usage. Where is modern computer user supposed to start?

Tesseraction
Apr 5, 2009

Not sure how helpful it would be for a newbie but there is currently a Humble Bundle of Linux stuff https://www.humblebundle.com/books/linux-no-starch-press-books

Which also contains several BSD books and specific software that's Linux-agnostic, but whatever.

Ahhh I remember the first time I booted up Linux and it was just a command line and me having to ask a friend "what's the Linux for dir?"

ExcessBLarg!
Sep 1, 2001

Saukkis posted:

I had been wondering this question recently. We just moved offices at the university and in the process I happened to be left with a decades old guide book to the terminal system university was using in those days. It covered everything from what do 'cd' and 'ls' do to awk usage. Where is modern computer user supposed to start?
I can only think of a handful of things I learned as a young hobbyist that hasn't been useful in my career within the past five years. They include:
  • File transfers over serial connections (e.g., ZMODEM).
  • Most anything related to CRTs, although I still have to deal with EDIDs and manually fixing up modelines.
  • PERL.
Everything else is still relevant, at least to me. And I do recall the last time I used ZMODEM and it was on a project 14 years ago, so not as long ago as you'd think.

xzzy
Mar 5, 2009

It was a good fuckin day when I converted my last Perl script to python.

What a miserable language.

(Python is far from perfect but at least the syntax doesn't promote writing line noise)

Tesseraction
Apr 5, 2009

I still use Perl for one-liners from time to time. Never written a full script.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.
I still reach for perl for new, portable scripts because every machine is guaranteed to have it, you don't have to do this "is this python 2 or 3" dance, and I hate hate hate she'll scripting. Perl is so much better than shell scripting

Adbot
ADBOT LOVES YOU

Computer viking
May 30, 2011
Now with less breakage.

Twerk from Home posted:

I still reach for perl for new, portable scripts because every machine is guaranteed to have it, you don't have to do this "is this python 2 or 3" dance, and I hate hate hate she'll scripting. Perl is so much better than shell scripting

I'm fairly sure "python, but not perl" is more common than the opposite on the machines I touch now - and IIRC the last release of python2 went out of upstream support a while ago. (Which means it'll only be a decade or so before you can trust redhat/centos machines to have python 3 if they have python at all...)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply