Am 27.09.2016 um 12:13 schrieb Marek Wieczorek:
> strace logs don't give me any clue. They look pretty much the same, except
> for memory addresses and ids, which are specific for each execution.
> Moreover, system calls stop before the actual communication process starts.
By default, strace following only the main process, and possibly the
main thread.
There are options to change that behaviour; did you try them?
> Also wireshark logs don't seem to contain anything interesting (these ARP
> packages seem to be a random garbage, as they were not present in every
> test run I performed). Both traces (the successful and the unsuccessful
> execution) show UDP packages flying both ways (client->server,
> server->client).
ARP is just machines trying to find out which MAC address is associated
with a given IP address, this is a very low-level part of the networking
protocols.
You can safely ignore these.
You can also ignore all packages except those that have the server as
source and the client as target, or vice versa.
Wireshark is good for finding out what data goes over the wire when, but
not so good at finding out why.
> I'm curious if anyone else would be able to reproduce the same problem, or
> there is something peculiar to my setup that makes the discovery process
> fail (although it happens on two different computers independently). Or
> maybe the way I'm perfoming LAN discovery is incorrect? (the source code is
> in the first email of this thread)
You're using a part of the Kryo API that I do not know.
I took a (very) short look at the code, it seems that the parameters are
two integers -> there's a potential for mixing up the parameter order,
so better check that and maybe debug until the code hits JDK networking
to see whether some intermediate software layer is mixing up parameter
values.
It's a shot in the dark though.
The best option is making strace work for you; it should give you a
definitive clue, particularly if you also compare return codes.
Run the outputs through a good diff tool that highlights not just
diverging lines but also diverging characters. Eclipse's "compare with
-> each other" is pretty good for that task actually, though it may be a
bit slow.
It may help to filter out dates, or replaces memory addresses with IDs.
Read the diff from top to bottom, and whenever some recurring noise
makes the diff too hard to read, do a search-and-replace - Eclipse's
search&replace in regex mode supports backreferences, i.e. it can do
quite a lot without forcing you into writing filter programs.
HTH
Jo