!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation 🏠

79 Members
Making your home go *BLING* using NixOS. 36 Servers

Load older messages


SenderMessageTime
24 Jan 2022
@hexa:lossy.networkhexacolmena to the rescue? 😀19:34:05
@zhaofeng:zhaofeng.liZhaofeng Li For simple usecases, colmena exec / morph exec should be sufficient? I toyed with the idea of adding more sophisticated support for plugins, but those seem to be a nightmare to maintain. 19:36:58
@hexa:lossy.networkhexa basically I currently do morph deploy default.nix boot --reboot --upload-secrets 19:45:51
@hexa:lossy.networkhexaand after it sends the machine to reboot I want a hook that unlocks the disk crypto via ssh19:46:10
@hexa:lossy.networkhexaI can maintain said script myself, but the option to define the hook so it gets automatically (post-reboot) called would be dope19:46:29
@hexa:lossy.networkhexa * I can maintain said script myself, but the option to define the hook so it gets automatically (post-reboot) called would be dope19:46:43
@hexa:lossy.networkhexanot sure how painful that ultimately is19:47:39
25 Jan 2022
@newam:matrix.orgnewam

I am getting core dumps every ~30s or so (user 286 is hass), any idea how to fix/suppress this?

systemd-coredump[4137]: [🡕] Process 4135 (ping) of user 286 dumped core.

Found module /run/wrappers/wrappers.pYuVeCo6xv/ping without build-id.
Found module linux-vdso.so.1 with build-id: 7e53ac3b939006d77a9ec0f4bc946cebfc5a0142
Found module ld-linux-x86-64.so.2 with build-id: 5fdb845aac15b1fa80448d4f182040d5d299e927
Found module libc.so.6 with build-id: bfb0243eb9e58d46ab5c93715a94955dc9aa709e
Stack trace of thread 4135:
#0  0x00007fb9a1b121e9 syscall (libc.so.6 + 0xf51e9)
#1  0x000055b4b64544dd n/a (/run/wrappers/wrappers.pYuVeCo6xv/ping + 0x14dd)
#2  0x62347278622f6572 n/a (n/a + 0x0)
01:11:39
@zhaofeng:zhaofeng.liZhaofeng LiLooks like something got caught in the syscall filter. dmesg should tell you which syscall it was01:24:54
@newam:matrix.orgnewam
In reply to @zhaofeng:zhaofeng.li
Looks like something got caught in the syscall filter. dmesg should tell you which syscall it was

Its my first time debugging something like this, do you know how to decode syscall=126?

[ 2760.049991] audit: type=1326 audit(1643074136.166:281): auid=4294967295 uid=286 gid=286 ses=4294967295 subj=kernel pid=10950 comm="ping" exe="/run/wrappers/wrappers.ETHww0962F/ping" sig=31 arch=c000003e syscall=126 compat=0 ip=0x7f669f5ad1e9 code=0x80000000
01:30:23
@newam:matrix.orgnewam Ah found it, sys_capset. Wonder why that is being used. 01:35:30
@zhaofeng:zhaofeng.liZhaofeng LiProbably it wants CAP_NET_RAW03:02:53
@hexa:lossy.networkhexawhich component did you enable?08:16:29
@hexa:lossy.networkhexaor … well08:16:45
@hexa:lossy.networkhexa is it the ping component? 08:17:42
@hexa:lossy.networkhexait does not seem to the the ping binary sensor 08:29:07
@hexa:lossy.networkhexa * it does not seem to be the ping binary sensor 09:08:04
@hexa:lossy.networkhexacould be the device tracker of that component, but I can't repro09:08:20
@hexa:lossy.networkhexa newam: when you're around I need more info on how to reproduce your problem 09:08:31
@newam:matrix.orgnewam
In reply to @hexa:lossy.network
newam: when you're around I need more info on how to reproduce your problem
I am still trying to isolate it, I only noticed it after I ported my entire configuration.
My current suspicion is that it is the wake_on_lan component, if you specify a hostname it will ping the host to determine the power state.
16:15:53
@hexa:lossy.networkhexahrm ok16:19:56
@newam:matrix.orgnewam Yup, pretty sure it is wake_on_lan, I added "~@privileged" back to SystemCallFilter, and removed wake_on_lan and got no more coredumps. 16:21:18
@hexa:lossy.networkhexaI understand that it wants to capset16:25:46
@hexa:lossy.networkhexabut what if it didn't need to?16:25:58
@hexa:lossy.networkhexalike … what cap does it want to set?16:26:08
@hexa:lossy.networkhexaok, I have a reproducer now16:28:32
@hexa:lossy.networkhexa
hass # [   42.926821] hass[797]: 2022-01-25 16:25:50 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on homeassistant/status: 'online', mid: 5
hass # [   70.945962] audit: type=1326 audit(1643127978.020:94): auid=4294967295 uid=286 gid=286 ses=4294967295 subj=kernel pid=1059 comm="ping" exe="/run/wrappers/wrappers.WMlTN4r4vU/ping" sig=31 arch=c000003e syscall=126 compat=0 ip=0x7f9e6bba21e9 code=0x80000000
hass # [   70.971324] systemd[1]: Started Process Core Dump (PID 1060/UID 0).
hass # [   71.250322] systemd-coredump[1061]: Process 1059 (ping) of user 286 dumped core.
16:28:48
@hexa:lossy.networkhexagreat success16:28:50
@hexa:lossy.networkhexa
diff --git a/nixos/tests/home-assistant.nix b/nixos/tests/home-assistant.nix
index 1ab5755863f..0a59ef901b2 100644
--- a/nixos/tests/home-assistant.nix
+++ b/nixos/tests/home-assistant.nix
@@ -49,6 +49,12 @@ in {
           payload_on = "let_there_be_light";
           payload_off = "off";
         }];
+        wake_on_lan = {};
+        switch = [{
+          platform = "wake_on_lan";
+          mac = "00:11:22:33:44:55";
+          host = "127.0.0.1";
+        }];
         # tests component-based capability assignment (CAP_NET_BIND_SERVICE)
         emulated_hue = {
           host_ip = "127.0.0.1";
@@ -56,6 +62,7 @@ in {
         };
         logger = {
           default = "info";
+          logs."homeassistant.components.wake_on_lan" = "debug";
           logs."homeassistant.components.mqtt" = "debug";
         };
       };
@@ -99,8 +106,13 @@ in {
         print("\n### home-assistant.log ###\n")
         print(output_log + "\n")
 
+    hass.sleep(30)
+
     with subtest("Check that no errors were logged"):
-        assert "ERROR" not in output_log
+        try:
+          assert "ERROR" not in output_log
+        finally:
+          hass.log(hass.succeed("cat /var/lib/foobar/configuration.yaml"))
 
     # example line: 2020-06-20 10:01:32 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on home-assistant/test: b'let_there_be_light'
     with subtest("Check we received the mosquitto message"):
16:29:15
@hexa:lossy.networkhexa
❯ getcap /run/wrappers/bin/ping
/run/wrappers/bin/ping cap_setpcap,cap_net_raw=p
16:32:36

There are no newer messages yet.


Back to Room ListRoom Version: 6