Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-08 Thread Christian Zigotzky

On 08 February 2020 at 07:59 am, Christian Zigotzky wrote:



On 7. Feb 2020, at 18:08, Arnd Bergmann  wrote:

On Fri, Feb 7, 2020 at 3:34 PM Christian Zigotzky
 wrote:

Hello Arnd,

We regularly compile and test Linux kernels every day during the merge
window. Since Thursday last week we have very high CPU usage because of
the avahi daemon on our desktop Linux systems (Ubuntu, Debian etc). The
avahi daemon produces a lot of the following log message. This generates
high CPU usage.

Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

strace /usr/sbin/avahi-daemon:


Thanks a lot for the detailed analysis, with this I immediately saw
what went wrong in my
original commit and I sent you a fix. Please test to ensure that this
correctly addresses
the problem.

Arnd

Hi Arnd,

Thanks a lot for your patch! I will test it as soon as possible.

Cheers,
Christian


Hi Arnd,

I successfully compiled the latest Git kernel with your patch today. The 
avahi daemon works fine now. That means your patch has solved the avahi 
issue.


Thanks for your patch and have a nice weekend!

Cheers,
Christian


Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-08 Thread Michael Ellerman
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=yes
>>use-ipv6=yes
>>
>># systemctl status -l --no-pager avahi-daemon
>>● 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
>>   ├─1884 avahi-daemon: running [mpe-ubuntu-le.local]
>>   └─1888 avahi-daemon: chroot helper
>>
>>Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
>> record for fe80::5054:ff:fe66:2a19 on eth0.*.
>>Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
>> record for 10.61.141.81 on eth0.IPv4.
>>Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
>> record for ::1 on lo.*.
>>Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
>> record for 127.0.0.1 on lo.IPv4.
>>Feb 06 14:55:34 mpe-ubuntu-le systemd[1]: Started Avahi mDNS/DNS-SD Stack.
>>Feb 06 14:55:35 mpe-ubuntu-le avahi-daemon[1884]: Server startup 
>> complete. 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 multicast 
>> 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 multicast 
>> group on interface eth0.IPv6 with address 
>> fd69:d75f:b8b5:61:5054:ff:fe66:2a19.
>>Feb 06 14:55:38 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
>> 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.
>>
>># 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 
> user told me that but this isn't correct. I compiled and tested the 
> stable kernel 5.5.1 and 5.5.2 today and both kernels don't have the 
> 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=4, events=POLLIN}, {fd=16, events=POLLIN}, {fd=15, 
> events=POLLIN}, {fd=14, events=POLLIN}, {fd=13, events=POLLIN}, {fd=12, 
> events=POLLIN}, {fd=11, events=POLLIN}, {fd=10, events=POLLIN}, {fd=9, 
> events=POLLIN}, {fd=8, events=POLLIN}, {fd=6, events=POLLIN}], 11, 65) = 
> 2 ([{fd=12, revents=POLLIN}, {fd=9, revents=POLLIN}])
> ioctl(12, FIONREAD, 0xffba6f24) = -1 ENOTTY (Inappropriate ioctl 
> for device)
> write(2, "ioctl(): Inappropriate ioctl for"..., 39ioctl(): Inappropriate 
> ioctl for device) = 39
> write(2, "\n", 1
> )   = 1
> ...
>
> Thanks,
> Christian


Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-07 Thread Christian Zigotzky



> On 7. Feb 2020, at 18:08, Arnd Bergmann  wrote:
> 
> On Fri, Feb 7, 2020 at 3:34 PM Christian Zigotzky
>  wrote:
>> 
>> Hello Arnd,
>> 
>> We regularly compile and test Linux kernels every day during the merge
>> window. Since Thursday last week we have very high CPU usage because of
>> the avahi daemon on our desktop Linux systems (Ubuntu, Debian etc). The
>> avahi daemon produces a lot of the following log message. This generates
>> high CPU usage.
>> 
>> Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device
>> 
>> strace /usr/sbin/avahi-daemon:
>> 
> 
> Thanks a lot for the detailed analysis, with this I immediately saw
> what went wrong in my
> original commit and I sent you a fix. Please test to ensure that this
> correctly addresses
> the problem.
> 
>Arnd

