From nobody Mon Mar 24 14:37:42 2025 X-Original-To: desktop@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZLwd22xp7z5s0B4 for ; Mon, 24 Mar 2025 14:37:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZLwd16QSQz3Pw2 for ; Mon, 24 Mar 2025 14:37:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742827061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iSTdb5oXcXF4dmNsk7wzfpXqA8FZww6R4kleaOGUtf4=; b=Jg7RXandP7a4DGCdxdl/h73WwvWCgAtF5DKiQIPxcwfk7t4kEBo/oIiUECeMMPxp7zIBWQ pN9gn7shxLAuFWYwCOoqhiECoAhtZki21mu2mAf7plb7UoOpVZT9wHGwaRe4cpmDJoh74/ Ffek5s0KVdLoupEmyySjlDZh81g6nvoa1q8YLA3r6ffTU6lZUdjFPisjdHrUcDJdeVkhaY 676V2SQAdtJuVOJwOzcax+CcxANU2P9fT/j9nhT4OnLC96BzoW6Qk3duTjETw5lPAdllcc baeGdgrYBlKq1j433NKnzIxLnPHRmidUwy+xCalWPiLfg96T6773BjOszBiJRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1742827061; a=rsa-sha256; cv=none; b=unGdjHetJLSM/c8PTncMQjrOl41zlDo1xizkN3PzdUmaxAq/twLlQvVQfTK6Ndd5Tzw3u8 R31cNH26Eoqc/5zjoQ//82hH8wcIh5Kohtj6MytsAW2WetyuCISCzxHBnCrp+w9KZKYzQs Jkqh78dawsLoI2MlcVPOZwt6CfD1ybo8MtuGAuhManuB/nEzM0Oi1b2Hzo358PLQuNZ1L7 9gHLUjZjaJoYa+K3O+0O4BPTNhJSFy35PiE33Wyx6iZghTLosk4/uluyWQrm5oaXUXdXRl HUGWOjav3hzjo2GoSrWHn+XC0Mnb2SEIF011F9kzQr+9B4dXbOCB4HMXEkfUXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1742827061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iSTdb5oXcXF4dmNsk7wzfpXqA8FZww6R4kleaOGUtf4=; b=XoXlSf3k3rfC88MckgMyHgpZqEiiBfsPer9svGX/NbWM2nKAoxMHHIt0CfadP0tE4juIo4 SIFK2OObp+os3q4vLoqV+ekpqz4VTXKwyPSvEGbD/YadMritwxakDuPupK2JDqgt0K5SB0 nfUsI5gSmalMjbUwJ1KfR78KQ7mKbM8AQdrAn/0r7Z84EbCMPEkUFxuKLuvpkOEO1zW0vs L8z8E5H3Yq7JzxiWU4Gg61FEqOhETfdZwuUeDW2WRQCSQcX1ysP+N/KtHXFNNw2mI9nS+S C0smkzNP9Ac2mGdCUzUibokf6Y+dpxIvAXiKBw8JwXatiTbDjh8eV0fpT7rM0g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZLwd15zMTzxgf for ; Mon, 24 Mar 2025 14:37:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 52OEbfn4037874 for ; Mon, 24 Mar 2025 14:37:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 52OEbfT7037873 for desktop@FreeBSD.org; Mon, 24 Mar 2025 14:37:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: desktop@FreeBSD.org Subject: [Bug 285394] sysutils/consolekit2 seems to use wrong tty Date: Mon, 24 Mar 2025 14:37:42 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: desktop@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Using and improving FreeBSD on the desktop List-Archive: https://lists.freebsd.org/archives/freebsd-desktop List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-desktop@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D285394 --- Comment #19 from Andriy Gapon --- I've got some time for more experiments last weekend and I must admit that = the basic premise of this bug report was false. I assumed that in my environment the console-kit daemon opened /dev/tty for some reason, but the assumption was wrong. console-kit-daemon actually opens /dev/console. And initially it works fine, but then somehow it gets broken. 3304 100948 console-kit-daemon 0.000021448 CALL=20 openat(AT_FDCWD,0x207f70,0x8000) 3304 100948 console-kit-daemon -0.000131032 NAMI "/dev/tty" 3304 100948 console-kit-daemon 0.000059309 RET openat -1 errno 6 Device= not configured 3304 100948 console-kit-daemon 0.000035080 CALL=20 openat(AT_FDCWD,0x207f70,0x8000) 3304 100948 console-kit-daemon 0.000030242 NAMI "/dev/tty" 3304 100948 console-kit-daemon 0.000100756 RET openat -1 errno 6 Device= not configured 3304 100948 console-kit-daemon 0.000129217 CALL=20 openat(AT_FDCWD,0x20cc60,0x8000) 3304 100948 console-kit-daemon 0.000023367 NAMI "/dev/tty0" 3304 100948 console-kit-daemon -0.000070810 RET openat -1 errno 2 No su= ch file or directory 3304 100948 console-kit-daemon -0.000327167 CALL=20 openat(AT_FDCWD,0x20b782,0x8000) 3304 100948 console-kit-daemon -0.000032761 NAMI "/dev/console" 3304 100948 console-kit-daemon 0.000038416 RET openat 12/0xc 3304 100948 console-kit-daemon 0.000070820 CALL=20 ioctl(0xc,CONS_GETVERS,0x8209b2934) 3304 100948 console-kit-daemon 0.000035115 RET ioctl 0 3304 100948 console-kit-daemon -0.000028165 CALL=20 ioctl(0xc,TIOCGETA,0x8209b28e4) 3304 100948 console-kit-daemon 0.000091327 RET ioctl 0 3304 100948 console-kit-daemon 0.000029932 CALL=20 ioctl(0xc,VT_GETACTIVE,0x8209b296c) 3304 100948 console-kit-daemon -0.000070518 RET ioctl 0 But after a while: 3304 101052 vt_thread_start -0.000074544 CALL ioctl(0xc,VT_WAITACTIVE,0x= 9) 3304 101052 vt_thread_start 0.000201533 RET ioctl -1 errno 25 Inappropr= iate ioctl for device Because console-kit-daemon keeps the descriptor open I was able to examine = it and the corresponding vnode with kgdb. $1 =3D {f_flag =3D 1, f_count =3D 9, f_data =3D 0xfffff80002c27400, f_ops = =3D 0xffffffff80f2d4b0 , f_vnode =3D 0xfffff8001e2ac8c0, f_cred =3D 0xfffff80298ee6100, f_type =3D 1, f_vnread_flags =3D 0, {f_seqcount =3D {0,= 0}, f_pipegen =3D 0}, f_nextoff =3D {0, 0}, f_vnun =3D {fvn_cdevpriv =3D 0x0, f= vn_advice =3D 0x0}, f_offset =3D 0} $2 =3D {v_type =3D VBAD, v_state =3D VSTATE_DEAD, v_irflag =3D 1, v_seqc = =3D 1, v_nchash =3D 1355928945, v_hash =3D 1977032, v_op =3D 0xffffffff8127a5c8 , v_data =3D 0x0, v_mount =3D 0x0, v_nmntvnodes =3D {tqe_next =3D 0xfffff8001= cd03e00, tqe_prev =3D 0xfffff8001ce2c028}, {v_mountedhere =3D 0x0, v_unpcb =3D 0x0, = v_rdev =3D 0x0, v_fifoinfo =3D 0x0}, v_hashlist =3D {le_next =3D 0x0, le_prev =3D 0x0}, v_cache_src =3D {lh_first =3D 0x0}, v_cache_dst =3D {tqh_first =3D 0x0, tqh= _last =3D 0xfffff8001e2ac918}, v_cache_dd =3D 0x0, v_lock =3D {lock_object =3D {lo_na= me =3D 0xffffffff80d1cf3c "devfs", lo_flags =3D 116588544, lo_data =3D 0, lo_witne= ss =3D 0x0}, lk_lock =3D 1, lk_exslpfail =3D 0, lk_pri =3D 64, lk_timo =3D 51}, v_= interlock =3D {lock_object =3D {lo_name =3D 0xffffffff80db24c1 "vnode interlock", lo_flag= s =3D 16973824, lo_data =3D 0, lo_witness =3D 0x0}, mtx_lock =3D 0}, v_vnlock =3D 0xfffff8001e2ac930, v_vnodelist =3D {tqe_next =3D 0xfffff8001e494e00, tqe_p= rev =3D 0xfffff8001e33e0c0}, v_lazylist =3D {tqe_next =3D 0x0, tqe_prev =3D 0x0}, v= _bufobj =3D {bo_lock =3D {lock_object =3D {lo_name =3D 0xffffffff80df4394 "bufobj inter= lock", lo_flags =3D 86179840, lo_data =3D 0, lo_witness =3D 0x0}, rw_lock =3D 1}, = bo_ops =3D 0xffffffff812b7190 , bo_object =3D 0x0, bo_synclist =3D {le_ne= xt =3D 0x0, le_prev =3D 0x0}, bo_private =3D 0xfffff8001e2ac8c0, bo_clean =3D {bv_= hd =3D {tqh_first =3D 0x0, tqh_last =3D 0xfffff8001e2ac9e8}, bv_root =3D {pt_root = =3D 0x1}, bv_cnt =3D 0}, bo_dirty =3D {bv_hd =3D {tqh_first =3D 0x0, tqh_last =3D 0xfffff8001e2aca08}, bv_root =3D {pt_root =3D 0x1}, bv_cnt =3D 0}, bo_numou= tput =3D 0, bo_flag =3D 4, bo_domain =3D 2, bo_bsize =3D 512}, v_pollinfo =3D 0x0, v_la= bel =3D 0x0, v_lockf =3D 0x0, v_rl =3D {rl_waiters =3D {tqh_first =3D 0x0, tqh_last =3D 0xfffff8001e2aca50}, rl_currdep =3D 0x0}, v_holdcnt =3D 1, v_usecount =3D 2= , v_iflag =3D 0, v_vflag =3D 10, v_mflag =3D 0, v_dbatchcpu =3D -1, v_writecount =3D = 1, v_seqc_users =3D 1} The descriptor is open, the (devfs) vnode is in use, but it has been "recyc= led" and is no longer usable. It's hard for me to imagine what caused that. Perhaps, a revoke(2) system call -- but why would anything call it? -- or m= aybe some sort of devfs "re-mount". Anyways, since console-kit already uses /dev/console, my patch is most like= ly moot. There is something stranger going on. Maybe something specific to my environment. --=20 You are receiving this mail because: You are the assignee for the bug.=