Skip to content

Disable writing parsetab files to disk.#207

Open
jfly wants to merge 1 commit into
mailgun:masterfrom
jfly:issue-206-ply-race
Open

Disable writing parsetab files to disk.#207
jfly wants to merge 1 commit into
mailgun:masterfrom
jfly:issue-206-ply-race

Conversation

@jfly
Copy link
Copy Markdown

@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
Copy Markdown

Can one of the admins verify this patch?

@jfly
Copy link
Copy Markdown
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
Copy Markdown
Author

jfly commented Oct 22, 2018

Bump! Any feedback on this PR?

@jfly
Copy link
Copy Markdown
Author

jfly commented Jan 8, 2019

Bump!

@jfly
Copy link
Copy Markdown
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
Copy Markdown
Author

jfly commented Jun 17, 2019

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

@Kobold
Copy link
Copy Markdown

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