Hi Arnd,

Thanks a lot for your patch! I will test it as soon as possible.

Cheers,
Christian

Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-07 Thread Arnd Bergmann
On Fri, Feb 7, 2020 at 3:34 PM Christian Zigotzky
 wrote:
>
> Hello Arnd,
>
> We regularly compile and test Linux kernels every day during the merge
> window. Since Thursday last week we have very high CPU usage because of
> the avahi daemon on our desktop Linux systems (Ubuntu, Debian etc). The
> avahi daemon produces a lot of the following log message. This generates
> high CPU usage.
>
> Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device
>
> strace /usr/sbin/avahi-daemon:
>

Thanks a lot for the detailed analysis, with this I immediately saw
what went wrong in my
original commit and I sent you a fix. Please test to ensure that this
correctly addresses
the problem.

Arnd


Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-06 Thread Christian Zigotzky

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=yes
   use-ipv6=yes
   
   # systemctl status -l --no-pager avahi-daemon

   ● 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
  ├─1884 avahi-daemon: running [mpe-ubuntu-le.local]
  └─1888 avahi-daemon: chroot helper
   
   Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address record for fe80::5054:ff:fe66:2a19 on eth0.*.

   Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
record for 10.61.141.81 on eth0.IPv4.
   Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
record for ::1 on lo.*.
   Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
record for 127.0.0.1 on lo.IPv4.
   Feb 06 14:55:34 mpe-ubuntu-le systemd[1]: Started Avahi mDNS/DNS-SD Stack.
   Feb 06 14:55:35 mpe-ubuntu-le avahi-daemon[1884]: Server startup complete. 
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 multicast 
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 multicast 
group on interface eth0.IPv6 with address fd69:d75f:b8b5:61:5054:ff:fe66:2a19.
   Feb 06 14:55:38 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
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.
   
   # 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 
user told me that but this isn't correct. I compiled and tested the 
stable kernel 5.5.1 and 5.5.2 today and both kernels don't have the 
issue with the avahi daemon.

Could you please also test the latest Git kernel?

strace /usr/sbin/avahi-daemon

...
poll([{fd=4, events=POLLIN}, {fd=16, events=POLLIN}, {fd=15, 
events=POLLIN}, {fd=14, events=POLLIN}, {fd=13, events=POLLIN}, {fd=12, 
events=POLLIN}, {fd=11, events=POLLIN}, {fd=10, events=POLLIN}, {fd=9, 
events=POLLIN}, {fd=8, events=POLLIN}, {fd=6, events=POLLIN}], 11, 65) = 
2 ([{fd=12, revents=POLLIN}, {fd=9, revents=POLLIN}])
ioctl(12, FIONREAD, 0xffba6f24) = -1 ENOTTY (Inappropriate ioctl 
for device)
write(2, "ioctl(): Inappropriate ioctl for"..., 39ioctl(): Inappropriate 
ioctl for device) = 39

write(2, "\n", 1
)   = 1
...

Thanks,
Christian


Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-05 Thread Michael Ellerman
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=yes
  use-ipv6=yes
  
  # systemctl status -l --no-pager avahi-daemon
  ● 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
 ├─1884 avahi-daemon: running [mpe-ubuntu-le.local]
 └─1888 avahi-daemon: chroot helper
  
  Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
record for fe80::5054:ff:fe66:2a19 on eth0.*.
  Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
record for 10.61.141.81 on eth0.IPv4.
  Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
record for ::1 on lo.*.
  Feb 06 14:55:34 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
record for 127.0.0.1 on lo.IPv4.
  Feb 06 14:55:34 mpe-ubuntu-le systemd[1]: Started Avahi mDNS/DNS-SD Stack.
  Feb 06 14:55:35 mpe-ubuntu-le avahi-daemon[1884]: Server startup complete. 
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 multicast 
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 multicast 
group on interface eth0.IPv6 with address fd69:d75f:b8b5:61:5054:ff:fe66:2a19.
  Feb 06 14:55:38 mpe-ubuntu-le avahi-daemon[1884]: Registering new address 
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.
  
  # 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

