You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "reschke (via GitHub)" <gi...@apache.org> on 2025/07/30 13:44:42 UTC
[PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
reschke opened a new pull request, #434:
URL: https://github.com/apache/felix-dev/pull/434
…not writable
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on code in PR #434:
URL: https://github.com/apache/felix-dev/pull/434#discussion_r2247191025
##########
fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java:
##########
@@ -607,19 +607,10 @@ private void prepareTempDir()
{
if (tmpDir == null)
{
- File javaIoTmpdir = new File(System.getProperty("java.io.tmpdir"));
- if (!javaIoTmpdir.exists() && !javaIoTmpdir.mkdirs()) {
- throw new IllegalStateException("Unable to create temporary directory " + javaIoTmpdir);
- }
- Random random = new Random();
- while (tmpDir == null)
- {
- File f = new File(javaIoTmpdir, "fileinstall-" + Long.toString(random.nextLong()));
- if (!f.exists() && f.mkdirs())
- {
- tmpDir = f;
- tmpDir.deleteOnExit();
- }
+ try {
+ tmpDir = Files.createTempDirectory("fileinstall-").toFile();
Review Comment:
ack
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3144145831
git push -f
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3139176563
ah, "one" :-)
Doesn't "squash & merge" address this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3143574003
> Hi @reschke, thanks for the update!
>
> To keep the PR history clean and readable, I’d really prefer if you could squash your changes into a single, clean commit. That way we avoid having intermediate commits that reverse or adjust earlier ones. While I could squash during merge, I think it’s better if the final commit is already meaningful and clean — especially for future reference.
>
> Would you mind doing a git rebase -i or resetting and recommitting the final version as one commit?
>
> Thanks!
Well. Can you walk me throudh the rebase steps? I'm already investing more time than the actual change took.
Otherwise, I can open a new PR, but then we'll lose *this* context.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3140203147
if we squash it, it won't be in the history.
Anyway, is there anything I can do except for a new PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3140968959
Hi @reschke,
thanks for the update!
To keep the PR history clean and readable, I’d really prefer if you could squash your changes into a single, clean commit. That way we avoid having intermediate commits that reverse or adjust earlier ones. While I could squash during merge, I think it’s better if the final commit is already meaningful and clean — especially for future reference.
Would you mind doing a git rebase -i or resetting and recommitting the final version as one commit?
Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3144198122
> git push -f
Thanks. As you can seel, I'm an amateur and just use Github.
PR now should be clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3144354931
@paulrutter can you have a short look? then i will merge if you dont have any further thoughts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3146398052
> @paulrutter can you have a short look? then i will merge if you dont have any further thoughts
On holiday now, but judging from my phone, this change looks ok to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on code in PR #434:
URL: https://github.com/apache/felix-dev/pull/434#discussion_r2247197268
##########
fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java:
##########
@@ -607,19 +607,10 @@ private void prepareTempDir()
{
if (tmpDir == null)
{
- File javaIoTmpdir = new File(System.getProperty("java.io.tmpdir"));
- if (!javaIoTmpdir.exists() && !javaIoTmpdir.mkdirs()) {
- throw new IllegalStateException("Unable to create temporary directory " + javaIoTmpdir);
- }
- Random random = new Random();
- while (tmpDir == null)
- {
- File f = new File(javaIoTmpdir, "fileinstall-" + Long.toString(random.nextLong()));
- if (!f.exists() && f.mkdirs())
- {
- tmpDir = f;
- tmpDir.deleteOnExit();
- }
+ try {
+ tmpDir = Files.createTempDirectory("fileinstall-").toFile();
Review Comment:
I don't believe java.nio.Files gives us the path of the temp directory that it could not create, but it's in the message of the nexted exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on code in PR #434:
URL: https://github.com/apache/felix-dev/pull/434#discussion_r2247191025
##########
fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java:
##########
@@ -607,19 +607,10 @@ private void prepareTempDir()
{
if (tmpDir == null)
{
- File javaIoTmpdir = new File(System.getProperty("java.io.tmpdir"));
- if (!javaIoTmpdir.exists() && !javaIoTmpdir.mkdirs()) {
- throw new IllegalStateException("Unable to create temporary directory " + javaIoTmpdir);
- }
- Random random = new Random();
- while (tmpDir == null)
- {
- File f = new File(javaIoTmpdir, "fileinstall-" + Long.toString(random.nextLong()));
- if (!f.exists() && f.mkdirs())
- {
- tmpDir = f;
- tmpDir.deleteOnExit();
- }
+ try {
+ tmpDir = Files.createTempDirectory("fileinstall-").toFile();
Review Comment:
ack
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof merged PR #434:
URL: https://github.com/apache/felix-dev/pull/434
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3138617206
We have 2 commits in this pr.
It seems that one would be enough.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "chrisrueger (via GitHub)" <gi...@apache.org>.
chrisrueger commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3144478328
> Thanks. As you can seel, I'm an amateur and just use Github.
>
> PR now should be clean.
Don't feel bad. I had to go through the same rebase squash requirement hell :)
But you get used to it and in Github Desktop it is just a few clicks. And most important it makes life easier for the maintainers e.g. to backport changes between versions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3144500864
In Jackrabbit, we just have "Squash & Merge" as the default for PRs in Github, and that has the same effect (mostly).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3143810562
> can you please add the
>
> tmpDir.deleteOnExit();
Good point. Sorry for that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on code in PR #434:
URL: https://github.com/apache/felix-dev/pull/434#discussion_r2246118482
##########
fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java:
##########
@@ -607,19 +607,10 @@ private void prepareTempDir()
{
if (tmpDir == null)
{
- File javaIoTmpdir = new File(System.getProperty("java.io.tmpdir"));
- if (!javaIoTmpdir.exists() && !javaIoTmpdir.mkdirs()) {
- throw new IllegalStateException("Unable to create temporary directory " + javaIoTmpdir);
- }
- Random random = new Random();
- while (tmpDir == null)
- {
- File f = new File(javaIoTmpdir, "fileinstall-" + Long.toString(random.nextLong()));
- if (!f.exists() && f.mkdirs())
- {
- tmpDir = f;
- tmpDir.deleteOnExit();
- }
+ try {
+ tmpDir = Files.createTempDirectory("fileinstall-").toFile();
Review Comment:
if (!tmpDir.canWrite()) {
Throw a meaning full exception like "Directory is NOT writable: " + dir.getAbsolutePath());
} else
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on code in PR #434:
URL: https://github.com/apache/felix-dev/pull/434#discussion_r2246100071
##########
fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java:
##########
@@ -607,19 +607,10 @@ private void prepareTempDir()
{
if (tmpDir == null)
{
- File javaIoTmpdir = new File(System.getProperty("java.io.tmpdir"));
- if (!javaIoTmpdir.exists() && !javaIoTmpdir.mkdirs()) {
- throw new IllegalStateException("Unable to create temporary directory " + javaIoTmpdir);
- }
- Random random = new Random();
- while (tmpDir == null)
- {
- File f = new File(javaIoTmpdir, "fileinstall-" + Long.toString(random.nextLong()));
- if (!f.exists() && f.mkdirs())
- {
- tmpDir = f;
- tmpDir.deleteOnExit();
Review Comment:
Removed without an relevant new method call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3143832467
```
> git reset 0916f3d49c865851c2899e835d8614fc2f174f74
Unstaged changes after reset:
M fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
> git add .
> git commit -a -m "FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is not writable, use java.nio.Files instead, improve diagnostics"
[FELIX-6794 8820b8ea1] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is not writable, use java.nio.Files instead, improve diagnostics
1 file changed, 6 insertions(+), 14 deletions(-)
> git push
To github.com:reschke/felix-dev.git
! [rejected] FELIX-6794 -> FELIX-6794 (non-fast-forward)
error: failed to push some refs to 'github.com:reschke/felix-dev.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
`hint:` See the 'Note about fast-forwards' in 'git push --help' for details.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on code in PR #434:
URL: https://github.com/apache/felix-dev/pull/434#discussion_r2246100071
##########
fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java:
##########
@@ -607,19 +607,10 @@ private void prepareTempDir()
{
if (tmpDir == null)
{
- File javaIoTmpdir = new File(System.getProperty("java.io.tmpdir"));
- if (!javaIoTmpdir.exists() && !javaIoTmpdir.mkdirs()) {
- throw new IllegalStateException("Unable to create temporary directory " + javaIoTmpdir);
- }
- Random random = new Random();
- while (tmpDir == null)
- {
- File f = new File(javaIoTmpdir, "fileinstall-" + Long.toString(random.nextLong()));
- if (!f.exists() && f.mkdirs())
- {
- tmpDir = f;
- tmpDir.deleteOnExit();
Review Comment:
Removed without an euivalent new method call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "reschke (via GitHub)" <gi...@apache.org>.
reschke commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3138465407
Sry? "commit" of what?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3137837117
Can you please make on commit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3143757126
can you please add the
` tmpDir.deleteOnExit();`
with `git log`
you can see the hash of the log that was last before your change.
with `git reset <HASH>` you cann reset to this commit
`git add .` adds all of your new code again
then you can commit again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3140060376
yes one, not on. sorry.
i prefere to have one commit,
<img width="899" height="852" alt="image" src="https://github.com/user-attachments/assets/2e9d3171-8f21-44fb-97ee-95343a7d64ca" />
This commit then later gets, removed. i dont think that we need this in the history, even not in the PR history
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FELIX-6794: Fileinstall hangs (endless loop) when java.io.tempdir is … [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #434:
URL: https://github.com/apache/felix-dev/pull/434#issuecomment-3140988168
Ans please align the pr message as title with commit measage
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org