wiki:TesterDocumentation

Version 5 (modified by samuli, 7 years ago) (diff)

--

Building development versions of OpenVPN

Downloading OpenVPN snapshots

There are two ways to get development versions of OpenVPN. First option is to get snapshot builds available here:

There are several directories there, one per git branch. New features are available in the allmerged branch. Weekly snapshots of various OpenVPN branches are also available here.

Once you've downloaded a snapshot package, extract it:

gzip -dc openvpn-<something>.tar.gz | tar xvf -
cd openvpn-<something>/

Fetching sources using git

Second option is to fetch sources using Git. This method is preferred, as it allows you to easily keep using the latest code. If you have not cloned the git repository you need to do this:

git clone git://openvpn.git.sourceforge.net/gitroot/openvpn/openvpn-testing.git
cd openvpn-testing
git checkout -b allmerged origin/allmerged

If you already have git repository clone:

cd openvpn-testing
git checkout allmerged
git pull --rebase origin

Building

First prepare for building:

autoreconf -vi

When testing this version of OpenVPN, we would appreciate if all deprecated features would be disabled by default. We want to know how OpenVPN behaves for you without these features. When doing the compile-time configuration of OpenVPN, please make sure the following arguments are included:

  • --disable-depr-random-resolv

Example:

./configure --disable-depr-random-resolv
make [-j <num CPU cores + 1>]

Once you've ran make, you can install OpenVPN using

make install

Debugging

If OpenVPN crashes, you can help developers figure out the problem by giving them a backtrace of the crash. If you're running released (stable) version of OpenVPN, you should install the openvpn debug and gdb packages and then run openvpn via gdb. On "testing" turn on debugging before compilation. In either case you can get a backtrace of the crash like this:

$ gdb /usr/sbin/openvpn
[gdb info message...blablabla...]
(gdb) run --config <your config file> [--other-arguments-you-might-pass]
[wait for the crash]
(gdb) bt
[full backtrace should appear]

Enable core dump

In some cases, it's not possible to trigger the bug when running via gdb directly. In this case, you can enable core dumps. On most distributions and *nix OSes today, you need to enable this from your shell before starting OpenVPN.

$ ulimit -c unlimited

Then run OpenVPN with the normal arguments. When OpenVPN crashes, it will now most likely create a core file which can be used for debugging the state of OpenVPN when it crashed.

$ gdb openvpn {core file}
[gdb info message...blablabla...]
(gdb) bt
[full backtrace should appear]

Please save the core files for a little while before deleting them. It might be that the developers would ask for a copy of the core file in some situations, to investigate more carefully the state OpenVPN was in when it crashed. But be also aware of that these core files can (will most likely) contain sensitive data, like encryption keys and certificates. So share with care.

Beware that if you start OpenVPN via init scripts, it will most likely not dump core files, unless you change the ulimit inside the init script.

Reporting bugs

You should document a few things:

  • Operating system (e.g. OpenBSD 4.3)
  • Your ./configure command-line
  • The complete output of:
    $ openvpn --version
    

Please note that we would like to have both success and failure reports.

Attachments (1)

Download all attachments as: .zip