> Christian Zigotzky wrote:
>
> Hi All,
>
> The issue with the avahi-daemon still exist in the latest Git kernel. It's a 
> PowerPC issue. I compiled the latest Git kernel on a PC today and there 
> aren't any issues with the avahi daemon. Another Power Mac user reported the 
> same issue on his G5. I tested with the AmigaOne X1000 and X5000 in the last 
> days.
>
> I bisected today but I think the result isn't correct because it found the 
> other problem with ordering of PCSCSI definition in esp_rev enum. I don't 
> know how to bisect if there is another issue at the same time. Maybe "git 
> bisect skip"?
>
> 2086faae3c55a652cfbd369e18ecdb703aacc493 is the first bad commit
> commit 2086faae3c55a652cfbd369e18ecdb703aacc493
> Author: Kars de Jong 
> Date:   Tue Nov 19 21:20:20 2019 +0100
>
> scsi: esp_scsi: Correct ordering of PCSCSI definition in esp_rev enum
>
> The order of the definitions in the esp_rev enum is important. The values
> are used in comparisons for chip features.
>
> Add a comment to the enum explaining this.
>
> Also, the actual values for the enum fields are irrelevant, so remove the
> explicit values (suggested by Geert Uytterhoeven). This makes adding a new
> field in the middle of the enum easier.
>
> Finally, move the PCSCSI definition to the right place in the enum. In its
> previous location, at the end of the enum, the wrong values are written to
> the CONFIG3 register when used with FAST-SCSI targets.
>
> Link: 
> https://lore.kernel.org/r/20191119202021.28720-2-jo...@linux-m68k.org
> Signed-off-by: Kars de Jong 
> Signed-off-by: Martin K. Petersen 
>
> :04 04 cdc128596e33fb60406b5de9b17b79623c187c1a 
> 48ceab06439f95285e8b30181e75f9a68c25fcb5 Mdrivers


Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-05 Thread Christian Zigotzky
Kernel 5.5 PowerPC is also affected.

— Christian

Christian Zigotzky wrote:

Hi All,

The issue with the avahi-daemon still exist in the latest Git kernel. It's a 
PowerPC issue. I compiled the latest Git kernel on a PC today and there aren't 
any issues with the avahi daemon. Another Power Mac user reported the same 
issue on his G5. I tested with the AmigaOne X1000 and X5000 in the last days.

I bisected today but I think the result isn't correct because it found the 
other problem with ordering of PCSCSI definition in esp_rev enum. I don't know 
how to bisect if there is another issue at the same time. Maybe "git bisect 
skip"?

2086faae3c55a652cfbd369e18ecdb703aacc493 is the first bad commit
commit 2086faae3c55a652cfbd369e18ecdb703aacc493
Author: Kars de Jong 
Date:   Tue Nov 19 21:20:20 2019 +0100

scsi: esp_scsi: Correct ordering of PCSCSI definition in esp_rev enum

The order of the definitions in the esp_rev enum is important. The values
are used in comparisons for chip features.

Add a comment to the enum explaining this.

Also, the actual values for the enum fields are irrelevant, so remove the
explicit values (suggested by Geert Uytterhoeven). This makes adding a new
field in the middle of the enum easier.

Finally, move the PCSCSI definition to the right place in the enum. In its
previous location, at the end of the enum, the wrong values are written to
the CONFIG3 register when used with FAST-SCSI targets.

Link: https://lore.kernel.org/r/20191119202021.28720-2-jo...@linux-m68k.org
Signed-off-by: Kars de Jong 
Signed-off-by: Martin K. Petersen 

:04 04 cdc128596e33fb60406b5de9b17b79623c187c1a 
48ceab06439f95285e8b30181e75f9a68c25fcb5 Mdrivers

Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-05 Thread Christian Zigotzky

On 03 February 2020 at 6:53 pm, Jakub Kicinski wrote:

On Sun, 2 Feb 2020 16:02:18 +0100, Christian Zigotzky wrote:

On 02 February 2020 at 09:19 am, Christophe Leroy wrote:

Hello,

Le 02/02/2020 à 01:08, Christian Zigotzky a écrit :

Hello,

