dart-lang/sdk

Process tests sometimes cause timeout on Linux

sgjesse opened this issue · 2 comments

Either of the process tests

  ProcessExitTest.dart
  ProcessSegfaultTest.dart
  ProcessStartExceptionTest.dart
  ProcessStderrTest.dart
  ProcessStdoutTest.dart

can hang on Linux. It happens once every ~25 runs.

This comment was originally written by fmalita@google.com


Hanging stack trace:

#­0 0xf77c0430 in __kernel_vsyscall ()
#­1 0xf7476e43 in __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:95
#­2 0xf740c367 in _L_lock_9639 () from /lib32/libc.so.6
#­3 0xf740ab96 in __libc_free (mem=0xa138448) at malloc.c:3736
#­4 0xf75f4a91 in operator delete(void*) () from /usr/lib32/libstdc++.so.6
#­5 0x0805d697 in ExitHandle (processSignal=17, siginfo=0xfff1d9bc, tmp=0xfff1da3c) at ../runtime/bin/process_linux.cc:70
#­6 <signal handler called>
#­7 0xf740896d in _int_malloc (av=<value optimized out>, bytes=<value optimized out>) at malloc.c:4500
#­8 0xf740ac6c in __libc_malloc (bytes=520) at malloc.c:3660
#­9 0xf75f6f87 in operator new(unsigned int) () from /usr/lib32/libstdc++.so.6
#­10 0x08076644 in dart::Handles<2, 64, 4>::SetupNextZoneBlock (this=0xfff1eac8) at ../runtime/vm/handles_impl.h:184
#­11 0x08076339 in dart::Handles<2, 64, 4>::AllocateHandleInZone (this=0xfff1eac8) at ../runtime/vm/handles.h:182
#­12 0x08075e67 in dart::Handles<2, 64, 4>::AllocateZoneHandle () at ../runtime/vm/handles_impl.h:70
#­13 0x08074f17 in dart::VMHandles::AllocateZoneHandle () at ../runtime/vm/handles.cc:45
#­14 0x080beb5e in dart::Type::ZoneHandle (raw_ptr=0xf3202361) at ../runtime/vm/object.h:727
#­15 0x080c257c in dart::ParamList::AddReceiver(int) ()

We're calling unsafe functions (delete/free) in the SIGCHLD handler, deadlocking glibc's allocator.