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

Failure to close BinaryWriter leads to segfault #319

Closed
simleo opened this issue Jul 11, 2018 · 0 comments
Closed

Failure to close BinaryWriter leads to segfault #319

simleo opened this issue Jul 11, 2018 · 0 comments
Labels

Comments

@simleo
Copy link
Member

simleo commented Jul 11, 2018

The following works fine:

from pydoop.mapreduce.binary_streams import BinaryWriter

with open("cmd_dump", "wb") as f:
    writer = BinaryWriter(f)
    writer.send(BinaryWriter.MAP_ITEM, b"k", b"v")
    writer.flush()
    writer.close()

print("foo")

If writer.close() is omitted, however, this code triggers a segfault (after printing "foo", so it probably happens when resources are freed). The segfault only happens when using Python 2 (in Python 3 we might also have a problem, but less noisy).

BinaryUpStreamAdapter has the same problem (unsurprisingly).

@simleo simleo added the bug label Jul 11, 2018
@simleo simleo mentioned this issue Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant