odp icon indicating copy to clipboard operation
odp copied to clipboard

Segmentation fault with ODP 1.34

Open manishmatey opened this issue 2 years ago • 2 comments

Hello team,

We have recently migrated from ODP 1.29 to 1.34 and found segmentation fault when first TCP SYN packet is received from client. We debugged further and found issue is with below function: File : ofp_tcp_input.c Function : ofp_tcp_input() -> ofp_packet_user_area()

Below function ofp_packet_user_area() is returning NULL pointer. if (ofp_packet_user_area(*m)->chksum_flags & OFP_L4_CHKSUM_STATUS_VALID)

This function ofp_packet_user_area() calls internally below ODP functions: static inline struct ofp_packet_user_area *ofp_packet_user_area(odp_packet_t pkt) { return odp_packet_user_area(pkt); }

_ODP_INLINE void *odp_packet_user_area(odp_packet_t pkt) { return _odp_pkt_get(pkt, void *, user_area); }

#define _odp_pkt_get(pkt, cast, field)
(*(cast *)(uintptr_t)((uint8_t *)pkt + _odp_packet_inline.field))

As there is no change in OFP code, only ODP code has been changed from 1.29 to 1.34 so posting this in ODP community. Please help me on this.

manishmatey avatar May 06 '22 04:05 manishmatey

Hi,

Is user area enabled in pool parameters (odp_pool_param_t.pkt.uarea_size)? odp_pool_print() output would help in debugging this issue.

@JereLeppanen has recently worked on updating OFP to support the latest ODP code, so he could have more insight into this issue.

MatiasElo avatar May 06 '22 10:05 MatiasElo

Hi @MatiasElo , I will check and update.

manishmatey avatar May 12 '22 11:05 manishmatey