Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1725008ybv; Sat, 8 Feb 2020 04:38:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwiYRq/PfzJU3ROkGkaHaP9vyKEOLYn3xEMIKUdJaIGubG6LN21ctBom6E5wLYmxffNo8cr X-Received: by 2002:a9d:ec7:: with SMTP id 65mr3336138otj.309.1581165531140; Sat, 08 Feb 2020 04:38:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581165531; cv=none; d=google.com; s=arc-20160816; b=VG60RYXhaQZVFmpxiQz++SFRvZhC0jjiBZX6aElW62cd4RqrkFIEotv8fq562E/ZgC 4h1Prx6OTaEajFE+jrN6G6g3soi7Sh5myTwPSG8mlIrGZizmc4SQ1S7d99XrR4wo0Z0L 9q/1TVtBEoY/8ayb5EYxNF9OShLr0BLG0vmeH+JdzfNza5WjxL7eMpt5uZRJTCY//NWw bXX85clpzjLbqIV7nqTRqckMBqYXcobT1SSXPJ/6mve0BWDosnHouYglH3gr5Ot/wJyL l40aES45Gwfx+OJPKwqv9qX+0rWmY8N/Hr6vZ474MBuuDoAcuDtN/ZcG+uL5AY4v2/ly xEYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=A5HiHER7sAHZNZ0uVdgIFAYOkMYI+OmIZAe2ruTFaQQ=; b=BsIldGLfombibiv2AsONODT+n+MShI78/W+i8oKp5RebcPcDLnY6M8wV1dE75mKasc +kda8lc8UH4V2I2lJ9DepUgNk2aBfeOIKuwSLy8rcdD2XI39MaGBwWHAniL3XMRJDD1O lNhGqM2B2lBYaoCXhD5Zbb6SAUdRjspPJFEWEGoXhnXtOwC+EklIBSer6jY5edXz2Cdr Y1kt8UPykjz+9H61wbSg79SjMAcwgrPT6KJLT/ewe7mk+lsi7D7BBh88l96NSKx+B42M G1J2K7aiX82zAkt+0vna+1BKG28aoYQGjUL4ZMgztbLEcG4xqA9SAfItdyO89UFSWW3U lm2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=RJe6RTnI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z22si1402639otq.94.2020.02.08.04.38.14; Sat, 08 Feb 2020 04:38:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=RJe6RTnI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727379AbgBHMgr (ORCPT + 99 others); Sat, 8 Feb 2020 07:36:47 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:38003 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727118AbgBHMgq (ORCPT ); Sat, 8 Feb 2020 07:36:46 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48FBVx05h8z9sPJ; Sat, 8 Feb 2020 23:36:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1581165403; bh=TIsBMikK22tP+iVnpNdBWnTezaZnCH4QX2IsCZvPKH0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RJe6RTnIjucqdrkV1R47EoAVUruFQ21tuPJZRji3dj8PHMoMeJiDFBH0WcpE8OUbv wpxfqHmP9Qs1/IiKuxPCsx1YBPpZqRbXqhf6QRPj+YAkH9ema/+g9Er8KctHpzCEyY f6Md2+myTJ+qW6Z1mSKpjdBC0zGiAwTmcznmdNbMYECjAsN046hiVhJqXQ/WF24sgQ LSZX0tqiMWziqXP2NqBYLSDWl1iLv2W9qhHcynY7KxySG9dRjatXwJvBLJ/m8dg5Dg khxlrwC15v3zsNVTHLkC2MFi7tkjVcEkUM4y5V5GR/7bzpA5BvdqRvcEc85KgRLZif mZk9CrM9j07sA== From: Michael Ellerman To: Christian Zigotzky , Jakub Kicinski Cc: Christophe Leroy , DTML , Darren Stevens , Linux Kernel Mailing List , linuxppc-dev@ozlabs.org, "contact\@a-eon.com" , "R.T.Dickinson" , Christoph Hellwig , mad skateman , "netdev\@vger.kernel.org" Subject: Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device In-Reply-To: References: <20200203095325.24c3ab1c@cakuba.hsd1.ca.comcast.net> <87tv441gg1.fsf@mpe.ellerman.id.au> Date: Sat, 08 Feb 2020 23:36:34 +1100 Message-ID: <87imkh1cj1.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christian Zigotzky writes: > On 06 February 2020 at 05:35 am, Michael Ellerman wrote: >> Christian Zigotzky writes: >>> Kernel 5.5 PowerPC is also affected. >> I don't know what you mean by that. What sha are you talking about? >> >> I have a system with avahi running and everything's fine. >> >> # grep use- /etc/avahi/avahi-daemon.conf >> use-ipv4=3Dyes >> use-ipv6=3Dyes >>=20=20=20=20 >> # systemctl status -l --no-pager avahi-daemon >> =E2=97=8F avahi-daemon.service - Avahi mDNS/DNS-SD Stack >> Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled;= vendor preset: enabled) >> Active: active (running) since Thu 2020-02-06 14:55:34 AEDT; 38min= ago >> Main PID: 1884 (avahi-daemon) >> Status: "avahi-daemon 0.7 starting up." >> CGroup: /system.slice/avahi-daemon.service >> =E2=94=9C=E2=94=801884 avahi-daemon: running [mpe-ubuntu-l= e.local] >> =E2=94=94=E2=94=801888 avahi-daemon: chroot helper >>=20=20=20=20 >> Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new add= ress record for fe80::5054:ff:fe66:2a19 on eth0.*. >> Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new add= ress record for 10.61.141.81 on eth0.IPv4. >> Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new add= ress record for ::1 on lo.*. >> Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new add= ress record for 127.0.0.1 on lo.IPv4. >> Feb 06 14:55:34 mpe-ubuntu-le systemd[1]: Started Avahi mDNS/DNS-SD S= tack. >> Feb 06 14:55:35 mpe-ubuntu-le avahi-daemon[1884]: Server startup comp= lete. Host name is mpe-ubuntu-le.local. Local service cookie is 3972418141. >> Feb 06 14:55:38 mpe-ubuntu-le avahi-daemon[1884]: Leaving mDNS multic= ast group on interface eth0.IPv6 with address fe80::5054:ff:fe66:2a19. >> Feb 06 14:55:38 mpe-ubuntu-le avahi-daemon[1884]: Joining mDNS multic= ast group on interface eth0.IPv6 with address fd69:d75f:b8b5:61:5054:ff:fe6= 6:2a19. >> Feb 06 14:55:38 mpe-ubuntu-le avahi-daemon[1884]: Registering new add= ress record for fd69:d75f:b8b5:61:5054:ff:fe66:2a19 on eth0.*. >> Feb 06 14:55:38 mpe-ubuntu-le avahi-daemon[1884]: Withdrawing address= record for fe80::5054:ff:fe66:2a19 on eth0. >>=20=20=20=20 >> # uname -r >> 5.5.0-gcc-8.2.0 >> >> >> The key question is what ioctl is it complaining about. You should be >> able to find that via strace. >> >> cheers >> > Hello Michael, > > Sorry it isn't true that the kernel 5.5 is also affected. A Power Mac G5= =20 > user told me that but this isn't correct. I compiled and tested the=20 > stable kernel 5.5.1 and 5.5.2 today and both kernels don't have the=20 > issue with the avahi daemon. OK good to know. > Could you please also test the latest Git kernel? That's literally all I ever do. The problem here is you didn't tell me you were running a big endian distro, which uses compat mode. In hindsight I should have thought of that. Now that I know that, I can reproduce the bug: Feb 08 23:31:12 mpe-ubuntu-be avahi-daemon[24819]: ioctl(): Inappropriate= ioctl for device Feb 08 23:31:12 mpe-ubuntu-be avahi-daemon[24819]: ioctl(): Inappropriate= ioctl for device Feb 08 23:31:12 mpe-ubuntu-be avahi-daemon[24819]: ioctl(): Inappropriate= ioctl for device Feb 08 23:31:12 mpe-ubuntu-be avahi-daemon[24819]: ioctl(): Inappropriate= ioctl for device But it seems you've already identified the problem commit, thanks for bisecting. I'm sure Arnd will be able to fix it now that you've identified the problematic commit. cheers > strace /usr/sbin/avahi-daemon > > ... > poll([{fd=3D4, events=3DPOLLIN}, {fd=3D16, events=3DPOLLIN}, {fd=3D15,=20 > events=3DPOLLIN}, {fd=3D14, events=3DPOLLIN}, {fd=3D13, events=3DPOLLIN},= {fd=3D12,=20 > events=3DPOLLIN}, {fd=3D11, events=3DPOLLIN}, {fd=3D10, events=3DPOLLIN},= {fd=3D9,=20 > events=3DPOLLIN}, {fd=3D8, events=3DPOLLIN}, {fd=3D6, events=3DPOLLIN}], = 11, 65) =3D=20 > 2 ([{fd=3D12, revents=3DPOLLIN}, {fd=3D9, revents=3DPOLLIN}]) > ioctl(12, FIONREAD, 0xffba6f24)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =3D -1 ENOTTY (Inappropriate ioctl=20 > for device) > write(2, "ioctl(): Inappropriate ioctl for"..., 39ioctl(): Inappropriate= =20 > ioctl for device) =3D 39 > write(2, "\n", 1 > )=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 1 > ... > > Thanks, > Christian