We regularly compile and test Linux kernels every day during the
merge window. Since Thursday we have very high CPU loads because of
the avahi daemon on our desktop Linux systems (Ubuntu, Debian etc).

Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for
device

Do you know which ioctl, on which device ?
Can you take a trace of running avahi-daemon with 'strace' ?

Can you bisect ?

Christophe

Hi Christophe,
Hi All,

I figured out that the avahi-daemon has a problem with the IPv6 address
of a network interface since the Git kernel from Thursday. (Log attached)
This generates high CPU usage because the avahi-daemon tries to access
the IPv6 address again and again and thereby it produces a lot of log
messages.

We figured out that the networking updates aren't responsible for this
issue because we created a test kernel on Wednesday. The issue is
somewhere in the commits from Wednesday night to Thursday (CET).

FWIW Thursday is when the latest networking pull came in, so could well
be networking related..


Please compile the latest Git kernel and test it with a desktop linux
distribution for example Ubuntu. In my point of view there are many
desktop machines affected. Many server systems don't use the avahi
daemon so they aren't affected.

It's possible to deactivate the access to the IPv6 address with the
following line in the file "/etc/avahi/avahi-daemon.conf":

use-ipv6=no

After a reboot the CPU usage is normal again. This is only a temporary
solution.

Unfortunately I don't have the time for bisecting next week. I have a
lot of other work to do. In my point of view it is very important that
you also compile the latest Git kernels. Then you will see the issue and
then you have a better possibility to fix the issue.

Hi All,

The issue still exist in the latest Git kernel. It's a PowerPC issue. I 
compiled the latest Git kernel on a PC today and there aren't any issues 
with the avahi daemon. Another Power Mac user reported the same issue on 
his G5. I tested with the AmigaOne X1000 and X5000 in the last days.


I bisected today but I think the result isn't correct because it founds 
the other problem with ordering of PCSCSI definition in esp_rev enum. I 
don't know how to bisect if there is another issue at the same time. 
Maybe "git bisect skip"?


2086faae3c55a652cfbd369e18ecdb703aacc493 is the first bad commit
commit 2086faae3c55a652cfbd369e18ecdb703aacc493
Author: Kars de Jong 
Date:   Tue Nov 19 21:20:20 2019 +0100

    scsi: esp_scsi: Correct ordering of PCSCSI definition in esp_rev enum

    The order of the definitions in the esp_rev enum is important. The 
values

    are used in comparisons for chip features.

    Add a comment to the enum explaining this.

    Also, the actual values for the enum fields are irrelevant, so 
remove the
    explicit values (suggested by Geert Uytterhoeven). This makes 
adding a new

    field in the middle of the enum easier.

    Finally, move the PCSCSI definition to the right place in the enum. 
In its
    previous location, at the end of the enum, the wrong values are 
written to

    the CONFIG3 register when used with FAST-SCSI targets.

    Link: 
https://lore.kernel.org/r/20191119202021.28720-2-jo...@linux-m68k.org

    Signed-off-by: Kars de Jong 
    Signed-off-by: Martin K. Petersen 

:04 04 cdc128596e33fb60406b5de9b17b79623c187c1a 
48ceab06439f95285e8b30181e75f9a68c25fcb5 M    drivers


Cheers,
Christian




Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-03 Thread Jakub Kicinski
On Sun, 2 Feb 2020 16:02:18 +0100, Christian Zigotzky wrote:
> On 02 February 2020 at 09:19 am, Christophe Leroy wrote:
> > Hello,
> >
> > Le 02/02/2020 à 01:08, Christian Zigotzky a écrit :  
> >> Hello,
> >>
> >> We regularly compile and test Linux kernels every day during the 
> >> merge window. Since Thuesday we have very high CPU loads because of 
> >> the avahi daemon on our desktop Linux systems (Ubuntu, Debian etc).
> >>
> >> Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for 
> >> device  
> >
> > Do you know which ioctl, on which device ?
> > Can you take a trace of running avahi-daemon with 'strace' ?
> >
> > Can you bisect ?
> >
> > Christophe  
> Hi Christophe,
> Hi All,
> 
> I figured out that the avahi-daemon has a problem with the IPv6 address 
> of a network interface since the Git kernel from Thursday. (Log attached)
> This generates high CPU usage because the avahi-daemon tries to access 
> the IPv6 address again and again and thereby it produces a lot of log 
> messages.
> 
> We figured out that the networking updates aren't responsible for this 
> issue because we created a test kernel on Wednesday. The issue is 
> somewhere in the commits from Wednesday night to Thursday (CET).

