FS#55587 - [cjdns] Startup fails with "Failed to write to pipe"

Attached to Project: Community Packages
Opened by PoroCYon (PoroCYon) - Monday, 11 September 2017, 13:58 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Thursday, 05 October 2017, 09:38 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Levente Polyak (anthraxx)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
When launching cjdns, it fails with "INFO Pipe.c:78 Failed to write to pipe [/var/run/cjdns_pipe_client-core-zfr3bf3m5mdm1tdc7mg1cn7qz3nw1j] [invalid argument]". This also occurs when tests are ran, which happens automatically after compilation.

This issue seems to be glibc-related, as it started happening after an upgrade to glibc 2.26, and 'drathir' on IRC (EFnet) has experienced the same thing. (If it is a glibc bug, sorry for filing it here.)

Additional info:
* package version(s): 20-1 *and* latest git commit
* config and/or log files etc.: see attachment for a full log of the test run. The error happens at line 7655.

Steps to reproduce:
1. Install cjdns (or clone the upstream version from https://github.com/cjdelisle/cjdns)
2. Run `cjdroute`, or build and test it using `./do`.
   buildlog (674.2 KiB)
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Thursday, 05 October 2017, 09:38 GMT
Reason for closing:  Fixed
Additional comments about closing:  cjdns 20-2
Comment by PoroCYon (PoroCYon) - Monday, 11 September 2017, 16:01 GMT
This was apparently a bug in the out-of-date fork of libuv used by cjdns. Sorry for filing it here, it was only happening on our Arch systems because Arch probably upgraded to glibc 2.26 quite early.

The bug in question was caused by sysconf(3) returning -1 without setting errno (seems to be new behavior AFAIK), which made a writev(3) call fail in the libuv fork (upstream libuv handles this, but incorrectly), causing CJDNS to fail to create a pipe, making it unable to launch. See https://github.com/cjdelisle/cjdns/pull/1107 and https://github.com/libuv/libuv/pull/1539 .

Again, sorry for causing noise.
Comment by whoami (atommixz) - Tuesday, 12 September 2017, 23:34 GMT
same for me. glibc from testing not work for me.

this downgrade work for me:
$ pacaur -S downgrade
$ downgrade glibc binutils

check
glibc-2.25-7
binutils-2.28.0-4

add to /etc/pacman.conf
IgnorePkg = glibc binutils

reboot
Comment by PoroCYon (PoroCYon) - Saturday, 16 September 2017, 14:28 GMT
If this bug will not be closed, I suggest publishing a new release with my patch ( https://patch-diff.githubusercontent.com/raw/cjdelisle/cjdns/pull/1107.patch ) until the problem is resolved, either at glibc or upstream CJDNS.
Comment by Bartłomiej Piotrowski (Barthalion) - Thursday, 05 October 2017, 09:37 GMT
Sorry, this somehow slipped my radar and then I was away. Pushed patched packages to [community], thanks PoroCYon for fixing it.

Loading...