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

Ephemerons lead to crash related to weak hash tables #7161

Closed
vicuna opened this Issue Mar 2, 2016 · 6 comments

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

commented Mar 2, 2016

Original bug ID: 7161
Reporter: maro
Status: closed (set by @damiendoligez on 2016-03-24T15:45:14Z)
Resolution: fixed
Priority: normal
Severity: crash
OS: Linux
Version: 4.03.0+dev / +beta1
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: runtime system and C interface
Related to: #7157 #7162
Monitored by: bobot @hcarty @yakobowski

Bug description

In Frama-C, we have some case studies where ephemerons lead to an assertion failure in one of our data structures, which is based on weak hash tables (Hptmap).

This happens with OCaml 4.03+beta1. After investigating via a manual git bisect, I arrived at the following commit:

e335998 - [GC] make ephemerons more efficient

(Note that this commit by itself does not compile; for commits between 03ed6a0 and ec173d0, I needed to cherry-pick commit 3a47063 in order to be able to compile them.)

Until the previous commit (ff8c0c8), everything works as usual. After e335998, a few case studies trigger an assertion that should never be triggered.

This report is mainly for notification purposes; we will discuss directly with François when he will be back to investigate the cause.

Steps to reproduce

Our case studies are based on open-source code, but require some complex settings; we can describe the required steps if needed, but initially it may be simpler to see it directly with François.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 2, 2016

Comment author: bobot

I don't know the schedule of 4.03, does the investigation of this bug can wait the 7th march?

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 3, 2016

Comment author: bobot

Andre (@MaRo), can you test with bobot@c1801a8 ? Thank you.

Without the debug runtime instead of an assert the bug can cause an alive value to be removed from the hashconsing table, and so two identical values can have different tags.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 3, 2016

Comment author: maro

Thanks! I'm still performing some tests, but so far no more crashes :)

Unfortunately, I'm also having some (probably unrelated) crashes with the GUI, and I kind of hoped they could be related to this issue, so that both would be fixed in one shot. The crashes still happen, however, so I'll investigate them and file a separate bug if needed.

I'll report back if further tests indicate something unexpected.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 3, 2016

Comment author: @mshinwell

I am hoping to merge the fix for #7157 (which is what bobot is referring to) into the upstream 4.03 branch this morning. It might be easier to test with that.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 3, 2016

Comment author: maro

The GUI-related issues are almost definitely unrelated to this bug (still investigating).

I've used https://github.com/bobot/ocaml/tree/pr7157-4.03-take2 in my tests, and the commits between 4.03 and the head of that branch do fix the issue in my tests.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 24, 2016

Comment author: @damiendoligez

Fixed by the #7157 fix.
The GUI-related issues are #7162.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.