Hi, On 02/01/18 15:57, Aaron M. Ucko wrote: > Source: ndpi > Version: 2.2-1 > Severity: serious > Tags: upstream > Justification: fails to build from source (but built successfully in the past) > User: debian-m...@lists.debian.org > Usertags: mips > > Builds of ndpi for mips, s390x, and the non-release architectures > powerpc and ppc64 all failed because running the test suite hit the > autobuilders' inactivity timeouts. These timeouts are generous enough > (600 minutes on ppc64, 150 minutes on the other three architectures) > that hitting them generally indicates that something managed to hang > or spin indefinitely. However, I see that the hppa build ran for a > long time before terminating on its own (albeit with test suite > errors), so you may simply need to add progress indicators for the > sake of slow architectures. (These are inactivity timeouts, so any > output to stdout or stderr resets them.) > > Could you please take a look?
It so happens that I was having a brief look already :) The ndpiReader application is the one that hangs. Extract from example/ndpi_util.c:750 > case MPLS_UNI: > case MPLS_MULTI: > mpls = (struct ndpi_mpls_header *) &packet[ip_offset]; > label = ntohl(mpls->label); > /* label = ntohl(*((u_int32_t*)&packet[ip_offset])); */ > workflow->stats.mpls_count++; > type = ETH_P_IP, ip_offset += 4; > > while((label & 0x100) != 0x100) { > ip_offset += 4; > label = ntohl(mpls->label); > } The hang occurs inside the above while loop. Notice that the value loaded into "label" inside the loop never changes and this is the only variable the loop condition depends on. Therefore, if the initial loop condition is true, the program will loop forever. The reason why this happens only on big-endian may be related to the definition of ndpi_mpls_header: > PACK_ON > struct ndpi_mpls_header > { > u_int32_t label:20, exp:3, s:1, ttl:8; > } PACK_OFF; Firstly, the order of fields in a bitfield is ABI dependent so any architecture could legitimately rearrange all the fields giving wrong results. I also don't really understand what the programmer intended to happen when invoking ntohl on a bitfield. Probably teh code needs rewriting to not use ndpi_mpls_header. James
signature.asc
Description: OpenPGP digital signature