You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <da...@elego.de> on 2012/12/19 19:53:13 UTC

backgrounding 'svn log' over serf

With trunk@HEAD and serf-1.2.x@HEAD (r1707), I tried to background an
'svn log':

[[[
% $svn log --search stefan2 --search-and truncate 
------------------------------------------------------------------------
r1398509 | stefan2 | 2012-10-15 20:53:19 +0000 (Mon, 15 Oct 2012) | 12 lines

Fix more int conversion-related warning.

* subversion/libsvn_fs_fs/temp_serializer.c
  (svn_fs_fs__serialize_mergeinfo,
   svn_fs_fs__deserialize_mergeinfo): use matching data types for 
   iteration variables
* subversion/svnrdump/load_editor.c
  (new_node_record): ditto
* subversion/libsvn_subr/cache-membuffer.c
  (find_entry): ditto
  (svn_cache__membuffer_cache_create): prevent "constant truncated" warning

^Z
zsh: suspended  $svn log --search stefan2 --search-and truncate
% bg
[1]  + continued  $svn log --search stefan2 --search-and truncate
% subversion/svn/log-cmd.c:870: (apr_err=4)
subversion/libsvn_client/log.c:620: (apr_err=4)
subversion/libsvn_ra_serf/log.c:607: (apr_err=4)
subversion/libsvn_ra_serf/util.c:819: (apr_err=4)
subversion/libsvn_ra_serf/util.c:786: (apr_err=4)
svn: E000004: Error running context: Interrupted system call

[1]  + exit 1     $svn log --search stefan2 --search-and truncate
]]]

Actual result: backgrounding svn killed it.

Expected result: after 'bg\n', keep fetching+filtering+printing log
messages in the background.

It worked in 1.7 with neon.  Can we make it work in 1.8 too?

Re: backgrounding 'svn log' over serf

Posted by Daniel Shahaf <da...@elego.de>.
C. Michael Pilato wrote on Wed, Dec 19, 2012 at 13:59:21 -0500:
> On 12/19/2012 01:53 PM, Daniel Shahaf wrote:
> > Actual result: backgrounding svn killed it.
> > 
> > Expected result: after 'bg\n', keep fetching+filtering+printing log
> > messages in the background.
> > 
> > It worked in 1.7 with neon.  Can we make it work in 1.8 too?
> 
> Please file an issue.  With as much code and complaint flying around as we

Filed http://subversion.tigris.org/issues/show_bug.cgi?id=4278 as
a release blocker.  (Unfortunately I can't file an issue on the serf
tracker.)

Daniel

> have, sometimes my view is:  "No issue, no problem."  But I suspect the
> issue needs to be filed against Serf, not Subversion.  The error you show is
> simply what is returned from serf_context_run().
> 
> 
> -- 
> C. Michael Pilato <cm...@collab.net>
> CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development
> 



Re: backgrounding 'svn log' over serf

Posted by Philip Martin <ph...@wandisco.com>.
Lieven Govaerts <lg...@apache.org> writes:

