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

Disable writing parsetab files to disk. #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfly
Copy link

@jfly jfly commented Sep 30, 2018

This fixes #206.

Before this change, when multiple Python processes are simultaneously
doing a from flanker.addresslib import address, it's possible for some
of them to crash in ply code.

See dabeaz/ply#184, where
I attempted to work around this issue by changing ply. You can see in this comment: dabeaz/ply#184 (comment) that the author of ply suggests two workarounds for this issue:

  1. Remove ply as a dependency in setup.py and copy the source code of ply into flanker.
  2. Disable writing parsetab files to disk when invoking yacc.
  1. seemed like the simpler solution to me, so that's what I've done
    here.

@mailgun-ci
Copy link

Can one of the admins verify this patch?

@jfly
Copy link
Author

jfly commented Sep 30, 2018

(Full disclosure, I haven't tested this at all because I'm not sure how to.)

@jfly jfly force-pushed the issue-206-ply-race branch from d4942ad to 4f63fc2 Compare September 30, 2018 20:18
@jfly
Copy link
Author

jfly commented Oct 22, 2018

Bump! Any feedback on this PR?

@jfly
Copy link
Author

jfly commented Jan 8, 2019

Bump!

@jfly
Copy link
Author

jfly commented Mar 21, 2019

Bump! Can anyone take a look?

This fixes mailgun#206.

Before this change, when multiple Python processes are simultaneously
doing a `from flanker.addresslib import address`, it's possible for some
of them to crash in `ply` code.

See dabeaz/ply#184, where
I attempted to work around this issue by changing ply. You can see in this comment: dabeaz/ply#184 (comment) that the author of ply suggests two workarounds for this issue:

1. Remove `ply` as a dependency in setup.py and copy the source code of `ply` into `flanker`.
2. Disable writing parsetab files to disk when invoking `yacc`.

2) seemed like the simpler solution to me, so that's what I've done
here.
@jfly jfly force-pushed the issue-206-ply-race branch from 4f63fc2 to 0dfed2e Compare March 21, 2019 02:44
@jfly
Copy link
Author

jfly commented Jun 17, 2019

Bump! Anyone got some time to take a look at this?

@Kobold
Copy link

Kobold commented Sep 11, 2024

I'm running into this crash as well. Thanks for the work @jfly .

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.

Crashes in parsetab due to ply race condition
3 participants