bifrost icon indicating copy to clipboard operation
bifrost copied to clipboard

segfault during packet capture with libvma

Open jaycedowell opened this issue 5 years ago • 2 comments

We upgraded ADP to Ubuntu 18 (gcc 7.4.0), CUDA 10.2, and libvma 8.9.5 and started running into problems with packet capture. Specifically, the first packet captured with Bifrost compiled with VMA = 1 causes a segfault. The problem appears to be related to using an aligned data type here in udp_capture.cpp for accessing the packet's payload.

If I roll back gcc to the version that ships with Ubuntu 16 (5.5.0) I don't have any problems. If I instead keep gcc7 and I switch the definition of itype to a new unaligned type, like this one:

struct unaligned256_type {
	uint8_t data[32];
};

I also don't have any problems. The unaligned type also does not appear to affect the capture speed. Has anyone else run into this?

jaycedowell avatar Mar 17 '20 19:03 jaycedowell

I don't remember much about it but it's probably related to this comment: https://github.com/ledatelescope/bifrost/blob/master/src/udp_capture.cpp#L56

It sounds like maybe gcc5 wasn't vectorizing the loads but gcc7 is trying to.

benbarsdell avatar Mar 17 '20 20:03 benbarsdell

Yeah, I had wondered about that comment when I was trying to sort out what was happening. I guess that would imply that we should not be trying to access the packet's contents as aligned memory unless something changes in libvma.

jaycedowell avatar Mar 18 '20 18:03 jaycedowell