sgx-lkl: [Tests] recvmsg/sendto fails with "bad file descriptor"

2020-06-11T19:06:41.000000Z [(H)ERROR] tid(0x7f9f23fff700) | :OE_BUFFER_TOO_SMALL [/agent/_work/1/s/openenclave/host/sgx/sgxquote.c:oe_sgx_get_supported_attester_format_ids:109] Azure Quote Provider: libdcap_quoteprov.so [ERROR]: Could not retreive environment variable for ‘AZDCAP_DEBUG_LOG_LEVEL’

[[  SGX-LKL ]] sgxlkl_enclave_init(): enter
[[  SGX-LKL ]] sgxlkl_enclave_show_attribute(): enclave base=0x7f9e80000000 size=1.043 GB
[[  SGX-LKL ]] sgxlkl_enclave_show_attribute(): enclave heap base=0x7f9e80b5c000 size=1024.00 M end=0x7f9ec0b5c000
[[  SGX-LKL ]] sgxlkl_enclave_init(): calling _dlstart_c()
[[  SGX-LKL ]] _register_enclave_signal_handlers(): Registering OE exception handler...
[[  SGX-LKL ]] lkl_start_init(): kernel command line: 'mem=512m console=hvc0'
[[  SGX-LKL ]] lkl_start_init(): lkl_start_kernel() called
[    0.000000] Linux version 5.3.0+ (AzDevOps@cisca24ba000129) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #1 Thu Jun 11 18:46:42 UTC 2020
[    0.000000] memblock address range: 0x7f9ea08db000 - 0x7f9ec08db000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129280
[    0.000000] Kernel command line: mem=512m console=hvc0 virtio_mmio.device=256@0x1000000:1
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory available: 516256k/524288k RAM
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 4096
[    0.000000] lkl: irqs initialized
[    0.000000] clocksource: lkl: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.000000] lkl: time and timers initialized (irq2)
[    0.001617] printk: console [hvc0] enabled
[    0.001617] pid_max: default: 4096 minimum: 301
[    0.002124] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.002124] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.005885] devtmpfs: initialized
[    0.013600] random: get_random_bytes called from 0x00007f9e80676515 with crng_init=0
[    0.014144] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.014144] futex hash table entries: 16 (order: -4, 384 bytes, linear)
[    0.014144] xor: automatically using best checksumming function   8regs     
[    0.014144] NET: Registered protocol family 16
[    0.019704] clocksource: Switched to clocksource lkl
[    0.019704] NET: Registered protocol family 2
[    0.020260] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.020815] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.020815] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.020815] TCP: Hash tables configured (established 4096 bind 4096)
[    0.021377] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.021377] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.021934] NET: Registered protocol family 1
[    0.021934] virtio-mmio: Registering device virtio-mmio.0 at 0x1000000-0x10000ff, IRQ 1.
[    0.021934] workingset: timestamp_bits=62 max_order=18 bucket_order=0
[    0.024684] NET: Registered protocol family 38
[    0.024684] io scheduler mq-deadline registered
[    0.024684] io scheduler kyber registered
[    0.160085] software IO TLB: mapped [mem 0x7f9f2eb97000-0x7f9f32b97000] (64MB)
[    0.162179] loop: module loaded
[    0.162179] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[    0.164578] wireguard: WireGuard 0.0.20191219 loaded. See www.wireguard.com for information.
[    0.165136] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    0.165692] NET: Registered protocol family 10
[    0.166249] Segment Routing with IPv6
[    0.166804] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.166804] This architecture does not have kernel memory protection.
[    0.175671] Run /init as init process
[[  SGX-LKL ]] lkl_start_init(): lkl_start_kernel() finished
[[  SGX-LKL ]] lkl_start_init(): creating LKL termination thread
[[  SGX-LKL ]] create_lkl_termination_thread(): enter
[[  SGX-LKL ]] lkl_start_init(): calling lkl_mount_virtial()
[[  SGX-LKL ]] lkl_termination_thread(): enter
[[  SGX-LKL ]] lkl_termination_thread(): Performed LKL syscall to get host task allocated (pid=36)
[[  SGX-LKL ]] lkl_start_init(): calling init_random()
[[  SGX-LKL ]] init_random(): Adding entropy to entropy pool
[    0.177108] random: crng init done
[[  SGX-LKL ]] init_enclave_clock(): Setting enclave realtime clock
[    0.231901] virtio_blk virtio1: [vda] 3072000 512-byte logical blocks (1.57 GB/1.46 GiB)
2020-06-11T19:06:41.000000Z [(H)ERROR] tid(0x7f9f23fff700) | :OE_BUFFER_TOO_SMALL [/agent/_work/1/s/openenclave/host/sgx/sgxquote.c:oe_sgx_get_supported_attester_format_ids:109]
Azure Quote Provider: libdcap_quoteprov.so [ERROR]: Could not retreive environment variable for 'AZDCAP_DEBUG_LOG_LEVEL'
[[  SGX-LKL ]] lkl_mount_disk(): lkl_mount_disk(dev="/dev/vda", mnt="/mnt/vda", ro=0)
[    0.234708] EXT4-fs (vda): recovery complete
[    0.234708] EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: 
[[  SGX-LKL ]] lkl_mount_disks(): Set working directory: /
[[  SGX-LKL ]] libc_start_main_stage2(): Calling app main: /ltp/testcases/kernel/syscalls/sendto/sendto01
sendto01    0  [1;34mTINFO[0m  :  Thread created
sendto01    1  [1;32mTPASS[0m  :  bad file descriptor successful
[[  SGX-LKL ]] lkl_terminate(): terminating LKL (exit_status=1)
[[  SGX-LKL ]] lkl_termination_thread(): termination thread unblocked
[[  SGX-LKL ]] lkl_termination_thread(): calling lkl_sys_chdir(/)
[[  SGX-LKL ]] lkl_termination_thread(): calling lkl_virtio_netdev_remove()
[[  SGX-LKL ]] lkl_termination_thread(): calling lkl_sys_halt()
[    0.252325] reboot: Restarting system
[[  SGX-LKL ]] lkl_termination_thread(): lthread_detach2() done

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

recvmsg fixed with PR https://github.com/lsds/sgx-lkl/pull/578 send01 fixed with PR https://github.com/lsds/sgx-lkl/pull/586 sendto01 fixed with PR https://github.com/lsds/sgx-lkl/pull/587 recvfrom01 fixed with PR https://github.com/lsds/sgx-lkl/pull/583 sendfile02 fixed with PR https://github.com/lsds/sgx-lkl/pull/588 sendmsg01 fixed with PR https://github.com/lsds/sgx-lkl/pull/585

sendfile 05,06, 09 left. All others fixed.