Commit Graph

4055 Commits

Author SHA1 Message Date
Ayush Ranjan d0127b23f2 [runtime tests] Update bugs and un-exclude passing tests.
PiperOrigin-RevId: 325045486
2020-08-05 10:23:12 -07:00
Dean Deng a2e129b540 Add missing case in tmpfs.inode.direntType.
This was discovered by syzkaller.

PiperOrigin-RevId: 325025193
2020-08-05 08:35:41 -07:00
Nayana Bidari 0e6f7a12c2 Update variables for implementation of RACK in TCP
RACK (Recent Acknowledgement) is a new loss detection
algorithm in TCP. These are the fields which should be
stored on connections to implement RACK algorithm.

PiperOrigin-RevId: 324948703
2020-08-04 20:59:34 -07:00
Adin Scannell c5f5806fe6 Enable "make packetimpact-tests" to work.
This required minor fixes to the bazel wrapper. The "dut_platform" is
also changed to "native" to line-up with the system call tests and
remove the hard-coded "linux" and "netstack" strings.
2020-08-04 20:49:00 -07:00
Dean Deng 87ee3898f7 Handle EOF in vfs2 sendfile.
Discovered by syzkaller.

PiperOrigin-RevId: 324938438
2020-08-04 19:12:31 -07:00
Fabricio Voznika 102735bfb4 Inline gofer.regularFileFD.pwriteLocked
Go compiler barely inlines anything, so inline by hand
pwriteLocked since it's called from a single place.

PiperOrigin-RevId: 324937734
2020-08-04 19:05:55 -07:00
Dean Deng b44408b40e Automated rollback of changelist 324906582
PiperOrigin-RevId: 324931854
2020-08-04 18:20:20 -07:00
Ayush Ranjan 338f96b36c [runtime tests] Exclude flaky tests.
PiperOrigin-RevId: 324923599
2020-08-04 17:20:24 -07:00
Zach Koopmans be7079578e Port sysbench benchmark.
PiperOrigin-RevId: 324918229
2020-08-04 16:51:04 -07:00
Fabricio Voznika 0ba702bd6c Error if dup'ing stdio FDs will clobber another FD
The loader dup's stdio FD into stable FD's starting at a fixed
number. During tests, it's possible that the target FD is already
in use. Added check to error early so it's easier to debug failures.
Also bumped up the starting FD number to prevent collisions.

PiperOrigin-RevId: 324917299
2020-08-04 16:45:01 -07:00
Ghanan Gowripalan 00993130e5 Use 1 fragmentation component per IP stack
This will help manage memory consumption by IP reassembly when
receiving IP fragments on multiple network endpoints. Previously,
each endpoint would cap memory consumption at 4MB, but with this
change, each IP stack will cap memory consumption at 4MB.

No behaviour changes.

PiperOrigin-RevId: 324913904
2020-08-04 16:27:00 -07:00
Dean Deng 0500f84b6f Add reference counting utility to VFS2.
The utility has several differences from the VFS1 equivalent:
- There are no weak references, which have a significant overhead
- In order to print useful debug messages with the type of the reference-
  counted object, we use a generic Refs object with the owner type as a
  template parameter. In vfs1, this was accomplished by storing a type name
  and caller stack directly in the ref count (as in vfs1), which increases the
  struct size by 6x. (Note that the caller stack was needed because fs types
  like Dirent were shared by all fs implementations; in vfs2, each impl has
  its own data structures, so this is no longer necessary.)

As an example, the utility is added to tmpfs.inode.

Updates #1486.

PiperOrigin-RevId: 324906582
2020-08-04 15:48:27 -07:00
Craig Chi 9094adfc27 Fix FUSE integration test failed with ECONNREFUSED
The newer version of FUSE_INIT checks the response from the FUSE server
if its major number is equal to 7. If it's not, then FUSE_INIT fails and
further filesystem operations will get ECONNREFUSED. To mitigate this
issue, we can send back a response with major version equals to 7 when
consuming the first FUSE_INIT request.

Fixes #3500
2020-08-04 14:48:37 -07:00
gVisor bot af2f456735 Merge pull request #3320 from craig08:fuse-integration-test
PiperOrigin-RevId: 324877577
2020-08-04 13:25:40 -07:00
Craig Chi 21d0334e7f Add FUSE integration test
This commit adds an integration test framework for FUSE support. Please
refer to the test example and test/fuse/README.md for further details.

