Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
At some point obd_uuid2str() may start to output just empty string instead of uuid passed to it, e.g.
0000100:00000200:2.0:1756976070.393004:0:78429:0:(lustre_peer.c:175:class_add_nids_to_uuid()) Comparing with 192.168.56.103@tcp 00000100:00000200:2.0:1756976070.393005:0:78429:0:(lustre_peer.c:182:class_add_nids_to_uuid()) Updating UUID ''
here output of UUID 192.168.56.103@tcp is replaced with ''.
It is result of 'safe' output attempt in obd_uuid2str():
- it checks always that last symbol in UUID is 0, which can be not true - UUID can be short and NULL-terminated but buffer is not filled with zeroes up to end
- it sets 0 symbol as 'temp[sizeof(*uuid->uuid) - 1] = '\0';'
but sizeof of uuid->uuid is not UUID size but 'char' size
So for an UUID which has no 0 at the end of buffer (but is NULL-terminated itself and sane) obd_uuid2str() is trying to output it 'safely' but does that wrongly and outputs nothing
Both should be fixed - check for NULL-terminated UUID and workaround for UUID which is not NULL-terminated