Project

General

Profile

Bug #750

OutputPyImage segmentation fault because of bad uuid library

Added by Rogers, Chris about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Jackson, Mike
Category:
Online reconstruction
Target version:
Start date:
19 October 2011
Due date:
% Done:

100%

Estimated time:
Workflow:

Description

python uuid library has a known bug that causes it to segv on some systems. This is breaking OutputPyImage.py on my machine at line 75:

            self.file_prefix = uuid.uuid4()

Any alternative to this library?


Related issues

Related to MAUS - Support #752: Build error on my machineClosedRogers, Chris19 October 2011

Actions
Related to MAUS - Bug #713: Segmentation fault in UUID python moduleClosedTunnell, Christopher27 September 2011

Actions
#1

Updated by Jackson, Mike about 12 years ago

This is only used to generate a file prefix if the caller hasn't provided one. We could just insist that the caller provide one and remove the need to use uuid.

#2

Updated by Rogers, Chris about 12 years ago

Or just use an index; increment by 1 until file doesn't exist... so you get <tag>0.png, <tag>1.png, etc... probably easier on the eye than <tag><30 character hex string>.png or whatever

But have to say, not quite sure what the context in which you are writing is (this is a temp file stored somewhere? or this is a file user wants to read?)

#3

Updated by Jackson, Mike about 12 years ago

These are files users will want to read e.g. files with histograms.

I'll just add the integer index. The user can override it if they want via a configuration parameter.

#4

Updated by Rogers, Chris about 12 years ago

If I was being really picky, I would ask you to prepend the index by 0s like 0001, 0002, ..., 0021, ... so that "ls" sorts the files in the right order...

#5

Updated by Jackson, Mike about 12 years ago

No, I'm not thinking, sorry. OutputPyImage doesn't need to increment/maintain a counter. At present the UUID is created in birth if the user hasn't explicitly provided a file name prefix. This prefix is shared by all files created by this worker. The JSON documents provided as input determine the rest of the file name - and it's up to whatever creates those (e.g. ReducePyMatplotlibHistogram) to ensure any numbering scheme is applied. So,

I'll

  • Just adopt a default string instead of the UUID. The user should configure it if they don't want this default (possibly, by creating their own UUID).
  • Update ReducePyMatplotlibHistogram to auto-number as suggested.
#6

Updated by Jackson, Mike about 12 years ago

Updated OutputPyImage.py to not use UUID - 669.

#7

Updated by Jackson, Mike about 12 years ago

Update ReducePyMatplotlibHistogram to zero-pad auto-numbers - 670

#8

Updated by Rogers, Chris about 12 years ago

I merged 670 into the trunk... (had someone else with the same problem)

#9

Updated by Rogers, Chris about 12 years ago

But let me know if you are happy to close the issue or have a few more tweaks to make...

#10

Updated by Jackson, Mike about 12 years ago

Happy to close, thanks.

#11

Updated by Rogers, Chris about 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
#12

Updated by Tunnell, Christopher about 12 years ago

FYI: for future reference, run number and spill number should be unique.

#13

Updated by Tunnell, Christopher about 12 years ago

FYI: this is fixed in python 2.7.2

#14

Updated by Rogers, Chris about 12 years ago

  • Target version changed from Future MAUS release to MAUS-v0.0.9

Also available in: Atom PDF