linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Diana Burgess <diana@peloton-tech.com>
To: "Stéphane Grosjean" <s.grosjean@peak-system.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Philipp Schrader <philipp@peloton-tech.com>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: peak_pciefd 0000:06:00.0 can1: can_put_echo_skb: BUG! echo_skb is occupied!
Date: Mon, 12 Mar 2018 11:20:57 -0700	[thread overview]
Message-ID: <CADJaPTAauXY22TA_BST16LTaCRGa9FQ8vh7=9VT44N8BmFi3Qg@mail.gmail.com> (raw)
In-Reply-To: <AM5PR03MB2963ABAC625DD0DB9CF8D694D6DA0@AM5PR03MB2963.eurprd03.prod.outlook.com>

On Mon, Mar 5, 2018 at 1:35 AM, Stéphane Grosjean
<s.grosjean@peak-system.com> wrote:
> Hi,
>
> The "BUG! echo_skb is occupied" msg is printed when the network tx queue is restarted, while there is no room left in the echo_skb array. Note that this msg does not prevent any CAN frame to be written on the bus.
>
> There's actually one place where the network tx queue is restarted, however the echo_skb array is filled:
>
> (see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/peak_canfd/peak_pciefd_main.c#n353)
>
> A driver version in which the below patch has been applied
>
>          /* handle tx link interrupt (if any) */
>          if (pciefd_irq_is_lnk(priv->irq_status)) {
>                  unsigned long flags;
>
>                  spin_lock_irqsave(&priv->tx_lock, flags);
>                  priv->tx_pages_free++;
>                  spin_unlock_irqrestore(&priv->tx_lock, flags);
> -
> -                /* wake producer up */
> -               netif_wake_queue(priv->ucan.ndev);
>          }
>
> has run during the whole weekend (~60 h). The echo_skb array size has also been reduced to 8 slots (instead of 24), to increase the probability for the issue to occur; two "cangen -g 0 -i" were running on can0 and can1. Unfortunately, during this period, the "BUG! echo is occupied" msg has been still sporadically printed (4 times, 2 times for can0, 2 times for can1).
>
> Still under investigation...
>
> Regards,
>
>
>> -----Original Message-----
>> From: Diana Burgess <diana@peloton-tech.com>
>> Sent: samedi 3 mars 2018 02:38
>> To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> Cc: Marc Kleine-Budde <mkl@pengutronix.de>; Stéphane Grosjean
>> <s.grosjean@peak-system.com>; Philipp Schrader <philipp@peloton-
>> tech.com>; linux-can@vger.kernel.org; linux-rt-users@vger.kernel.org
>> Subject: Re: peak_pciefd 0000:06:00.0 can1: can_put_echo_skb: BUG!
>> echo_skb is occupied!
>>
>> On Tue, Feb 27, 2018 at 12:58 AM, Sebastian Andrzej Siewior
>> <bigeasy@linutronix.de> wrote:
>> > On 2018-02-26 11:55:11 [-0800], Diana Burgess wrote:
>> >> That patch is part of my branch already so it does not fix this bug.
>> >>
>> >> Also 4.15 is not part of rt-devel yet so I did not try to build and
>> >> run that version.
>> > about that. The tree you were using is not updated (is EOL) so I
>> > suggest to upgrade to 4.14-RT. This may not fix your bug but you get a
>> > kernel with stable/security updates.
>> >
>> > You mentioned that you use -RT and you see this problem only with the
>> > peak card. You never mentioned if this also happens often or rarely or
>> > if this happens once you disable RT and you keep doing what you are
>> > doing.
>> >
>> >>
>> >> Thanks,
>> >>
>> >
>> > Sebastian
>>
>> I've upgraded to 4.14-RT and tried with and without RT. Using RT I see the
>> bug approximately every 45s (though it is not consistent). This time between
>> bugs increases when not using RT, but does not go away.
>>
>> --
>> Diana Burgess
>
> --
> PEAK-System Technik GmbH
> Sitz der Gesellschaft Darmstadt - HRB 9183
> Geschaeftsfuehrung: Alexander Gach / Uwe Wilhelm
> --

Stephane Grosjean sent out the following two patches which fixed the bug:
   can: peak/pcie_fd: fix echo_skb is occupied! bug
   can: peak/pcie_fd: remove useless code when interface starts

-- 
Diana Burgess

      reply	other threads:[~2018-03-12 18:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23  1:23 peak_pciefd 0000:06:00.0 can1: can_put_echo_skb: BUG! echo_skb is occupied! Diana Burgess
2018-02-23  8:46 ` Stéphane Grosjean
2018-02-26  9:46   ` Sebastian Andrzej Siewior
2018-02-26 10:34     ` Marc Kleine-Budde
2018-02-26 19:55       ` Diana Burgess
2018-02-27  8:58         ` Sebastian Andrzej Siewior
2018-03-03  1:37           ` Diana Burgess
2018-03-05  9:35             ` Stéphane Grosjean
2018-03-12 18:20               ` Diana Burgess [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADJaPTAauXY22TA_BST16LTaCRGa9FQ8vh7=9VT44N8BmFi3Qg@mail.gmail.com' \
    --to=diana@peloton-tech.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=philipp@peloton-tech.com \
    --cc=s.grosjean@peak-system.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).