Segmentation fault when running application including the DRC
Summary
Note: This issue was initially described on the the OpenCPI.org slack channel. This report was generated from the information provided.
A segmentation fault was observed on the E310 platform as shown below:
% ocpirun applications/timestamp_testing/timestamp_testing.xml
ad9361_init : AD936x Rev 2 successfully initialized
Segmentation fault
The failing application timestamp_test.xml
has a pattern similar to following:
RX:
E31x DRC RX -> a single RCC worker, doesn't appear to matter which one -> file_write
TX:
file_read -> E31x DRC TX
The user has also tried to add a second RCC worker in the RX chain and observed the following error:
% ocpirun applications/timestamp_testing/timestamp_testing.xml
ad9361_init : AD936x Rev 2 successfully initialized
ocpirun: file_write.c:87: run: Assertion `port->input.eof || port->current.data' failed.
Aborted
Modifying the application to include a rcc worker to print the opcodes shows the following output:
% ocpirun applications/timestamp_testing/timestamp_testing.xml
ad9361_init : AD936x Rev 2 successfully initialized
OCPI( 0:114.0911): print: Input opcode: 1
OCPI( 0:114.0911): print: Time opcode received.
OCPI( 0:114.0911): print: fract_sec: 0
OCPI( 0:114.0911): print: sec: 957588582
OCPI( 0:114.0968): print: Input opcode: 0
OCPI( 0:114.0968): print: Samples opcode received.
OCPI( 0:114.0968): print: Interpreting as uchar stream.
OCPI( 0:114.0968): print: Number of data points: 16384
Segmentation fault
The user has tried removing the file_read and file_write components from the application. In doing so, no segmentation fault is observed as shown below:
% ocpirun applications/timestamp_testing/timestamp_testing.xml
ad9361_init : AD936x Rev 2 successfully initialized
OCPI( 0:524.0501): print: Input opcode: 1
OCPI( 0:524.0501): print: Time opcode received.
OCPI( 0:524.0501): print: fract_sec: 0
OCPI( 0:524.0501): print: sec: 3488763533
OCPI( 0:524.0557): print: Input opcode: 0
OCPI( 0:524.0558): print: Samples opcode received.
OCPI( 0:524.0558): print: Interpreting as uchar stream.
OCPI( 0:524.0558): print: Number of data points: 16384
OCPI( 0:524.0614): print: Input opcode: 0
OCPI( 0:524.0614): print: Samples opcode received.
OCPI( 0:524.0614): print: Interpreting as uchar stream.
OCPI( 0:524.0615): print: Number of data points: 16384
OCPI( 0:524.0671): print: Input opcode: 0
OCPI( 0:524.0671): print: Samples opcode received.
OCPI( 0:524.0671): print: Interpreting as uchar stream.
OCPI( 0:524.0671): print: Number of data points: 16384
OCPI( 0:524.0728): print: Input opcode: 0
OCPI( 0:524.0728): print: Samples opcode received.
OCPI( 0:524.0728): print: Interpreting as uchar stream.
OCPI( 0:524.0728): print: Number of data points: 16384
^C
%
Steps to reproduce
The following files are included to aid in the replication of this issue: Assembly/container:
DRC:
Application:
- Install opencpi version tag 2.2.1
- Install/build the e31x OSP version 2.3.0
- Build the container and assembly
- Run the timestamp_testing application
- Observe the application failure
Expected correct behavior
Application run successfully without segmentation fault.
Relevant logs and/or screenshots
Relevant logs are provided above in the issue summary
Environment info
- OpenCPI Version used: tag v2.2.1
- E31x OSP Version used: tag v2.3.0
- Vivado 19.2
- Operating System and version: Ubuntu 18.04