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

minc-toolkit perl function update_history (or minc_modify_header?) fails with long arguments #21

Open
gdevenyi opened this issue Nov 18, 2014 · 3 comments

Comments

@gdevenyi
Copy link

While working with autocrop, the cropping would succeed, but then throw the following error:

spawn: exec of minc_modify_header failed: Argument list too long
autocrop: crashed while running minc_modify_header (termination status=65280)

The command I was using to start autocrop

autocrop -clobber -verbose -debug -bbox /home/cic/devgab/projects/cutneck//chamal_hr_003_20141105_150333_2_mri.cutneck.tmp -isoexpand 5 /data/chamal/projects/raihaan/2014-11-05-Rob/chamal_hr_003_20141105_150333/chamal_hr_003_20141105_150333_2_mri.mnc /home/cic/devgab/projects/cutneck//chamal_hr_003_20141105_150333_2_mri.cutneck.mnc

Commenting out the instances of update_history in autocrop solved the crash.

@andrewjanke
Copy link
Member

This would seem a tad strange, if you run with a -verbose flag is there an extremely long argument list anywhere?

On most Linux based systems ARG_MAX is massive these days (for me):

$ getconf ARG_MAX
2097152

Which OS are you running on? or is this a perl problem with the internals of spawn?

a

@gdevenyi
Copy link
Author

Well, it was run with verbose, and debug, so that's all the output I got. I can try and add a print somewhere and see what I get.

This is on Debian 6.0, Linux x86_64

I'll check ARG_MAX to be sure tomorrow.

@gdevenyi
Copy link
Author

A very late followup, ARG_MAX is the same for me.

The root cause of this seems to be the case where dcm2mnc is called with an entire directory tree of DICOMs at once (like an entire study) and then the -fname/-dname features are used to split up the MINC files. This produces a huge history entry from the conversion, which is much longer than ARG_MAX.

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

No branches or pull requests

2 participants