https://bugs.kde.org/show_bug.cgi?id=465435
Bug ID: 465435 Summary: m_libcfile.c:66 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed. Classification: Developer tools Product: valgrind Version: 3.20.0 Platform: Debian stable OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: tin...@noel.tf Target Milestone: --- When running crosvm under valgrind, I'm hitting the following assertion: m_libcfile.c:66 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed. STEPS TO REPRODUCE 1. I'm using the mesa CI container in Docker as privileged, and I'm running crosvm in valgrind with crosvm --no-syslog run --gpu vulkan=true,gles=false,backend=virglrenderer,egl=true,surfaceless=true,width=1024,height=768 --gpu-render-server path=/usr/local/libexec/virgl_render_server -m 4096 -c 2 --disable-sandbox --shared-dir /:my_root:type=fs:writeback=true:timeout=60:cache=always --host-ip=192.168.30.1 --netmask=255.255.255.0 --mac AA:BB:CC:00:00:12 -p quiet console=null root=my_root rw rootfstype=virtiofs ip=192.168.30.2::192.168.30.1:255.255.255.0:crosvm:eth0 init=/mesa/crosvm-init.sh OBSERVED RESULT Valgrind stops with ab assert EXPECTED RESULT Crosvm to continue to run SOFTWARE/OS VERSIONS Linux 78aae9de313f 5.15.0-58-generic #64~20.04.1-Ubuntu SMP Fri Jan 6 16:42:31 UTC 2023 x86_64 GNU/Linux ADDITIONAL INFORMATION ==283== --283-- Valgrind options: --283-- -v --283-- Contents of /proc/version: --283-- Linux version 5.15.0-58-generic (buildd@lcy02-amd64-033) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #64~20.04.1-Ubuntu SMP Fri Jan 6 16:42:31 UTC 2023 --283-- --283-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed --283-- Page sizes: currently 4096, max supported 4096 --283-- Valgrind library directory: /usr/libexec/valgrind --283-- Reading syms from /usr/local/bin/crosvm --283-- Reading syms from /lib/x86_64-linux-gnu/ld-2.31.so --283-- Considering /usr/lib/debug/.build-id/e2/5570740d590e5cb7b1a20d86332a8d1bb3b65f.debug .. --283-- .. build-id is valid --283-- Reading syms from /usr/libexec/valgrind/memcheck-amd64-linux --283-- Considering /usr/lib/debug/.build-id/31/b12880cc55b577063de0457f6dbfffd17ebed4.debug .. --283-- .. build-id is valid --283-- object doesn't have a dynamic symbol table --283-- Scheduler: using generic scheduler lock implementation. --283-- Reading suppressions file: /usr/libexec/valgrind/default.supp ==283== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-283-by-???-on-78aae9de313f ==283== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-283-by-???-on-78aae9de313f ==283== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-283-by-???-on-78aae9de313f ==283== ==283== TO CONTROL THIS PROCESS USING vgdb (which you probably ==283== don't want to do, unless you know exactly what you're doing, ==283== or are doing some strange experiment): ==283== /usr/bin/vgdb --pid=283 ...command... ==283== ==283== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==283== /path/to/gdb crosvm ==283== and then give GDB the following command ==283== target remote | /usr/bin/vgdb --pid=283 ==283== --pid is optional if only one valgrind process is running ==283== --283-- REDIR: 0x401fa70 (ld-linux-x86-64.so.2:strlen) redirected to 0x580bc6a2 (vgPlain_amd64_linux_REDIR_FOR_strlen) --283-- REDIR: 0x401f850 (ld-linux-x86-64.so.2:index) redirected to 0x580bc6bc (vgPlain_amd64_linux_REDIR_FOR_index) --283-- Reading syms from /usr/libexec/valgrind/vgpreload_core-amd64-linux.so --283-- Considering /usr/lib/debug/.build-id/c0/82d431d9afeb5607de0aad7fc1ae7269254c4c.debug .. --283-- .. build-id is valid --283-- Reading syms from /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so --283-- Considering /usr/lib/debug/.build-id/30/32ca2a6a9aa36d4c02d7c8e09830f31028f0b7.debug .. --283-- .. build-id is valid ==283== WARNING: new redirection conflicts with existing -- ignoring it --283-- old: 0x0401fa70 (strlen ) R-> (0000.0) 0x580bc6a2 vgPlain_amd64_linux_REDIR_FOR_strlen --283-- new: 0x0401fa70 (strlen ) R-> (2007.0) 0x0483f8c0 strlen --283-- REDIR: 0x401c290 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4840870 (strcmp) --283-- REDIR: 0x401ffb0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4844400 (mempcpy) --283-- Reading syms from /lib/x86_64-linux-gnu/libcap.so.2.44 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libX11.so.6.4.0 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 --283-- Considering /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 .. --283-- .. CRC mismatch (computed fee28fcb wanted ccf52917) --283-- object doesn't have a symbol table --283-- Reading syms from /usr/local/lib/libwayland-client.so.0.3.0 --283-- Reading syms from /usr/local/lib/libvirglrenderer.so.1.7.7 --283-- Reading syms from /lib/x86_64-linux-gnu/libc-2.31.so --283-- Considering /usr/lib/debug/.build-id/b5/03275bf9fee51581fdceef97533b194035b4f7.debug .. --283-- .. build-id is valid ==283== WARNING: new redirection conflicts with existing -- ignoring it --283-- old: 0x04c1bda0 (memalign ) R-> (1011.0) 0x0483eb80 memalign --283-- new: 0x04c1bda0 (memalign ) R-> (1017.0) 0x0483eb50 aligned_alloc ==283== WARNING: new redirection conflicts with existing -- ignoring it --283-- old: 0x04c1bda0 (memalign ) R-> (1011.0) 0x0483eb80 memalign --283-- new: 0x04c1bda0 (memalign ) R-> (1017.0) 0x0483eb20 aligned_alloc ==283== WARNING: new redirection conflicts with existing -- ignoring it --283-- old: 0x04c1bda0 (memalign ) R-> (1011.0) 0x0483eb80 memalign --283-- new: 0x04c1bda0 (memalign ) R-> (1017.0) 0x0483eb50 aligned_alloc ==283== WARNING: new redirection conflicts with existing -- ignoring it --283-- old: 0x04c1bda0 (memalign ) R-> (1011.0) 0x0483eb80 memalign --283-- new: 0x04c1bda0 (memalign ) R-> (1017.0) 0x0483eb20 aligned_alloc --283-- Reading syms from /lib/x86_64-linux-gnu/libgcc_s.so.1 --283-- object doesn't have a symbol table --283-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.31.so --283-- Considering /usr/lib/debug/.build-id/25/5e355c207aba91a59ae1f808e3b4da443abf0c.debug .. --283-- .. build-id is valid --283-- Reading syms from /lib/x86_64-linux-gnu/libm-2.31.so --283-- Considering /usr/lib/debug/.build-id/1d/6ff6c4c69f3572486bc27b8290ee932b0b9f39.debug .. --283-- .. build-id is valid --283-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.31.so --283-- Considering /usr/lib/debug/.build-id/46/b3bf3f9b9eb092a5c0cf5575e89092f768054c.debug .. --283-- .. build-id is valid --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libffi.so.7.1.0 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libepoxy.so.0.0.0 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/local/lib/libdrm.so.2.4.0 --283-- Reading syms from /builds/tintou/mesa/install/lib/libgbm.so.1.0.0 --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libvulkan.so.1.2.162 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 --283-- object doesn't have a symbol table --283-- Reading syms from /lib/x86_64-linux-gnu/libexpat.so.1.6.12 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libbsd.so.0.11.3 --283-- object doesn't have a symbol table --283-- Reading syms from /usr/lib/x86_64-linux-gnu/libmd.so.0.0.4 --283-- object doesn't have a symbol table --283-- REDIR: 0x4c20120 (libc.so.6:memmove) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) ==283== Preferring higher priority redirection: --283-- old: 0x04cf5290 (__memcpy_avx_unalign) R-> (2018.0) 0x04841b40 __memcpy_avx_unaligned_erms --283-- new: 0x04cf5290 (__memcpy_avx_unalign) R-> (2018.1) 0x04843460 memmove --283-- REDIR: 0x4c1f420 (libc.so.6:strncpy) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c205f0 (libc.so.6:strcasecmp) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1eb70 (libc.so.6:strcat) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1f4b0 (libc.so.6:rindex) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c219f0 (libc.so.6:rawmemchr) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c39d40 (libc.so.6:wmemchr) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c39810 (libc.so.6:wcscmp) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c20360 (libc.so.6:mempcpy) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c20090 (libc.so.6:bcmp) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1f370 (libc.so.6:strncmp) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1ec90 (libc.so.6:strcmp) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c20250 (libc.so.6:memset) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c397a0 (libc.so.6:wcschr) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1f270 (libc.so.6:strnlen) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1ede0 (libc.so.6:strcspn) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c20640 (libc.so.6:strncasecmp) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1ed50 (libc.so.6:strcpy) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c20790 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c3afb0 (libc.so.6:wcsnlen) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c39880 (libc.so.6:wcscpy) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1f520 (libc.so.6:strpbrk) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1ec00 (libc.so.6:index) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1f200 (libc.so.6:strlen) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c25db0 (libc.so.6:memrchr) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c20690 (libc.so.6:strcasecmp_l) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c20020 (libc.so.6:memchr) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c39920 (libc.so.6:wcslen) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1f7c0 (libc.so.6:strspn) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c20560 (libc.so.6:stpncpy) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c204d0 (libc.so.6:stpcpy) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c21a60 (libc.so.6:strchrnul) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c206e0 (libc.so.6:strncasecmp_l) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4c1ff50 (libc.so.6:strstr) redirected to 0x482e1b0 (_vgnU_ifunc_wrapper) --283-- REDIR: 0x4cf2130 (libc.so.6:__strrchr_avx2) redirected to 0x483f300 (rindex) --283-- REDIR: 0x4cf2300 (libc.so.6:__strlen_avx2) redirected to 0x483f7a0 (strlen) --283-- REDIR: 0x4cedc60 (libc.so.6:__strncmp_avx2) redirected to 0x483fe70 (strncmp) --283-- REDIR: 0x4c1b0f0 (libc.so.6:malloc) redirected to 0x4839740 (malloc) --283-- REDIR: 0x4c1fc60 (libc.so.6:__GI_strstr) redirected to 0x48446a0 (__strstr_sse2) --283-- REDIR: 0x4cee180 (libc.so.6:__memchr_avx2) redirected to 0x48408f0 (memchr) --283-- REDIR: 0x4cf5290 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4843460 (memmove) --283-- REDIR: 0x4cee430 (libc.so.6:__rawmemchr_avx2) redirected to 0x4843f20 (rawmemchr) --283-- REDIR: 0x4c1b980 (libc.so.6:realloc) redirected to 0x483e750 (realloc) --283-- REDIR: 0x4c1b720 (libc.so.6:free) redirected to 0x483c090 (free) --283-- REDIR: 0x4cf5720 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x4843360 (memset) --283-- REDIR: 0x4c1be50 (libc.so.6:calloc) redirected to 0x483e4d0 (calloc) syslog init failed: guess of fd for syslog connection was invalid --283-- REDIR: 0x4cee910 (libc.so.6:__memcmp_avx2_movbe) redirected to 0x4842c00 (bcmp) --283-- REDIR: 0x4ced820 (libc.so.6:__strcmp_avx2) redirected to 0x4840770 (strcmp) [2023-02-07T17:55:27.924295456+00:00 INFO crosvm] crosvm started. [2023-02-07T17:55:28.115588802+00:00 INFO crosvm] CLI arguments parsed. --283-- WARNING: Serious error when reading debug info --283-- When reading debug info from /memfd:crosvm_guest (deleted): --283-- failed to stat64/stat this file ==283== Warning: set address range perms: large range [0x59c94000, 0x129c94000) (defined) --283-- WARNING: Serious error when reading debug info --283-- When reading debug info from /memfd:crosvm_guest (deleted): --283-- failed to stat64/stat this file ==283== Warning: set address range perms: large range [0x5740000, 0x35740000) (defined) --283-- REDIR: 0x4cf1f40 (libc.so.6:__strchrnul_avx2) redirected to 0x4843ef0 (strchrnul) --283-- REDIR: 0x4cf5270 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x4844000 (mempcpy) ==284== Warning: invalid file descriptor 1012 in syscall close() ==284== at 0x4C80FC3: close (close.c:27) ==284== by 0x72030B: close_open_fds (libminijail.c:2666) ==284== by 0x72030B: minijail_run_internal (libminijail.c:3412) ==284== by 0x72030B: minijail_run_config_internal (libminijail.c:3546) ==284== by 0x72111E: minijail_run_env_pid_pipes (libminijail.c:3028) ==284== by 0x71AF4F: <&std::path::Path as minijail::Runnable>::run_command (in /usr/local/bin/crosvm) ==284== by 0x719F6A: minijail::Minijail::run_internal (in /usr/local/bin/crosvm) ==284== by 0x719CC9: minijail::Minijail::run_command (in /usr/local/bin/crosvm) ==284== by 0x534F4AF: ??? ==284== by 0x25: ??? ==284== by 0x25: ??? ==284== by 0x534F51F: ??? ==284== by 0x2: ??? ==284== by 0x2: ??? ==284== Warning: invalid file descriptor 1013 in syscall close() ==284== at 0x4C80FC3: close (close.c:27) ==284== by 0x72030B: close_open_fds (libminijail.c:2666) ==284== by 0x72030B: minijail_run_internal (libminijail.c:3412) ==284== by 0x72030B: minijail_run_config_internal (libminijail.c:3546) ==284== by 0x72111E: minijail_run_env_pid_pipes (libminijail.c:3028) ==284== by 0x71AF4F: <&std::path::Path as minijail::Runnable>::run_command (in /usr/local/bin/crosvm) ==284== by 0x719F6A: minijail::Minijail::run_internal (in /usr/local/bin/crosvm) ==284== by 0x719CC9: minijail::Minijail::run_command (in /usr/local/bin/crosvm) ==284== by 0x534F4AF: ??? ==284== by 0x25: ??? ==284== by 0x25: ??? ==284== by 0x534F51F: ??? ==284== by 0x2: ??? ==284== by 0x2: ??? ==284== Warning: invalid file descriptor 1014 in syscall close() ==284== at 0x4C80FC3: close (close.c:27) ==284== by 0x72030B: close_open_fds (libminijail.c:2666) ==284== by 0x72030B: minijail_run_internal (libminijail.c:3412) ==284== by 0x72030B: minijail_run_config_internal (libminijail.c:3546) ==284== by 0x72111E: minijail_run_env_pid_pipes (libminijail.c:3028) ==284== by 0x71AF4F: <&std::path::Path as minijail::Runnable>::run_command (in /usr/local/bin/crosvm) ==284== by 0x719F6A: minijail::Minijail::run_internal (in /usr/local/bin/crosvm) ==284== by 0x719CC9: minijail::Minijail::run_command (in /usr/local/bin/crosvm) ==284== by 0x534F4AF: ??? ==284== by 0x25: ??? ==284== by 0x25: ??? ==284== by 0x534F51F: ??? ==284== by 0x2: ??? ==284== by 0x2: ??? ==284== Warning: invalid file descriptor 1015 in syscall close() ==284== Use --log-fd=<number> to select an alternative log fd. ==284== at 0x4C80FC3: close (close.c:27) ==284== by 0x72030B: close_open_fds (libminijail.c:2666) ==284== by 0x72030B: minijail_run_internal (libminijail.c:3412) ==284== by 0x72030B: minijail_run_config_internal (libminijail.c:3546) ==284== by 0x72111E: minijail_run_env_pid_pipes (libminijail.c:3028) ==284== by 0x71AF4F: <&std::path::Path as minijail::Runnable>::run_command (in /usr/local/bin/crosvm) ==284== by 0x719F6A: minijail::Minijail::run_internal (in /usr/local/bin/crosvm) ==284== by 0x719CC9: minijail::Minijail::run_command (in /usr/local/bin/crosvm) ==284== by 0x534F4AF: ??? ==284== by 0x25: ??? ==284== by 0x25: ??? ==284== by 0x534F51F: ??? ==284== by 0x2: ??? ==284== by 0x2: ??? ==284== Warning: invalid file descriptor 1016 in syscall close() ==284== at 0x4C80FC3: close (close.c:27) ==284== by 0x72030B: close_open_fds (libminijail.c:2666) ==284== by 0x72030B: minijail_run_internal (libminijail.c:3412) ==284== by 0x72030B: minijail_run_config_internal (libminijail.c:3546) ==284== by 0x72111E: minijail_run_env_pid_pipes (libminijail.c:3028) ==284== by 0x71AF4F: <&std::path::Path as minijail::Runnable>::run_command (in /usr/local/bin/crosvm) ==284== by 0x719F6A: minijail::Minijail::run_internal (in /usr/local/bin/crosvm) ==284== by 0x719CC9: minijail::Minijail::run_command (in /usr/local/bin/crosvm) ==284== by 0x534F4AF: ??? ==284== by 0x25: ??? ==284== by 0x25: ??? ==284== by 0x534F51F: ??? ==284== by 0x2: ??? ==284== by 0x2: ??? ==284== Warning: invalid file descriptor 1017 in syscall close() ==284== at 0x4C80FC3: close (close.c:27) ==284== by 0x72030B: close_open_fds (libminijail.c:2666) ==284== by 0x72030B: minijail_run_internal (libminijail.c:3412) ==284== by 0x72030B: minijail_run_config_internal (libminijail.c:3546) ==284== by 0x72111E: minijail_run_env_pid_pipes (libminijail.c:3028) ==284== by 0x71AF4F: <&std::path::Path as minijail::Runnable>::run_command (in /usr/local/bin/crosvm) ==284== by 0x719F6A: minijail::Minijail::run_internal (in /usr/local/bin/crosvm) ==284== by 0x719CC9: minijail::Minijail::run_command (in /usr/local/bin/crosvm) ==284== by 0x534F4AF: ??? ==284== by 0x25: ??? ==284== by 0x25: ??? ==284== by 0x534F51F: ??? ==284== by 0x2: ??? ==284== by 0x2: ??? --283-- REDIR: 0x4c1cb10 (libc.so.6:posix_memalign) redirected to 0x483ea60 (posix_memalign) valgrind: m_libcfile.c:66 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed. -- You are receiving this mail because: You are watching all bug changes.