-
Notifications
You must be signed in to change notification settings - Fork 22
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
aftest: bugs.aff: Invalid argument in HURD (Debian) #42
Comments
@eribertomota This looks like probably the error is that is can't create the |
It is a bit odd for me because all Debian building environments are identical. I don't believe in a permission issue. The CWD is set by Makefile. But we have 22 architectures and aftest fails in hurd-i386 only. |
I uploaded a workaround some minutes ago (disabling test_signing.sh) but you can see all current builds here[1]. |
Hmm, I wonder if it hurd doesn't like this combination of open flags |
I am creating a hurd environment to run gdb. But I can test any change from you now. Hurd is a slow machine here. |
Let's start by verifying this line (line 733) in lib/aftest.cpp is the line that is failing:
by e.g., adding a After confirming that line is the culprit, I think we need to play with those parameters to see what makes it work; e.g., try an absolute path for bugs.aff; e.g., try removing the O_TRUNC flag; e.g., try mode 0 instead of 0666. |
|
oops, I meant to say put the HERE 2 line after this line:
|
I already tried remove OTRUNC. Nothing. Going to s/0666/0.
|
cool, if changing the mode doesn't help, you can also try changing "bugs.aff" to something else like "/tmp/tmp.aff" |
s/0666/0 not work |
Not worked:
|
can you put the HERE 1 and HERE 2 lines around these two lines in lib/vnode_aff.cpp and try it?
|
I added the new lines and I kept the old lines.
|
ok, looks like that check is where it's failing; now we just need to determine if it's failing on the can you revert all the changes we've made so far and then replace lines 553 and 554 with this block of code: if(!af_is_filestream(af->fname))
{
printf("BAD DAY 1\n");
errno = EINVAL;
return -1;
}
if((af->openflags & O_ACCMODE) == O_WRONLY)
{
printf("BAD DAY 2\n");
errno = EINVAL;
return -1;
} |
Yes. In packaging is mandatory use patches. I will remove the patches and use this new. |
No results for grep BAD |
oh, I must have misinterpreted what your previous test was then; I suppose the ...back to square one, also, is it easier if I just attach patches? |
No. I just change the file and run 'dpkg-source --commit' and debhelper creates the patch for me. |
ok, this next test is a little bigger, so I'll paste it as a patch just in case; please revert all previous changes and test this patch: diff --git a/lib/vnode_aff.cpp b/lib/vnode_aff.cpp
index e07d2c7..b86ab84 100644
--- a/lib/vnode_aff.cpp
+++ b/lib/vnode_aff.cpp
@@ -549,37 +549,52 @@ static int err_close(AFFILE *af)
static int aff_open(AFFILE *af)
{
+ printf("aff_open: 1\n");
// must be a file stream with read access
if(!af_is_filestream(af->fname) || (af->openflags & O_ACCMODE) == O_WRONLY)
{ errno = EINVAL; return -1; }
+ printf("aff_open: 2\n");
+
bool canWrite = (af->openflags & O_ACCMODE) == O_RDWR;
/* Open the raw file */
int fd = open(af->fname,af->openflags | O_BINARY,af->openmode);
+ printf("aff_open: 3\n");
if(fd < 0)
return -1;
+ printf("aff_open: 4\n");
+
/* Lock the file if writing */
#ifdef HAVE_FLOCK
if(flock(fd, canWrite ? LOCK_EX : LOCK_SH) < 0)
return err_close(fd);
#endif
+ printf("aff_open: 5\n");
+
/* Open the FILE for the AFFILE */
af->aseg = fdopen(fd, canWrite ? "w+b" : "rb");
+ printf("aff_open: 6\n");
if(!af->aseg)
return err_close(fd);
+ printf("aff_open: 7\n");
+
/* Get file size */
struct stat sb;
if(fstat(fd, &sb) < 0)
return err_close(af);
+ printf("aff_open: 8\n");
+
/* If file is empty, then put out an AFF header, badflag, and AFF version */
if(canWrite && sb.st_size == 0)
return aff_create(af);
+ printf("aff_open: 9\n");
+
/* We are opening an existing file. Verify once more than it is an AFF file
* and skip past the header...
*/ |
Sorry for delay. I made it manually because copy/paste changed tabs for spaces. Building. |
ok, no worries; in the future you don't need to worry about that; the code will work regardless of tabs or spaces for indenting |
Yes, but the patch command won't apply a patch if tabs changed by spaces. |
oh, I see what you mean; sorry about that |
No problem my friend. No results for grep aff_open. |
what in the world? ok, let me take a closer look here... |
Sorry but I need to send afflib to experimental and sleep. Now 04:12 AM in Brazil. hurd is a non-official arch in Debian and can wait if needed. s390x is in main line. I will can work in some hours or other day if you busy. I am thankful for the work you've done . |
ok, let's try this |
ok, no worries; it's getting late for me too; I can pick this back up on Saturday if not sooner |
Thank you! I will send the package to experimental now and tomorrow I will post here the results of the new patch. Have a good night! |
Sent. In some hours we will have a result here: https://buildd.debian.org/status/package.php?p=afflib&suite=experimental Goodbye! |
Good evening from Brazil @sshock, S390x, ppc64 and sparc64 has been built like a charm, thanks! I applied tmp.patch.txt now in hurd-i386. The result of egrep is below.
============================================================================ |
Hi @sshock, Now you can run Debian/Hurd-i386 in your own PC! I prepared a simple tutorial about it[1]. [1] https://eriberto.pro.br/wiki/index.php?title=Running_Debian/Hurd_in_KVM After get your Hurd, you can do it as root:
When fixed the tests, please, release a new version. If you need any help, please call me! Thanks a lot in advance! Cheers, Eriberto |
Cool, I'll give it a try soon. |
I had gnu/hurd working then after a bunch of updates and rebooting it now no longer works, even when starting over. It hangs on But that's ok. I think I understand the problem already based on the output you pasted 4 days ago and a note from here:
So yeah, this is going to be easy to fix. |
@eribertomota I just made this commit that I believe will fix the issue: 7a8b5ca Can you test that for me since hurd on kvm isn't working for me at the moment, and then I'll create a tag/release if it works. Thanks! |
@sshock Thanks a lot for your efforts. I think the problem with HURD Kvm machine can be caused by aleatory issues in environment. I think a new try can result in success. The commit 7a8b5ca caused new fails. See below:
Cheers, Eriberto |
Looks like some more work to do. Ok, I'll try to hurd again later and hope it behaves so I can look into these... |
Hi @eribertomota . I committed some more fixes, mostly related to open flags that were not being set properly. All the tests are passing for me now. Can you please try again with the latest code from master and make sure it works for you too? |
Hi @sshock, the changes seem to work now. I uploaded a new package to Debian Experimental and in some hours we will know if the tests are working in all architectures[1]. I will notify you. Thanks a lot for your help! [1] https://buildd.debian.org/status/package.php?p=afflib&suite=experimental PS: worked fine your Hurd machine? |
Hi @sshock! The afflib has been built in all architectures, except to Hurd, due to a temporary issue with a dependency of debhelper (the packaging system). However, I confirmed in my personal Hurd machine that the package is building fine. You can release a new version now. There are some warnings when building, but it is not a problem for Debian. If you don't like it, please check the reports here, clicking over "Installed" links. [1] https://buildd.debian.org/status/package.php?p=afflib&suite=experimental Cheers, Eriberto |
Yeah, well, I had to switch to another computer and then I was able to get it working. |
Cool, I will take care of that later tonight.
Cool, I may take a look at those sometime. |
Don't worry! This is a specific problem of Debian infrastructure and it was already fixed. The Hurd version was built.
Good! If you want, I can upload new changes to Experimental again before you release a new version. |
I'm going to call this good for now. The new release has been made! https://github.com/sshock/AFFLIBv3/releases/tag/v3.7.19 |
Thank you! I will send it to Debian.
Em ter., 7 de jul. de 2020 às 01:33, Phillip Hellewell <
[email protected]> escreveu:
… I'm going to call this good for now. The new release has been made!
https://github.com/sshock/AFFLIBv3/releases/tag/v3.7.19
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABRDFLTOV7KAONVL3OWSG7DR2KQTJANCNFSM4OM6WEUQ>
.
|
Dear @sshock,
As I said in #41, I re-enabled the upstream tests for afflib in Debian. The package was built in several architectures but failed to build from source in hurd-i386. I attached a full build log but you can see the relevant part below:
I have SSH access to hurd-i386 machine. Please, let me know if you need more details or tests.
Thanks a lot in advance.
Regards,
Eriberto
afflib_3.7.18-8_hurd-i386.build.gz
The text was updated successfully, but these errors were encountered: