ledatelescope / bifrost

A stream processing framework for high-throughput applications.
BSD 3-Clause "New" or "Revised" License
66 stars 29 forks source link

segfault during packet capture with libvma #137

Closed jaycedowell closed 3 weeks ago

jaycedowell commented 4 years ago

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?

benbarsdell commented 4 years ago

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.

jaycedowell commented 4 years ago

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 commented 3 weeks ago

Shouldn't be an issue anymore since #248 was merged.