Fixes #3098
2020-08-04 12:27:55 -07:00
Kevin Krakauer 12c2c6ae30 docs: tools/images.mk does not exist.
PiperOrigin-RevId: 324833018
2020-08-04 10:02:58 -07:00
Ayush Ranjan 7dfcf727a5 [runtime tests] Fix nodejs runtime tests.
- Exclude flaky tests.
- Bump timeout.
- Un-exclude passing tests to increase testing surface.
- Create/Update bugs for tests that pass on runc but fail on runsc.

PiperOrigin-RevId: 324830840
2020-08-04 09:51:13 -07:00
gVisor bot d64ba89da3 Internal change.
PiperOrigin-RevId: 324826968
2020-08-04 09:31:11 -07:00
Bhasker Hariharan 1bdadbc4f8 Fix broken httpd_test.
PiperOrigin-RevId: 324822613
2020-08-04 09:07:09 -07:00
gVisor bot 7142a86a2c Internal change.
PiperOrigin-RevId: 324819246
2020-08-04 08:49:02 -07:00
Ian Lewis 9873b8ea3e Add shim documentation to the website.
Add three new doc pages to the website.

- A containerd quick start covering containerd 1.2. This is limited to shim v2
  and runtime class as the docs would get too complicated explaining all the
  combinations that are possible. We want folks to use shim v2 and runtime
  class anyway.
- An advanced configuration page. This covers containerd and
  containerd-shim-runsc-v1's configuration options.
- A page for old versions (i.e. containerd 1.1). Notes that this is deprecated
  and supported on a best-effort basis.

Fixes #3279

PiperOrigin-RevId: 324775563
2020-08-04 02:43:44 -07:00
Ian Lewis a02b7534f2 Fix grouping and ordering of website menus
Groups subcategories and sorts their pages by weight properly. Subcategories
are sorted by name. Pages within subcategories are sorted by weight.

PiperOrigin-RevId: 324766128
2020-08-04 01:07:42 -07:00
Andrei Vagin 25798f214c Add callbacks to support lazy loading/restoring thread states
PiperOrigin-RevId: 324748508
2020-08-03 22:08:25 -07:00
Dean Deng b5c9ff8192 Exclude flaky nodejs runtime test.
PiperOrigin-RevId: 324738840
2020-08-03 20:32:23 -07:00
Ayush Ranjan ad7c9fc4c3 [vfs2] Implement /sys/devices/system/cpu/cpuX.
Fixes #3364

PiperOrigin-RevId: 324724614
2020-08-03 18:16:54 -07:00
gVisor bot fe441dd251 Internal change.
PiperOrigin-RevId: 324695672
2020-08-03 15:30:30 -07:00
Dean Deng 5626ccf61f Remove old TODO.
Fixes #2920.

PiperOrigin-RevId: 324695118
2020-08-03 15:24:54 -07:00
Nayana Bidari b2ae7ea1bb Plumbing context.Context to DecRef() and Release().
context is passed to DecRef() and Release() which is
needed for SO_LINGER implementation.

PiperOrigin-RevId: 324672584
2020-08-03 13:36:05 -07:00
gVisor bot ef11bb936b Merge pull request #3460 from zhlhahaha:1927
PiperOrigin-RevId: 324658881
2020-08-03 12:38:15 -07:00
Dean Deng 1fbbc795ef Add inotify events for fallocate and tests for fallocate/sendfile.
Updates #1479, #2923.

PiperOrigin-RevId: 324658826
2020-08-03 12:36:14 -07:00
gVisor bot 07267fc4c0 Merge pull request #3469 from craig08:fuse-fix-test-mount-failed
PiperOrigin-RevId: 324657612
2020-08-03 12:27:03 -07:00
Bhasker Hariharan 1a93a78d10 Add support for a reverse HTTPD test.
This change adds a new reverse HTTP test where the HTTPD server runs
in a native container but the client runs inside gVisor. It allows
us to test download performance under varying levels of concurrency.

Also tweaks the concurrent request numbers to test for high levels
of concurrency.

PiperOrigin-RevId: 324651203
2020-08-03 12:00:01 -07:00
Adin Scannell e3c349d219 Fix syntax error in issue_reviver.
PiperOrigin-RevId: 324642975
2020-08-03 11:22:52 -07:00
Adin Scannell 10f6c41bbd Include shim binaries in the Go branch.
PiperOrigin-RevId: 324615016
2020-08-03 09:09:51 -07:00
Howard Zhang b9a49f2065 AARCH64:fix variable name collision with register name
The variable name is g which is collision with the reserved name
for R28. This leads to bazel build failure on ARM with following
information:
(register+register) not supported on this architecture

