Skip to content

Some flappy test failure fixes#113

Merged
nickkeers merged 4 commits into
develop-2.2from
develop-2.2.5
Feb 20, 2018
Merged

Some flappy test failure fixes#113
nickkeers merged 4 commits into
develop-2.2from
develop-2.2.5

Conversation

@russelldb

Copy link
Copy Markdown
Contributor

Again around processes and their registration/visibility.

NOTE: the deps will need updating when all the other 2.2.5 -> 2.2 PRs are merged

Use a monitor to decide if a process is dead, rather than presence in
the `processes()` list, as intermitently the list was inconsistent. I
didn't get to the bottom of why. Using a monitor works. Also there was a
process leak with vnode processes. Not that it matters from eunit, but
running for > 10 minutes on my machine would lead to erlang running out
of processes.

@nickkeers nickkeers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

end.

fitting_is_alive(#fitting{pid=Pid}) ->
lists:member(Pid, erlang:processes()).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@russelldb can this not be solved by adding an erlang:is_process_alive() call around the Pid?

It looks like the monitor is just keeping a check of when the pid goes down / when it isn't alive anymore, the docs for processes/0 mentions:

"Notice that an exiting process exists, but is not alive. That is, is_process_alive/1 returns false for an exiting process, but its process identifier is part of the result returned from processes/0."

Just thought I'd mention before we go further - I don't know what was tried before or anything, cheers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the fix is a bit more involved than that for some reason, weird. I'm going to go with, if it ain't broke don't fix it 👍

@nickkeers
nickkeers merged commit 7dbb489 into develop-2.2 Feb 20, 2018
@russelldb
russelldb deleted the develop-2.2.5 branch February 20, 2018 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants