raboof / nethogs

Linux 'net top' tool
GNU General Public License v2.0
3.13k stars 286 forks source link

Make parallelization broken #183

Open robert-scheck opened 4 years ago

robert-scheck commented 4 years ago

Make parallelization seems to be broken, for me mainly reproducible on armv7hl and aarch64, but technically this could indeed occur on any hardware platform with the correct timing.

Building target platforms: aarch64
Building for target aarch64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.2pyujq
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf nethogs-0.8.5
+ /usr/bin/gzip -dc /builddir/build/SOURCES/nethogs-0.8.5.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nethogs-0.8.5
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.SSTTfH
+ umask 022
+ cd /builddir/build/BUILD
+ cd nethogs-0.8.5
+ make -j5 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection' 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection'
make -C src -f MakeApp.mk decpcap_test
make -C src -f MakeApp.mk test
make -C src -f MakeApp.mk nethogs
make[1]: Entering directory '/builddir/build/BUILD/nethogs-0.8.5/src'
cc  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -c decpcap.c
make[1]: Entering directory '/builddir/build/BUILD/nethogs-0.8.5/src'
g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection    conninode_test.cpp   -o conninode_test
make[1]: Entering directory '/builddir/build/BUILD/nethogs-0.8.5/src'
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -c packet.cpp
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -c connection.cpp
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -c process.cpp
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection  decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm
cc  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -c decpcap.c
In file included from conninode_test.cpp:1:
conninode.cpp: In function 'int addprocinfo(const char*)':
conninode.cpp:169:8: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   fgets(buffer, sizeof(buffer), procinfo);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -c cui.cpp -DVERSION=\"0.8.5\"
decpcap.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
make[1]: *** [MakeApp.mk:35: decpcap_test] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/nethogs-0.8.5/src'
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -c inode2prog.cpp
make: *** [Makefile:47: decpcap_test] Error 2
make: *** Waiting for unfinished jobs....
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -c conninode.cpp
for test in conninode_test; do echo $test ; ./$test ; done
conninode_test
g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection   -c -o devices.o devices.cpp
make[1]: Leaving directory '/builddir/build/BUILD/nethogs-0.8.5/src'
conninode.cpp: In function 'int addprocinfo(const char*)':
conninode.cpp:169:8: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   fgets(buffer, sizeof(buffer), procinfo);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inode2prog.cpp: In function 'void get_info_for_pid(const char*)':
inode2prog.cpp:176:33: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 11 and 40 [-Wformat-truncation=]
     snprintf(fromname, fromlen, "%s/%s", dirname, entry->d_name);
                                 ^~~~~~~
In file included from /usr/include/stdio.h:873,
                 from /usr/include/c++/8/cstdio:42,
                 from /usr/include/c++/8/ext/string_conversions.h:43,
                 from /usr/include/c++/8/bits/basic_string.h:6400,
                 from /usr/include/c++/8/string:52,
                 from /usr/include/c++/8/bits/locale_classes.h:40,
                 from /usr/include/c++/8/bits/ios_base.h:41,
                 from /usr/include/c++/8/ios:42,
                 from /usr/include/c++/8/ostream:38,
                 from /usr/include/c++/8/iostream:39,
                 from inode2prog.cpp:29:
/usr/include/bits/stdio2.h:67:35: note: '__builtin___snprintf_chk' output between 2 and 286 bytes into a destination of size 41
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection  main.cpp packet.o connection.o process.o decpcap.o cui.o inode2prog.o conninode.o devices.o -o nethogs -lpcap -lm -lncurses -DVERSION=\"0.8.5\"
main.cpp: In function 'void quit_cb(int)':
main.cpp:57:10: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
     write(self_pipe.second, "x", 1);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: Leaving directory '/builddir/build/BUILD/nethogs-0.8.5/src'
error: Bad exit status from /var/tmp/rpm-tmp.SSTTfH (%build)

Other example:

