Open PaJaSoft opened 4 months ago
After even deeper investigation, it isn't only AMD x64 arch CPU, but the source code of NTRIP Caster v1.0 relies on undefined behavior which can lead to random issues during execution, including Intel CPU.
One related issue is here because ([cite]) "Character movement is performed differently in different implementations. Thus overlapping moves may yield surprises." -> the outcome is unpredictable and in couple of runs I've got really weird result for my server_name config parameter (only!).
Hi, Thanks for the digging, and it does explain some weird behaviour I've seen when adding users and suddenly no one can log in. On your research did you come across a fix? Or a workaround? We're well into the weeds here, which isn't my speciality.
In file ntrip_string.c inside function "char splitc (char first, char *rest, const char divider)" calling "strcpy(rest, p+1);" replaced by "memmove(rest, p+1, strlen(p+1) +1);" fixes above issue for me (I'm over decade out of C programming, not sure if my approach is the best in this case, however WFM).
Added your changes to the ntripstring branch.
You may be interested to know that BKG have recently released their professional NTRIP caster free of charge https://igs.bkg.bund.de/ntrip/bkgcaster
Hello, I've discovered some weird issue on AMD x64 arch (AMD Ryzen 9 5950X in my case). I wasn't able to authorize my NTRIP-X station although I was sure I've provided correct creds - I've always got 'Bad Password' result.
Digging deeper into the issue and I've discovered that there is some issue related to the HTTP handling and decoding.
The correct decoding looks like:
however on the AMD CPU the same part looks like:
As you can see somehow there is mangled User-Agent and Authorization headers.
I don't have a fix or further info now, the only what I know is that on Intel CPU everything is correct and works as expected. Another symptom is that when I use this chain: NTRIP-X -> ntrip-caster (on Intel CPU) -> ntrip-server -> ntrip-caster (on AMD CPU) , the ntrip-caster on AMD CPU produces a coredump when I put mountpoint, user, passwd on the command line of ntrip-server.
On each CPU platform I build ntripcaster-containerized, so it seems something related to AMD CPU. I'll try to find the issue when time permits...