Skip to content
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

dart vm segmentation fault #2235

Closed
DartBot opened this issue Mar 20, 2012 · 6 comments
Closed

dart vm segmentation fault #2235

DartBot opened this issue Mar 20, 2012 · 6 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-isolate

Comments

@DartBot
Copy link

DartBot commented Mar 20, 2012

This issue was originally filed by @darrellpf


What steps will reproduce the problem?

  1. Run the attached dart program
    2.

What is the expected output? What do you see instead?

VM segfaults

What version of the product are you using? On what operating system?

This is the dart from editor 5692 build. (I couldn't find a dart vm command that would give a version)

Please provide any additional information below.

The program is a Java brain trying to turn on a Dart brain. It isn't full of glowing Dart-isms (yet)


Attachment:
stadiumprint.dart (1.78 KB)

@DartBot
Copy link
Author

DartBot commented Mar 20, 2012

This comment was originally written by @darrellpf


OS is Fedora rawhide.

@iposva-google
Copy link
Contributor

Added Area-VM, Triaged labels.

@sethladd
Copy link
Contributor

cc @sigmundch.
Added Isolates label.

@turnidge
Copy link
Contributor

Set owner to @turnidge.
Added Started label.

@turnidge
Copy link
Contributor

I am only able to reproduce the problem in Release mode.

The initializer for someVar is required to elicit the failure. The value of the initializer seems to affect the address that we see in our crash. Crashes look like this:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000007
[Switching to process 7945]
0x0001e5d4 in dart::Object::SetRaw (this=0xb00204bc, value=0x514467d) at object.h:4906
4906 handle_vtable_ : raw_->ptr()->class_->ptr()->handle_vtable_);

Here's a shorter test program to elicit the failure:


#import('dart:isolate');

class Foo {
  const Foo();
}

class TestClass {
  var _someVar = 0;

  void getValue() {
  }
}

void helperIsolate() {
  // print('ENTER helperIsolate');

  var test = new TestClass();
  // print('CREATED TestClass');

  test.getValue();
  // print('CALLED function');
  // print("CALLING FUNCTION ${test.getValue()}");

  // print('EXIT helperIsolate');
}

void main() {
  ReceivePort rp = new ReceivePort();
  var test = new TestClass();
  test.getValue();

  // helperIsolate();
  SendPort helper = spawnFunction(helperIsolate);
}

@turnidge
Copy link
Contributor

Ok.

I'm sorry it took so long to get to this bug. The behavior was pretty broken. We were never finalizing classes for new isolates spawned by the new api in Release mode. This was causing all of the object sizes to be zero with boggling effects. Normally, we would catch such an issue in Debug mode, with a nice explanatory message, BUT, I was finalizing classes inside an ASSERT. I had cribbed this code from the old isolate api, but neglected to notice that they were actually finalizing the classes at a different point, deep in a helper method that was getting used for error checking.

Long story, short, it's fixed now in bleeding_edge r8079. It may take a bit to migrate up to trunk.


Added Fixed label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels May 29, 2012
@nex3 nex3 added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-isolate and removed area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Jun 8, 2015
dart-bot pushed a commit that referenced this issue Oct 29, 2019
Includes the following commits:
80ac76400ff58fde3c5a335d860d196c3febe837 Warn about authors field in pubspec.yaml
6b6e02fcdd8094ccbba919b2fdc74947b1cebb71 Warn about old flutter plugin registration format (#2233)
8308acbc48ebd4da4ab7f45169af8dee4df18e79 Language versioning
b18d4f6a5d035f4f72ef187e9cdb133d18848c2d update doc
408bdd58ab01689fd82cc036b4142f7b592b4ba0 Added utility for faster local testing (#2235)
055fc19d2e06e819dbd47b3b56909c47bd893f66 Upgraded package:yaml to 2.2.0 (#2237)
0f3baf7abb13702f7fb1ff3709c584065df1435c Remove unused Map `availableVersions`
cfa9dc760b6b601f9473e65d15f15b60a319336d Fix to show proper error message when git is not installed (#2209)
d99b0d58f4059d7bb4ac4616fd3d54ec00a2b5d4 Rephrase warnings for missing deps (#2203)
76b8c30395b37f96d3db3e842344cc842bdd7c24 Don't mention 'transformed dependencies'. (#2199)
4bd65e0f54e6e4540f03467b0272a5666e8d54ba return the hashCode of the description (#2198)
92b52682e8fc6eed9ef2e77ed890647f75570165 Test more pre-release behavior. (#2175)
066ac118d406500f672339e25f0154af9321deac update to latest pkg:analyzer (#2172)
289804a5d2c9746b4e86c271c2abcfe17417e20f Minor typo fixed (#2166)

Change-Id: I3922bcaacb5399853a291b92d7192d21f719d224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123404
Reviewed-by: Jonas Jensen <[email protected]>
Commit-Queue: Sigurd Meldgaard <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-isolate
Projects
None yet
Development

No branches or pull requests

5 participants