Skip to content

gproc:reg_or_locate crashes #43

Closed
paul-mhq opened this Issue Jul 15, 2013 · 3 comments

2 participants

@paul-mhq

I've had a reproducible crash in gproc:reg_or_locate due to a pattern match failure from the stuff found in the ETS lookup. The failure situation seems to be:

1) gproc:await(Key) in one process
2) a little while later, another process does gproc:reg_or_locate(Key)

The ETS returns some stuff that gproc:reg_or_lookup doesn't recognize. From inspecting gproc:where1, it looks like the ETS entry is {Key, Waiters} where Waiters is info about the other process awaiting creation of the gproc key. The first element actually looks like {Key,T} rather than Key.

I tried making a local patch to handle this situation the same way as if the key didn't exist, and that stops the crash, though my program still doesn't work. I'm not sure if that's because my gproc patch was wrong, or my application has some other error.

@uwiger
Owner
uwiger commented Jul 16, 2013

Try the latest master. I also added support for global scope in gproc:reg_or_locate(Key, Value, Fun).

@paul-mhq

Thanks, new version seems to work better.

@uwiger
Owner
uwiger commented Jul 17, 2013

Ok, thanks.

@uwiger uwiger closed this Jul 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.