Skip to content

Crash in VM when running tests using Dart test runner #802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sgjesse opened this issue Dec 12, 2011 · 4 comments
Closed

Crash in VM when running tests using Dart test runner #802

sgjesse opened this issue Dec 12, 2011 · 4 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@sgjesse
Copy link
Contributor

sgjesse commented Dec 12, 2011

Running the Dart test runner sometimes crashes the VM.

On r2336 the following was observed:

gdb --args out/Debug_ia32/dart tools/test.dart -m debug

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xf35bfb70 (LWP 21997)]
0xf7fdf430 in __kernel_vsyscall ()
(gdb) bt

­0 0xf7fdf430 in __kernel_vsyscall ()

­1 0xf7bdf921 in *__GI_raise (sig=6)

    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64

­2 0xf7be2d52 in *__GI_abort () at abort.c:92

­3 0x08071fd0 in dart::DynamicAssertionHelper::Fail (this=0xf35bf24c,

    format=0x8219d9f "expected: %s") at runtime/vm/assert.cc:39

­4 0x08060c5c in dart::WriteStream::WriteStream (this=0xf35bf2f8,

    buffer=0xf35bf30c,
    alloc=0x805145b <dart::allocator(uint8_t*, intptr_t, intptr_t)>)
    at runtime/vm/snapshot.h:189

­5 0x08060dbd in dart::MessageWriter::MessageWriter (this=0xf35bf2f8,

    buffer=0xf35bf30c,
    alloc=0x805145b <dart::allocator(uint8_t*, intptr_t, intptr_t)>)
    at runtime/vm/snapshot.h:335

­6 0x080514cd in dart::Dart_PostIntArray (port_id=7159, len=0, data=0x0)

    at runtime/vm/dart_api_impl.cc:765

­7 0x0806dd92 in EventHandlerImplementation::HandleTimeout (this=0x8308f58)

    at runtime/bin/eventhandler_linux.cc:333

­8 0x0806de4c in EventHandlerImplementation::Poll (args=0x8308f58)

    at runtime/bin/eventhandler_linux.cc:355

­9 0xf7fab96e in start_thread (arg=0xf35bfb70) at pthread_create.c:300

­10 0xf7c84b5e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Backtrace stopped: Not enough registers or memory available to unwind further

Looks like a failed allocation at snapshot.h:186:

    buffer_ = reinterpret_cast<uint8_t>(alloc_(NULL,
                                                 0,
                                                 kBufferIncrementSize));
    ASSERT(*buffer_ != NULL);

@iposva-google
Copy link
Contributor

Removed the owner.

@whesse
Copy link
Contributor

whesse commented Dec 13, 2011

Is this allocation on the VM heap, or in malloced memory? Are we doing something wrong, to run out of memory here? I just checked - we are at 4 GB virtual memory. We are obviously doing something wrong. I think this is a library problem, not a VM problem.

Of course, this should be a graceful OOM termination, but why are we running out of memory here?

@whesse
Copy link
Contributor

whesse commented Dec 14, 2011

Issue #836 has been merged into this issue.


cc @madsager.

@whesse
Copy link
Contributor

whesse commented Dec 14, 2011

Fixed by revision 2422. Streams that are read using readLine should have a lineHandler, not a dataHandler. There is still a bug where an endless stream of dataHandler calls that do nothing causes an OOM in the VM's C++ heap, but we don't do it in test.dart anymore. Creating a test case.


Set owner to @whesse.
Added Fixed label.

@sgjesse sgjesse added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Dec 14, 2011
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants