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

BUG Account for other Possible unpickling errors #13

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

gadorlhiac
Copy link
Collaborator

Description

This PR provides additional error handling in the PipeCommunicator.read method to account for other types of exceptions that can arise during unpickling.

Checklist

  • Catch ValueError and EOFError when attempting to unpickle a potentially encoded, or mixed pickle/encoded, bytes object.
  • Allow the PipeCommunicator to re-enable using pickle by default.

PR Type:

  • New feature/Enhancement

Address issues:

  • NA

Testing

Tested against the psocake peak finding Task (merged earlier today) where this potential failure mode was discovered. The Task printed the message: b'Found an event with image: 0\nfindPeaks: exp=cxic0515:run=0009:idx\n' which produced an uncaught ValueError and caused failure. The temporary fix was to comment out the line of code allowing the PipeCommunicator to set _use_pickle back to True.

The fixes introduced in this PR address the issue. The Task runs without error even with the temporary fix removed by uncommenting.

The PR can be tested by running: /sdf/scratch/users/d/dorlhiac/script_psocake.sh which points to an installation of LUTE checked out to this branch.

Screenshots

NA

@gadorlhiac gadorlhiac requested a review from valmar March 27, 2024 21:23
Copy link
Contributor

@valmar valmar left a comment

Choose a reason for hiding this comment

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

Ok this is what we discussed!

@valmar valmar merged commit fafbdc6 into slac-lcls:dev Mar 29, 2024
1 check passed
@gadorlhiac gadorlhiac deleted the BUG/pickle_ipc branch May 15, 2024 18:26
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