> On Ubuntu I can reproduce this issue at the first try, On Mac OS X not at all.
>
> Attached patch to serf fixes the issue for me.
>
> [..]
>
> Lieven
>
> Index: context.c
> ===================================================================
> --- context.c	(revision 1701)
> +++ context.c	(working copy)
> @@ -289,6 +289,11 @@ apr_status_t serf_context_run(
>  
>      if ((status = apr_pollset_poll(ps->pollset, duration, &num,
>                                     &desc)) != APR_SUCCESS) {
> +        /* EINTR indicates a handled signal happened during the poll call,
> +           ignore, the application can safely retry. */
> +        if (APR_STATUS_IS_EINTR(status))
> +            return APR_SUCCESS;
> +
>          /* ### do we still need to dispatch stuff here?
>             ### look at the potential return codes. map to our defined
>             ### return values? ...

That will because BSD always restarts the call.  I suppose a Linux
application that set SA_RESTART would not see the problem either.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: backgrounding 'svn log' over serf

Posted by Lieven Govaerts <lg...@apache.org>.
On Wed, Dec 19, 2012 at 8:31 PM, Philip Martin
<ph...@wandisco.com> wrote:
> "C. Michael Pilato" <cm...@collab.net> writes:
>
>> On 12/19/2012 01:59 PM, C. Michael Pilato wrote:
>>> On 12/19/2012 01:53 PM, Daniel Shahaf wrote:
>>>> Actual result: backgrounding svn killed it.
>>>>
>>>> Expected result: after 'bg\n', keep fetching+filtering+printing log
>>>> messages in the background.
>>>>
>>>> It worked in 1.7 with neon.  Can we make it work in 1.8 too?
>>>
>>> Please file an issue.  With as much code and complaint flying around as we
>>> have, sometimes my view is:  "No issue, no problem."  But I suspect the
>>> issue needs to be filed against Serf, not Subversion.  The error you show is
>>> simply what is returned from serf_context_run().
>>
>> Sorry:  to clarify, it's a Subversion-generated error message which wraps
>> the status code returned from serf_context_run().
>
> Yes, I can reproduce it on my Linux machine but only if the interrupt
> occurs in an epoll_wait call:
>
> epoll_wait(3, ^Z
> [1]+  Stopped                 strace subversion/svn/.libs/lt-svn log http://svn.apache.org/repos/asf/subversion
> $ fg
> strace subversion/svn/.libs/lt-svn log http://svn.apache.org/repos/asf/subversion
> 7fb0234461e8, 16, 500)    = -1 EINTR (Interrupted system call)
> --- SIGCONT (Continued) @ 0 (0) ---

On Ubuntu I can reproduce this issue at the first try, On Mac OS X not at all.

Attached patch to serf fixes the issue for me.

[..]

Lieven

Re: backgrounding 'svn log' over serf

Posted by Philip Martin <ph...@wandisco.com>.
"C. Michael Pilato" <cm...@collab.net> writes:

> On 12/19/2012 01:59 PM, C. Michael Pilato wrote:
>> On 12/19/2012 01:53 PM, Daniel Shahaf wrote:
>>> Actual result: backgrounding svn killed it.
>>>
>>> Expected result: after 'bg\n', keep fetching+filtering+printing log
>>> messages in the background.
>>>
>>> It worked in 1.7 with neon.  Can we make it work in 1.8 too?
>> 
>> Please file an issue.  With as much code and complaint flying around as we
>> have, sometimes my view is:  "No issue, no problem."  But I suspect the
>> issue needs to be filed against Serf, not Subversion.  The error you show is
>> simply what is returned from serf_context_run().
>
> Sorry:  to clarify, it's a Subversion-generated error message which wraps
> the status code returned from serf_context_run().

Yes, I can reproduce it on my Linux machine but only if the interrupt
occurs in an epoll_wait call:

epoll_wait(3, ^Z
[1]+  Stopped                 strace subversion/svn/.libs/lt-svn log http://svn.apache.org/repos/asf/subversion
$ fg
strace subversion/svn/.libs/lt-svn log http://svn.apache.org/repos/asf/subversion
7fb0234461e8, 16, 500)    = -1 EINTR (Interrupted system call)
--- SIGCONT (Continued) @ 0 (0) ---
open("/usr/share/locale/en_GB/LC_MESSAGES/libc.mo", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=1474, ...}) = 0
mmap(NULL, 1474, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7fb0232cf000
close(5)                                = 0
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb0232cd000
write(2, "../src/subversion/svn/log-cmd.c:"..., 35../src/subversion/svn/log-cmd.c:870) = 35
write(2, ": (apr_err=4)\n", 14: (apr_err=4)
)         = 14
write(2, "../src/subversion/libsvn_client/"..., 41../src/subversion/libsvn_client/log.c:620) = 41
write(2, ": (apr_err=4)\n", 14: (apr_err=4)
)         = 14
write(2, "../src/subversion/libsvn_ra_serf"..., 42../src/subversion/libsvn_ra_serf/log.c:607) = 42
write(2, ": (apr_err=4)\n", 14: (apr_err=4)
)         = 14
write(2, "../src/subversion/libsvn_ra_serf"..., 43../src/subversion/libsvn_ra_serf/util.c:819) = 43
write(2, ": (apr_err=4)\n", 14: (apr_err=4)
)         = 14
write(2, "../src/subversion/libsvn_ra_serf"..., 43../src/subversion/libsvn_ra_serf/util.c:786) = 43
write(2, ": (apr_err=4)\n", 14: (apr_err=4)
)         = 14
write(2, "svn: E000004: Error running cont"..., 61svn: E000004: Error running context: Interrupted system call
) = 61
close(4)                                = 0
close(4294967295)                       = -1 EBADF (Bad file descriptor)
close(3)                                = 0
munmap(0x7fb0233ca000, 106496)          = 0

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download

Re: backgrounding 'svn log' over serf

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 12/19/2012 01:59 PM, C. Michael Pilato wrote:
> On 12/19/2012 01:53 PM, Daniel Shahaf wrote:
>> Actual result: backgrounding svn killed it.
>>
>> Expected result: after 'bg\n', keep fetching+filtering+printing log
>> messages in the background.
>>
>> It worked in 1.7 with neon.  Can we make it work in 1.8 too?
> 
> Please file an issue.  With as much code and complaint flying around as we
> have, sometimes my view is:  "No issue, no problem."  But I suspect the
> issue needs to be filed against Serf, not Subversion.  The error you show is
> simply what is returned from serf_context_run().

Sorry:  to clarify, it's a Subversion-generated error message which wraps
the status code returned from serf_context_run().

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development


Re: backgrounding 'svn log' over serf

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 12/19/2012 01:53 PM, Daniel Shahaf wrote:
> Actual result: backgrounding svn killed it.
> 
> Expected result: after 'bg\n', keep fetching+filtering+printing log
> messages in the background.
> 
> It worked in 1.7 with neon.  Can we make it work in 1.8 too?

Please file an issue.  With as much code and complaint flying around as we
have, sometimes my view is:  "No issue, no problem."  But I suspect the
issue needs to be filed against Serf, not Subversion.  The error you show is
simply what is returned from serf_context_run().


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development