On 10.01.2023 12:50:18, Thomas.Kopp@xxxxxxxxxxxxx wrote: > > For the last case, I attached debugger after the fail an tried to read from the > > socket until read returned -1: > > (gdb) p malloc(72) > > (gdb) p read(sockfd,$1,72) > > (gdb) print fprint_canframe_mtu(stdout, $1, "\n", 4, 72) And surprise > > surprise, there were more CAN frames in store. Refer to the log/pdf. > > I was finally able to reproduce the issue and capture a full SPI/CAN > log when it happens. At this point it looks like the tail pointer of > the FIFO in the MCP2518FD gets corrupted and the driver does what it's > supposed to do and reads out lots of frames... You mean the head pointer? > So yeah, I see all the > frames being read via SPI multiple times which matches what you found > with your gdb approach. > It's interesting to see that this wasn't noticed before - I have > reproduced this issue also with cangen (when manually comparing TX/RX > counters) Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature