aboutsummaryrefslogtreecommitdiffstats
path: root/ChangeLog.txt
AgeCommit message (Collapse)Author
2011-01-14Automatically create state/prefix directoriesPeter Seebach
It'd be handy for the WR build system if new state directories could be created as needed. It is made so. And to answer the first question everyone, including me, has on reading this: You can't do system("mkdir -p ...") because the invoked shell would need to run under pseudo, so it'd have to check for a server, and...
2011-01-13ChangeLog for previous fixPeter Seebach
2010-12-17When pseudo is disabled avoid directory processing...Mark Hatle
When pseudo is disabled, we skip a bunch of the prefix, localstate, etc processing. This allows pseudo to run with a directory that does not yet exist. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-16The maketables thing made it possible for some modules to get builtPeter Seebach
before pseudo_tables.h existed. Fixed.
2010-12-16update docs to eliminate claims that we don't have chrootPeter Seebach
2010-12-16Change the file journal from PERSIST to OFFMark Hatle
Changing the file journal to OFF, this makes things a bit more susceptible to failure in cases where pseudo crashes or the system crashes.. however, this is believed to be unlikely. Timing: Before: real 6m42.093s user 0m34.321s sys 2m46.086s (with journal set to MEMORY) real 6m33.037s user 0m33.133s sys 2m48.668s After (journal set to OFF) real 6m17.313s user 0m32.757s sys 2m47.654s Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-16Optimize the sql database indexes differently...Mark Hatle
We change the index from simply "path" to "path, dev, ino". This allows for slightly faster searches for the exact file information, and does not cause any penalty for a simple "path" based search. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-16Add a cache of the last object found in pseudo_opMark Hatle
Add a cache of the last object found in pseudo_op. Profiling has indiciated that many operations come in clusters. So instead of doing select, operation for each item in the cluster, we check to see if we already know the item and perform the op.. Performance improvement when processing 500k or so files: Previous: real 7m11.778s user 0m35.929s sys 2m46.723s This commit: real 6m42.093s user 0m34.321s sys 2m46.086s Also validation of the component can be added by compiling with NVALIDATE. This verifies the result of the cache is the same as what would have come from the database. Differences are logged to the standard pseudo.log. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-16Restructure the pseudo_op file identificationMark Hatle
We restructure the pseudo_op file identification, which involves a fairly significant performance increase. The old method would do: if pdb_find_file_path: found_path = 1; if found_path && pdb_find_file_exact: found_ino = 1; else if pdb_find_file_dev: found_ino = 1; This resulted in at least two select calls for each file. One for "path" and one for exact or dev. The new method instead does: if pdb_find_file_exact: found_path = 1; found_ino = 1; else if pdb_find_file_path: found_path = 1; if pdb_find_file_dev: found_ino = 1; This shrinks the number of selects to either one or three. Potentially cutting the number of selects in half -- or increasing the number to three on an empty set... (Profiling has shown this is a net win) Timing numbers when manipulating a large number (500k) of files in a ramdisk: real 7m48.354s user 0m32.895s sys 2m50.274s After this change: real 7m11.778s user 0m35.929s sys 2m46.723s Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-16Add sqlite call profilingMark Hatle
Add sqlite call profiling, this allows us to see the sqlite calls that are being made as the system runs, via the pseudo log. It was noted that by this profiling that a small change to pseudo.c, when a file was found, reduced the sqlite SELECT calls by about 1/3. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-16Restructure wrapfuncs.cMark Hatle
Restructure wrapfuncs.c in an attempt to improve PSEUDO_DISABLED=1 performance. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-13Further amend the system to enable/disable sudo during fork/exec.Mark Hatle
2010-12-09: * (mhatle) Add doc/program_flow to attempt to explain startup/running * (mhatle) guts/* minor cleanup * (mhatle) Reorganize into a new constructor for libpseudo ONLY pseudo main() now manually calls the util init new / revised init for client, wrappers and utils * (mhatle) Add central "reinit" function * (mhatle) Add manul execv* functions * (mhatle) rename pseudo_populate_wrappers to pseudo_check_wrappers Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-132010-12-08:Mark Hatle
* (mhatle) Add guts/clone.c to cleanup the clone support * (mhatle) guts/clone.c only run setupenv and reinit when NOT PSEUDO_RELOADED * (mhatle) guts/execve.c whitespace fixe * (mhatle) guts/fork.c similar to guts/clone.c change * (mhatle) pseudo_client.c add reinit function * (mhatle) pseudo_client.c revise client reset, include code from pseudo_wrappers.c * (mhatle) pseudo_server.c move the pid writing to the parent * (mhatle) pseudo_wrappers.c clone cleanup and populate cleanup Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-12-07This is a merge of several commits from a tree which turned out toPeter Seebach
be out of sync in a very inconvenient way. Changes include: * Some whitespace fixes, also move the pseudo_variables definition into pseudo_util.c since it's not used anywhere else. * Further improvements in the fork() support: We now recognize both positive and negative forms of PSEUDO_DISABLED, so we can distinguish between "it was removed from the environment by env -i" (restore the old value) and "it was intentionally turned off" (the new value wins). * clone(2) support. This is a little primitive, and programs might still fail horribly due to clone's semantics, but at least it's there and passes easy test cases. Plus a big patch from Mark Hatle: Cleanup fork/clone and PSEUDO_DISABLED guts/fork.c: * cleanup function and make it more robust * be sure to call pseudo_setupenv prior to pseudo_client_reset to match exec behavior pseudo_wrappers.c: * fix mismatched type in execl_to_v call via typecast * Simplify fork call via single call to wrap_fork() * be sure to save pseudo_disabled * be sure to call pseudo_setupenv prior to pseudo_client_reset to match exec behavior tests: * Add a test of whether pseudo can be disabled/enabled on a fork. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-11-18Messing with makewrappers: Move templating code out (for planned usePeter Seebach
in an incoming "maketables".)
2010-11-17Add "Futures.txt" for notes about planned work.Peter Seebach
2010-11-17First pass of some cleanups -- support moving a tracked directory fromPeter Seebach
one device to another, for instance.
2010-10-25Clean up makewrappers a bit.Peter Seebach
2010-10-12Remove tabs from makewrappers.Peter Seebach
2010-10-12Was missing copyright in new makewrappers.Peter Seebach
2010-10-11Major change: Replace the shell-based makewrappers with a PythonPeter Seebach
one. There's a long story here, but to abbreviate it: The shell script was annoying at best to maintain and starting to show signs of not really being the right tool for the job. For various reasons, we have some other Python stuff in our build system, so we picked Python as the language we were already using for other stuff. We think this works with anything reasonably recent (around Python 2.4 through 2.6). There's a little bit of cleanup, also, of the wrapper templates.
2010-10-11Add the other *xattr() wrappers (all ENOTSUP) for consistency.Peter Seebach
Note that this replaces an existing getxattr() wrapper which canonicalized pathnames for use in a chroot() environment. The need for that to work in some possible future may require us to revisit this.
2010-10-06Add the fsetxattr wrapper to return ENOTSUPMark Hatle
Current versions of gnu coreutils 'cp' were attempting to set permissions using fsetxattr. As a workaround, we need to return ENOTSUP so that it falls back to using fchmod, which pseudo does know how to wrap. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-16The exec*() functions were inconsistent about the name of their firstPeter Seebach
argument -- which turns out to be a problem, as this controls the canonicalization. The upshot is that some invocations of symlinks were corrupting $0.
2010-09-15In the WR Linux build system, we build host tools (including pseudo)Peter Seebach
in one place, but then often reuse them in other project directories. As a result, the --with-sqlite path is no longer the right path to use for RPATH later in the program's life. In the past, we were using chrpath to change the path to something more suitable, but this doesn't work if the new path is longer. Instead, allow an explicit --with-rpath setting which our build system can use. The logic is: * If you don't specify --with-sqlite or --with-rpath, you get no -Wl,-R * If you specify an empty path in --with-rpath, or --without-rpath, you get no -Wl,-R * If you specify --with-rpath with a non-empty path, you get -Wl,-R<path> * If you specify --with-sqlite, but not --with-rpath, you get -Wl,-R$(SQLITE)/lib
2010-09-08Fix mkfifoat() to not always failPeter Seebach
mknodat() uses a dev_t * argument, not a dev_t argument, so the 0 passed into wrap___xmknodat() by wrap_mkfifoat() is an invalid argument rather than an unused but valid zero. Change mkfifoat to create a dummy dev_t and pass its address.
2010-09-02Add -Wl,-R$(SQLITE)/lib so we can find libsqlite3 if it wasn'tPeter Seebach
in the default location.
2010-09-02Wait, the man page says we give ERANGE for that, not ENAMETOOLONG.Peter Seebach
... Also, make that error message a debugging message, since that's a normal and legitimate use case.
2010-09-01A couple more int/size_t mismatch fixes.Peter Seebach
2010-08-31Fix an error message which was mostly-harmless but still clearly aPeter Seebach
flaw in the code. Yes, Virginia, your printf arguments must match their format strings, and size_t is not the same thing as int.
2010-08-27We got bitten AGAIN by hard-coded lengths in memcmp, so we've swappedPeter Seebach
that for a macro that does it correctly. Why not just use strcmp, you ask? Because we aren't doing a string compare, we're looking for a prefix.
2010-08-26The logic for updating LD_LIBRARY_PATH had a bug; if you hadseebs
an LD_LIBRARY_PATH that included the pseudo library directory and some other directories, the other directories would get wiped out. Also a couple of whitespace rationalizatoins.
2010-08-26While looking at a possible 64/32-bit clash (there wasn't one afterseebs
all) noticed, that offsets.c was busted. Fixed.
2010-08-26Almost had it! The problem is that because the save ofseebs
pseudo_saved_sigmask occurred outside of the check against antimagic, calls to wrapped functions made by the internals of a wrapper resulted on overwriting pseudo_saved_sigmask, so we restored the already-blocked sigmask. This could result in programs getting their sigmask permanently changed to block various signals, most crucially SIGCHLD. We now stash the value immediately before calling a wrapper, and never stash it if we're not calling a wrapper. Now the anti-magic stuff happening inside wrappers isn't trashing the signal mask. YAY!
2010-08-25Initial attempt at fixing problems with SIGCHLD being blockedseebs
in processes started under pseudo.
2010-08-20Handle insane boundary condition for regcomp()/regexec()seebs
For reasons that may never be known, the /usr/bin/find on RHEL5 contains its own local copies of regcomp() and regexec(). Thus, when pseudo makes calls to these functions, it gets the local copies in the binary instead of the ones in libc. But wait! That's not all. There's also the fascinating detail that, for reasons unknown, these local copies have an incompatible API, such that: regexec(pattern, list, 1, pmatch, 0); can write to more than one element of pmatch, and since that's a local array of one member, that means that they can crush something on the stack, such that a couple of function calls later you get a segfault in Nothing In Particular. So. We try to grab the real regcomp/regexec from libc, using dlsym, and if we can't, we fall back on whatever the defaults were. Inexplicably, this code actually made pseudo crash less often on at least one target. This is madness within madness, and I really have no idea why on earth /usr/bin/find, on a Linux system, would have its own local copies of regcomp/regexec, let alone why it would have copies that had substantially different semantics.
2010-08-17Draft one effort at making unlink more robust and fixing an obviousseebs
bug in the speculative-unlink operation. The intent is to mark and then confirm or cancel the delete. This removes the quirk where we tried to stash old database entries, which didn't handle directories anyway; "rmdir non-empty-directory" is a bit too common a case to dismiss as unthinkable.
2010-08-16A few minor fixes:seebs
Fixed a couple of allocation issues, corrected an off-by-one error in environment setup.
2010-08-16Fix ld_preload/ld_library_path mixupMark Hatle
Fix an obvious ld_preload/ld_library_path mixup in pseudo_util.c Signed-off-by: Richard Purdie <richard.purdie@intel.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-08-12Whoops, const really does mean read-only on some targets.seebs
2010-08-12Fix for libpseudo.so when using $(SUFFIX), correct a note in guts/README.seebs
2010-08-11Document new variables.Peter Seebach
2010-08-11Enable local variable cacheMark Hatle
Add local variable cache via get_value and set_value. The local cache is setup at constructor time (or soon after). Rewrite the pseudo_setupenv and pseudo_dropenv routines, add a new pseudo_setupenvp and pseudo_dropenvp as well to handle the execve cases. We can now successfully use /usr/bin/env -i env and get pseudo values back!
2010-08-11Enable execl, execle, execlp, execv, and execvp wrappersMark Hatle
We wrap all of the execs so that we can ensure the environment is properly configured prior to the exec running. handle ... for the new execl* wrappers Add a test for the new execl* ... handling.
2010-08-06Fix an exec program with an empty environmentMark Hatle
If the environment has been cleared (in an execve for instance), we need to seed the environment with the PSEUDO_PREFIX, PSEUDO_BINDIR, PSEUDO_LIBDIR, and PSEUDO_LOCALSTATEDIR values.
2010-08-04Add new environment values to allow easy override of default locationsMark Hatle
Add PSEUDO_BINDIR, PSEUDO_LIBDIR, and PSEUDO_LOCALSTATEDIR to allow for more easy customization of PSEUDO components at run-time. If these are not set they will be automatically generated based on the existing PSEUDO_PREFIX path. PSEUDO_BINDIR = PSEUDO_PREFIX /bin PSEUDO_LIBDIR = PSEUDO_PREFIX /lib PSEUDO_LOCALSTATEDIR = PSEUDO_PREFIX /var/pseudo Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-08-04Allow CFLAGS to be set in the environment.Mark Hatle
CFLAGS is set by many autobuilder systems. In these environments we may need both the internal flags pseudo expects and the autobuilder flags. Adjust the Makefile accordingly. Based on code from Richard Purdie 2010-03-18 in Poky Linux. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-08-04Fix parallel buildsMark Hatle
Add a missing dependency from pseudo_wrapfuncs.h to wrappers. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-07-30Update the changelog.Konrad Scherer
2010-06-29Whoops, remove a couple of extra debugging messages.Peter Seebach