This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH RFC] fork: reduce chances for "address space is already occupied" errors


On 3/28/19 4:19 PM, Brian Inglis wrote:
> On 2019-03-28 08:59, Michael Haubenwallner wrote:
>> On 3/27/19 8:59 PM, Achim Gratz wrote:
>>> Michael Haubenwallner writes:
>>>> As far as I understand, rebasing is about touching already installed
>>>> dlls as well, which would require to restart all Cygwin processes.
>>>> As the problem is about some dll built during a larger build job,
>>>> this is not something that feels useful to me.
>>>
>>> That's exactly why I introduced the "--oblivious" option several years
>>> ago.  It'll let you rebase a set of DLL while benefitting from the
>>> rebase database, but not recording them there, so if you later install
>>> them properly there will be no collision.  I needed this for testing
>>> newly compiled Perl XS modules, but you seem to have a similar use case.
>>
>> What I can see so far is that right now there is only one single rebase
>> database, in /etc/rebase.db.<arch>.
>>
>> However, my 'installed' dlls are not put into /bin, but into the so called
>> Gentoo "Prefix", e.g. /home/haubi/test-20190327/gentoo-prefix/usr/bin for
>> example.  Remember that there can be multiple independent instances of Gentoo
>> Prefix, so recording them all into the host /etc/rebase.db is not an option.
>>
>> Hence there should be a rebase database per Gentoo Prefix instance, like
>> /home/haubi/test-20190327/gentoo-prefix/etc/rebase.db.<arch>, to record
>> my 'installed' dlls, while still loading the /etc/rebase.db.<arch> to avoid
>> conflicts with cygwin provided dlls.
>>
>> And how would one explicitly remove specific entries from the rebase database
>> when dlls get uninstalled (by either package remove or package upgrade)?
> 
> Using rebase -O, --oblivious with -T, --filelist local-test-rebase-db gives you
> your own local test rebase db - just add all your test dlls into it (sort -u to
> eliminate dups).

Sounds interesting... but something I must be doing wrong here:


$ rebase --oblivious --filelist=my-dlls.txt local-test-rebase-db
local-test-rebase-db: skipped because nonexistent.

$ touch local-test-rebase-db

$ rebase --oblivious --filelist=my-dlls.txt local-test-rebase-db
local-test-rebase-db: skipped because not rebaseable

$ cp /etc/rebase.db.x86_64 local-test-rebase-db

$ rebase --oblivious --filelist=my-dlls.txt local-test-rebase-db
local-test-rebase-db: skipped because not rebaseable


It doesn't want to create or update the local-test-rebase-db file...

Thanks!
/haubi/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]