Issue 42 in fabricate: tar input files not noticed

24 views
Skip to first unread message

fabr...@googlecode.com

unread,
Jun 4, 2013, 4:41:38 PM6/4/13
to fabrica...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 42 by pjimen...@gmail.com: tar input files not noticed
http://code.google.com/p/fabricate/issues/detail?id=42

What steps will reproduce the problem?
1. run the test/creat test via 'python build.py' in that dir
2. echo "// changes" >> test/creat/a.c
3. re-run 'python build.py'

What is the expected output? What do you see instead?

I expect foo.tar.gz to get rebuilt ; it doesn't.

What version of the product are you using? On what operating system?

f10c4063ab4bc1f0ccb7a8bac3d9c7a485918652 on ubuntu 12.04

Please provide any additional information below.

Looking in .deps, there's only an entry for foo.tar.gz as an output, no
listed inputs.
I did an strace and see not the expected open()s of a.c and b.c, but
instead: openat(AT_FDCWD, "b.c", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_NOFOLLOW|
O_CLOEXEC)

Looks like solving this will, as a by-product, solve the fchdir() problem.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Simon Alford

unread,
Jun 6, 2013, 2:14:14 AM6/6/13
to fabrica...@googlegroups.com
I have noticed this exact same issue. It started occurring after a system update, which I assume must of included a new version of tar. The new version obviously uses the openat() function. I believe the reason to use these xxxat functions is to protect the use of the cwd in a multi-threaded program where any thread could change the cwd.

It is looking increasingly like the only way to get full coverage of all file operations is to track the open file descriptors so these xxxat and fchdir (and possibly other fxxx functions) can be correctly tracked.


You received this message because you are subscribed to the Google Groups "fabricate users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabricate-users+unsubscribe@googlegroups.com.
To post to this group, send email to fabricate-users@googlegroups.com.
Visit this group at http://groups.google.com/group/fabricate-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



pjz

unread,
Jun 10, 2013, 10:25:48 AM6/10/13
to fabrica...@googlegroups.com

Sounds like a plan.  Is there code for that?  I must admit I'm finding contributions via google code to be more cumbersome than the fork/pull request features of github.
To unsubscribe from this group and stop receiving emails from it, send an email to fabricate-use...@googlegroups.com.
To post to this group, send email to fabrica...@googlegroups.com.

fabr...@googlecode.com

unread,
Sep 13, 2013, 8:37:03 AM9/13/13
to fabrica...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 42 by simon.al...@gmail.com: tar input files not noticed
http://code.google.com/p/fabricate/issues/detail?id=42

(No comment was entered for this change.)

fabr...@googlecode.com

unread,
Mar 12, 2014, 5:38:04 PM3/12/14
to fabrica...@googlegroups.com

Comment #2 on issue 42 by BeChris1...@gmail.com: tar input files not noticed
http://code.google.com/p/fabricate/issues/detail?id=42

Hello, very good and promising tool.

I tried to fix this issue.
Check attached patch.

Attachments:
0001-Take-into-account-new-system-calls.patch 3.1 KB

Simon Alford

unread,
Mar 13, 2014, 9:37:36 AM3/13/14
to fabrica...@googlegroups.com
Thanks pjz,

I will take a look at the patch and try and merge it into the release version of fabricate.

Simon.


You received this message because you are subscribed to the Google Groups "fabricate users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabricate-users+unsubscribe@googlegroups.com.
To post to this group, send email to fabricate-users@googlegroups.com.
Visit this group at http://groups.google.com/group/fabricate-users.
For more options, visit https://groups.google.com/d/optout.

Simon Alford

unread,
Mar 13, 2014, 1:11:52 PM3/13/14
to fabrica...@googlegroups.com
Sorry I gave credit to the wrong person their. Got confused in the email thread. 

Thanks for the patch BeChris1, I am taking a look now.

fabr...@googlecode.com

unread,
Mar 13, 2014, 1:32:17 PM3/13/14
to fabrica...@googlegroups.com

Comment #3 on issue 42 by simon.al...@gmail.com: tar input files not noticed
http://code.google.com/p/fabricate/issues/detail?id=42

I have taken a look at the patch, and it looks good as a partial fix.

If I understand it correctly it will only match openat and statat calls if
the special file handle AT_FDCWD is used. So it will only work if the call
is going to use the CWD. This is good, because we track the CWD. The
downside is that it will still fail to match any calls that specify a
directory by file handle. To correctly observe those calls would require
tracking open file handles. It remains to be seen how many programs
actually use that functionality, so it may be better to open a new bug for
that feature.

The only other shortcoming is some other xxxat calls are missing (e.g.
mkdirat)

I will merge it into fabricate.py as a partial fix, as it is certainly an
improvement over what we have currently.
Reply all
Reply to author
Forward
0 new messages