Building target platforms: armv7hl
Building for target armv7hl
setting SOURCE_DATE_EPOCH=1564012800
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.NslL0J
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf nethogs-0.8.5
+ /usr/bin/gzip -dc /builddir/build/SOURCES/nethogs-0.8.5.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nethogs-0.8.5
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.2AZZlJ
+ umask 022
+ cd /builddir/build/BUILD
+ cd nethogs-0.8.5
+ make -j5 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard' 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard'
make -C src -f MakeApp.mk decpcap_test
make -C src -f MakeApp.mk test
make -C src -f MakeApp.mk nethogs
make[1]: Entering directory '/builddir/build/BUILD/nethogs-0.8.5/src'
cc  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -c decpcap.c
make[1]: Entering directory '/builddir/build/BUILD/nethogs-0.8.5/src'
g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard    conninode_test.cpp   -o conninode_test
make[1]: Entering directory '/builddir/build/BUILD/nethogs-0.8.5/src'
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -c packet.cpp
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -c connection.cpp
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -c process.cpp
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard  decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm
In file included from conninode_test.cpp:1:
conninode.cpp: In function 'int addprocinfo(const char*)':
conninode.cpp:169:8: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
  169 |   fgets(buffer, sizeof(buffer), procinfo);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -c decpcap.c
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -c cui.cpp -DVERSION=\"0.8.5\"
/usr/bin/ld: decpcap.o: file not recognized: file truncated
collect2: error: ld returned 1 exit status
make[1]: *** [MakeApp.mk:35: decpcap_test] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/nethogs-0.8.5/src'
make: *** [Makefile:47: decpcap_test] Error 2
make: *** Waiting for unfinished jobs....
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -c inode2prog.cpp
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -c conninode.cpp
for test in conninode_test; do echo $test ; ./$test ; done
conninode_test
g++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard   -c -o devices.o devices.cpp
make[1]: Leaving directory '/builddir/build/BUILD/nethogs-0.8.5/src'
conninode.cpp: In function 'int addprocinfo(const char*)':
conninode.cpp:169:8: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
  169 |   fgets(buffer, sizeof(buffer), procinfo);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
inode2prog.cpp: In function 'void get_info_for_pid(const char*)':
inode2prog.cpp:176:37: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 11 and 40 [-Wformat-truncation=]
  176 |     snprintf(fromname, fromlen, "%s/%s", dirname, entry->d_name);
      |                                     ^~
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/c++/9/ext/string_conversions.h:43,
                 from /usr/include/c++/9/bits/basic_string.h:6493,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from inode2prog.cpp:29:
/usr/include/bits/stdio2.h:67:35: note: '__builtin___snprintf_chk' output between 2 and 286 bytes into a destination of size 41
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard  main.cpp packet.o connection.o process.o decpcap.o cui.o inode2prog.o conninode.o devices.o -o nethogs -lpcap -lm -lncurses -DVERSION=\"0.8.5\"
main.cpp: In function 'bool wait_for_next_trigger()':
main.cpp:104:24: warning: narrowing conversion of 'refreshdelay' from 'unsigned int' to '__time_t' {aka 'long int'} [-Wnarrowing]
  104 |     timeval timeout = {refreshdelay, 0};
      |                        ^~~~~~~~~~~~
main.cpp: In function 'int main(int, char**)':
main.cpp:285:42: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'const time_t' {aka 'const long int'} [-Wsign-compare]
  285 |     if (last_refresh_time + refreshdelay <= now) {
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
main.cpp: In function 'void quit_cb(int)':
main.cpp:57:10: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   57 |     write(self_pipe.second, "x", 1);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: Leaving directory '/builddir/build/BUILD/nethogs-0.8.5/src'
error: Bad exit status from /var/tmp/rpm-tmp.2AZZlJ (%build)

Removal of -j5 from make lets (fresh) builds succeed.

raboof commented 4 years ago

It seems the problem is:

decpcap.o: file not recognized: File truncated collect2: error: ld returned 1 exit status

I guess that file is read while it is also being written, probably because 'decpcap_test', 'test' and 'nethogs' all require it and are ran in parallel.

As a short-term solution perhaps you should just 'make nethogs' without running the tests?

raboof commented 4 years ago

or perhaps we should make the 'nethogs' target depend on 'test' and the 'test' target on 'decpcap_test' - though that makes it harder to run those individually