FWIW Thursday is when the latest networking pull came in, so could well
be networking related..

> Please compile the latest Git kernel and test it with a desktop linux 
> distribution for example Ubuntu. In my point of view there are many 
> desktop machines affected. Many server systems don't use the avahi 
> daemon so they aren't affected.
> 
> It's possible to deactivate the access to the IPv6 address with the 
> following line in the file "/etc/avahi/avahi-daemon.conf":
> 
> use-ipv6=no
> 
> After a reboot the CPU usage is normal again. This is only a temporary 
> solution.
> 
> Unfortunately I don't have the time for bisecting next week. I have a 
> lot of other work to do. In my point of view it is very important that 
> you also compile the latest Git kernels. Then you will see the issue and 
> then you have a better possibility to fix the issue.


Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-02 Thread Christian Zigotzky

On 02 February 2020 at 09:19 am, Christophe Leroy wrote:

Hello,

Le 02/02/2020 à 01:08, Christian Zigotzky a écrit :

Hello,

We regularly compile and test Linux kernels every day during the 
merge window. Since Thuesday we have very high CPU loads because of 
the avahi daemon on our desktop Linux systems (Ubuntu, Debian etc).


Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for 
device


Do you know which ioctl, on which device ?
Can you take a trace of running avahi-daemon with 'strace' ?

Can you bisect ?

Christophe

Hi Christophe,
Hi All,

I figured out that the avahi-daemon has a problem with the IPv6 address 
of a network interface since the Git kernel from Thursday. (Log attached)
This generates high CPU usage because the avahi-daemon tries to access 
the IPv6 address again and again and thereby it produces a lot of log 
messages.


We figured out that the networking updates aren't responsible for this 
issue because we created a test kernel on Wednesday. The issue is 
somewhere in the commits from Wednesday night to Thursday (CET).


Please compile the latest Git kernel and test it with a desktop linux 
distribution for example Ubuntu. In my point of view there are many 
desktop machines affected. Many server systems don't use the avahi 
daemon so they aren't affected.


It's possible to deactivate the access to the IPv6 address with the 
following line in the file "/etc/avahi/avahi-daemon.conf":


use-ipv6=no

After a reboot the CPU usage is normal again. This is only a temporary 
solution.


Unfortunately I don't have the time for bisecting next week. I have a 
lot of other work to do. In my point of view it is very important that 
you also compile the latest Git kernels. Then you will see the issue and 
then you have a better possibility to fix the issue.


