Closed tysonite closed 4 years ago
Hi tysonite,
This message can occur for a few reasons. The most common is that the kernel will drop messages received while the interface is down. Another would be if we really were going too fast and filling the receive buffer, but this is unlikely and I've never seen it happen.
What has lead you to use this older version? In the version you are using, we were warning once about this and printing a stacktrace. You wouldn't be warned about it happening again. Now, we don't trigger a stacktrace as I don't believe it makes sense for this warning, and we also will warn again for each message dropped.
While starting up, if there's bus load and you're not immediately bringing the interface up, this is an expected message. The message is here so that, if we were to receive reports of performance issues, and we saw this message appearing while networks are up and we're receiving messages, we'd know where to start investigating. The equivalent message you'll see on v2.0.2 is "intrepid: Dropping message on can0, dropped by kernel".
Hi @hollinsky,
Thanks for your feedback. Probably your are right about your guess that interface wasn't brought up at a time we see this message. However, after that stack trace / warning, the system under test don't come up - there could be several reasons of that (e.g. peripheral hardware issues, ...), but I would like to exclude CAN driver issue as system under test boots up via CAN. Can you please suggest a way to sniff CAN bus on OrangePI side? Any tools available for that?
You'll want to install the can-utils
package, which includes the candump
program. Then candump ics0can0
or candump any
will start dumping frames to the terminal. You can also use cansend
to transmit.
Thanks. Everything looks to be good from candump
or cansend
perspective.
One unrelated questions:
ics0can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:96985 errors:0 dropped:76 overruns:0 frame:0
TX packets:8 errors:2 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:484949 (484.9 KB) TX bytes:8 (8.0 B)
ics0can1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:2451686 errors:0 dropped:311 overruns:0 frame:0
TX packets:787624 errors:1727 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:13871916 (13.8 MB) TX bytes:8 (8.0 B)
Both interfaces show some errors / dropped packets. Is it possible to figure out why this is happening? I suppose it just because of some buffers that are not big enough.
@hollinsky-intrepid, I appreciate any suggestions or proposals...
My apologies, I missed the previous comment. We increment the interface's TX error count any time the TEC changes (transmit error counter of the CAN controller). This can occur if there's electrical interference impacting the bus, collisions, etc. It will also occur when the device is attempting to transmit and no nodes are acknowledging it (i.e. if the device is not connected to a bus, or if it is the only node on the bus).
It will also be telling if the error counter only increases at startup, when a node is plugged/unplugged, or if errors are periodically being generated during runtime.
I would not expect that you are overrunning any buffers unless this is an extremely high traffic scenario, but it can happen. I would rule out a software bug, but it is harder for me to say since I can see you're running old deprecated versions of the software.
It would help to know more about what you're trying to do so we can get an idea of which error scenarios are the most likely. If it's something you'd prefer not to talk about in the open, you could also email support@intrepidcs.com.
Does your answer apply also to dropped packets?
We have a plan to use fresh software earlier next week, I will return back if necessary. Thank you in advance.
With the latest version, every increment of the drop counter also logs a message to dmesg with more information about the drop. I believe the older versions would only warn on the first one, this has since been fixed.
99% of the time, a packet is being dropped because the interface link state is set to down (right when it's created, before it's set to up by the user). You'd see "dropped by kernel" in the log message if that's the case. I have not seen dropped packets after the initial startup.
The following error message logged into
dmesg
:The kernel module revision is d8ea05895e3fc1ec16f0444401f763beb20b6fdd