FS#49816 - [dkms] /usr/bin/dkms: line ****: echo: write error: Broken pipe
Attached to Project:
Arch Linux
Opened by Carlos jimenez (ozmage) - Thursday, 23 June 2016, 08:27 GMT
Last edited by Sébastien Luttringer (seblu) - Friday, 19 August 2016, 00:47 GMT
Opened by Carlos jimenez (ozmage) - Thursday, 23 June 2016, 08:27 GMT
Last edited by Sébastien Luttringer (seblu) - Friday, 19 August 2016, 00:47 GMT
|
Details
Description:
Additional info: * package version(s) * config and/or log files etc. dkms-2.2.0.3+git151023-11-any.pkg.tar.xz Steps to reproduce: Upgrade Any kernel Version. This dont Happend with version dkms-2.2.0.3+git151023-10 |
This task depends upon
==> dkms remove -m vboxhost -v 5.0.22_OSE -k 4.6.2-1-ARCH
/usr/bin/dkms: line 1972: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1974: echo: write error: Broken pipe
/usr/bin/dkms: line 1972: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1974: echo: write error: Broken pipe
/usr/bin/dkms: line 1972: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1974: echo: write error: Broken pipe
/usr/bin/dkms: line 1972: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1916: echo: write error: Broken pipe
/usr/bin/dkms: line 1974: echo: write error: Broken pipe
I assume as its just trying to echo something it is 'harmless' ?
FS#49816to let users get feedback from dkms builds.Only virtualbox-*-dkms seems produce these noisy outputs. I don't know yet if the problem is in dkms or in the virtualbox.
Apparently it is not possible (in bash) to trap (or reset) a signal that was ignored when the shell was launched ("Signals ignored upon entry to the shell cannot be trapped or reset."), so there's not much we can do in the dkms hook. It also seems logical that libalpm runs hooks with SIGPIPE ignored, as a hook could close its pipe side while still having work to do.
I see 3 options:
1. As a workaround, do not ignore SIGPIPE in libalpm, and instead install a handler that does nothing. Not beautiful, but with that we can restore the default handler in the dkms hook.
2. Use some kind of (C?) wrapper to launch dkms from the hook, restoring SIGPIPE to default. Quite heavy, I guess.
3. Make dkms handle SIGPIPE being ignored properly. Probably not trivial.
Option 1 sounds like the most doable.
Anyway, I wasn't sure how easy it would be to reset the signal handler in Perl, but being that easy I find your oneliner to be quite a reasonable workaround (I don't think rewriting the whole script is reasonable just because of signal handling). I think we should use it until a more proper fix can be made.
following what Andrew wrote I created "/etc/pacman.d/hooks/70-dkms-remove.hook" (the directory was not existing, so I created it) copied over all the contents from "/usr/share/libalpm/hooks/70-dkms-remove.hook" and adjusted the 'Exec' entry Andrew pointed out.
The error went away. Did I forgot anything? Is this really everything that needs to be changed? I googled and found somehting about "HookDir" in "pacman.conf", but I think it is set by default to the path above? So there is no need to activate it specifically, correct? It may be a stupid question, but i am rather new to Linux, thats why I am asking.
Greets
@Sébastien: thanks!