Ruben Laguna’s blog

Cvs [Xxxxx]: Received Broken Pipe Signal

Today I received this error message when issuing a cvs import to the cvs repository

cvs [import failed]: received broken pipe signal

after googling a little bit I found this mail thread that led me to the following entry in the cvs manual about loginfo:

Note that the filter program must read all of the log information or CVS may fail with a broken pipe signal.

so I took a look to the CVSROOT/loginfo and the line there was

ALL /usr/local/viewvc-1.0.0/bin/loginfo-handler %{sVv}

so I figured out that loginfo-handler from viewvc must be causing the problem. I went to the viewvc repository and find out the following comment on Revision 1518 of loginfo-handler:

* bin/loginfo-handler
Add some more debugging, and consume stdin so CVS’s pipe doesn’t
back up (which causes an abort()).

I downloaded the latest version of loginfo-handler and tried to use it instead of the old one but I doesn’t work. You must upgrade to latest version of viewvc. So I tried another solution I modified a little bit the 1.0.0 loginfo-handler

1
2
3
4
5
6
7
8
9
10
11
12
13

1
2
3
4
5
6
7
8
9
10
11
12
13
<span class='line'>*** loginfo-handler     2007-03-29 18:26:18.000000000 +0200
</span><span class='line'>--- loginfo-handler-patched     2007-03-29 18:25:49.000000000 +0200
</span><span class='line'>***************
</span><span class='line'>*** 266,271 ****
</span><span class='line'>--- 266,274 ----
</span><span class='line'>      if len(sys.argv) > 3:
</span><span class='line'>          error('Bad arguments')
</span><span class='line'>
</span><span class='line'>+     debug('Discarded from stdin:')
</span><span class='line'>+     debug(map(lambda x: '   ' + x, sys.stdin.readlines())) # consume stdin
</span><span class='line'>+
</span><span class='line'>      repository = cvsdb.CleanRepository(repository)
</span><span class='line'>      directory, files = fun(arg, repository)</span>

and now it seems to work.

UPDATE:: There is another way (easier) to solve this problem without editing loginfo-handler just change the line

ALL /usr/local/viewvc-1.0.0/bin/loginfo-handler %{sVv}

in your /CVSROOT/loginfo file with

ALL (/usr/local/viewvc-1.0.0/bin/loginfo-handler %{sVv};cat) >/dev/null

this also consumes all stdin data upon completion avoiding the received broken pipe signal.

Comments

Copyright © 2015 - Ruben Laguna - Powered by Octopress