Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.fish

Linux server hangs on shutdown

I've had two server oses here: alma linux and debian(currently). On both of them, they will hang when I shut them down from cockpit, and they hang at the end of the shutdown.

Also, it takes an hour to a day to have this issue start. if it's restarted two times in a row quickly, it works perfectly fine for some reason.

What I've tried:

  • setting "acpi=off" and "acpi=force" kernel parameters in grub
  • removing my nvidia gpu(i was using nouveau drivers)
  • changing distros

nothing worked. here are some things that both distros had in common with eachother:

  • systemd
  • cockpit
  • libvirt & qemu
  • docker

does anyone have advice? nothing i've seen online has worked. thank you for suggestions

View original on lemmy.fish
38

49 replies

lemm.ee

Hardware? Do they shut down properly if you do it from the console or ssh?

5
lemmy.fish

I will try to restart it using the reboot command.

The computer consists of:

  • i3-10100
  • 16gb ddr4 ram
  • MSI h410m pro
2
catloafreply
lemm.ee

Interesting. BIOS update? Maybe check through all the settings, or do a factory reset on the BIOS? I have a similar board (H510 something) running proxmox and it works fine.

2

I would like to note that this may have been caused by a bios update, as it started sometime after it. i'll try another update now.

edit: already on the latest bios version.

3

@potentiallynotfelix As a diagnostic, I would suggest trying shutting them down by ssh in and then using systemctl to shut them down, if that works then you know the issue is with cockpit. If it hangs even when systemd is asked to halt then I would consider reverting to the previous bios and see if the problem persists.

4
lemmy.fish

Ok. Cockpit uses the shutdown command to shut down[src], but systemctl poweroff might work. I will also attempt to revert bioses if msi supports it. thank you very much!

2
nanookreply
friendica.eskimo.com

@potentiallynotfelix Ok bet of luck. I've had all sorts of weird issues with systemd as of late, but not sure how many of those are inherent to systemd itself and how many are Ubuntu's config of same.

1
nanookreply
friendica.eskimo.com

@potentiallynotfelix Well flash to an older and see how it goes. I've seen some wired bios issues. I've got an i7=6850k machine on an Asus motherboard, and after I flashed to the latest bios, the USB power strobed on and off every few seconds so keyboard and mouse would work then not work then work then not work. I thought something was broken with hardware but then found others had the same issue with the most current BIOS, flashed to one release earlier and all good.

2
lemmy.fish

Flashing an older bios seemed to succeed! I gave it 14 hours or so before attempting a reboot, and if seemed to reboot without stalling. I'll give it a few more days now and try another, but that seemed to have fixed it.

1
lemmy.world

reboot: machine restart

This makes me think it's a motherboard issue.

The system is done with its shutdown process and issued the reboot command, but the motherboard didn't restart.

There could be some electronics components which get wedged over time. My sound card will occasionally not boot unless it has been completely powered off for 30 seconds or so.

2
programming.dev

Is it actual server hardware? I've seen some very weird things with real servers that take ages to reboot (I was assuming it was self checking or something). Are you sure its hung, and not just very slow to shutdown/reboot?

Is there any serial/monitor output before the hang?

2
lemmy.fish

Monitor output after shutting down:

I've given it 6 hours or so to shut down, so it's almost 100% a hang not a slow shutdown

9
lemmy.fish

The xserver-xorg-video-nouveau package was not installed, how else would I remove nouveau?

3

lsmod | grep nouveau returns nothing, so I assume removing my gpu automatically stopped it from being loaded. that sorta rules out nouveau as an issue.

2
ⲇⲅⲇreply
lemmy.ml

seems its a nvidia issue, i also have that issue, the gpu locks and i need to reboot while the VM with the nvidia passthrough freezes. i need a full reboot from baremetal machine to stop gpu using all his power stuck, don't let it be for hours being on or you will kill your hardware

3
ⲇⲅⲇreply
lemmy.ml

yes sorry I read you after writting it, if you remove the GPU the log message is the same but without the GPU lockup line?

1

Perfect! Thanks for the feedback, good to know BIOS could solve hardware issues also. Weird to see you needed to reverd to fix the problems.

2
lemmy.fish

I've run arch linux for a year or so before converting it, and no issues with shutdown. what makes you think that's the cause?

1
feddit.org

Because you tried two different OSes and the point where it hangs is the point where the OS sends an APM/ACPI command to reboot / power off. This is the last thing the OS does. So if that's not happening something is wrong with the hardware, BIOS, or BIOS settings.

You could try the syslog (journalctl), but logging is probably already off at that point.

2

yeah journalctl logs show nothing relevant. I have disabled acpi and forced it(acpi=force), but that didn't fix this. There are a lot of different combinations of acpi settings I could try:

acpi=force noapic
nolapic
noapic
acpi_osi=“Linux”
acpi_osi=“Windows 2006”
acpi=ht
pci=noacpi
acpi=noirq
pnpacpi=off

But I found these from a guy which they didn't work on so I'm reluctant to try them.

2
hendrikreply
palaver.p3x.de

And I guess if you're in front of the computer, you could just press the reset button or unplug it at that point (after it sucessfully synchronized the disks). no need to let it sit, there is no harm or data to be lost at that point.

1
BCsvenreply
lemmy.ca

Says reboot, are you issuing a reboot or a shutdown poweroff? Entering sleep state 5 shout be power off right?

1
lemmy.fish

I click the reboot button on cockpit, which issues a shutdown --reboot command as root. I agree that sleep state S5 is powered off. From the acpi docs:

A computer state where the computer consumes a minimal amount of power. No user mode or system mode code is run. This state requires a large latency in order to return to the Working state. The system’s context will not be preserved by the hardware. The system must be restarted to return to the Working state. It is not safe to disassemble the machine in this state.

This likely means my system is failing to reach that s5/g2 state.

1
BCsvenreply
lemmy.ca

If you ssh login directly and issue same command, not In cockpit interface, does it react the same?

3
beehaw.org

do you know that use device mapper? what kind of device is /dev/dm-1 ?

"dmsetup info" might help

1
lemmy.fish

sudo dmsetup info returns:

Name:              raven--vg-root
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      254, 0
Number of targets: 1
UUID: LVM-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Name:              raven--vg-swap_1
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        2
Event number:      0
Major, minor:      254, 1
Number of targets: 1
UUID: LVM-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1
beehaw.org

did you make these yourself? if not, could you cdo an ls -l /dev/mapper? it shows which name corresponds to which dm device

1

no, sorry for not specifying. it's scrapped together from old consumer components.

  • i3-10100
  • 16gb ddr4 ram
  • MSI h410m pro
2
lemmy.fish

thanks for the suggestion, could you elaborate on what this would do differently from the regular shutdown command that systemctl uses? thanks again

2
undrwaterreply
lemmy.world

My understanding is that 'halt' had been an alias for 'halt -p', but that changed recently. -p tells the command to power off. Without it, it just shuts down process.

2

Your machine isn't shutting down, it's trying to sleep.

You also have active KVM instances which are fighting to keep it alive.

0

can you elaborate on why you suspect this? The cockpit reboot or shutdown button uses the shutdown command directly along with a --reboot or --poweroff flag.

    onSubmit(event) {
        const Dialogs = this.context;
        const arg = this.props.shutdown ? "--poweroff" : "--reboot";
        if (!this.props.shutdown)
            cockpit.hint("restart");

        cockpit.spawn(["shutdown", arg, this.state.when, this.state.message], { superuser: "require", err: "message" })
                .then(this.props.onClose || Dialogs.close)
                .catch(e => this.setState({ error: e.toString() }));

        event.preventDefault();
        return false;
    }

(source)

1