Problems with compiling and running packetdrill

52 views
Skip to first unread message

Robert Raszuk

unread,
Aug 5, 2021, 4:48:44 AM8/5/21
to packe...@googlegroups.com
Hi,

Two issues .. 

1. Minor: Compiling on latest ubuntu and gcc 9.3.0 fails but it seems pretty easy to fix with three steps: 

a) packet_socket_linux.c --> add #include <linux/sockios.h>


b) Makefile.common --> add to CFLAGS switch -Wno-address-of-packed-member


c) eliminate collision with system gettid() by renaming run_system_call.c:


52c52

< static pid_t sys_gettid(void)

---

> static pid_t gettid(void)

1889c1889

<       state->syscalls->thread_id = sys_gettid();

---

>       state->syscalls->thread_id = gettid();

1891c1891

<               die_perror("sys_gettid");

---

>               die_perror("gettid");


After this all builds clean. 



2. Major: 


While running locally is all fine - when I try to run it remotely I get ioctl error 

ioctl SIOCGIFINDEX: No such device on an ZeroTier interface - which works fine before.


Moreover after the packetdrill run attempt the IP address magically disappears from this interface and nothing I tried (down/up, full net reset etc ...) other then full reboot is able to bring it back. 


That is showstopper for me to continue to use this otherwise great tool. 



Questions: 


* Did anyone managed to build it fine on ubuntu with gcc9.3.0 without the above diffs ? 


* Did anyone was able to run it on a LAN ? 


* Did anyone try to run over ZeroTier LAN ? 


Many thx,

Robert

Neal Cardwell

unread,
Aug 5, 2021, 10:39:28 AM8/5/21
to Robert Raszuk, packe...@googlegroups.com
Thanks for the report!

I'm able to build packetdrill without problems on recent Ubuntu distributions with gcc versions equal to or newer than what you report, with both:

(a) Ubuntu 20.04 and "gcc --version" showing:
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

(b) Ubuntu 21.04 and "gcc --version" showing:
gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0

To debug why you are running into this...

(1) Can you please share the output of running "gcc --version"?

(2) Can you please share the exact command and URL you used to download packetdrill, and the exact SHA1 at which you built packetdrill (the output of "git describe")?

Thanks!
neal


--
You received this message because you are subscribed to the Google Groups "packetdrill" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packetdrill...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packetdrill/CA%2Bb%2BER%3D_HaBRQqKjcVdMHZwtEekq2kg2ie33oUi2H%3D6BA6Tx5Q%40mail.gmail.com.

Robert Raszuk

unread,
Aug 5, 2021, 10:45:47 AM8/5/21
to Neal Cardwell, packe...@googlegroups.com
Hello Neal,

Many thx for your reply. Pls see inline the answers to the questions you asked. 

robert@nuc2-eo:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
robert@nuc2-eo:~$



Many thx,
R.






Robert Raszuk

unread,
Aug 5, 2021, 11:41:25 AM8/5/21
to Neal Cardwell, packe...@googlegroups.com
Hi,

Just an update .. when I use src from git it indeed compiles cleanly ! 

The link I found before to get it is here and apparently I guess it should be obsoleted: 


Btw will try to test it more on LAN but for now I found on wiki some magic switches -S -L -l which "Usage:" help does not explain at all :) 

I guess time to search the code ... 

Many thx,
Robert






Neal Cardwell

unread,
Aug 5, 2021, 11:46:46 AM8/5/21
to Robert Raszuk, packe...@googlegroups.com
Thanks for the details!

Yes, the version of packetdrill that you have downloaded is a 7-year-old archive of packetdrill from its old location on code.google.com. :-)

It sounds like you concluded the same thing, and downloaded the current version of packetdrill at:

I have requested that the old code.google.com version of the project be removed and replaced with a redirect to the new location. Sorry for the confusion!

Btw will try to test it more on LAN but for now I found on wiki 
> some magic switches -S -L -l which "Usage:" help does not explain at all :) 

Those "-S -L -l" flags look like flags for the run_all.py script. If you run the run_all.py script and pass the --help option:

  :/tmp/packetdrill/gtests/net/packetdrill$ ./run_all.py --help

...then you get some usage help that explains the flags:

usage: run_all.py [-h] [-l] [-L] [-p] [-s] [-S] [-v] [path]positional arguments: pathoptional arguments: -h, --help show this help message and exit -l, --log_on_error requires verbose -L, --log_on_success requires verbose -p, --parallelize_dirs -s, --subdirs -S, --serialized -v, --verbose
thanks,
neal
Reply all
Reply to author
Forward
0 new messages