Thanks,
Christian
Kernel 5.5.0: journalctl | grep -i avahi
Feb 02 13:57:05 DC1 systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation 
Socket.
Feb 02 13:57:05 DC1 systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Feb 02 13:57:05 DC1 avahi-daemon[4314]: Found user 'avahi' (UID 112) and group 
'avahi' (GID 122).
Feb 02 13:57:05 DC1 avahi-daemon[4314]: Successfully dropped root privileges.
Feb 02 13:57:05 DC1 avahi-daemon[4314]: avahi-daemon 0.6.32-rc starting up.
Feb 02 13:57:06 DC1 systemd[1]: Started Avahi DNS Configuration Daemon.
Feb 02 13:57:06 DC1 avahi-daemon[4314]: Successfully called chroot().
Feb 02 13:57:06 DC1 avahi-daemon[4314]: Successfully dropped remaining 
capabilities.
Feb 02 13:57:06 DC1 avahi-daemon[4314]: No service file found in 
/etc/avahi/services.
Feb 02 13:57:06 DC1 avahi-daemon[4314]: Network interface enumeration completed.
Feb 02 13:57:06 DC1 avahi-daemon[4314]: Server startup complete. Host name is 
DC1.local. Local service cookie is 3202921551.
Feb 02 13:57:06 DC1 avahi-daemon[4314]: Failed to parse address 'localhost', 
ignoring.
Feb 02 13:57:06 DC1 avahi-dnsconfd[4487]: Successfully connected to Avahi 
daemon.
Feb 02 13:57:06 DC1 systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Feb 02 13:57:07 DC1 root[4749]: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd 
returned non-zero exit status 1
Feb 02 13:57:07 DC1 avahi-daemon[4314]: Joining mDNS multicast group on 
interface enP4096p4s4.IPv4 with address 192.168.178.47.
Feb 02 13:57:07 DC1 avahi-daemon[4314]: New relevant interface enP4096p4s4.IPv4 
for mDNS.
Feb 02 13:57:07 DC1 avahi-daemon[4314]: Registering new address record for 
192.168.178.47 on enP4096p4s4.IPv4.
Feb 02 13:57:09 DC1 avahi-daemon[4314]: Joining mDNS multicast group on 
interface enP4096p4s4.IPv6 with address fe80::250:fcff:fecb:5181.
Feb 02 13:57:09 DC1 avahi-daemon[4314]: New relevant interface enP4096p4s4.IPv6 
for mDNS.
Feb 02 13:57:09 DC1 avahi-daemon[4314]: Registering new address record for 
fe80::250:fcff:fecb:5181 on enP4096p4s4.*.
Feb 02 13:57:10 DC1 avahi-daemon[4314]: Leaving mDNS multicast group on 
interface enP4096p4s4.IPv6 with address fe80::250:fcff:fecb:5181.
Feb 02 13:57:10 DC1 avahi-daemon[4314]: Joining mDNS multicast group on 
interface enP4096p4s4.IPv6 with address 2a02:8109:89c0:ebfc:250:fcff:fecb:5181.
Feb 02 13:57:10 DC1 avahi-daemon[4314]: Registering new address record for 
2a02:8109:89c0:ebfc:250:fcff:fecb:5181 on enP4096p4s4.*.
Feb 02 13:57:10 DC1 avahi-daemon[4314]: Withdrawing address record for 
fe80::250:fcff:fecb:5181 on enP4096p4s4.


--


Latest Git kernel (5.6): journalctl | grep -i avahi

Feb 02 14:04:04 DC1 systemd[1]: Listening on Avahi mDNS/DNS-SD Stack Activation 
Socket.
Feb 02 14:04:05 DC1 systemd[1]: Started Avahi DNS Configuration Daemon.
Feb 02 14:04:05 DC1 systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Feb 02 14:04:05 DC1 avahi-daemon[4573]: Found user 'avahi' (UID 112) and group 
'avahi' (GID 122).
Feb 02 14:04:05 DC1 avahi-daemon[4573]: Successfully dropped root privileges.
Feb 02 14:04:05 DC1 avahi-daemon[4573]: avahi-daemon 0.6.32-rc starting up.
Feb 02 14:04:05 DC1 avahi-daemon[4573]: Successfully called chroot().
Feb 

Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-02 Thread Christophe Leroy

Hello,

Le 02/02/2020 à 01:08, Christian Zigotzky a écrit :

Hello,

We regularly compile and test Linux kernels every day during the merge 
window. Since Thuesday we have very high CPU loads because of the avahi 
daemon on our desktop Linux systems (Ubuntu, Debian etc).


Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device


Do you know which ioctl, on which device ?
Can you take a trace of running avahi-daemon with 'strace' ?

Can you bisect ?

Christophe


Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-01 Thread Randy Dunlap
[might be network related, so adding netdev mailing list]

On 2/1/20 4:08 PM, Christian Zigotzky wrote:
> Hello,
> 
> We regularly compile and test Linux kernels every day during the merge 
> window. Since Thuesday we have very high CPU loads because of the avahi 
> daemon on our desktop Linux systems (Ubuntu, Debian etc).
> 
> Error message: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device
> 
> Could you please test the latest Git kernel?
> 
> It is possible to deactivate the avahi daemon with the following lines in the 
> file "/etc/avahi/avahi-daemon.conf":
> 
> use-ipv4=no
> use-ipv6=no
> 
> But this is only a temporary solution.
> 
> Thanks,
> Christian


-- 
~Randy