lkml.org 
[lkml]   [2008]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice
    From
    Date
    Hi Tom,

    On Fri, 2008-10-10 at 23:58 -0500, Tom Zanussi wrote:
    > It looks like you hit the same problem as described here:
    >
    > commit 8191ecd1d14c6914c660dfa007154860a7908857
    >
    > splice: fix infinite loop in generic_file_splice_read()
    >
    > relay uses the same loop but it never got noticed or fixed. Can you try
    > the following patch:
    >
    > diff --git a/kernel/relay.c b/kernel/relay.c
    > index 8d13a78..6a4d439 100644
    > --- a/kernel/relay.c
    > +++ b/kernel/relay.c
    > @@ -1318,12 +1318,9 @@ static ssize_t relay_file_splice_read(struct file *in,
    > if (ret < 0)
    > break;
    > else if (!ret) {
    > - if (spliced)
    > - break;
    > - if (flags & SPLICE_F_NONBLOCK) {
    > + if (flags & SPLICE_F_NONBLOCK)
    > ret = -EAGAIN;
    > - break;
    > - }
    > + break;
    > }
    >
    > *ppos += ret;
    >

    Indeed. That fixes the deadlock.

    However, now I don't get anything to the cpu*.out files if I run
    kmemtraced with kmemtrace disabled. If I enable kmemtrace manually and
    then run kmemtraced, I do receive some data. I did apply the
    kmemtrace-user patch as well.

    Hmm?

    Pekka



    \
     
     \ /
      Last update: 2008-10-13 09:01    [W:2.339 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site