-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Running multiple fpm at the same time causes tar to error eventualy #1423
Comments
I had a go trying to reproduce this outside of goreleaser, and this is kind of the closest I think i could come (multiple ruby running in parallel)
I wasn't able to cause any duplication. That said, it's certainly possible for duplication (just statistically unlikely, I think?). Your error report is very interesting! Internal to FPM, Stud::Temporary is used to create temporary paths. This library uses I'm not quite sure how a duplicate random-30-character string occurs unless two rubies end up getting the same random seed? This is weird. I looked at the Ruby SecureRandom code and nothing disturbing popped out. Are you able to reproduce this on systems outside of Travis? (Hypothesis, untested: Travis maybe has a bad/low-quality entropy source?) If we can't find the origin of this problem, I'm open to trying to work around it -- We could make Stud::Temporary calls guaranteed unique by using flock(2) or some other cross-process coordination mechanism. Alternately, fpm could include the pid in the path (simpler than flock). A possible workaround until a solution is found: You could give |
For science, I am trying to reproduce. The travis-ci link references this:
But this git reference doesn't exist?
|
I found goreleaser/goreleaser@ff42024 and am using the previous commit. I'll try to get it to fail overnight. |
Testing with this -- and I have disabled docker and snapcraft parts of .goreleaser.yml to make it focus just on fpm.
Hopefully I'll be able to crash it. |
Hi @jordansissel! thanks for looking into it! I was able to reproduce the issue in my mac with this:
you can test it against this tag. anyway, the solution of appending the pid would probably be enough :D |
Ok, so, I tried the
|
Different error now: |
Found issue #882, tried:
Running for a couple of minutes now... |
this may avoid running into jordansissel/fpm#1423
This may avoid running into jordansissel/fpm#1423
Yeah, seems like giving a workdir for each instance fixes it. |
This may avoid running into jordansissel/fpm#1423
This is still on my backlog to fix -- something to automatically make workdir safer to use and have fpm generate some unique path with it |
@jordansissel no need to hurry :D I was able to workaround the issue with goreleaser/goreleaser@11fee22 thanks! |
I ended up with same error. Process failed: tar failed (exit code 1). Full command was:["tar", "-C", "/var/folders/6l/tp9krwld3rz0rb7tbqg417300000gy/T/package-deb-build-d95fd5fcfd6eba58ae7e7735927add5a3c672ae96af4e5f1041ea46ae754/control", "-zcf", "/var/folders/6l/tp9krwld3rz0rb7tbqg417300000gy/T/package-deb-build-d95fd5fcfd6eba58ae7e7735927add5a3c672ae96af4e5f1041ea46ae754/control.tar.gz", "--owner=0", "--group=0", "--numeric-owner", "."] {:level=>:error, :file=>"fpm/command.rb", :line=>"505", :method=>"rescue in execute"} i am an Admin , can this be fixed using some parameters. |
+1 I do have the same error. How do I fix it? |
+1 I do have the same error. |
Hi!
Thanks for the awesome software!
I'm the author of goreleaser, which integrates with fpm.
We were running several fpm instances in parallel, meaning that one fpm instance would be packaging for linux amd64 deb and other instance might be doing the same for rpm or maybe linux x86.
Anyway, eventually, an error came out.
I added the debug flag so I could find out what was happening. Got this:
https://travis-ci.org/goreleaser/goreleaser/builds/290224710#L1065
So, seems like fpm (or maybe another tool fpm uses?) is putting files in the same temp folder or something, causing
tar
to warn that a file changed.More info:
For now, I disabled the concurrency in that part of the code.
Anyway, would love to see if this can be fixed here (if it belongs here).
Thanks, and let me know if I can help in any way!
The text was updated successfully, but these errors were encountered: