received signal SIGSEGV, Segmentation fault when buildEngine

nvinfer1::LogStream<(nvinfer1::ILogger::Severity)1>::Buf::sync() () from /usr/lib/x86_64-linux-gnu/libnvinfer.so.4
#2 0x00007ffff14e4e3e in std::ostream::flush() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff1fff676 in nvinfer1::FullyConnectedLayer::validate(std::vector<nvinfer1::TensorForm, std::allocatornvinfer1::TensorForm > const&) const ()
from /usr/lib/x86_64-linux-gnu/libnvinfer.so.4
#4 0x00007ffff1fd5ded in nvinfer1::Network::updateTensor(nvinfer1::NetworkTensor const*) const () from /usr/lib/x86_64-linux-gnu/libnvinfer.so.4
#5 0x00007ffff1fd6308 in nvinfer1::NetworkTensor::getDimensions() const () from /usr/lib/x86_64-linux-gnu/libnvinfer.so.4
#6 0x00007ffff1fd8378 in nvinfer1::Network::validate(nvinfer1::cudnn::HardwareContext const&, bool, bool, int) const () from /usr/lib/x86_64-linux-gnu/libnvinfer.so.4
#7 0x00007ffff1fbca37 in nvinfer1::builder::buildEngine(nvinfer1::CudaEngineBuildConfig&, nvinfer1::cudnn::HardwareContext const&, nvinfer1::Network const&) ()
from /usr/lib/x86_64-linux-gnu/libnvinfer.so.4
#8 0x00007ffff2026201 in ?? () from /usr/lib/x86_64-linux-gnu/libnvinfer.so.4

Hi,
Can you provide the following information so we can better help?
Provide details on the platforms you are using:
o Linux distro and version
o GPU type
o Nvidia driver version
o CUDA version
o CUDNN version
o Python version [if using python]
o Tensorflow version
o TensorRT version
o If Jetson, OS, hw versions

Also, if possible please share the script and model file to reproduce the issue.

Thanks