rename it from g to ptr (referenced from golang source
code)

Signed-off-by: Howard Zhang <howard.zhang@arm.com>
2020-08-03 16:38:51 +08:00
gVisor bot d5b31458aa Merge pull request #3300 from lubinszARM:pr_fpsimd_usr
PiperOrigin-RevId: 324309862
2020-07-31 16:48:24 -07:00
Kevin Krakauer fcc88a8b27 Fix PHONY target typos
PiperOrigin-RevId: 324305107
2020-07-31 16:20:35 -07:00
Craig Chi e76c3c1064 Fix MountFuseFilesystem tests failing
Before kernel version 4.16-rc6, fuse mount is protected by
capable(CAP_SYS_ADMIN). After this version, it uses
ns_capable(CAP_SYS_ADMIN) to protect. Before the 4.16 kernel,
it was not allowed to mount fuse file systems without the
global CAP_SYS_ADMIN.

Fixes #3360
2020-07-31 16:18:40 -07:00
Andrei Vagin fd5f4ffed1 test/socket_netlink_route: check that there is a route on local or main tables
A new network namespace has only the local route table.

PiperOrigin-RevId: 324303629
2020-07-31 16:14:06 -07:00
Adin Scannell a7d9aa6d5b Use proper set-output syntax.
PiperOrigin-RevId: 324302828
2020-07-31 16:08:29 -07:00
Ayush Ranjan 12a6657d9c [runtime tests] Enhance java runtime test.
- Added a bunch of helpful options which help in speeding up the test and
  providing useful output.
- Unexcluded passing tests and updated bugs. Excluded tests which were failing.
- Increased the batch size for java tests so that we can take advantage of
  the shared JVMs.

The running time of the tests decreased from 3+ hours (I don't know the exact
running time because this test has always timed out after 3 hours) to 1 hour
15 minutes. We can reliably run this a CI kokoro job.

PiperOrigin-RevId: 324301503
2020-07-31 16:01:36 -07:00
Ghanan Gowripalan ade4ff95fc Support fragments from different sources
Prevent fragments with different source-destination pairs from
conflicting with each other.

Test:
    - ipv6_test.TestReceiveIPv6Fragments
    - ipv4_test.TestReceiveIPv6Fragments
PiperOrigin-RevId: 324283246
2020-07-31 14:19:49 -07:00
gVisor bot b22c2ab1d7 Merge pull request #3348 from kevinGC:so-orig-dst
PiperOrigin-RevId: 324279280
2020-07-31 14:01:03 -07:00
gVisor bot 8908baaf79 Internal change.
PiperOrigin-RevId: 324259991
2020-07-31 12:25:38 -07:00
Kevin Krakauer 5d2b09b71d s/github.dev/gvisor.dev
PiperOrigin-RevId: 324249991
2020-07-31 11:40:12 -07:00
Kevin Krakauer 2a7b2a61e3 iptables: support SO_ORIGINAL_DST
Envoy (#170) uses this to get the original destination of redirected
packets.
2020-07-31 10:47:26 -07:00
gVisor bot 987242716a Merge pull request #3420 from google:dependabot/bundler/benchmarks/workloads/ruby/activesupport-6.0.3.2
PiperOrigin-RevId: 324238154
2020-07-31 10:45:20 -07:00
Dean Deng 68a7da9549 Clean up vfs2 fallocate.
Move to setstat.go and add a FileDescription wrapper method.

PiperOrigin-RevId: 324165277
2020-07-31 00:40:52 -07:00
Mithun Iyer ad8164bb50 Fix TCP CurrentConnected counter updates.
CurrentConnected counter is incorrectly decremented on close of an
endpoint which is still not connected.

Fixes #3443

PiperOrigin-RevId: 324155171
2020-07-30 22:49:30 -07:00
Zach Koopmans 98f9527c04 Port nginx and move parsers to own package.
This change:
- Ports the nginx benchmark.
- Switches the Httpd benchmark to use 'hey' as a client.
- Moves all parsers to their own package 'tools'.

Parsers are moved to their own package because 1) parsing output of a command
is often dependent on the format of the command (e.g. 'fio --json'), 2) to
enable easier reuse, and 3) clean up and simplify actual running benchmarks
(no TestParser functions and ugly sample output in benchmark files).

PiperOrigin-RevId: 324144165
2020-07-30 21:17:45 -07:00