Comment # 8 on bug 1167079 from
(In reply to Franck Bui from comment #7)
> So did you try to downgrade the kernel used by the client ?

Not yet :/.

> Can you interpret the "POLLHUP" event returned by the kernel and see in
> which condition the kernel returns this event rather than "POLLIN" ?
> 
> This value was not expected by systemd hence the failure.

Looking into the systemd code, perhaps I am missing something really obvious,
or the code is completely broken :).

automount_enter_waiting creates a pipe and then closes the write end:
        if (pipe2(p, O_CLOEXEC) < 0) { 
...
        p[1] = safe_close(p[1]);

Then, it uses the read end for polling:
        r = sd_event_add_io(UNIT(a)->manager->event, &a->pipe_event_source,
p[0], EPOLLIN, automount_dispatch_io, a);

If I am not mistaken, this is exactly the problem as automount_dispatch_io
checks revents and prints the error if it is not POLLIN:
  log_unit_error(UNIT(a), "Got invalid poll event %"PRIu32" on pipe (fd=%d)",
events, fd);

Obviously, one cannot poll read end of the pipe and expect to receive POLLIN in
this situation. POLLHUP is what it obviously and correctly gets.

I am not sure what changed recently so that this started happenning.

No matter what, the code looks broken to me.


You are receiving this mail because: