Products > Board Support Package (Installation, Licensing, ...)

ETHAPI crash in sipif.cpp

(1/2) > >>

Blair Fonville:
I am working on some code for an FMC150 on ML605 which indefinitely grabs blocks of data from the ADC. The code first does all the initializations (borrowed from the ref design) then starts a thread which continually arms the FMC150 SIP, sends a sw trigger, reads the ADC data block, and repeats. It works for a while, but at random occasions it crashes at sipif_readdata(void *buf, uint32_t size) within sipif.cpp. Specifically at the line:  rceth = g_pETH_ReadBlock((PUCHAR)buf, size, 0); within the switch-statement's SIPIF_ETHAPI case.

I know this isn't much to go on, but any ideas on this? Is this a known issue? Am I using an outdated API?

Thanks,
Blair Fonville

arnaudNL:
Blair,


First of all our software in not thread-safe so you need to make sure you don't have several players communicating from different threads. Then maybe the interface is stressed too much. I am not sure what data rate you are trying to achieve but generally anything above a few MB/s will tend to fail.


What would be interesting to know is if g_pETH_ReadBlock is getting NULL maybe. ETHAPI API is not reliable/streaming interface as it was designed for snapshots application. Maybe a memory leak bringing the whole thing down. Also makes sure to download and install the latest WinPCAP version from their website.


We haven't heard about such crashes. I know my answer is probably not helping you much and I am sorry about that. Have you tried to run the FMC Analyzer? I think the analyzer is doing pretty much that using the same code base.


Best Regards,
Arnaud

arnaudNL:
Dear Blair,


I haven't heard back from you, do you have any updated for us?


Best Regards,
Arnaud

ebarhorst:
Dear Blair,


Have your questions been answered and can I close the topic?


Best regards,
Erik

Blair Fonville:
Hi Arnaud,

Sorry for the late reply. I left for vacation on the day of my post (and will be out of the office until Jan 2). But I can answer most of your questions...

1. Before I left, I ran the FMC Analyzer several times for extended periods. Each time it also crashed at some point. Always at seemingly random intervals. I have no way to determine the cause of the Analyzer crashes, as I cannot run them within a debugger, of course.

2. The g_pETH_ReadBlock function was not receiving nullptr (this was the first thing I checked).

3. The threading is inconsequential in this problem. It is well protected but also this is a small application and there is no contention for communication. This is the only working thread, the main thread only waits for user interaction to change polling rates and such. The crash occurs without ever receiving user feedback from the main thread.

4. Finally, there is no memory leak. I also monitored this closely to be sure.

Blair


Navigation

[0] Message Index

[#] Next page

Go to full version